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

SOF-7417: consider non-collinear case while parsing qe bandstructure #146

Merged
merged 9 commits into from
Aug 14, 2024

Conversation

pranabdas
Copy link
Member

No description provided.

@@ -23,7 +23,7 @@ dependencies = [
# "rdkit-pypi>=2022.3.5",
"jarvis-tools>=2023.12.12",
# To avoid module 'numpy.linalg._umath_linalg' has no attribute '_ilp64' in Colab
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timurbazhirov what is the numpy version requirement for Colab? There are some breaking (minor) changes on numpy v2 (recently released). For now, we may pin to numpy v1. Also, numpy now requires Python v3.9 or above. Tests are failing on v3.8, because it cannot install numpy v1.26.0. If Colab compatibility allows, we may pin to v1.24.4.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's just use "numpy<2" and let pip figure it out?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including @knc6 - any insight regarding the numpy version for Colab?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The root of the problem appears to be presence of multiple numpy versions in the system numpy/numpy#25150 Colab comes with preinstalled set of python packages, including numpy. As of now, Colab uses the latest release of numpy v1. So, with current range specification, we are good for now. But the problem might come back when Colab upgrades to numpy v2 and we are not. We can fix our code in a separate PR, so that we can use numpy v2 as well.

@pranabdas
Copy link
Member Author

There are more breaking changes on numpy v2:

======================================================================
ERROR: properties.test_material (unittest.loader._FailedTest.properties.test_material)
----------------------------------------------------------------------
ImportError: Failed to import test module: properties.test_material
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/unittest/loader.py", line 419, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/unittest/loader.py", line 362, in _get_module_from_name
    __import__(name)
  File "/home/runner/work/express/express/tests/integration/properties/test_material.py", line 5, in <module>
    from express.parsers.apps.espresso.parser import EspressoParser
  File "/home/runner/work/express/express/express/parsers/apps/espresso/parser.py", line 12, in <module>
    from express.parsers.mixins.electronic import ElectronicDataMixin
  File "/home/runner/work/express/express/express/parsers/mixins/electronic.py", line 2, in <module>
    from pymatgen.core.structure import Structure
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pymatgen/core/__init__.py", line 11, in <module>
    from pymatgen.core.lattice import Lattice
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pymatgen/core/lattice.py", line 19, in <module>
    from pymatgen.util.coord import pbc_shortest_vectors
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pymatgen/util/coord.py", line 14, in <module>
    from pymatgen.util import coord_cython
  File "src/pymatgen/util/coord_cython.pyx", line 1, in init pymatgen.util.coord_cython
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

See - numpy/numpy#26710

@pranabdas pranabdas merged commit 1174a1e into dev Aug 14, 2024
18 checks passed
@pranabdas pranabdas deleted the feat/SOF-7417 branch August 14, 2024 11:00
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

Successfully merging this pull request may close these issues.

2 participants