Migrate to NumPy 2.x.x and raise minimum Python version to 3.10 - #403
Migrate to NumPy 2.x.x and raise minimum Python version to 3.10#403muhammad-fiaz wants to merge 15 commits into
Conversation
|
Hi @muhammad-fiaz! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
- pyproject.toml: Python >=3.10, numpy>=1.26 (no upper bound), add Py3.13/3.14 classifiers, ruff NPY201 (from upstream PR facebookresearch#403) - sam3/agent/helpers/visualizer.py: np.bool -> np.bool_ (from PR facebookresearch#403) - sam3/model_builder.py: - replace pkg_resources with importlib.resources (pkg_resources absent as a standalone module under Python 3.14 + setuptools 82) - skip CUDA-only position-encoding & decoder coord-cache precomputation when CUDA is unavailable (precompute paths hard-code device="cuda") - sam3/model/geometry_encoders.py: - guard pin_memory() behind torch.cuda.is_available() (pin_memory requires a working CUDA driver)
|
This PR looks quite obviously LLM-generated. Looking at some other merged PRs like #137 it seems they have much more succinct descriptions. Consider writing the words with your human hands rather than the LLM. |
|
Hello, @tamird first look at the actual changes made in this PR rather than judging based on the description alone. This PR only contains a minor version update along with a small API syntax compatibility change, and the implementation was done manually. btw I even added reference citation links to clearly show the related changes and sources :) |
|
Optional: if anyone would like to try these changes before the PR is merged, you can install them directly from my fork: pip install git+https://github.com/muhammad-fiaz/sam3.git@mainor uv add git+https://github.com/muhammad-fiaz/sam3.git@mainThis includes the NumPy 2.x compatibility updates and the Python 3.10+ requirement introduced by this PR. |
Hello!
I have updated the project to be compatible with NumPy 2.0 (minimum supported version) and raised the minimum required Python version to 3.10 to ensure consistent dependency resolution when using uv.
NumPy Compatibility
np.boolwithnp.bool_.NPY201Python Version Requirement
* I raised the minimum supported Python version to 3.10
uv sync --devcompletes successfully with the updated constraints.these changes follows the official NumPy 2.0 migration guide.
please tell me, if there any additional changes needed!
additional reference
Update np.bool to be an alias to np.bool_ and un-deprecate it