]> khamidou — GitHub mirrors - safetensors.git/commitdiff
Testing torch==1.10 (lowest available on transformers with `frombuffer`) too. (#46)
authorNicolas Patry <patry.nicolas@protonmail.com>
Tue, 1 Nov 2022 07:52:03 +0000 (08:52 +0100)
committerGitHub <noreply@github.com>
Tue, 1 Nov 2022 07:52:03 +0000 (08:52 +0100)
* Testing torch==1.7 (lowest available on transformers) too.

* Running the checks every single time.

* Minimum required version is going to be torch==1.10.

Before that `frombuffer` didn't exist.
And since we want `bfloat16` support it's pretty much impossible
to use `numpy` or copy directly to the buffer with `set_`.

We could technically `memcpy` the buffer directly but it feels
overkill.

.github/workflows/python.yml
.github/workflows/rust.yml

index 77ba940904e963af1c25eae9b341facd279f2815..b4d19a17e88a6389d54425d56543436efd254b1c 100644 (file)
@@ -2,9 +2,6 @@ name: Python
 
 on:
   pull_request:
-    paths:
-      - bindings/python/**
-      - safetensors/**
 
 jobs:
   build_and_test:
@@ -13,6 +10,9 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-18.04, macos-latest, windows-latest]
+        # Lowest and highest, no version specified so that 
+        # new releases get automatically tested against
+        torch_version: [torch==1.10, torch]
     steps:
       - name: Checkout repository
         uses: actions/checkout@v1
@@ -55,7 +55,7 @@ jobs:
         run: |
           pip install -U pip
           pip install pytest requests setuptools_rust numpy pyarrow datasets
-          pip install torch tensorflow numpy
+          pip install ${{ matrix.torch_version }} tensorflow numpy
           pip install jax jaxlib flax
           python setup.py develop
 
index 807b4cd3a36be072fdef4effaa00d3cea9f2906c..c394b8eefaaea0428836df049429c077131188b6 100644 (file)
@@ -1,9 +1,6 @@
 name: Rust
 
 on:
-  push:
-    branches:
-      - master
   pull_request:
 
 jobs: