From a483b4bab2da5dd8b095ff20906ff9cc35aa6e1e Mon Sep 17 00:00:00 2001 From: Zach Mueller Date: Fri, 12 Apr 2024 14:32:12 -0400 Subject: [PATCH] rm cast, could keep None --- src/transformers/training_args.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/transformers/training_args.py b/src/transformers/training_args.py index e203d6a3ff642b..adc5bae05e65b1 100644 --- a/src/transformers/training_args.py +++ b/src/transformers/training_args.py @@ -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