Closed harupy closed 3 years ago
test_is_testing_respects_environment_variable
leaks a run but test_is_testing_respects_environment_variable
never creates a run. Does this mean test_autologging_behaviors_unit.py
or test_autologging_behaviors_integration.py
(they are executed prior to test_autologging_safety_unit.py
) leaks a run?mlflow.end_run()
failure indicates that the leaked run is created outside of test_is_testing_respects_environment_variable
.import mlflow
mlflow.set_tracking_uri("foo")
# A run leaks somewhere
mlflow.start_run()
# At setup for test_is_testing_respects_environment_variable,
# switch to a different tracking URI via `tracking_uri_mock`
mlflow.set_tracking_uri("bar")
# test_is_testing_respects_environment_variable passes
# At teardown for test_is_testing_respects_environment_variable:
assert not mlflow.active_run() -> fails since an active run exists
mlflow.end_run() -> fails since the active run doesn't belong to the tracking URI "bar"
I'm investigating:
@dbczumar Thanks for investigating!
pytest --verbose tests/autologging --large
is flaky:https://github.com/mlflow/mlflow/runs/2389644344#step:6:2031
An error occurs at the teardown of
test_is_testing_respects_environment_variable
intest_autologging_safety_unit.py
.Full error log: