Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
japdubengsub committed Oct 1, 2024
1 parent 49722b1 commit a804240
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/tests_pytorch/loggers/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def log_metrics(self, metrics, step):

if logger_class == CometLogger:
logger.experiment.id = "foo"
logger._comet_config.offline_directory = None
logger.experiment.project_name = "bar"

if logger_class == NeptuneLogger:
Expand Down Expand Up @@ -299,7 +300,9 @@ def test_logger_with_prefix_all(mlflow_mock, wandb_mock, comet_mock, neptune_moc
_patch_comet_atexit(monkeypatch)
logger = _instantiate_logger(CometLogger, save_dir=tmp_path, prefix=prefix)
logger.log_metrics({"test": 1.0}, step=0)
logger.experiment.log_metrics.assert_called_once_with({"tmp-test": 1.0}, epoch=None, step=0)
logger.experiment.__internal_api__log_metrics__.assert_called_once_with(
{"test": 1.0}, epoch=None, step=0, prefix=prefix, framework="pytorch-lightning"
)

# MLflow
Metric = mlflow_mock.entities.Metric
Expand Down

0 comments on commit a804240

Please sign in to comment.