Closed davidhoover closed 8 months ago
Hi!
So sorry about this, we've been playing around a bit with the install script. Could you try running the following command, while the model_angelo
conda environment is activated?
pip install -e --force-reinstall git+https://github.com/3dem/model-angelo.git
Sorry, that didn't help. I still get errors.
What are the errors? Does it fix it if you do
pip install -e --force-reinstall git+https://github.com/3dem/model-angelo.git#egg=model-angelo
instead?
I just reran the installation, and it seems like the latest git repository has changed. I'm seeing a different error:
Successfully installed biopython-1.81 contourpy-1.1.1 cycler-0.11.0 einops-0.6.1 fair-esm-2.0.0 fonttools-4.42.1 kiwisolver-1.4.5 loguru-0.7.2 matplotlib-3.8.0 model-angelo-1.0.3 mrcfile-1.4.3 numpy-1.26.0 packaging-23.1 pandas-2.1.1 pillow-10.0.1 psutil-5.9.5 pyhmmer-0.10.2 pyparsing-3.1.1 python-dateutil-2.8.2 pytz-2023.3.post1 scipy-1.11.2 six-1.16.0 tqdm-4.66.1 tzdata-2023.3
Writing weights to /lscratch/9144866/model_angelo_weights
Traceback (most recent call last):
File "/lscratch/9144866/mamba/envs/model_angelo/bin/model_angelo", line 33, in <module>
sys.exit(load_entry_point('model-angelo', 'console_scripts', 'model_angelo')())
File "/lscratch/9144866/git/model-angelo/model_angelo/__main__.py", line 22, in main
import model_angelo.apps.build
File "/lscratch/9144866/git/model-angelo/model_angelo/apps/build.py", line 23, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
Traceback (most recent call last):
File "/lscratch/9144866/mamba/envs/model_angelo/bin/model_angelo", line 33, in <module>
sys.exit(load_entry_point('model-angelo', 'console_scripts', 'model_angelo')())
File "/lscratch/9144866/git/model-angelo/model_angelo/__main__.py", line 22, in main
import model_angelo.apps.build
File "/lscratch/9144866/git/model-angelo/model_angelo/apps/build.py", line 23, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
Trying your suggestion, I get this error:
$ pip install -e --force-reinstall git+https://github.com/3dem/model-angelo.git#egg=model-angelo
ERROR: --force-reinstall is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).
Rearranging the command, it seemed to work:
pip install --force-reinstall -e git+https://github.com/3dem/model-angelo.git#egg=model-angelo
But it didn't seem to download the weights files.
Ok, thank you so much for your patience. If you pull the latest code from the repository, and re-run the install script, all things including the weight download should work.
Please let me know if there are issues
The installation run successfully for version 1.0.4 but not 1.0.3. This are the installation commands, which I used:
VERSION=1.0.4
URL='https://github.com/3dem/model-angelo'
TMPDIR=$(mktemp -d)
pushd $TMPDIR
git clone --depth 1 --branch v$VERSION -q $URL model-angelo
pushd model-angelo
TORCH_HOME=/scratch/mirror/modelangelo/$VERSION
mkdir -p $TORCH_HOME
sed -i "s/ -n model_angelo/ -n modelangelo-$VERSION/" install_script.sh
sed -i "s/model_angelo$/modelangelo-$VERSION/" install_script.sh
sed -i "s/model_angelo\"/modelangelo-$VERSION\"/" install_script.sh
source install_script.sh --download-weights
popd
It would be nice to be able to chose a name for the conda environment via a flag: e.g. -n
or --name
Unfortunately, the installation does not work for a central installation on a shared computational resource. When I try to activate the environment as a regular user, this is what I get:
[jowodo@login02 ~]$ conda activate modelangelo-1.0.4
[jowodo@login02 ~]$ echo $CONDA_DEFAULT_ENV
modelangelo-1.0.4
[jowodo@login02 ~]$ model_angelo -h
File "/home/apps/conda/miniconda3/envs/modelangelo-1.0.4/bin/model_angelo", line 33, in <module>
sys.exit(load_entry_point('model-angelo', 'console_scripts', 'model_angelo')())
File "/home/apps/conda/miniconda3/envs/modelangelo-1.0.4/bin/model_angelo", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/home/apps/conda/miniconda3/envs/modelangelo-1.0.4/lib/python3.10/importlib/metadata/__init__.py", line 969, in distribution
return Distribution.from_name(distribution_name)
File "/home/apps/conda/miniconda3/envs/modelangelo-1.0.4/lib/python3.10/importlib/metadata/__init__.py", line 548, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for model-angelo
[jowodo@login02 ~]$ ls -l $CONDA_PREFIX/lib/python3.10/site-packages/model*
-rw-r--r-- 1 appadmin admin 34 Sep 29 12:31 /home/apps/conda/miniconda3/envs/modelangelo-1.0.4/lib/python3.10/site-packages/model-angelo.egg-link
Additionally, the models are not stored in $TORCH_HOME
:
[appadmin@login02 ~]$ ls $TORCH_HOME -la
total 1
drwxr-sr-x 2 appadmin appadmin 0 Sep 29 12:29 .
drwxrwsr-x 3 dataadmin appadmin 1 Sep 29 12:29 ..
[appadmin@login02 ~]$ ls ~/.cache/torch/hub/checkpoints/model_angelo_v1.0/
nucleotides nucleotides_no_seq
[appadmin@login02 ~]$
Hi @jowodo ,
Yes, ModelAngelo-1.0.3 had installation issues. You're able to get 1.0.4 to install? Do you also have issues with the weights in 1.0.4, or is that just for 1.0.3?
Just to finish this, version 1.0.5 installed without errors. Nice!
I followed the directions for installing v1.0.3, but got these errors:
It also complained bitterly about using
python setup.py install
, but I believe these are just warnings.