mirror of
https://github.com/wassname/jaxtyping.git
synced 2026-09-09 11:24:55 +08:00
We now have Float[np.ndarray, ...] <: np.ndarray. Added basic torch tests. (#68)
This required quite a lot of refactoring! JAX supports virtual subclass registration (its metaclass is ABCMeta) but NumPy does not, so we have to actually subclass `np.ndarray`. Simple stuff like __base__ hacking fails due to deallocator conflicts.
This commit is contained in:
@@ -33,7 +33,8 @@ jobs:
|
||||
with:
|
||||
python-version: "3.8"
|
||||
test-script: |
|
||||
python -m pip install pytest beartype equinox jaxlib
|
||||
python -m pip install pytest beartype equinox jaxlib cloudpickle
|
||||
python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
cp -r ${{ github.workspace }}/test ./test
|
||||
pytest
|
||||
pypi-token: ${{ secrets.pypi_token }}
|
||||
|
||||
@@ -42,7 +42,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install pytest wheel beartype equinox jaxlib
|
||||
python -m pip install pytest wheel beartype equinox jaxlib cloudpickle
|
||||
python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
|
||||
- name: Checks with pre-commit
|
||||
uses: pre-commit/action@v2.0.3
|
||||
|
||||
Reference in New Issue
Block a user