Skip to content

Commit b748e5d

Browse files
committed
Fix MLflow logger test for checkpoint_path_prefix
1 parent 182bef6 commit b748e5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/tests_pytorch/loggers/test_mlflow.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def test_set_tracking_uri(mlflow_mock):
430430

431431

432432
@mock.patch("lightning.pytorch.loggers.mlflow._get_resolve_tags", Mock())
433-
def test_mlflow_log_model_with_checkpoint_artifact_path_prefix(mlflow_mock, tmp_path):
433+
def test_mlflow_log_model_with_checkpoint_path_prefix(mlflow_mock, tmp_path):
434434
"""Test that the logger creates the folders and files in the right place with a prefix."""
435435
client = mlflow_mock.tracking.MlflowClient
436436

@@ -455,4 +455,5 @@ def test_mlflow_log_model_with_checkpoint_artifact_path_prefix(mlflow_mock, tmp_
455455

456456
# Check that the prefix is used in the artifact path
457457
for call in client.return_value.log_artifact.call_args_list:
458-
assert call[1]["artifact_path"].startswith("my_prefix")
458+
args, _ = call
459+
assert str(args[2]).startswith("my_prefix")

0 commit comments

Comments
 (0)