MolecularAI / aizynthtrain

Tools to train synthesis prediction models
Apache License 2.0
21 stars 7 forks source link

pydantic gone from dependencies #11

Closed j3mdamas closed 6 months ago

j3mdamas commented 6 months ago
> python -m aizynthtrain.pipelines.template_pipeline run --config template_pipeline_config.yml --max-workers 1 --max-num-splits 1
Traceback (most recent call last):
  File "/progs/all/opensource/python/3.10.13/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/progs/all/opensource/python/3.10.13/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tmp/aizynth/aizynthtrain/aizynthtrain/aizynthtrain/pipelines/template_pipeline.py", line 8, in <module>
    from aizynthtrain.utils.configs import (
  File "/tmp/aizynth/aizynthtrain/aizynthtrain/aizynthtrain/utils/configs.py", line 6, in <module>
    from pydantic import BaseModel, Field
ModuleNotFoundError: No module named 'pydantic'

I see from https://github.com/MolecularAI/aizynthtrain/commit/0fef1202d4bd407d6ff79894b577af0400680052#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L16 that pydantic was removed from the dependencies, but it's still used in the code: https://github.com/MolecularAI/aizynthtrain/blob/d662a908653116dd3040866b8e4ee78432836e5b/aizynthtrain/utils/configs.py#L6

As expected, installing pydantic fixes the error.

SGenheden commented 6 months ago

Thanks for bring this to our attention. It was due to a missing aizynthfinder extra dependency.