Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install does not include utils/data directory #8

Open
puehringer opened this issue Jun 6, 2021 · 2 comments
Open

pip install does not include utils/data directory #8

puehringer opened this issue Jun 6, 2021 · 2 comments

Comments

@puehringer
Copy link

Description

The project does not include a MANIFEST.in file, which causes pip install . to not include the utils/data/elements.txt in the install directory.
This causes an FileNotFoundError: [Errno 2] File /opt/conda/envs/api/lib/python3.7/site-packages/molbert/utils/featurizer/../data/elements.txt does not exist: '/opt/conda/envs/api/lib/python3.7/site-packages/molbert/utils/featurizer/../data/elements.txt' error when using the MolBertFeaturizer.

Solution

Add a MANIFEST.in file with the following entry:

recursive-include molbert/utils/data *
@bfabiandev
Copy link
Collaborator

Hey, thanks for raising the issue. Could you add more details so that I can reproduce this? I was able to run scripts/featurize.py with the pre-trained model on a completely new installation (following the README) without any issues. Cheers, Beni

@puehringer
Copy link
Author

Hi Beni, I found the issue when installing it via pip in a docker container. What happens is that pip clones the repository and executes the install (via the setup.py). The cloned repository is discarded, only the installed source survives in the install path (/opt/conda/envs/api/lib/python3.7/site-packages/molbert for example). But because the assets are not included in the MANIFEST, they are not copied to this directory.
You can check this by installing it via
pip install git+https://github.com/BenevolentAI/MolBERT.git and then check the install path, you will see that it doesn't include the required assets (or it does and I messed up 😅).
Let me know if you need anything else, and thanks for the response!
Best,
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants