From e4f6c3d9888815c1286e2883d4504dc24e47bfca Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 1 Nov 2022 08:52:03 +0100 Subject: [PATCH] Testing torch==1.10 (lowest available on transformers with `frombuffer`) too. (#46) * 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 | 8 ++++---- .github/workflows/rust.yml | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 77ba940..b4d19a1 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 807b4cd..c394b8e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,9 +1,6 @@ name: Rust on: - push: - branches: - - master pull_request: jobs: -- 2.43.0