File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import torch
44
55
6- __version__ = "1.0.17 "
6+ __version__ = "1.0.18 "
77
88pkg_path = os .path .dirname (os .path .realpath (__file__ ))
99lib_path = os .path .join (pkg_path , "lib" )
Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ def add_dynamic_forward(cls):
365365 func_signature = ", " .join (args )
366366 dict_creation_lines = [f" '{ arg } ': { arg } ," for arg in args ]
367367 func_body = (
368- " inputs = {{ \n " + "\n " .join (dict_creation_lines ) + "\n }\n "
368+ " inputs = {\n " + "\n " .join (dict_creation_lines ) + "\n }\n "
369369 )
370370 func_body += " return self.user_model(inputs)\n "
371371 func_code = f"def forward(self, { func_signature } ):\n { func_body } "
@@ -415,7 +415,7 @@ def add_dynamic_forward(cls):
415415 # 构建函数体
416416 dict_creation_lines = [f" '{ arg } ': { arg } ," for arg in valid_args ]
417417 func_body = (
418- " inputs = {{ \n " + "\n " .join (dict_creation_lines ) + "\n }\n "
418+ " inputs = {\n " + "\n " .join (dict_creation_lines ) + "\n }\n "
419419 )
420420
421421 # 为invalid_placeholder添加空tensor
You can’t perform that action at this time.
0 commit comments