You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the onnxruntime training API for Python, some packages in onnxruntime.training.optim import torch. Due to how Python package imports work, this results in a dependency of all packages in onnxruntime.training on torch. torch package sizes can be rather large and this size is problematic in some environments. It would be great to not require this package if using parts of onnxruntime that don't need it (e.g. onnxblock).
Not too urgent, I have a workaround in place that's patching the API in onnxruntime.training.__init__.py to only add the optim package if torch is available.
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.19.2
PyTorch Version
not using Pytorch
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered:
nfnt
added
the
training
issues related to ONNX Runtime training; typically submitted using template
label
Sep 12, 2024
This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.
Is there anything I can help with to get this resolved? I can see that there were some CI failures on #22072, but I'm not sure if they are related to the proposed changes.
Describe the issue
In the onnxruntime training API for Python, some packages in
onnxruntime.training.optim
importtorch
. Due to how Python package imports work, this results in a dependency of all packages inonnxruntime.training
ontorch
.torch
package sizes can be rather large and this size is problematic in some environments. It would be great to not require this package if using parts of onnxruntime that don't need it (e.g.onnxblock
).To reproduce
In a fresh virtual env run:
This will fail with
Urgency
Not too urgent, I have a workaround in place that's patching the API in
onnxruntime.training.__init__.py
to only add theoptim
package iftorch
is available.ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.19.2
PyTorch Version
not using Pytorch
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: