Skip to content

Commit d0c77c7

Browse files
committed
change
1 parent fe36790 commit d0c77c7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

_unittests/ut_helpers/test_torch_test_helper.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@ def test_replace_string_by_dynamic(self):
6262
proc = replace_string_by_dynamic(example)
6363
sproc = (
6464
str(proc)
65+
.replace("_DimHint(type=<_DimHintType.DYNAMIC: 3>)", "DYN")
66+
.replace(" ", "")
67+
.replace("<_DimHint.DYNAMIC:3>", "DYN")
6568
.replace(
6669
"_DimHint(type=<_DimHintType.DYNAMIC:3>,min=None,max=None,_factory=True)",
6770
"DYN",
6871
)
69-
.replace(",min=None,max=None,_factory=True", "")
70-
.replace("_DimHint(type=<_DimHintType.DYNAMIC: 3>)", "DYN")
71-
.replace(" ", "")
72-
.replace("<_DimHint.DYNAMIC:3>", "DYN")
7372
)
7473
self.assertEqual(
7574
"{'input_ids':{0:DYN,1:DYN},'attention_mask':({0:DYN,1:DYN},),'position_ids':[{0:DYN,1:DYN}]}",

0 commit comments

Comments
 (0)