FAIR-Chem / fairchem

FAIR Chemistry's library of machine learning methods for chemistry
https://opencatalystproject.org/
Other
843 stars 251 forks source link

torch package issue #242

Closed superdavidxp closed 3 years ago

superdavidxp commented 3 years ago

Hi,

I tried to run the code with our IBM Power system and have some issue with torch_sparse package, would you please give me some advice?

Singularity> python main.py --mode train --config-yml configs/s2ef/200k/base.yml 
Traceback (most recent call last):
  File "main.py", line 18, in <module>
    from ocpmodels.common.utils import (
  File "/root/ocp/ocpmodels/common/utils.py", line 27, in <module>
    from torch_geometric.utils import remove_self_loops
  File "/opt/miniconda/lib/python3.7/site-packages/torch_geometric/__init__.py", line 5, in <module>
    import torch_geometric.data
  File "/opt/miniconda/lib/python3.7/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
    from .data import Data
  File "/opt/miniconda/lib/python3.7/site-packages/torch_geometric/data/data.py", line 8, in <module>
    from torch_sparse import coalesce, SparseTensor
  File "/opt/miniconda/lib/python3.7/site-packages/torch_sparse/__init__.py", line 15, in <module>
    f'{library}_{suffix}', [osp.dirname(__file__)]).origin)
AttributeError: 'NoneType' object has no attribute 'origin'

and my conda env list is

# packages in environment at /opt/miniconda:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
absl-py                   0.10.0                   pypi_0    pypi
alabaster                 0.7.12                     py_0    conda-forge
appdirs                   1.4.4                      py_0  
argon2-cffi               20.1.0           py37h7b6447c_1  
ase                       3.21.1             pyhd8ed1ab_0    conda-forge
asn1crypto                1.3.0                    py37_1  
async_generator           1.10             py37h28b3542_0  
attrs                     20.2.0                     py_0  
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0                      py_0  
basemap                   1.2.0            py37h705c2d8_0  
black                     21.5b0             pyhd8ed1ab_0    conda-forge
blas                      1.0                    openblas  
bleach                    3.2.1                      py_0  
bzip2                     1.0.8                h7b6447c_0  
ca-certificates           2020.12.5            h1084571_0    conda-forge
cachetools                4.1.1                    pypi_0    pypi
certifi                   2020.12.5        py37h35e4cab_1    conda-forge
cffi                      1.14.0           py37h2e261b9_0  
cfgv                      3.3.0                    pypi_0    pypi
chardet                   3.0.4                 py37_1003  
click                     8.0.1            py37h35e4cab_0    conda-forge
cloudpickle               1.6.0                    pypi_0    pypi
cmake                     3.14.0               h52cb24c_0  
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
conda                     4.10.1           py37h35e4cab_0    conda-forge
conda-merge               0.1.5                      py_0    conda-forge
conda-package-handling    1.6.0            py37h7b6447c_0  
configparser              5.0.2                    pypi_0    pypi
cryptography              2.8              py37h1ba5d50_0  
cudatoolkit               11.0.221             h6bb024c_0  
cycler                    0.10.0                   py37_0  
cython                    0.29.21          py37h29c3540_0  
dataclasses               0.6                      pypi_0    pypi
decorator                 4.4.2                      py_0  
dedent                    0.5                      pypi_0    pypi
defusedxml                0.6.0                      py_0  
demjson                   2.2.4              pyh9f0ad1d_0    conda-forge
distlib                   0.3.1                    py37_0  
docker-pycreds            0.4.0                    pypi_0    pypi
docutils                  0.16                     pypi_0    pypi
entrypoints               0.3                      py37_0  
expat                     2.2.10               he6710b0_2  
filelock                  3.0.12                     py_0  
flask                     1.1.2              pyh9f0ad1d_0    conda-forge
freetype                  2.10.4               h5ab3b9f_0  
fsspec                    0.8.4                    pypi_0    pypi
future                    0.18.2                   py37_1  
geos                      3.6.2                hf484d3e_2  
gitdb                     4.0.7                    pypi_0    pypi
gitpython                 3.1.17                   pypi_0    pypi
gmp                       6.1.2                h7f7056e_2  
google-auth               1.22.1                   pypi_0    pypi
google-auth-oauthlib      0.4.1                    pypi_0    pypi
googledrivedownloader     0.4                      pypi_0    pypi
grpcio                    1.33.1                   pypi_0    pypi
h5py                      2.10.0           py37h7918eee_0  
hdf5                      1.10.4               hb1b8bf9_0  
hypothesis                5.37.4                     py_0  
identify                  2.2.5                    pypi_0    pypi
idna                      2.8                      py37_0  
imagesize                 1.2.0                      py_0    conda-forge
importlib-metadata        2.0.0                      py_1  
importlib_metadata        2.0.0                         1  
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
ipykernel                 5.3.4            py37h5ca1d4c_0  
ipython                   7.18.1           py37h5ca1d4c_0  
ipython_genutils          0.2.0              pyhd3eb1b0_1  
isodate                   0.6.0                    pypi_0    pypi
itsdangerous              2.0.1              pyhd8ed1ab_0    conda-forge
jedi                      0.17.2           py37h6ffa863_1  
jinja2                    2.11.2                     py_0  
joblib                    0.17.0                     py_0  
jpeg                      9b                   hcb7ba68_2  
json5                     0.9.5                      py_0  
jsonschema                3.2.0                      py_2  
jupyter_client            6.1.7                      py_0  
jupyter_core              4.6.1                    py37_0  
jupyterlab                2.2.6                      py_0  
jupyterlab_pygments       0.1.2                      py_0  
jupyterlab_server         1.2.0                      py_0  
kiwisolver                1.2.0            py37hfd86e86_0  
krb5                      1.18.2               h597af5e_0  
lcms2                     2.11                 h396b838_0  
ld_impl_linux-ppc64le     2.33.1               h0f24833_7  
libcurl                   7.71.1               h20c2e04_1  
libedit                   3.1.20191231         h14c3975_1  
libffi                    3.2.1             hf484d3e_1007  
libgcc-ng                 8.2.0                h822a55f_1  
libgfortran-ng            7.3.0                h822a55f_1  
libopenblas               0.3.10               h5a2b251_0  
libpng                    1.6.37               hbc83047_0  
libsodium                 1.0.18               h7b6447c_0  
libssh2                   1.9.0                h1ba5d50_1  
libstdcxx-ng              8.2.0                h822a55f_1  
libtiff                   4.1.0                h2733197_0  
llvmlite                  0.36.0           py37hf484d3e_0    numba
lmdb                      0.9.29               h29c3540_0  
markdown                  3.3.2                    pypi_0    pypi
markupsafe                1.1.1            py37h7b6447c_0  
matplotlib                3.3.2                h6ffa863_0  
matplotlib-base           3.3.2            py37h76a9e4f_0  
mistune                   0.8.4            py37h7b6447c_0  
monty                     2021.5.9                 pypi_0    pypi
more-itertools            8.8.0              pyhd8ed1ab_0    conda-forge
mpi                       1.0                     openmpi  
mpmath                    1.2.1                    pypi_0    pypi
mypy_extensions           0.4.3            py37h35e4cab_3    conda-forge
nbclient                  0.5.1                      py_0  
nbconvert                 6.0.7                    py37_0  
nbformat                  5.0.8                      py_0  
nbsphinx                  0.8.5              pyhd8ed1ab_1    conda-forge
ncurses                   6.2                  he6710b0_1  
nest-asyncio              1.4.1                      py_0  
networkx                  2.5.1                    pypi_0    pypi
ninja                     1.10.1           py37hfd86e86_0  
nodeenv                   1.6.0                    pypi_0    pypi
notebook                  6.1.4                    py37_0  
numba                     0.53.1                   pypi_0    pypi
numpy                     1.20.3                   pypi_0    pypi
numpy-base                1.19.1           py37h75fe3a5_0  
oauthlib                  3.1.0                    pypi_0    pypi
olefile                   0.46                     py37_0  
openmpi                   4.0.2                hb1b8bf9_1  
openssl                   1.1.1g               h6eb9509_0    conda-forge
packaging                 20.4                       py_0  
palettable                3.3.0                    pypi_0    pypi
pandas                    1.1.3            py37hdf5156a_0  
pandoc                    2.0.0.1                       1  
pandocfilters             1.4.2                    py37_1  
parso                     0.7.0                      py_0  
pathspec                  0.8.1              pyhd3deb0d_0    conda-forge
pathtools                 0.1.2                    pypi_0    pypi
pexpect                   4.8.0              pyhd3eb1b0_3  
pickleshare               0.7.5           pyhd3eb1b0_1003  
pillow                    8.2.0            py37h3f95422_0  
pip                       21.1.2             pyhd8ed1ab_0    conda-forge
plotly                    4.14.3                   pypi_0    pypi
pluggy                    0.13.1           py37h35e4cab_4    conda-forge
pre-commit                2.13.0                   pypi_0    pypi
proj4                     5.2.0                he6710b0_1  
prometheus_client         0.8.0                      py_0  
promise                   2.3                      pypi_0    pypi
prompt-toolkit            3.0.8                      py_0  
protobuf                  3.13.0                   pypi_0    pypi
psutil                    5.8.0                    pypi_0    pypi
ptyprocess                0.6.0              pyhd3eb1b0_2  
py                        1.10.0             pyhd3deb0d_0    conda-forge
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pybind11                  2.5.0            py37hfd86e86_0  
pycosat                   0.6.3            py37h7b6447c_1  
pycparser                 2.19                     py37_0  
pygments                  2.7.1                      py_0  
pymatgen                  2022.0.8                 pypi_0    pypi
pyopenssl                 19.1.0                     py_1  
pyparsing                 2.4.7                      py_0  
pyproj                    1.9.6            py37h14380d9_0  
pyrsistent                0.17.3           py37h7b6447c_0  
pyshp                     2.1.3              pyh44b312d_0    conda-forge
pysocks                   1.7.1                    py37_1  
pytest                    6.2.4            py37h35e4cab_0    conda-forge
python                    3.7.6                h4134adf_2  
python-dateutil           2.8.1                      py_0  
python-louvain            0.15                     pypi_0    pypi
python_abi                3.7                     1_cp37m    conda-forge
pytorch-lightning         1.1.3                    pypi_0    pypi
pytz                      2020.1                     py_0  
pyyaml                    5.3.1            py37h7b6447c_0  
pyzmq                     19.0.2           py37he6710b0_1  
rdflib                    5.0.0                    pypi_0    pypi
readline                  7.0                  h7b6447c_5  
regex                     2021.4.4         py37h140841e_0  
requests                  2.22.0                   py37_1  
requests-oauthlib         1.3.0                    pypi_0    pypi
retrying                  1.3.3                    pypi_0    pypi
rhash                     1.4.0                h1ba5d50_0  
rsa                       4.6                      pypi_0    pypi
ruamel_yaml               0.15.87          py37h7b6447c_0  
scikit-learn              0.23.2           py37h0573a6f_0  
scipy                     1.5.2            py37habc2bb6_0  
send2trash                1.5.0              pyhd3eb1b0_1  
sentencepiece             0.1.94                   pypi_0    pypi
sentry-sdk                1.1.0                    pypi_0    pypi
setuptools                50.3.0           py37h7557452_1  
shortuuid                 1.0.1                    pypi_0    pypi
six                       1.14.0                   py37_0  
smmap                     4.0.0                    pypi_0    pypi
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.2.2                      py_0  
spglib                    1.16.1                   pypi_0    pypi
sphinx                    4.0.2              pyh6c4a22f_0    conda-forge
sphinx-rtd-theme          0.5.2                    pypi_0    pypi
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_0    conda-forge
sqlite                    3.31.1               h7b6447c_0  
submitit                  1.3.3                    pypi_0    pypi
subprocess32              3.5.4                    pypi_0    pypi
sympy                     1.8                      pypi_0    pypi
tabulate                  0.8.9                    pypi_0    pypi
tensorboard               2.3.0                    pypi_0    pypi
tensorboard-plugin-wit    1.7.0                    pypi_0    pypi
terminado                 0.9.1                    py37_0  
testpath                  0.4.4                      py_0  
threadpoolctl             2.1.0              pyh5ca1d4c_0  
tk                        8.6.8                hbc83047_0  
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
torch                     1.7.0a0                  pypi_0    pypi
torch-cluster             1.5.9                    pypi_0    pypi
torch-geometric           1.7.0                    pypi_0    pypi
torch-scatter             2.0.6                    pypi_0    pypi
torch-sparse              0.6.9                    pypi_0    pypi
torch-spline-conv         1.2.1                    pypi_0    pypi
torchaudio                0.7.0a0+a853dff          pypi_0    pypi
torchtext                 0.6.0                    pypi_0    pypi
torchvision               0.8.0a0+2f40a48          pypi_0    pypi
tornado                   6.0.4            py37h7b6447c_1  
tqdm                      4.60.0             pyhd8ed1ab_0    conda-forge
traitlets                 5.0.5                      py_0  
typed-ast                 1.4.2            py37h140841e_1  
typing                    3.7.4.3                  py37_0  
typing_extensions         3.7.4.3                    py_0  
uncertainties             3.1.5                    pypi_0    pypi
urllib3                   1.25.8                   py37_0  
virtualenv                20.0.35                  py37_0  
wandb                     0.10.30                  pypi_0    pypi
wcwidth                   0.2.5                      py_0  
webencodings              0.5.1                    py37_1  
werkzeug                  1.0.1                    pypi_0    pypi
wheel                     0.34.2                   py37_0  
xz                        5.2.4                h14c3975_4  
yaml                      0.1.7                h1bed415_2  
zeromq                    4.3.3                he6710b0_3  
zipp                      3.3.1                      py_0  
zlib                      1.2.11               h7b6447c_3  
zstd                      1.3.7                h0b5b093_0
abhshkdz commented 3 years ago

Going by this, could you try to make sure you don't have multiple versions of torch_sparse installed, and that the *.so files are getting created correctly?

superdavidxp commented 3 years ago

I don't think I have multiple versions of torch_parse, following is the info I gathered from our system, thank you for your advice in advance,

Singularity> ls /opt/miniconda/lib/python3.7/site-packages/torch_sparse/*.so -al
-rwxr-xr-x 1 root root 134296 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_convert_cpu.so
-rwxr-xr-x 1 root root 134240 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_diag_cpu.so
-rwxr-xr-x 1 root root 134288 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_metis_cpu.so
-rwxr-xr-x 1 root root 200752 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_relabel_cpu.so
-rwxr-xr-x 1 root root 134368 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_rw_cpu.so
-rwxr-xr-x 1 root root 134656 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_saint_cpu.so
-rwxr-xr-x 1 root root 134776 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_sample_cpu.so
-rwxr-xr-x 1 root root 597592 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_spmm_cpu.so
-rwxr-xr-x 1 root root 200816 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_spspmm_cpu.so
-rwxr-xr-x 1 root root  67952 May 23 08:04 /opt/miniconda/lib/python3.7/site-packages/torch_sparse/_version_cpu.so
Singularity> ls /opt/miniconda/lib/python3.7/site-packages/torch
torch/                                 torch_scatter/                         torchaudio/
torch-1.7.0a0-py3.7.egg-info/          torch_scatter-2.0.6.dist-info/         torchaudio-0.7.0a0+a853dff.dist-info/
torch_cluster/                         torch_sparse/                          torchtext/
torch_cluster-1.5.9.dist-info/         torch_sparse-0.6.9.dist-info/          torchtext-0.6.0.dist-info/
torch_geometric/                       torch_spline_conv/                     torchvision/
torch_geometric-1.7.0.dist-info/       torch_spline_conv-1.2.1.dist-info/     torchvision-0.8.0a0+2f40a48.dist-info/
mshuaibii commented 3 years ago

I have the OCP repo set up on a cluster that's also IBM Power. Open-CE: https://github.com/open-ce/open-ce provides builds for Power-architecture systems. I first created an environment from open-ce/1.1.3. I then installed the appropriate pytorch geometric binaries and any other missing packages OCP required.

My conda env list is as follows for that system (NOTE - there are several pacakages here that are not required by OCP that were part of the Open-CE environment).

Hope this helps! If by any chance you are on the DOE's Summit system, I'm happy to point you to my environment.

# packages in environment at /ccs/home/mshuaibi/.conda/envs/ocp-models:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main
_pytorch_select           2.0                  cuda10.2_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
_tensorflow_select        2.0                  cuda10.2_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
_xgboost_select           2.0                  cuda10.2_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
absl-py                   0.10.0                   py36_0
aiohttp                   3.7.4            py36h140841e_1
appdirs                   1.4.4                    pypi_0    pypi
ase                       3.21.1                   pypi_0    pypi
astunparse                1.6.3                      py_0
async-timeout             3.0.1            py36h6ffa863_0
attrs                     19.3.0                     py_0
av                        8.0.2            py36haa86098_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
binutils_impl_linux-ppc64le 2.31.1               he53550c_1
binutils_linux-ppc64le    2.31.1               he53550c_8
blas                      1.0                    openblas
blinker                   1.4              py36h6ffa863_0
brotlipy                  0.7.0           py36h140841e_1003
bzip2                     1.0.8                h7b6447c_0
c-ares                    1.17.1               h140841e_0
ca-certificates           2021.1.19            h6ffa863_1
cachetools                4.2.1              pyhd3eb1b0_0
cairo                     1.16.0               he491a88_1
catalogue                 1.0.0                    py36_1
certifi                   2020.12.5        py36h6ffa863_0
cffi                      1.14.5           py36hf9d8e4b_0
cfgv                      3.2.0                    pypi_0    pypi
chardet                   3.0.4           py36h6ffa863_1003
click                     7.0                      py36_0
cloudpickle               1.3.0                      py_0
cmake                     3.14.0               h52cb24c_0
configparser              5.0.2                    pypi_0    pypi
cryptography              3.4.7            py36h7ed74fa_0
cudatoolkit               10.2.89              hfd86e86_1
cudnn                     7.6.5_10.2           h9286eec_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
cycler                    0.10.0                   py36_0
cymem                     2.0.5            py36h29c3540_0
cython-blis               0.4.1            py36h7b6447c_1
cytoolz                   0.11.0           py36h7b6447c_0
dali                      0.28.0          cuda10.2_py36_3    file:///sw/sources/open-ce/conda-channel-v1.1.3
dask-core                 2021.3.1           pyhd3eb1b0_0
dataclasses               0.7              py36h6ffa863_0
decorator                 4.4.2              pyhd3eb1b0_0
demjson                   2.2.4                    pypi_0    pypi
dill                      0.3.3              pyhd3eb1b0_0
distlib                   0.3.1                    pypi_0    pypi
dm-tree                   0.1.5            py36hb8906cf_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
docker-pycreds            0.4.0                    pypi_0    pypi
expat                     2.3.0                h29c3540_2
ffmpeg                    4.2.2                h20bf706_0
filelock                  3.0.12             pyhd3eb1b0_1
fontconfig                2.13.1               ha0a49a9_0
freeglut                  3.0.0                hf484d3e_5
freetype                  2.10.4               h5ab3b9f_0
fsspec                    0.8.7              pyhd3eb1b0_0
future                    0.18.2                   py36_1
gast                      0.3.3                      py_0
gcc_impl_linux-ppc64le    7.3.0                he01c8ba_1
gcc_linux-ppc64le         7.3.0                h48e019a_8
gettext                   0.20.2               h1b965fe_0
giflib                    5.2.1                h7b6447c_0
gitdb                     4.0.7                    pypi_0    pypi
gitpython                 3.1.14                   pypi_0    pypi
glib                      2.68.0               h1318424_0
gmp                       6.2.1                h29c3540_0
gnutls                    3.6.5             h71b1129_1002
google-auth               1.23.0             pyhd3eb1b0_0
google-auth-oauthlib      0.4.4              pyhd3eb1b0_0
google-pasta              0.2.0                      py_0
googleapis-common-protos  1.52.0           py36h6ffa863_0
googledrivedownloader     0.4                      pypi_0    pypi
graphite2                 1.3.14               h23475e2_0
graphsurgeon              0.4.1                    py36_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
grpcio                    1.31.0           py36hf8bcb03_0
gxx_impl_linux-ppc64le    7.3.0                h822a55f_1
gxx_linux-ppc64le         7.3.0                h48e019a_8
h5py                      2.10.0           py36h7918eee_0
harfbuzz                  1.8.8                hffaf4a1_0
hdf5                      1.10.4               hb1b8bf9_0
horovod                   0.21.0          cuda10.2_system_py36_5    file:///sw/sources/open-ce/conda-channel-v1.1.3
icu                       58.2                 he6710b0_3
identify                  2.2.3                    pypi_0    pypi
idna                      2.8                      py36_0
idna_ssl                  1.1.0            py36h6ffa863_0
imageio                   2.9.0                      py_0
importlib-metadata        3.7.3            py36h6ffa863_1
importlib_metadata        3.7.3                hd3eb1b0_1
importlib_resources       3.3.0            py36h6ffa863_0
isodate                   0.6.0                    pypi_0    pypi
jasper                    2.0.14               h07fcdf6_1
jinja2                    2.11.3                   pypi_0    pypi
joblib                    0.17.0                     py_0
jpeg                      9b                   hcb7ba68_2
jpeg-turbo                2.0.5                h8b879f5_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
jsonschema                3.2.0                      py_2
keras-preprocessing       1.1.2              pyhd3eb1b0_0
kiwisolver                1.3.1            py36h29c3540_0
krb5                      1.18.2               h597af5e_0
lame                      3.100                h7b6447c_0
lcms2                     2.11                 h396b838_0
ld_impl_linux-ppc64le     2.33.1               h0f24833_7
leveldb                   1.20                 hf484d3e_1
libcurl                   7.71.1               h20c2e04_1
libedit                   3.1.20210216         h140841e_1
libevent                  2.1.11               hafc74fa_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
libffi                    3.3                  he6710b0_2
libflac                   1.3.1                    py38_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
libgcc-ng                 8.2.0                h822a55f_1
libgfortran-ng            7.3.0                h822a55f_1
libglu                    9.0.0                hf484d3e_1
libogg                    1.3.2                h7b6447c_0
libopenblas               0.3.6                h5a2b251_1
libopencv                 3.4.10                   py36_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
libopus                   1.3.1                h7b6447c_0
libpng                    1.6.37               hbc83047_0
libprotobuf               3.9.2                h847787d_3    file:///sw/sources/open-ce/conda-channel-v1.1.3
libsndfile                1.0.28                   py38_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
libssh2                   1.9.0                h1ba5d50_1
libstdcxx-ng              8.2.0                h822a55f_1
libtensorflow             2.4.1           cuda10.2_py38_4    file:///sw/sources/open-ce/conda-channel-v1.1.3
libtiff                   4.2.0                h781710b_0
libuuid                   1.0.3                h1bed415_2
libvorbis                 1.3.7                h7b6447c_0
libvpx                    1.7.0                hf484d3e_0
libwebp                   1.2.0                he32dc1f_0
libwebp-base              1.2.0                h140841e_0
libxcb                    1.14                 h7b6447c_0
libxgboost-base           1.3.3                cuda10.2_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
libxml2                   2.9.10               h871c0c7_3
llvmlite                  0.31.0           py36hd408876_0
lmdb                      0.9.22               hf484d3e_1
lz4-c                     1.9.3                h29c3540_0
magma                     2.5.4                cuda10.2_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
make                      4.2.1                h14c3975_1
markdown                  3.1.1                    py36_0
markupsafe                1.1.1                    pypi_0    pypi
matplotlib-base           3.3.4            py36he087750_0
more-itertools            8.7.0              pyhd3eb1b0_0
mpmath                    1.2.1                    pypi_0    pypi
multidict                 5.1.0            py36h140841e_2
murmurhash                1.0.5            py36h29c3540_0
nccl                      2.7.8                cuda10.2_4    file:///sw/sources/open-ce/conda-channel-v1.1.3
ncurses                   6.2                  he6710b0_1
nettle                    3.4.1                hbb512f6_0
networkx                  2.3                        py_0
ninja                     1.9.0            py36hfd86e86_0
nodeenv                   1.6.0                    pypi_0    pypi
nomkl                     3.0                           0
numactl                   2.0.12               h459fe5f_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
numba                     0.47.0           py36h962f231_0
numpy                     1.19.2           py36h6163131_0
numpy-base                1.19.2           py36h75fe3a5_0
nvidia-dali-tf-plugin-cuda102 0.28.0                   pypi_0    pypi
oauthlib                  3.1.0                      py_0
ocp-models                0.0.2                     dev_0    <develop>
olefile                   0.46                     py36_0
onnx                      1.6.0                    py36_3    file:///sw/sources/open-ce/conda-channel-v1.1.3
openblas                  0.3.6                         1
openblas-devel            0.3.6                         1
opencv                    3.4.10                   py36_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
openh264                  2.1.0                hd408876_0
openssl                   1.1.1k               h140841e_0
opt_einsum                3.1.0                      py_0
packaging                 20.9               pyhd3eb1b0_0
pandas                    1.1.5                    pypi_0    pypi
pathtools                 0.1.2                    pypi_0    pypi
pcre                      8.44                 he6710b0_0
pillow                    8.1.2            py36h3f95422_0
pip                       21.0.1           py36h6ffa863_0
pixman                    0.40.0               h7b6447c_0
plac                      0.9.6                    py36_1
pluggy                    0.13.1           py36h6ffa863_0
pre-commit                2.12.0                   pypi_0    pypi
preshed                   3.0.2            py36he6710b0_1
promise                   2.3              py36h6ffa863_0
protobuf                  3.15.7                   pypi_0    pypi
psutil                    5.8.0            py36h140841e_1
py                        1.10.0             pyhd3eb1b0_0
py-opencv                 3.4.10                   py36_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
py-xgboost                1.3.3           cuda10.2_py36_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
py-xgboost-base           1.3.3           cuda10.2_py36_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
pyasn1                    0.4.8                      py_0
pyasn1-modules            0.2.8                      py_0
pycparser                 2.20                       py_2
pyjwt                     1.7.1                    py36_0
pyopenssl                 20.0.1             pyhd3eb1b0_1
pyparsing                 2.4.7              pyhd3eb1b0_0
pyrsistent                0.17.3           py36h7b6447c_0
pysocks                   1.7.1            py36h6ffa863_0
pytest                    5.4.3            py36h6ffa863_0
python                    3.6.13               h836d2c2_0
python-dateutil           2.8.1              pyhd3eb1b0_0
python-flatbuffers        1.12               pyhb211add_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
python-lmdb               0.98             py36he6710b0_0
python-louvain            0.15                     pypi_0    pypi
pytorch                   1.7.1           cuda10.2_py36_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
pytorch-base              1.7.1           cuda10.2_py36_8    file:///sw/sources/open-ce/conda-channel-v1.1.3
pytorch-lightning         1.1.0              pyh72259b7_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
pytorch-lightning-bolts   0.2.5              pyh22e1ee5_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
pytz                      2021.1                   pypi_0    pypi
pywavelets                1.1.1            py36h7b6447c_2
pywget                    3.2              py36h6ffa863_0
pyyaml                    5.4.1            py36h140841e_1
rdflib                    5.0.0                    pypi_0    pypi
readline                  8.1                  h140841e_0
regex                     2020.6.8         py36h7b6447c_0
requests                  2.22.0                   py36_1
requests-oauthlib         1.3.0                      py_0
rhash                     1.4.1                hb567c45_1
rsa                       4.7.2              pyhd3eb1b0_1
rust-nightly              1.50.0               hb975b1c_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
sacremoses                0.0.43             pyh87dc625_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
scikit-image              0.17.2           py36hdf5156a_0
scikit-learn              0.24.1           py36haab0e66_0
scipy                     1.4.1            py36habc2bb6_0
semantic_version          2.8.5              pyh87dc625_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
sentencepiece             0.1.91                   py36_3    file:///sw/sources/open-ce/conda-channel-v1.1.3
sentry-sdk                1.0.0                    pypi_0    pypi
setuptools                52.0.0           py36h6ffa863_0
shortuuid                 1.0.1                    pypi_0    pypi
six                       1.15.0           py36h6ffa863_0
smmap                     4.0.0                    pypi_0    pypi
snappy                    1.1.8                he6710b0_0
spacy                     2.3.4            py36h7bb18f6_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
sqlite                    3.35.3               hd7247d8_0
srsly                     1.0.4            py36hf30110f_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
submitit                  1.3.0                    pypi_0    pypi
subprocess32              3.5.4                    pypi_0    pypi
sympy                     1.7.1                    pypi_0    pypi
tabulate                  0.8.9            py36h6ffa863_0
tbb                       2020.3               hfd86e86_0
tensorboard               2.4.1              pyhda65f9a_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorboard-plugin-wit    1.6.0              pyhc0078e9_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow                2.4.1           cuda10.2_py36_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-addons         0.11.2                   py36_3    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-base           2.4.1           cuda10.2_py36_4    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-datasets       4.1.0              pyh674cb94_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-estimator      2.4.0              pyhd2f33a5_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-hub            0.10.0             pyh9958038_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-metadata       0.26.0             pyh17e375c_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-model-optimization 0.5.0                    py36_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-probability    0.12.1                   py36_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-serving        2.4.1           cuda10.2_py38_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-serving-api    2.4.1              pyhdac48b3_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorflow-text           2.4.1                    py36_3    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorrt                  7.0.0.11        cuda10.2_py36_4    file:///sw/sources/open-ce/conda-channel-v1.1.3
tensorrt-samples          7.0.0.11        cuda10.2_py36_4    file:///sw/sources/open-ce/conda-channel-v1.1.3
termcolor                 1.1.0            py36h6ffa863_1
thinc                     7.4.1            py36he5a58c3_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
threadpoolctl             2.1.0              pyh5ca1d4c_0
tifffile                  2020.10.1        py36hdd07704_2
tk                        8.6.10               hbc83047_0
tokenizers                0.9.3            py36h91be2ad_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
toml                      0.10.2                   pypi_0    pypi
toolz                     0.11.1             pyhd3eb1b0_0
torch-cluster             1.5.9                    pypi_0    pypi
torch-geometric           1.6.3                    pypi_0    pypi
torch-scatter             2.0.6                    pypi_0    pypi
torch-sparse              0.6.9                    pypi_0    pypi
torch-spline-conv         1.2.1                    pypi_0    pypi
torchtext                 0.8.1                    py36_4    file:///sw/sources/open-ce/conda-channel-v1.1.3
torchvision               0.8.2           cuda10.2_py36_0    file:///sw/sources/open-ce/conda-channel-v1.1.3
torchvision-base          0.8.2           cuda10.2_py36_6    file:///sw/sources/open-ce/conda-channel-v1.1.3
tornado                   6.1              py36h140841e_0
tqdm                      4.41.1                     py_0
transformers              3.5.1              pyh4cad38a_2    file:///sw/sources/open-ce/conda-channel-v1.1.3
typing-extensions         3.7.4.3              hd3eb1b0_0
typing_extensions         3.7.4.3            pyh06a4308_0
uff                       0.6.5                    py36_1    file:///sw/sources/open-ce/conda-channel-v1.1.3
urllib3                   1.25.11                    py_0
virtualenv                20.4.3                   pypi_0    pypi
wandb                     0.10.28                  pypi_0    pypi
wasabi                    0.6.0                      py_0
wcwidth                   0.2.5                      py_0
werkzeug                  0.16.0                     py_0
wheel                     0.35.1             pyhd3eb1b0_0
wrapt                     1.12.1           py36h7b6447c_1
x264                      1!157.20191217       h7b6447c_0
xz                        5.2.5                h7b6447c_0
yaml                      0.2.5                h7b6447c_0
yarl                      1.6.3            py36h140841e_0
zipp                      3.4.1              pyhd3eb1b0_0
zlib                      1.2.11               h7b6447c_3
zstd                      1.4.5                h9ceee32_0
superdavidxp commented 3 years ago

@mshuaibii, Thank you very much for your help, I will try to re-produce your python env on our system first.

superdavidxp commented 3 years ago

@mshuaibii Thank you again for your help.

I noticed that your python env doesn't comes with "ray", how do you train the model without it? I tried to comment the "import ray" and I got this error,

Thank you in advance,

(ocp_models) [root@hal02 ocp]# python main.py --mode train --config-yml configs/s2ef/200k/base.yml 
Traceback (most recent call last):
  File "main.py", line 144, in <module>
    Runner()(config)
  File "main.py", line 44, in __call__
    model=config["model"],
KeyError: 'model'
mshuaibii commented 3 years ago

@mshuaibii Thank you again for your help.

I noticed that your python env doesn't comes with "ray", how do you train the model without it? I tried to comment the "import ray" and I got this error,

Thank you in advance,

(ocp_models) [root@hal02 ocp]# python main.py --mode train --config-yml configs/s2ef/200k/base.yml 
Traceback (most recent call last):
  File "main.py", line 144, in <module>
    Runner()(config)
  File "main.py", line 44, in __call__
    model=config["model"],
KeyError: 'model'

Ray is actually a new addition to the repo so it's not in that environment, you should be able to pip install that though. But it isn't necessary to train a model, so commenting it out should be fine...the reason you're getting that error is because base.yml is not a valid config to use, try something like this:

python main.py --mode train --config-yml configs/s2ef/200k/schnet/schnet.yml

base.yml is used in the specific model config, but not to be used on its own at the command line. Hope this helps!

superdavidxp commented 3 years ago

@mshuaibii Thank you very much for your reply,

I have tried your conmmand and had some new error

(ocp_models) [root@hal02 ocp]# python main.py --mode train --config-yml configs/s2ef/200k/schnet/schnet.yml
Traceback (most recent call last):
  File "main.py", line 144, in <module>
    Runner()(config)
  File "main.py", line 40, in __call__
    trainer = registry.get_trainer_class(
  File "/root/ocp/ocpmodels/trainers/forces_trainer.py", line 83, in __init__
    super().__init__(
  File "/root/ocp/ocpmodels/trainers/base_trainer.py", line 82, in __init__
    timestamp = datetime.datetime.fromtimestamp(timestamp).strftime(
TypeError: only integer tensors of a single element can be converted to an index

Should I modified the code or there are some conflict packages here?

Thank you in advance,

mshuaibii commented 3 years ago

Are you using python=3.8 here? I believe this error is related to that. You can do the following to fix without modifying package versions:

timestamp = datetime.datetime.fromtimestamp(timestamp.int()).strftime(
superdavidxp commented 3 years ago

@mshuaibii , Thank you so much, it did worked.

Now MaY I ask which dataset I should use and where should I put them, I downloaded the 200k training data but there are all *.xz files......

### Loading dataset: trajectory_lmdb
Traceback (most recent call last):
  File "main.py", line 144, in <module>
    Runner()(config)
  File "main.py", line 40, in __call__
    trainer = registry.get_trainer_class(
  File "/root/ocp/ocpmodels/trainers/forces_trainer.py", line 83, in __init__
    super().__init__(
  File "/root/ocp/ocpmodels/trainers/base_trainer.py", line 156, in __init__
    self.load()
  File "/root/ocp/ocpmodels/trainers/base_trainer.py", line 163, in load
    self.load_task()
  File "/root/ocp/ocpmodels/trainers/forces_trainer.py", line 110, in load_task
    self.train_dataset = registry.get_dataset_class(
  File "/root/ocp/ocpmodels/datasets/trajectory_lmdb.py", line 51, in __init__
    assert len(db_paths) > 0, f"No LMDBs found in {srcdir}"
AssertionError: No LMDBs found in data/s2ef/200k/train
mshuaibii commented 3 years ago

@mshuaibii , Thank you so much, it did worked.

Now MaY I ask which dataset I should use and where should I put them, I downloaded the 200k training data but there are all *.xz files......

### Loading dataset: trajectory_lmdb
Traceback (most recent call last):
  File "main.py", line 144, in <module>
    Runner()(config)
  File "main.py", line 40, in __call__
    trainer = registry.get_trainer_class(
  File "/root/ocp/ocpmodels/trainers/forces_trainer.py", line 83, in __init__
    super().__init__(
  File "/root/ocp/ocpmodels/trainers/base_trainer.py", line 156, in __init__
    self.load()
  File "/root/ocp/ocpmodels/trainers/base_trainer.py", line 163, in load
    self.load_task()
  File "/root/ocp/ocpmodels/trainers/forces_trainer.py", line 110, in load_task
    self.train_dataset = registry.get_dataset_class(
  File "/root/ocp/ocpmodels/datasets/trajectory_lmdb.py", line 51, in __init__
    assert len(db_paths) > 0, f"No LMDBs found in {srcdir}"
AssertionError: No LMDBs found in data/s2ef/200k/train

Please use the following script to download the data: https://github.com/Open-Catalyst-Project/ocp/blob/master/scripts/download_data.py. It will take care of processing the raw data into LMDBs and moving it to the corresponding directory. Something like this:

python download_data.py --task s2ef --split 200k --get-edges --ref-energy --num-workers NUM_WORKERS_AVAILABLE
superdavidxp commented 3 years ago

Thank you very much, it works now!