neural-amp-modeler

Neural network emulator for guitar amplifiers
Log | Files | Refs | README | LICENSE

commit 5245fd10b9c67eec9a5dae9251f65e4c8e5b2e2b
parent 7e904bad58a2c78915e273c44f55708aea9ce286
Author: Steven Atkinson <[email protected]>
Date:   Thu, 27 Jul 2023 01:47:46 -0500

Fix requirements (#295)

* Fix requirements

* Fix requirements
Diffstat:
Menvironment_cpu.yml | 1+
Menvironment_gpu.yml | 1+
Mnam/_version.py | 2+-
Mrequirements.txt | 3+++
Msetup.py | 14++++++++++++++
5 files changed, 20 insertions(+), 1 deletion(-)

diff --git 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 @@ -33,5 +33,6 @@ dependencies: - pre-commit - pytorch_lightning - sounddevice + - transformers>=4 # See requirements.txt - wavio >=0.0.5 - -e . diff --git a/nam/_version.py b/nam/_version.py @@ -1 +1 @@ -__version__ = "0.7.0" +__version__ = "0.7.1" diff --git 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 @@ -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: @@ -14,6 +25,8 @@ requirements = [ "auraloss==0.3.0", "matplotlib", "numpy", + "onnx", + "onnxruntime", "pydantic", "pytorch_lightning", "scipy", @@ -23,6 +36,7 @@ requirements = [ "tqdm", "wavio>=0.0.5", # Breaking change with older versions ] +requirements.extend(get_additional_requirements()) setup( name="neural-amp-modeler",