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

Successful environment setup #57

Open
CownowAn opened this issue Apr 4, 2024 · 5 comments
Open

Successful environment setup #57

CownowAn opened this issue Apr 4, 2024 · 5 comments

Comments

@CownowAn
Copy link

CownowAn commented Apr 4, 2024

I've made several attempts at setting up the environment, and when I followed these steps, the code ran successfully.
I'm sharing this to help others who might encounter similar issues.

First of all, the content of the "env_copy.yml" file is as follows:

channels:
- pytorch
- conda-forge
- defaults
- pyg
dependencies:
- ase=3.22
- autopep8
- cudatoolkit=10.2
- jupyterlab
- matminer=0.7.3
- matplotlib
- nglview
- pip
- pyg=2.0.1
- ipywidgets
- pylint
- pymatgen==2023.8.10
- python=3.8.13
- pytorch-lightning=1.3.8
- pytorch=1.9.0
- seaborn
- tqdm
- pip:
  - hydra-core==1.1.0
  - hydra-joblib-launcher==1.1.5
  - p-tqdm==1.3.3
  - pytest
  - python-dotenv
  - smact==2.2.1
  - streamlit==0.79.0
  - wandb==0.10.33
name: cdvae_copy

Save the above content to the "env_copy.yml" file and then execute the following.

conda env create -f env_copy.yml
conda activate cdvae_copy

If you encounter the error

ImportError: cannot import name 'get_num_classes' from 'torchmetrics.utilities.data'

, then try the following steps:

pip uninstall torchmetrics==0.9.0.dev0
pip install torchmetrics==0.5

If you encounter the error

AttributionError: module 'distutils' has no attribute 'version'

, then try:
pip install setuptools==59.5.0

@ejansen927
Copy link

Thanks a lot. Spent a while working on this. Here is your changes but modified for CPU use.

channels:
  - pytorch
  - conda-forge
  - defaults
  - pyg

dependencies:
  - ase=3.22
  - autopep8
  - cpuonly  
  - jupyterlab
  - matminer=0.7.3
  - matplotlib
  - nglview
  - pip
  - pyg=2.0.1
  - ipywidgets
  - pylint
  - pymatgen==2023.8.10  
  - python=3.8.13  
  - pytorch-lightning=1.3.8
  - pytorch=1.9.0  
  - seaborn
  - tqdm

  - pip:
      - hydra-core==1.1.0
      - hydra-joblib-launcher==1.1.5
      - p-tqdm==1.3.3
      - pytest
      - python-dotenv
      - smact==2.2.1
      - streamlit==0.79.0
      - wandb==0.10.33

name: cdvae_copy

@eshagupta01
Copy link

For CPU-only I'm getting an issue with the pyg package not being available in the channels. Do you know how to fix this? Thanks.

@ejansen927
Copy link

ejansen927 commented May 13, 2024 via email

@yuuhaixia
Copy link

@CownowAn
Thank you very much for the runtime environment, do you know how to fix the following error?

2024-05-13 21:24:38,353][hydra.utils][INFO] - Instantiating <cdvae.pl_data.data module.CrystDataModule>
Error executing job with overrides: ['data=perov', 'expname=perov']
Error locating target 'cdvae.pl_data.datamodule.CrystDataModule', set env var HY DRA_FULL_ERROR=1 to see chained exception.
full_key: data.datamodule

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

@eshagupta01
Copy link

eshagupta01 commented May 14, 2024 via email

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

No branches or pull requests

4 participants