From 6f1110ace4d80dfaccaa18bba4c71b4cd4d44c49 Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Wed, 26 Jul 2023 23:37:13 -0700 Subject: [PATCH 1/3] Fix requirements --- nam/_version.py | 2 +- setup.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/nam/_version.py b/nam/_version.py index 49e0fc1e..a5f830a2 100644 --- a/nam/_version.py +++ b/nam/_version.py @@ -1 +1 @@ -__version__ = "0.7.0" +__version__ = "0.7.1" diff --git a/setup.py b/setup.py index f23c2292..3ac41bed 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,17 @@ from distutils.util import convert_path from setuptools import setup, find_packages +def get_additional_requirements(): + # Issue 294 + try: + import transformers + # This may not be unnecessarily straict a requirement, but I'd rather + # fix this promptly than leave a chance that it wouldn't be fixed + # properly. + return ["transformers>=4"] + except ModuleNotFoundError: + return [] + main_ns = {} ver_path = convert_path("nam/_version.py") with open(ver_path) as ver_file: @@ -23,6 +34,7 @@ "tqdm", "wavio>=0.0.5", # Breaking change with older versions ] +requirements.extend(get_additional_requirements()) setup( name="neural-amp-modeler", From 0290c13a9fa8e556cd9b51d9d97121320058996f Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Wed, 26 Jul 2023 23:43:18 -0700 Subject: [PATCH 2/3] Fix requirements --- environment_cpu.yml | 1 + environment_gpu.yml | 1 + requirements.txt | 3 +++ setup.py | 2 ++ 4 files changed, 7 insertions(+) diff --git a/environment_cpu.yml b/environment_cpu.yml index 59241f7d..22ac08d5 100644 --- a/environment_cpu.yml +++ b/environment_cpu.yml @@ -31,5 +31,6 @@ dependencies: - pre-commit - pytorch_lightning - sounddevice + - transformers>=4 # See requirements.txt - wavio >=0.0.5 - -e . diff --git a/environment_gpu.yml b/environment_gpu.yml index 8e01a5cd..b5d4cb94 100644 --- a/environment_gpu.yml +++ b/environment_gpu.yml @@ -33,5 +33,6 @@ dependencies: - pre-commit - pytorch_lightning - sounddevice + - transformers>=4 # See requirements.txt - wavio >=0.0.5 - -e . diff --git a/requirements.txt b/requirements.txt index 919ad770..219fb509 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,6 +18,9 @@ pytorch_lightning scipy sounddevice torch +# Not required, but if you have it, it needs to be recent enough so I'm adding +# it. +transformers>=4 tqdm wavio wheel diff --git a/setup.py b/setup.py index 3ac41bed..be24b2cd 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,8 @@ def get_additional_requirements(): "auraloss==0.3.0", "matplotlib", "numpy", + "onnx", + "onnxruntime", "pydantic", "pytorch_lightning", "scipy", From b5a25695137de296930568d93167fd9a3cd6a6a2 Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Thu, 27 Jul 2023 00:42:02 -0700 Subject: [PATCH 3/3] Force transformers dependency --- nam/_version.py | 2 +- setup.py | 13 +------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/nam/_version.py b/nam/_version.py index a5f830a2..bc8c296f 100644 --- a/nam/_version.py +++ b/nam/_version.py @@ -1 +1 @@ -__version__ = "0.7.1" +__version__ = "0.7.2" diff --git a/setup.py b/setup.py index be24b2cd..1a9b96cc 100644 --- a/setup.py +++ b/setup.py @@ -5,17 +5,6 @@ from distutils.util import convert_path from setuptools import setup, find_packages -def get_additional_requirements(): - # Issue 294 - try: - import transformers - # This may not be unnecessarily straict a requirement, but I'd rather - # fix this promptly than leave a chance that it wouldn't be fixed - # properly. - return ["transformers>=4"] - except ModuleNotFoundError: - return [] - main_ns = {} ver_path = convert_path("nam/_version.py") with open(ver_path) as ver_file: @@ -33,10 +22,10 @@ def get_additional_requirements(): "sounddevice", "tensorboard", "torch", + "transformers>=4", # Issue-294 "tqdm", "wavio>=0.0.5", # Breaking change with older versions ] -requirements.extend(get_additional_requirements()) setup( name="neural-amp-modeler",