Skip to content

Commit 6d41365

Browse files
committed
Fix: check None
1 parent 25a308e commit 6d41365

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/training_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2567,7 +2567,7 @@ def to_dict(self):
25672567
quantization_config = v.get("quantization_config")
25682568
if quantization_config and not isinstance(quantization_config, dict):
25692569
d[k]["quantization_config"] = quantization_config.to_dict()
2570-
if k == "parallelism_config":
2570+
if k == "parallelism_config" and v is not None:
25712571
import copy
25722572

25732573
# This is a hack as torch DeviceMesh is not json serializable

0 commit comments

Comments
 (0)