-
Notifications
You must be signed in to change notification settings - Fork 94
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
Environment issues and some name inconsistency #2
Comments
Thanks for reaching out @YKQ98 For the first question, it seems the step 'solving environment' is taking a very long time. But I was able to successfully install the conda packages after waiting several hours. I don't know why it takes so long to solve the environment though.. For the crystvae, these are some leftovers from the refactoring and sorry about that. They should be resolved in #1. Let me know if you have more errors after pulling the latest commits. |
Thank you for the feedback! Actually I manually installed all the packages needed and the code works fine. |
Seems like a good use-case for |
A more useful error message produced by (base) PS C:\Users\sterg\Documents\GitHub\sgbaird-5DOF\cdvae> conda install -c conda-forge mamba
(base) PS C:\Users\sterg\Documents\GitHub\sgbaird-5DOF\cdvae> mamba env create -f env.yml
pkgs/main/win-64 No change
pytorch/noarch 5.4kB @ 7.2kB/s 0.8s
numba/noarch 589.0 B @ 602.0 B/s 0.2s
pyg/win-64 19.0kB @ 14.2kB/s 0.7s
pkgs/main/noarch No change
pkgs/msys2/noarch No change
pytorch/win-64 89.7kB @ 31.2kB/s 2.9s
bioconda/noarch 3.5MB @ 1.2MB/s 2.3s
sgbaird/win-64 143.0 B @ 43.0 B/s 0.5s
plotly/win-64 1.2kB @ 332.0 B/s 1.9s
pkgs/r/noarch No change
pkgs/msys2/win-64 No change
pyg/noarch 130.0 B @ 34.0 B/s 0.2snumba/win-64 148.9kB @ 36.3kB/s 0.8sconda-forge/noarch 8.4MB @ 2.0MB/s 4.9splotly/noarch 5.5kB @ 1.1kB/s 1.2sbioconda/win-64 122.0 B @ 25.0 B/s 0.8s
sgbaird/noarch 4.1kB @ 837.0 B/s 0.8s
pkgs/r/win-64 No change
conda-forge/win-64 15.1MB @ 2.4MB/s 7.5s
Looking for: ['ase=3.22', 'autopep8', 'cudatoolkit=10.2', 'jupyterlab', 'matminer=0.7.3', 'matplotlib', 'nglview]
Encountered problems while solving:
- nothing provides dscribe >=0.2.9 needed by matminer-0.7.3-pyhd8ed1ab_0 |
My attempt at a manual install: conda create -n cdvae python==3.9.*
conda activate cdvae
conda install -c pytorch -c conda-forge -c defaults -c pyg ase autopep8 cudatoolkit jupyterlab matminer matplotlib nglview pip pyg ipywidgets pylint pymatgen pytorch-lightning pytorch seaborn tqdm
pip install hydra-core hydra-joblib-launcher p-tqdm pytest python-dotenv smact streamlit wandb
pip install -e .
Also tried Lightning-AI/pytorch-lightning#7110 (comment): pip install hydra-core --upgrade
Same error. Tried installing with: mamba install -c conda-forge pytorch-lightning=1.5.10 Failed via mamba, possibly due to issue with mamba and WSL (it wasn't working before with using `mamba` instead of `conda` above)
(cdvae) sgbaird@Dell-G7:~/GitHub/sparks-baird/cdvae$ mamba install -c conda-forge pytorch-lightning=1.5.10
Trying: conda install -c conda-forge pytorch-lightning=1.5.10 and it took maybe a few minutes to solve. It seems to be loading the CIF files now. (~30 min to load ~30k CIF files from string representation, so saving the pymatgen |
So, first making sure that I'm actually in the WSL storage, the following seems to work: git clone https://github.com/txie-93/cdvae.git
cd cdvae
conda create -n cdvae python==3.9.*
conda activate cdvae
conda install -c pytorch -c conda-forge -c defaults -c pyg ase autopep8 cudatoolkit jupyterlab matminer matplotlib nglview pip pyg ipywidgets pylint pymatgen pytorch-lightning=1.5.10 pytorch seaborn tqdm
pip install hydra-core hydra-joblib-launcher p-tqdm pytest python-dotenv smact streamlit wandb
pip install -e .
I'm running this in debugging mode with VS Code. My
and just in case, also set it in a custom launch file: {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "CDVAE MP-20",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false,
"args": [
"data=mp_20",
"expname=mp_20"
],
"env": {
"PROJECT_ROOT": "/home/sgbaird/cdvae",
"HYDRA_JOBS": "/home/sgbaird/hydra",
"WABDB_DIR": "/home/sgbaird/wabdb"
}
}
]
} |
Still ran into an error eventually: Exception has occurred: InstantiationException (note: full exception trace is shown but execution is paused at: _run_module_as_main)
Error in call to target 'cdvae.pl_modules.model.CDVAE':
InstantiationException("Error in call to target 'cdvae.pl_modules.gnn.DimeNetPlusPlusWrap':\nRuntimeError('a leaf Variable that requires grad is being used in an in-place operation.')\nfull_key: encoder")
full_key: model
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 92, in _call_target
return _target_(*args, **kwargs)
File "/home/sgbaird/cdvae/cdvae/pl_modules/gnn.py", line 327, in __init__
super(DimeNetPlusPlusWrap, self).__init__(
File "/home/sgbaird/cdvae/cdvae/pl_modules/gnn.py", line 223, in __init__
self.rbf = BesselBasisLayer(num_radial, cutoff, envelope_exponent)
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/torch_geometric/nn/models/dimenet.py", line 59, in __init__
self.reset_parameters()
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/torch_geometric/nn/models/dimenet.py", line 62, in reset_parameters
torch.arange(1, self.freq.numel() + 1, out=self.freq).mul_(PI)
The above exception was the direct cause of the following exception:
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 92, in _call_target
return _target_(*args, **kwargs)
File "/home/sgbaird/cdvae/cdvae/pl_modules/model.py", line 140, in __init__
self.encoder = hydra.utils.instantiate(
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 222, in instantiate
return instantiate_node(
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 339, in instantiate_node
return _call_target(_target_, partial, args, kwargs, full_key)
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 97, in _call_target
raise InstantiationException(msg) from e
The above exception was the direct cause of the following exception:
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 97, in _call_target
raise InstantiationException(msg) from e
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 339, in instantiate_node
return _call_target(_target_, partial, args, kwargs, full_key)
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 222, in instantiate
return instantiate_node(
File "/home/sgbaird/cdvae/cdvae/run.py", line 94, in run
model: pl.LightningModule = hydra.utils.instantiate(
File "/home/sgbaird/cdvae/cdvae/run.py", line 166, in main
run(cfg)
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/core/utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/core/utils.py", line 260, in return_value
raise self._return_value
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 132, in run
_ = ret.return_value
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/utils.py", line 453, in <lambda>
lambda: hydra.run(
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/utils.py", line 216, in run_and_report
raise ex
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/utils.py", line 216, in run_and_report
raise ex
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/utils.py", line 452, in _run_app
run_and_report(
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/_internal/utils.py", line 389, in _run_hydra
_run_app(
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/site-packages/hydra/main.py", line 90, in decorated_main
_run_hydra(
File "/home/sgbaird/cdvae/cdvae/run.py", line 170, in <module>
main()
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/runpy.py", line 268, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/sgbaird/miniconda3/envs/cdvae/lib/python3.9/runpy.py", line 197, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None, Seems related: https://discuss.pytorch.org/t/leaf-variable-was-used-in-an-inplace-operation/308 Not sure if there are notifications on the closed issue: @YKQ98 @txie-93 |
Dear authors,
Hi, when I install the environment by running 'conda env create -f env.yml', I got stuck in the 'solving environment' step of conda.
Could you check this step? I think something might be wrong here ~.
Also, there are some errors when I run the training code. Some places you name it cdvae but you use crystalvae to refer it in the pipeline.
The text was updated successfully, but these errors were encountered: