GeophyAI / seistorch

A pytorch-based package for seismic invesrion with automatic differentiation.
21 stars 5 forks source link

Missing Package Version Information in requirements.txt Causing Compatibility Issues #2

Open Parallelopiped opened 2 months ago

Parallelopiped commented 2 months ago

Hello,

I recently encountered an issue with the current requirements.txt file in the repository, which does not include specific version information for the required packages. This has led to compatibility problems due to recent updates in some packages.

Specifically, the issue arises with the latest version of numpy (2.0.0), which has deprecated certain keywords that are critical for running some scripts in the repository. For example, after setting up the environment using the provided requirements.txt file, I encountered errors when running fwi.py. The error details are as follows:

AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.

I managed to resolve this issue by downgrading numpy to version 1.25.0. I would like to suggest specifying the versions of the packages in the requirements.txt file to prevent such issues in the future.

Here is the environment configuration generated as environment.yml of conda that worked for me, ensuring tested scripts run smoothly:

name: fwi
channels:
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_gnu
  - absl-py=2.1.0=pyhd8ed1ab_0
  - aiohttp=3.9.5=py39hd1e30aa_0
  - aiosignal=1.3.1=pyhd8ed1ab_0
  - asttokens=2.4.1=pyhd8ed1ab_0
  - async-timeout=4.0.3=pyhd8ed1ab_0
  - attrs=23.2.0=pyh71513ae_0
  - blinker=1.8.2=pyhd8ed1ab_0
  - brotli=1.1.0=hd590300_1
  - brotli-bin=1.1.0=hd590300_1
  - brotli-python=1.1.0=py39h3d6467e_1
  - bzip2=1.0.8=hd590300_5
  - c-ares=1.28.1=hd590300_0
  - ca-certificates=2024.6.2=hbcca054_0
  - cached-property=1.5.2=hd8ed1ab_1
  - cached_property=1.5.2=pyha770c72_1
  - cachetools=5.3.3=pyhd8ed1ab_0
  - certifi=2024.6.2=pyhd8ed1ab_0
  - cffi=1.16.0=py39h7a31438_0
  - charset-normalizer=3.3.2=pyhd8ed1ab_0
  - click=8.1.7=unix_pyh707e725_0
  - colorama=0.4.6=pyhd8ed1ab_0
  - contourpy=1.2.1=py39h7633fee_0
  - cryptography=42.0.8=py39h8169da8_0
  - cycler=0.12.1=pyhd8ed1ab_0
  - decorator=5.1.1=pyhd8ed1ab_0
  - exceptiongroup=1.2.0=pyhd8ed1ab_2
  - executing=2.0.1=pyhd8ed1ab_0
  - fonttools=4.53.0=py39hd3abc70_0
  - freetype=2.12.1=h267a509_2
  - frozenlist=1.4.1=py39hd1e30aa_0
  - google-auth=2.30.0=pyhff2d567_0
  - google-auth-oauthlib=1.0.0=pyhd8ed1ab_1
  - greenlet=3.0.3=py39h3d6467e_0
  - grpcio=1.62.2=py39h174d805_0
  - h5py=3.11.0=nompi_py39h24b94d4_102
  - hdf5=1.14.3=nompi_hdf9ad27_105
  - icu=73.2=h59595ed_0
  - idna=3.7=pyhd8ed1ab_0
  - importlib-metadata=7.2.0=pyha770c72_0
  - importlib-resources=6.4.0=pyhd8ed1ab_0
  - importlib_resources=6.4.0=pyhd8ed1ab_0
  - intel-openmp=2022.0.1=h06a4308_3633
  - ipython=8.18.1=pyh707e725_3
  - jedi=0.19.1=pyhd8ed1ab_0
  - joblib=1.3.2=pyhd8ed1ab_0
  - keyutils=1.6.1=h166bdaf_0
  - kiwisolver=1.4.5=py39h7633fee_1
  - krb5=1.21.2=h659d440_0
  - lcms2=2.16=hb7c19ff_0
  - ld_impl_linux-64=2.40=hf3520f5_7
  - lerc=4.0.0=h27087fc_0
  - libabseil=20240116.2=cxx17_h59595ed_0
  - libaec=1.1.3=h59595ed_0
  - libblas=3.9.0=16_linux64_mkl
  - libbrotlicommon=1.1.0=hd590300_1
  - libbrotlidec=1.1.0=hd590300_1
  - libbrotlienc=1.1.0=hd590300_1
  - libcblas=3.9.0=16_linux64_mkl
  - libcurl=8.8.0=hca28451_0
  - libdeflate=1.20=hd590300_0
  - libedit=3.1.20191231=he28a2e2_2
  - libev=4.33=hd590300_2
  - libffi=3.4.2=h7f98852_5
  - libgcc-ng=13.2.0=h77fa898_12
  - libgfortran-ng=13.2.0=h69a702a_12
  - libgfortran5=13.2.0=h3d2ce59_12
  - libgomp=13.2.0=h77fa898_12
  - libgrpc=1.62.2=h15f2491_0
  - libiconv=1.17=hd590300_2
  - libjpeg-turbo=3.0.0=hd590300_1
  - liblapack=3.9.0=16_linux64_mkl
  - libnghttp2=1.58.0=h47da74e_1
  - libnsl=2.0.1=hd590300_0
  - libopenblas=0.3.27=pthreads_h413a1c8_0
  - libpng=1.6.43=h2797004_0
  - libprotobuf=4.25.3=h08a7969_0
  - libre2-11=2023.09.01=h5a48ba9_2
  - libsqlite=3.46.0=hde9e2c9_0
  - libssh2=1.11.0=h0841786_0
  - libstdcxx-ng=13.2.0=hc0a3c3a_12
  - libtiff=4.6.0=h1dd3fc0_3
  - libuuid=2.38.1=h0b41bf4_0
  - libwebp-base=1.4.0=hd590300_0
  - libxcb=1.16=hd590300_0
  - libxcrypt=4.4.36=hd590300_1
  - libxml2=2.12.7=hc051c1a_1
  - libxslt=1.1.39=h76b75d6_0
  - libzlib=1.3.1=h4ab18f5_1
  - lxml=5.2.2=py39h8a3eb29_0
  - markdown=3.6=pyhd8ed1ab_0
  - markupsafe=2.1.5=py39hd1e30aa_0
  - matplotlib-base=3.8.4=py39h10d1fc8_2
  - matplotlib-inline=0.1.7=pyhd8ed1ab_0
  - mkl=2022.1.0=hc2b9512_224
  - mpi=1.0=mpich
  - mpi4py=3.1.4=py39h6cbbaa3_1
  - mpich=4.2.1=h63d650b_101
  - multidict=6.0.5=py39hd1e30aa_0
  - munkres=1.0.7=py_1
  - ncurses=6.5=h59595ed_0
  - numpy=1.25.0=py39h6183b62_0
  - oauthlib=3.2.2=pyhd8ed1ab_0
  - obspy=1.3.0=py39hd257fcd_0
  - openjpeg=2.5.2=h488ebb8_0
  - openssl=3.3.1=h4ab18f5_0
  - packaging=24.1=pyhd8ed1ab_0
  - parso=0.8.4=pyhd8ed1ab_0
  - pexpect=4.9.0=pyhd8ed1ab_0
  - pickleshare=0.7.5=py_1003
  - pillow=10.3.0=py39h16a7006_1
  - pip=24.0=pyhd8ed1ab_0
  - pot=0.8.1.0=py39hde0f152_0
  - prettytable=3.9.0=pyhd8ed1ab_0
  - prompt-toolkit=3.0.47=pyha770c72_0
  - protobuf=4.25.3=py39h1be52a0_0
  - pthread-stubs=0.4=h36c2ea0_1001
  - ptyprocess=0.7.0=pyhd3deb0d_0
  - pure_eval=0.2.2=pyhd8ed1ab_0
  - pyasn1=0.6.0=pyhd8ed1ab_0
  - pyasn1-modules=0.4.0=pyhd8ed1ab_0
  - pycparser=2.22=pyhd8ed1ab_0
  - pygments=2.18.0=pyhd8ed1ab_0
  - pyjwt=2.8.0=pyhd8ed1ab_1
  - pyopenssl=24.0.0=pyhd8ed1ab_0
  - pyparsing=3.1.2=pyhd8ed1ab_0
  - pysocks=1.7.1=pyha2e5f31_6
  - python=3.9.19=h0755675_0_cpython
  - python-dateutil=2.9.0=pyhd8ed1ab_0
  - python_abi=3.9=4_cp39
  - pyu2f=0.1.5=pyhd8ed1ab_0
  - pyyaml=6.0.1=py39hd1e30aa_1
  - re2=2023.09.01=h7f4b329_2
  - readline=8.2=h8228510_1
  - requests=2.32.3=pyhd8ed1ab_0
  - requests-oauthlib=2.0.0=pyhd8ed1ab_0
  - rsa=4.9=pyhd8ed1ab_0
  - scipy=1.13.1=py39haf93ffa_0
  - segyio=1.9.12=py39hfc16268_2
  - setproctitle=1.3.3=py39hd1e30aa_0
  - setuptools=70.1.0=pyhd8ed1ab_0
  - six=1.16.0=pyh6c4a22f_0
  - sqlalchemy=1.4.49=py39hd1e30aa_1
  - stack_data=0.6.2=pyhd8ed1ab_0
  - tensorboard=2.14.1=pyhd8ed1ab_0
  - tensorboard-data-server=0.7.0=py39hd4f0224_1
  - tk=8.6.13=noxft_h4845f30_101
  - tqdm=4.66.1=pyhd8ed1ab_0
  - traitlets=5.14.3=pyhd8ed1ab_0
  - typing-extensions=4.12.2=hd8ed1ab_0
  - typing_extensions=4.12.2=pyha770c72_0
  - tzdata=2024a=h0c530f3_0
  - unicodedata2=15.1.0=py39hd1e30aa_0
  - urllib3=2.2.2=pyhd8ed1ab_0
  - wcwidth=0.2.13=pyhd8ed1ab_0
  - werkzeug=3.0.3=pyhd8ed1ab_0
  - wheel=0.43.0=pyhd8ed1ab_1
  - xorg-libxau=1.0.11=hd590300_0
  - xorg-libxdmcp=1.1.3=h7f98852_0
  - xz=5.2.6=h166bdaf_0
  - yaml=0.2.5=h7f98852_2
  - yarl=1.9.4=py39hd1e30aa_0
  - zipp=3.19.2=pyhd8ed1ab_0
  - zstd=1.5.6=ha6fb4c9_0
  - pip:
      - filelock==3.15.4
      - fsspec==2024.6.0
      - geomloss==0.2.6
      - jinja2==3.1.4
      - mpmath==1.3.0
      - networkx==3.2.1
      - nvidia-cublas-cu12==12.1.3.1
      - nvidia-cuda-cupti-cu12==12.1.105
      - nvidia-cuda-nvrtc-cu12==12.1.105
      - nvidia-cuda-runtime-cu12==12.1.105
      - nvidia-cudnn-cu12==8.9.2.26
      - nvidia-cufft-cu12==11.0.2.54
      - nvidia-curand-cu12==10.3.2.106
      - nvidia-cusolver-cu12==11.4.5.107
      - nvidia-cusparse-cu12==12.1.0.106
      - nvidia-nccl-cu12==2.18.1
      - nvidia-nvjitlink-cu12==12.5.40
      - nvidia-nvtx-cu12==12.1.105
      - sympy==1.12.1
      - torch==2.1.0
      - torchaudio==2.1.0
      - torchvision==0.16.0
      - triton==2.1.0

I am more than delighted to share any further details if needed. Thank you for your attention to this matter.