Skip to content

Commit 6218583

Browse files
committed
fix key error in CometLogger
1 parent 1e90052 commit 6218583

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torchtune/training/metric_logging.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def save_config(config: DictConfig) -> Path:
4646
OmegaConf.save(config, output_config_fname)
4747
return output_config_fname
4848
except Exception as e:
49-
log.warning(f"Error saving config to {output_config_fname}.\nError: \n{e}.")
49+
log.warning(f"Error saving config.\nError: \n{e}.")
5050

5151

5252
class MetricLoggerInterface(Protocol):
@@ -421,7 +421,8 @@ def __init__(
421421
) from e
422422

423423
# Remove 'log_dir' from kwargs as it is not a valid argument for comet_ml.ExperimentConfig
424-
del kwargs["log_dir"]
424+
if "log_dir" in kwargs:
425+
del kwargs["log_dir"]
425426

426427
_, self.rank = get_world_size_and_rank()
427428

0 commit comments

Comments
 (0)