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

release numpy <2 pin, and support python 3.13 #719

Merged
merged 9 commits into from
Dec 10, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classifiers = [
]
dependencies = [
"ruamel.yaml",
"numpy<2.0.0",
"numpy",
]
version = "2024.10.21"

Expand All @@ -44,7 +44,7 @@ json = [
"pandas",
"pydantic",
"pint",
"torch",
"torch", # Note: need torch>=2.3.0 for numpy 2 # 719
Copy link
Contributor Author

@DanielYang59 DanielYang59 Oct 23, 2024

Choose a reason for hiding this comment

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

I decide to drop this pin entirely because I believe it's something torch should resolve instead of monty (i.e. torch should correctly list supported numpy)

Unless tensor.numpy() should not be used at certain versions? I'm not a torch user, input appreciated!


Plan B (which I don't really like because it would narrow the default supported NumPy version) is to have something like:

json = [
...,
monty[torch_with_numpy2,...]
]

torch_with_numpy2 = [
  "numpy>=2",
  "torch>=2.3.0",  # Torch version compatible with numpy 2
]
torch_with_numpy1 = [
  "numpy<2",
  "torch",  
]

]
multiprocessing = ["tqdm"]
optional = ["monty[dev,json,multiprocessing,serialization]"]
Expand Down
Loading