mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Add missing Python dependencies for ORT training (#7104)
* Add missing Python dependencies for training cerberus - option parsing h5py - checkpoint onnx - model proto packaging/sympy - symbolic shape inference * Separate requirements.txt for inference and training Python packages.
This commit is contained in:
parent
fffe16cb43
commit
6987106bf5
2 changed files with 14 additions and 3 deletions
8
requirements-training.txt
Normal file
8
requirements-training.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
cerberus
|
||||
flatbuffers
|
||||
h5py
|
||||
numpy >= 1.16.6
|
||||
onnx
|
||||
packaging
|
||||
protobuf
|
||||
sympy
|
||||
9
setup.py
9
setup.py
|
|
@ -232,11 +232,14 @@ packages = [
|
|||
'onnxruntime.transformers.longformer',
|
||||
]
|
||||
|
||||
requirements_file = "requirements.txt"
|
||||
|
||||
if '--enable_training' in sys.argv:
|
||||
packages.extend(['onnxruntime.training',
|
||||
'onnxruntime.training.amp',
|
||||
'onnxruntime.training.optim'])
|
||||
sys.argv.remove('--enable_training')
|
||||
requirements_file = "requirements-training.txt"
|
||||
|
||||
package_data = {}
|
||||
data_files = []
|
||||
|
|
@ -310,12 +313,12 @@ if bdist_wheel is not None :
|
|||
cmd_classes['bdist_wheel'] = bdist_wheel
|
||||
cmd_classes['build_ext'] = build_ext
|
||||
|
||||
requirements_path = path.join(getcwd(), "requirements.txt")
|
||||
requirements_path = path.join(getcwd(), requirements_file)
|
||||
if not path.exists(requirements_path):
|
||||
this = path.dirname(__file__)
|
||||
requirements_path = path.join(this, "requirements.txt")
|
||||
requirements_path = path.join(this, requirements_file)
|
||||
if not path.exists(requirements_path):
|
||||
raise FileNotFoundError("Unable to find 'requirements.txt'")
|
||||
raise FileNotFoundError("Unable to find " + requirements_file)
|
||||
with open(requirements_path) as f:
|
||||
install_requires = f.read().splitlines()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue