From 30383320b031d86d5d552df04d2281306e69d913 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 13 Sep 2024 10:28:19 -0700 Subject: [PATCH 1/5] upgrade modelopt --- pyproject.toml | 2 +- tests/py/requirements.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f6230c8a74..543d8ba937 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ dynamic = ["version"] [project.optional-dependencies] torchvision = ["torchvision >=0.20.dev,<0.21.0"] -quantization = ["nvidia-modelopt[all]>=0.15.1"] +quantization = ["nvidia-modelopt[all]>=0.17.0"] monitoring-tools = ["rich >= 13.7.1"] jupyter = ["rich[jupyter] >= 13.7.1"] diff --git a/tests/py/requirements.txt b/tests/py/requirements.txt index 460cc01027..5a3c7ee8b1 100644 --- a/tests/py/requirements.txt +++ b/tests/py/requirements.txt @@ -9,6 +9,5 @@ pytest-xdist>=3.6.1 pyyaml timm>=1.0.3 transformers==4.40.2 -# TODO @lanlao-nvidia Renable when modelopt can be install properly to run the tests -# "nvidia-modelopt[all]">=0.16.1,<0.17.0 +nvidia-modelopt[all]>=0.17.0 --extra-index-url https://pypi.nvidia.com From 11f999ebda3d009734ffe00b2826bf7daac320d8 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Sat, 14 Sep 2024 07:07:58 -0700 Subject: [PATCH 2/5] test --- pyproject.toml | 2 +- tests/py/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 543d8ba937..61d09a2287 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ dynamic = ["version"] [project.optional-dependencies] torchvision = ["torchvision >=0.20.dev,<0.21.0"] -quantization = ["nvidia-modelopt[all]>=0.17.0"] +quantization = ["nvidia-modelopt[all]~=0.17.0"] monitoring-tools = ["rich >= 13.7.1"] jupyter = ["rich[jupyter] >= 13.7.1"] diff --git a/tests/py/requirements.txt b/tests/py/requirements.txt index 5a3c7ee8b1..68fea70033 100644 --- a/tests/py/requirements.txt +++ b/tests/py/requirements.txt @@ -9,5 +9,5 @@ pytest-xdist>=3.6.1 pyyaml timm>=1.0.3 transformers==4.40.2 -nvidia-modelopt[all]>=0.17.0 +nvidia-modelopt[all]~=0.17.0 --extra-index-url https://pypi.nvidia.com From b2b8143d854727b7a3863e69e32ad932a707053c Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Sat, 14 Sep 2024 07:49:14 -0700 Subject: [PATCH 3/5] test --- pyproject.toml | 2 +- tests/py/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 61d09a2287..bc6c6b60cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ dynamic = ["version"] [project.optional-dependencies] torchvision = ["torchvision >=0.20.dev,<0.21.0"] -quantization = ["nvidia-modelopt[all]~=0.17.0"] +quantization = ["nvidia-modelopt[deploy,hf,torch]~=0.17.0"] monitoring-tools = ["rich >= 13.7.1"] jupyter = ["rich[jupyter] >= 13.7.1"] diff --git a/tests/py/requirements.txt b/tests/py/requirements.txt index 68fea70033..f791444c8a 100644 --- a/tests/py/requirements.txt +++ b/tests/py/requirements.txt @@ -9,5 +9,5 @@ pytest-xdist>=3.6.1 pyyaml timm>=1.0.3 transformers==4.40.2 -nvidia-modelopt[all]~=0.17.0 +nvidia-modelopt[deploy,hf,torch]~=0.17.0 --extra-index-url https://pypi.nvidia.com From a21b780d6ac42cdadaa0a6a8cc27331051bfa62b Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Sun, 15 Sep 2024 09:17:47 -0700 Subject: [PATCH 4/5] test --- tests/py/dynamo/models/test_models_export.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/py/dynamo/models/test_models_export.py b/tests/py/dynamo/models/test_models_export.py index 8976c7fbc0..9b3ed6efaf 100644 --- a/tests/py/dynamo/models/test_models_export.py +++ b/tests/py/dynamo/models/test_models_export.py @@ -1,5 +1,6 @@ # type: ignore import importlib +import platform import unittest from importlib import metadata @@ -251,8 +252,9 @@ def calibrate_loop(model): @unittest.skipIf( not importlib.util.find_spec("modelopt") - or Version(metadata.version("nvidia-modelopt")) < Version("0.16.1"), - "modelopt 0.16.1 or later is required Int8 quantization is supported in modelopt since 0.16.1 or later", + or platform.system() != "Linux" + or Version(metadata.version("nvidia-modelopt")) < Version("0.17.0"), + "modelopt 0.17.0 or later is required, Int8 quantization is supported in modelopt since 0.17.0 or later for linux", ) @pytest.mark.unit def test_base_int8(ir): From 5566c30ec3ea013d3c23bc8abc8a166ab0daa554 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Mon, 16 Sep 2024 08:39:36 -0700 Subject: [PATCH 5/5] test --- tests/py/dynamo/models/test_models_export.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/py/dynamo/models/test_models_export.py b/tests/py/dynamo/models/test_models_export.py index 9b3ed6efaf..25116ce865 100644 --- a/tests/py/dynamo/models/test_models_export.py +++ b/tests/py/dynamo/models/test_models_export.py @@ -251,8 +251,8 @@ def calibrate_loop(model): @unittest.skipIf( - not importlib.util.find_spec("modelopt") - or platform.system() != "Linux" + platform.system() != "Linux" + or not importlib.util.find_spec("modelopt") or Version(metadata.version("nvidia-modelopt")) < Version("0.17.0"), "modelopt 0.17.0 or later is required, Int8 quantization is supported in modelopt since 0.17.0 or later for linux", )