Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 5 additions & 4 deletions .github/workflows/run_type_checked_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: "3.10"
- name: Install dependencies
run: |
if [[ ${{ matrix.pytorch-version }} = "latest" ]]; then
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html;
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
else
pip install torch==1.11+cpu -f https://download.pytorch.org/whl/torch_stable.html;
pip install torch==1.11+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install "numpy<2"
Comment on lines +30 to +31
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is numpy < 2 needed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

torch=1.11 is not compatible with numpy>2 but it does not explicitly require <2 either, so we end up with CI failing with RuntimeError: Numpy is not available on tensor.numpy() calls despite numpy==2.2.2 being installed. See https://github.com/cornellius-gp/linear_operator/actions/runs/12961267021/job/36156321493

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. torch 1.11 is rather ancient but I guess this is only relevant for the CI testing, so this is fine by me.

fi
pip install -e ".[test]"
- name: Run unit tests
run: |
pytest ${{ inputs.files_to_test }} --jaxtyping-packages=linear_operator,typeguard.typechecked
pytest ${{ inputs.files_to_test }} --jaxtyping-packages=typeguard.typechecked
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# Other requirements
install_requires += [
"scipy",
"jaxtyping==0.2.19",
"jaxtyping",
"mpmath>=0.19,<=1.3", # avoid incompatibiltiy with torch+sympy with mpmath 1.4
]

Expand Down
Loading