From a3c4e01e53fcde9a73a4d3d767a3626d293b137e Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 13:29:37 +0200 Subject: [PATCH 01/20] check with transformers Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f28d6ce34..bc6bb89e9 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -106,6 +106,41 @@ jobs: name: IR profiling results path: tests/ir/serde_test_profiles + dort: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + transformers: ["4.37.2", "4.41.2"] + torch: ["", "--pre"] + name: + - py311 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Pull Test Data + run: git lfs pull + - run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install -r requirements-dev.txt + name: Install requirements. + - run: | + python -m pip install ${{ matrix.torch }} torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu + name: Install torch + - run: | + python -m pip uninstall -y onnxruntime + python -m pip install onnxruntime-training + name: Install onnxruntime-training + - run: | + python -m pip install transformers==${{ matrix.transformers }} + name: Install transformers + - name: Run tests + run: pytest + build_docs: strategy: fail-fast: false From 7356f389b2b95d365ab281c847104262bcdd8c28 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 14:22:13 +0200 Subject: [PATCH 02/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index bc6bb89e9..bb2a679f1 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -113,15 +113,16 @@ jobs: os: [ubuntu-latest] transformers: ["4.37.2", "4.41.2"] torch: ["", "--pre"] + python_version: ["3.11"] name: - - py311 + - dort runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version }} + - name: Setup Python ${{ matrix.python_version }} uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python_version }} - name: Pull Test Data run: git lfs pull - run: | From 3733d6afb5a61e82e228acd3b04e9f980a528491 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 14:49:39 +0200 Subject: [PATCH 03/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index bb2a679f1..6fb733020 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -126,14 +126,12 @@ jobs: - name: Pull Test Data run: git lfs pull - run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install -r requirements-dev.txt + python -m pip install --upgrade pip setuptools wheel pytest onnx name: Install requirements. - run: | python -m pip install ${{ matrix.torch }} torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu name: Install torch - run: | - python -m pip uninstall -y onnxruntime python -m pip install onnxruntime-training name: Install onnxruntime-training - run: | From 9bb7c790e790452b5e76cc386e63e4eba583b469 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 15:21:53 +0200 Subject: [PATCH 04/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6fb733020..ff6b2bb04 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -130,7 +130,7 @@ jobs: name: Install requirements. - run: | python -m pip install ${{ matrix.torch }} torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu - name: Install torch + name: Install torch - run: | python -m pip install onnxruntime-training name: Install onnxruntime-training From 7f38e8b8c6cba5d69986f4bb2b47a3b2498a5f5f Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 15:54:40 +0200 Subject: [PATCH 05/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ff6b2bb04..07a593465 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -126,7 +126,7 @@ jobs: - name: Pull Test Data run: git lfs pull - run: | - python -m pip install --upgrade pip setuptools wheel pytest onnx + python -m pip install --upgrade pip setuptools wheel pytest onnx parameterized ml-dtypes pytest-coverage hypothesis expecttest==0.1.6 beartype!=0.16.0 pytest-cov pytest-randomly pytest-subtests pytest-xdist pyyaml name: Install requirements. - run: | python -m pip install ${{ matrix.torch }} torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu From cbaedb23a4cdee0a882cf502c73b88c8028472d6 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 16:07:07 +0200 Subject: [PATCH 06/20] delay import Signed-off-by: Xavier Dupre --- tests/ir/serde_roundtrip_test.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/ir/serde_roundtrip_test.py b/tests/ir/serde_roundtrip_test.py index ad4c8c923..791b125cf 100644 --- a/tests/ir/serde_roundtrip_test.py +++ b/tests/ir/serde_roundtrip_test.py @@ -8,7 +8,6 @@ import onnx import onnx.backend.test import parameterized -import pyinstrument import onnxscript.testing from onnxscript import ir @@ -26,15 +25,23 @@ class SerdeTest(unittest.TestCase): def setUp(self) -> None: - self.profiler = pyinstrument.Profiler() + try: + import pyinstrument + + self.profiler = pyinstrument.Profiler() + except ImportError: + self.profiler = None def tearDown(self) -> None: - self.profiler.reset() + if self.profiler: + self.profiler.reset() @parameterized.parameterized.expand(test_args) def test_serialization_deserialization_produces_same_model( self, _: str, model_path: pathlib.Path ) -> None: + if not self.profiler: + raise unittest.SkipTest("pyinstrument is not installed.") model = onnx.load(model_path) # Fix the missing graph name of some test models model.graph.name = "main_graph" From e6b3b208acf211e824a985f961abc5c9430deddd Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 16:27:43 +0200 Subject: [PATCH 07/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 7 ++++++- tests/ir/serde_roundtrip_test.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 07a593465..c83c33a00 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -137,8 +137,13 @@ jobs: - run: | python -m pip install transformers==${{ matrix.transformers }} name: Install transformers + - run: | + python -m pip freeze + name: pip freeze + - name: Run onnxscript/tests + run: pytest onnxscript/tests - name: Run tests - run: pytest + run: pytest tests build_docs: strategy: diff --git a/tests/ir/serde_roundtrip_test.py b/tests/ir/serde_roundtrip_test.py index 791b125cf..80810f0e0 100644 --- a/tests/ir/serde_roundtrip_test.py +++ b/tests/ir/serde_roundtrip_test.py @@ -1,5 +1,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. +# pylint: disable=import-outside-toplevel from __future__ import annotations import pathlib From 66a729dd27546cb4771c4b1a723ade4b82649c77 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 16:40:18 +0200 Subject: [PATCH 08/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c83c33a00..570a36c09 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -140,8 +140,8 @@ jobs: - run: | python -m pip freeze name: pip freeze - - name: Run onnxscript/tests - run: pytest onnxscript/tests + - name: Run onnxscript tests + run: pytest onnxscript - name: Run tests run: pytest tests From 76bc3708bb460424a95a4d82e8dd1b0502e65432 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 16:41:22 +0200 Subject: [PATCH 09/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 570a36c09..db3947dd4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -140,10 +140,12 @@ jobs: - run: | python -m pip freeze name: pip freeze - - name: Run onnxscript tests - run: pytest onnxscript - - name: Run tests - run: pytest tests + - run: | + pytest onnxscript + name: Run onnxscript tests + - run: | + pytest tests + name: Run tests build_docs: strategy: From 4640c8a03f798e3b7ea965bc826417cf61bc8375 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 16:56:27 +0200 Subject: [PATCH 10/20] cuda Signed-off-by: Xavier Dupre --- tests/common/testutils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/common/testutils.py b/tests/common/testutils.py index 2ea566646..6f2c714df 100644 --- a/tests/common/testutils.py +++ b/tests/common/testutils.py @@ -10,6 +10,7 @@ import numpy as np import onnx import onnxruntime +import torch from onnxscript import optimizer from onnxscript._legacy_ir import visitor @@ -29,7 +30,7 @@ def skip_if_no_cuda(reason: str): def skip_dec(func): @functools.wraps(func) def wrapper(self, *args, **kwargs): - if not onnxruntime.get_device() == "GPU": + if not torch.cuda.is_available() or not onnxruntime.get_device() == "GPU": raise unittest.SkipTest(f"GPU is not available. {reason}") return func(self, *args, **kwargs) From 7667f8d29c7c6d9ffc90372a6c6a32f88a3a38a4 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 18:03:56 +0200 Subject: [PATCH 11/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index db3947dd4..d2777647e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -112,7 +112,7 @@ jobs: matrix: os: [ubuntu-latest] transformers: ["4.37.2", "4.41.2"] - torch: ["", "--pre"] + torch: ["", "nightly"] python_version: ["3.11"] name: - dort @@ -129,11 +129,16 @@ jobs: python -m pip install --upgrade pip setuptools wheel pytest onnx parameterized ml-dtypes pytest-coverage hypothesis expecttest==0.1.6 beartype!=0.16.0 pytest-cov pytest-randomly pytest-subtests pytest-xdist pyyaml name: Install requirements. - run: | - python -m pip install ${{ matrix.torch }} torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu + if: matrix.torch == 'nightly' + name: Install torch nightly + - run: | + python -m pip install torch torchvision torchaudio + if: matrix.torch != 'nightly' name: Install torch - run: | python -m pip install onnxruntime-training - name: Install onnxruntime-training + name: Install onnxruntime-training==1.17.0 - run: | python -m pip install transformers==${{ matrix.transformers }} name: Install transformers From 6230fe4760035f7e3b8ed48deb8be513eccec6a3 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 18:15:22 +0200 Subject: [PATCH 12/20] dort Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d2777647e..f6db3f9cf 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -137,11 +137,14 @@ jobs: if: matrix.torch != 'nightly' name: Install torch - run: | - python -m pip install onnxruntime-training - name: Install onnxruntime-training==1.17.0 + python -m pip install onnxruntime-training==1.17.0 + name: Install onnxruntime-training - run: | python -m pip install transformers==${{ matrix.transformers }} name: Install transformers + - run: | + python -m pip install . + name: Install onnxscript - run: | python -m pip freeze name: pip freeze From c26f2216ba08f8b78b38c73694e45316cc6d5dab Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 18:26:32 +0200 Subject: [PATCH 13/20] ci Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f6db3f9cf..6f6a3f5b7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -137,7 +137,7 @@ jobs: if: matrix.torch != 'nightly' name: Install torch - run: | - python -m pip install onnxruntime-training==1.17.0 + python -m pip install onnxruntime-training==1.17.1 name: Install onnxruntime-training - run: | python -m pip install transformers==${{ matrix.transformers }} From 117fbda056cb5d2aba28cc442f2ba06742c9dad5 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 18:54:07 +0200 Subject: [PATCH 14/20] needs torch more recent Signed-off-by: Xavier Dupre --- onnxscript/tools/benchmark/export_model_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/onnxscript/tools/benchmark/export_model_test.py b/onnxscript/tools/benchmark/export_model_test.py index c8a2dc229..b68550227 100644 --- a/onnxscript/tools/benchmark/export_model_test.py +++ b/onnxscript/tools/benchmark/export_model_test.py @@ -62,6 +62,11 @@ def test_export_model_llama_cpu_eager(self): @unittest.skipIf(not has_transformers(), reason="transformers missing") @unittest.skipIf(not is_onnxruntime_training(), reason="onnxruntime-training is needed") + @unittest.skipIf( + torch_older_than("2.4"), + reason="TypeError: _functionalize_sync(): " + "argument 't' (position 1) must be Tensor, not NoneType", + ) def test_export_model_phi_cpu_dynamo(self): args = [ "--verbose", From f8bb218b0f3c74c0e85a40bf9ec889a79a9dcad4 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 19:16:21 +0200 Subject: [PATCH 15/20] remove profilder to measure the time Signed-off-by: Xavier Dupre --- tests/ir/serde_roundtrip_test.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/ir/serde_roundtrip_test.py b/tests/ir/serde_roundtrip_test.py index 80810f0e0..0d6478e15 100644 --- a/tests/ir/serde_roundtrip_test.py +++ b/tests/ir/serde_roundtrip_test.py @@ -41,21 +41,21 @@ def tearDown(self) -> None: def test_serialization_deserialization_produces_same_model( self, _: str, model_path: pathlib.Path ) -> None: - if not self.profiler: - raise unittest.SkipTest("pyinstrument is not installed.") model = onnx.load(model_path) # Fix the missing graph name of some test models model.graph.name = "main_graph" onnx.checker.check_model(model) # Profile the serialization and deserialization process - self.profiler.start() + if self.profiler: + self.profiler.start() ir_model = ir.serde.deserialize_model(model) serialized = ir.serde.serialize_model(ir_model) - self.profiler.stop() - profile_path = pathlib.Path(__file__).parent / "serde_test_profiles" - profile_path.mkdir(exist_ok=True) - self.profiler.write_html(profile_path / f"{self.id().split('.')[-1]}.html") + if self.profiler: + self.profiler.stop() + profile_path = pathlib.Path(__file__).parent / "serde_test_profiles" + profile_path.mkdir(exist_ok=True) + self.profiler.write_html(profile_path / f"{self.id().split('.')[-1]}.html") onnxscript.testing.assert_onnx_proto_equal(serialized, model) onnx.checker.check_model(serialized) From 33810a1a13e0a8c04e5c44b2202a73c72e2bab22 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Fri, 14 Jun 2024 19:38:30 +0200 Subject: [PATCH 16/20] removing pyinstrument Signed-off-by: Xavier Dupre --- noxfile.py | 1 - requirements-dev.txt | 1 - tests/ir/serde_roundtrip_test.py | 19 ------------------- 3 files changed, 21 deletions(-) diff --git a/noxfile.py b/noxfile.py index 29799d8a4..fa8b7fe09 100644 --- a/noxfile.py +++ b/noxfile.py @@ -19,7 +19,6 @@ 'numpy==1.26.4; python_version>="3.9"', "packaging", "parameterized", - "pyinstrument", "pytest-cov", "pytest-randomly", "pytest-subtests", diff --git a/requirements-dev.txt b/requirements-dev.txt index bcac54c97..856ced098 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -24,7 +24,6 @@ beartype!=0.16.0 expecttest==0.1.6 hypothesis parameterized -pyinstrument pytest-cov pytest-randomly pytest-subtests diff --git a/tests/ir/serde_roundtrip_test.py b/tests/ir/serde_roundtrip_test.py index 0d6478e15..69d23d69e 100644 --- a/tests/ir/serde_roundtrip_test.py +++ b/tests/ir/serde_roundtrip_test.py @@ -25,18 +25,6 @@ class SerdeTest(unittest.TestCase): - def setUp(self) -> None: - try: - import pyinstrument - - self.profiler = pyinstrument.Profiler() - except ImportError: - self.profiler = None - - def tearDown(self) -> None: - if self.profiler: - self.profiler.reset() - @parameterized.parameterized.expand(test_args) def test_serialization_deserialization_produces_same_model( self, _: str, model_path: pathlib.Path @@ -47,15 +35,8 @@ def test_serialization_deserialization_produces_same_model( onnx.checker.check_model(model) # Profile the serialization and deserialization process - if self.profiler: - self.profiler.start() ir_model = ir.serde.deserialize_model(model) serialized = ir.serde.serialize_model(ir_model) - if self.profiler: - self.profiler.stop() - profile_path = pathlib.Path(__file__).parent / "serde_test_profiles" - profile_path.mkdir(exist_ok=True) - self.profiler.write_html(profile_path / f"{self.id().split('.')[-1]}.html") onnxscript.testing.assert_onnx_proto_equal(serialized, model) onnx.checker.check_model(serialized) From aa40595a04f2c4cdb500ced871a4a27ab55f16b3 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Mon, 17 Jun 2024 13:06:07 +0200 Subject: [PATCH 17/20] switch to nox Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 31 +++---------------------------- noxfile.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6f6a3f5b7..027c52603 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -112,8 +112,9 @@ jobs: matrix: os: [ubuntu-latest] transformers: ["4.37.2", "4.41.2"] - torch: ["", "nightly"] + torch: ["release", "nightly"] python_version: ["3.11"] + nox-tag: test-dort name: - dort runs-on: ${{ matrix.os }} @@ -126,33 +127,7 @@ jobs: - name: Pull Test Data run: git lfs pull - run: | - python -m pip install --upgrade pip setuptools wheel pytest onnx parameterized ml-dtypes pytest-coverage hypothesis expecttest==0.1.6 beartype!=0.16.0 pytest-cov pytest-randomly pytest-subtests pytest-xdist pyyaml - name: Install requirements. - - run: | - python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu - if: matrix.torch == 'nightly' - name: Install torch nightly - - run: | - python -m pip install torch torchvision torchaudio - if: matrix.torch != 'nightly' - name: Install torch - - run: | - python -m pip install onnxruntime-training==1.17.1 - name: Install onnxruntime-training - - run: | - python -m pip install transformers==${{ matrix.transformers }} - name: Install transformers - - run: | - python -m pip install . - name: Install onnxscript - - run: | - python -m pip freeze - name: pip freeze - - run: | - pytest onnxscript - name: Run onnxscript tests - - run: | - pytest tests + nox -t ${{ matrix.nox-tag }} --forcecolor -- ${{ matrix.torch }} ${{ matrix.transformers }} name: Run tests build_docs: diff --git a/noxfile.py b/noxfile.py index fa8b7fe09..0d0bccc01 100644 --- a/noxfile.py +++ b/noxfile.py @@ -152,3 +152,32 @@ def test_experimental_torchlib_onnx_ir(session): *session.posargs, env={"TORCHLIB_EXPERIMENTAL_USE_IR": "1"}, ) + + +@nox.session(tags=["test-dort"]) +def test_dort(session): + """Test the conversion of a couple of models from transformers.""" + session.install( + *COMMON_TEST_DEPENDENCIES, + ) + torch_version, transformers_version = session.posarg + + if torch_version == "nighly": + session.install( + "--pre", + "torch", + "torchvision", + "torchaudio", + "--index-url", + "https://download.pytorch.org/whl/nightly/cpu", + ) + else: + session.install("torch", "torchvision", "torchaudio") + + session.install("torch", "torchvision", "torchaudio") + session.install(f"transformers=={transformers_version}") + session.install("onnxruntime-training==1.17.1") + + session.run("pip", "list") + session.run("pytest", "onnxscript") + session.run("pytest", "tests") From 89e3d4ef2a9e7e1c67c2d49307a701d827fb6686 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Mon, 17 Jun 2024 13:16:20 +0200 Subject: [PATCH 18/20] add missing nox Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 027c52603..2e6978552 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -114,7 +114,7 @@ jobs: transformers: ["4.37.2", "4.41.2"] torch: ["release", "nightly"] python_version: ["3.11"] - nox-tag: test-dort + nox-tag: "test-dort" name: - dort runs-on: ${{ matrix.os }} @@ -124,6 +124,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} + - name: Install nox + run: python -m pip install nox - name: Pull Test Data run: git lfs pull - run: | From 65ae8b7b03389445d98161f4df54d0aae06ceea4 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Mon, 17 Jun 2024 13:23:15 +0200 Subject: [PATCH 19/20] fix nox tag Signed-off-by: Xavier Dupre --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 2e6978552..4e918552b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -114,7 +114,7 @@ jobs: transformers: ["4.37.2", "4.41.2"] torch: ["release", "nightly"] python_version: ["3.11"] - nox-tag: "test-dort" + nox-tag: ["test-dort"] name: - dort runs-on: ${{ matrix.os }} From 00043f72d62bcef8246d92e1fb010c5f6664e1ab Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Mon, 17 Jun 2024 13:37:34 +0200 Subject: [PATCH 20/20] fix mispelling Signed-off-by: Xavier Dupre --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 0d0bccc01..f4bfb1337 100644 --- a/noxfile.py +++ b/noxfile.py @@ -160,7 +160,7 @@ def test_dort(session): session.install( *COMMON_TEST_DEPENDENCIES, ) - torch_version, transformers_version = session.posarg + torch_version, transformers_version = session.posargs if torch_version == "nighly": session.install(