Skip to content

Commit

Permalink
Fix requirements (#295)
Browse files Browse the repository at this point in the history
* Fix requirements

* Fix requirements
  • Loading branch information
sdatkinson authored Jul 27, 2023
1 parent 7e904ba commit 5245fd1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions environment_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ dependencies:
- pre-commit
- pytorch_lightning
- sounddevice
- transformers>=4 # See requirements.txt
- wavio >=0.0.5
- -e .
1 change: 1 addition & 0 deletions environment_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ dependencies:
- pre-commit
- pytorch_lightning
- sounddevice
- transformers>=4 # See requirements.txt
- wavio >=0.0.5
- -e .
2 changes: 1 addition & 1 deletion nam/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.0"
__version__ = "0.7.1"
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -14,6 +25,8 @@
"auraloss==0.3.0",
"matplotlib",
"numpy",
"onnx",
"onnxruntime",
"pydantic",
"pytorch_lightning",
"scipy",
Expand All @@ -23,6 +36,7 @@
"tqdm",
"wavio>=0.0.5", # Breaking change with older versions
]
requirements.extend(get_additional_requirements())

setup(
name="neural-amp-modeler",
Expand Down

0 comments on commit 5245fd1

Please sign in to comment.