MolecularAI / aizynthtrain

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

template extraction issue #9

Closed steveowk closed 5 months ago

steveowk commented 8 months ago

Hi, Seeking help with an issue on template extraction (step 4). A key seems to be missing from a dict. (see the attached) error

Been able to generate the uspto mapped csv successfully.

Thanks.

SGenheden commented 8 months ago

Hello. This action, the "hasunmappedradicalatom" was introduce in rxnutils 1.2. Could it be that you have an old version rxnutils installed in your environment? Could try to do "pip install -U reaction-utils"?

steveowk commented 8 months ago

Hello

Thanks for the response. After the update, the error is not there. However, the template extraction pipeline still fails (while executing template_pipeline.sh)

error2

SGenheden commented 8 months ago

Did you install a Jupyter kernel? ipython kernel install --name "aizynthtrain" --user

steveowk commented 8 months ago

Hello

Yes.

I have rerun the train env set-up but have the same error.

SGenheden commented 7 months ago

I find this very peculiar. We just pushed a new version. Could you try and re-install (or at least git pull + poetry update)?

JeremyMolineau commented 6 months ago

Hello, I'm having the same problem with kernelspec. After following your suggestions (git pull & poetry update), no improvement. I tried to specify the python_kernel in aizynthtrain/utils/configs.py in class TemplatePipelineConfig(BaseModel): like this python_kernel: str = "aizynthtrain" --> no improvement.

A check with the command (jupyter kernelspec list) showed me that the kernel exists. output = aizynthtrain /home/.local/share/jupyter/kernels/aizynthtrain

SGenheden commented 6 months ago

Hello. We encountered the same issue with our internal setup, and we found a solution. It is not elegant but it works for now The thing is that is requires a new feature in the papermill package that has not been released, but this worked for us

conda activate aizynthtrain
python -m pip uninstall papermill
python -m pip install git+https://github.com/nteract/papermill.git
JeremyMolineau commented 6 months ago

Thank you, this problem is solved on my side.