Skip to content

Commit e83ac9e

Browse files
Modified the default model_name argument
1 parent 9b9c41d commit e83ac9e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

QEfficient/base/onnx_transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def apply(
4242
cls,
4343
model: ModelProto,
4444
*,
45-
model_name: str,
45+
model_name: str = "",
4646
onnx_base_dir: Optional[str] = None,
4747
apply_clip: bool = True,
4848
apply_split: bool = True,

tests/base/test_onnx_transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_fp16clip_transform():
3232
}
3333
""")
3434
onnx.checker.check_model(test_onnx, True, True, True)
35-
transformed_onnx, transformed = ClipAndSplitTransform.apply(test_onnx, model_name="", apply_split=False)
35+
transformed_onnx, transformed = ClipAndSplitTransform.apply(test_onnx, apply_split=False)
3636
assert transformed
3737
assert onnx.numpy_helper.to_array(transformed_onnx.graph.initializer[0]) == 65504.0
3838
assert onnx.numpy_helper.to_array(transformed_onnx.graph.initializer[1]) == 2147483647
@@ -64,7 +64,7 @@ def test_fp16clip_transform_external(tmp_path):
6464
onnx.checker.check_model(onnx_path, True, True, True)
6565

6666
transformed_onnx, transformed = ClipAndSplitTransform.apply(
67-
test_onnx, model_name="", onnx_base_dir=str(tmp_path), apply_split=False
67+
test_onnx, onnx_base_dir=str(tmp_path), apply_split=False
6868
)
6969
assert transformed
7070
assert onnx.numpy_helper.to_array(transformed_onnx.graph.initializer[0]) == -65504.0

0 commit comments

Comments
 (0)