Closed Andrew-S-Rosen closed 1 month ago
I've downgraded the PyTorch to ver 2.2.1, and it works.
The pinned dependency is dgl==1.1.3. There are issues with the dgl=2.x releases.
The pin is in the requirements.txt file. In any case, I agree we need to update the code to support DGL 2.x. @kenko911 Pls fix.
Hi @shyuep and @Andrew-S-Rosen, sorry for the late reply. We need to explicitly include the dependence of pydantic starting from dgl-2. . However, the dgl-2. is not compatible with torch.2.2.2 or above at the momennt. Is it okay for us to fix it by including pydantic, torch>=2.0.0; <=2.2.1, dgl >=2.0.0 in requirement.txt?
Of course defer to @shyuep on this matter, but since users are installing matgl
based on pyproject.toml
and not requirements.txt
, I think it is important to make sure the pyproject.toml
contains the version ranges necessary to properly run matgl
. The requirements.txt
should have strict version pins for the sake of CI, which are updated by dependabot. In any case, I think having the suggested ranges in pyproject.toml
is appropriate.
I would go for the latest version of DGL, and whatever version the subdependencies require. My impression is that pyproject.toml. is a replacement for setup.py and you are not supposed to pin versions in pyproject.toml.
Strict version pins should be avoided in pyproject.toml
, but a bounded range of versions in this case is necessary (yes?) otherwise users doing pip install matgl
will not get a working build. That was the context for my original issue report, at least. I agree that the strict version pins for the latest version of DGL and necessary subdependencies should be in requirements.txt
.
That I agree. @kenko911 can modify pyproject.toml to specify the latest range.
Hi @shyuep and @Andrew-S-Rosen, thank you so much for your input. I will do what you all suggested in pyproject.toml with a bounded range of versions and only include the strict version in requirements.txt. I do learn a lot from you guys!! :)
Thank you for addressing this! 🙏
Email (Optional)
No response
Version
1.0.0
Which OS(es) are you using?
What happened?
This is just a head's up that if you install
matgl
from PyPI right now (3/28/2024), you'll getdgl==2.1.0
andtorch==2.2.2
, which are not compatible. For details, see https://github.com/dmlc/dgl/issues/7247#issuecomment-2026414981.Code snippet
No response
Log output
No response
Code of Conduct