Skip to content

Commit

Permalink
rm cast, could keep None
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerzr committed Apr 12, 2024
1 parent 16c3bf7 commit a483b4b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,10 +1397,6 @@ def __post_init__(self):
# else its likely a filename if supported
if isinstance(passed_value, str) and passed_value.startswith("{"):
setattr(self, field, json.loads(passed_value))
# Since we default to a blank dict, set it to `None` after parsing
elif isinstance(passed_value, dict):
if passed_value == {}:
setattr(self, field, None)

# expand paths, if not os.makedirs("~/bar") will make directory
# in the current directory instead of the actual home
Expand Down

0 comments on commit a483b4b

Please sign in to comment.