chore: change onnxruntime to 1.16
Browse files- pipeline.py +1 -1
- requirements.txt +4 -4
pipeline.py
CHANGED
|
@@ -20,7 +20,7 @@ class ONNXBaseModel(PreTrainedModel):
|
|
| 20 |
if base_path:
|
| 21 |
model_path = base_path + '/' + config.model_path
|
| 22 |
if os.path.exists(model_path):
|
| 23 |
-
self.session = ort.InferenceSession(model_path)
|
| 24 |
|
| 25 |
def forward(self, input=None, **kwargs):
|
| 26 |
outs = self.session.run(None, {'input': input})
|
|
|
|
| 20 |
if base_path:
|
| 21 |
model_path = base_path + '/' + config.model_path
|
| 22 |
if os.path.exists(model_path):
|
| 23 |
+
self.session = ort.InferenceSession(model_path, providers=['CPUExecutionProvider'])
|
| 24 |
|
| 25 |
def forward(self, input=None, **kwargs):
|
| 26 |
outs = self.session.run(None, {'input': input})
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
transformers
|
| 2 |
-
torch
|
| 3 |
-
onnx
|
| 4 |
-
onnxruntime
|
|
|
|
| 1 |
+
transformers
|
| 2 |
+
torch
|
| 3 |
+
onnx
|
| 4 |
+
onnxruntime==1.16.0
|