Skip to content

Commit 8000eb6

Browse files
committed
fix style
1 parent 5f3e1d7 commit 8000eb6

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/onnxruntime/test_modeling.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,13 @@ def __init__(self, *args, **kwargs):
141141
self.TINY_ONNX_SEQ2SEQ_MODEL_ID = "fxmarty/sshleifer-tiny-mbart-onnx"
142142
self.TINY_ONNX_STABLE_DIFFUSION_MODEL_ID = "optimum-internal-testing/tiny-stable-diffusion-onnx"
143143

144-
145144
def test_ella(self):
146-
model_id = "optimum-internal-testing/tiny-random-llama"
147-
file_name="model_optimized.onnx"
145+
model_id = "optimum-internal-testing/tiny-random-llama"
146+
file_name = "model_optimized.onnx"
148147

149148
model = ORTModelForCausalLM.from_pretrained(model_id, revision="onnx")
150149
self.assertEqual(model.model_path.name, "model.onnx")
151-
150+
152151
model = ORTModelForCausalLM.from_pretrained(model_id, revision="onnx", file_name=file_name)
153152
self.assertEqual(model.model_path.name, file_name)
154153

@@ -161,13 +160,15 @@ def test_ella(self):
161160
model = ORTModelForCausalLM.from_pretrained(model_id, revision="merged-onnx", subfolder="subfolder")
162161
self.assertEqual(model.model_path.name, "model.onnx")
163162

164-
model = ORTModelForCausalLM.from_pretrained(model_id, revision="merged-onnx", subfolder="subfolder", file_name=file_name)
163+
model = ORTModelForCausalLM.from_pretrained(
164+
model_id, revision="merged-onnx", subfolder="subfolder", file_name=file_name
165+
)
165166
self.assertEqual(model.model_path.name, file_name)
166-
167-
model = ORTModelForCausalLM.from_pretrained(model_id, revision="merged-onnx", file_name="decoder_with_past_model.onnx")
168-
self.assertEqual(model.model_path.name, "decoder_with_past_model.onnx")
169-
170167

168+
model = ORTModelForCausalLM.from_pretrained(
169+
model_id, revision="merged-onnx", file_name="decoder_with_past_model.onnx"
170+
)
171+
self.assertEqual(model.model_path.name, "decoder_with_past_model.onnx")
171172

172173
def test_load_model_from_local_path(self):
173174
model = ORTModel.from_pretrained(self.LOCAL_MODEL_PATH)

0 commit comments

Comments
 (0)