Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comment
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
  • Loading branch information
Isotr0py committed Sep 10, 2025
commit a47fe4f1ad64f5bf513fab5a75d7bb5fe4e7b5db
4 changes: 2 additions & 2 deletions src/transformers/configuration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,8 +1058,8 @@ def dict_dtype_to_str(self, d: dict[str, Any]) -> None:
if d.get("dtype") is not None:
if isinstance(d["dtype"], dict):
d["dtype"] = {k: str(v).split(".")[-1] for k, v in d["dtype"].items()}
elif not isinstance(d["dtype"], str) and (str_dtype := str(d["dtype"])).count("."):
d["dtype"] = str_dtype.split(".")[1]
elif not isinstance(d["dtype"], (str, int)):
d["dtype"] = str(d["dtype"]).split(".")[1]
for value in d.values():
if isinstance(value, dict):
self.dict_dtype_to_str(value)
Expand Down