Skip to content

Make NumPy an optional dependency#352

Open
extrasmall0 wants to merge 1 commit into
protectai:mainfrom
extrasmall0:fix/optional-numpy
Open

Make NumPy an optional dependency#352
extrasmall0 wants to merge 1 commit into
protectai:mainfrom
extrasmall0:fix/optional-numpy

Conversation

@extrasmall0

Copy link
Copy Markdown

Summary

  • move NumPy from the core dependencies into a numpy extra
  • keep pickle and PyTorch scanning importable without NumPy installed
  • return a dependency error for NumPy scans when the extra is missing

Fixes #79

Tests

  • uvx poetry run pytest tests/test_modelscan.py -k numpy
  • uvx poetry run mypy modelscan/scanners/pickle/scan.py modelscan/tools/picklescanner.py
  • uvx poetry run black --check modelscan/scanners/pickle/scan.py modelscan/tools/picklescanner.py tests/test_modelscan.py

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.

Make NumPy an optional dependency

1 participant