Skip to content

Commit

Permalink
fix key error in CometLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankur-singh committed Jan 18, 2025
1 parent 1e90052 commit 6218583
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions torchtune/training/metric_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def save_config(config: DictConfig) -> Path:
OmegaConf.save(config, output_config_fname)
return output_config_fname
except Exception as e:
log.warning(f"Error saving config to {output_config_fname}.\nError: \n{e}.")
log.warning(f"Error saving config.\nError: \n{e}.")


class MetricLoggerInterface(Protocol):
Expand Down Expand Up @@ -421,7 +421,8 @@ def __init__(
) from e

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

_, self.rank = get_world_size_and_rank()

Expand Down

0 comments on commit 6218583

Please sign in to comment.