Closed freemin7 closed 2 months ago
I tried to bisect the issue but output of test changed non deterministically as i walked back the tree and it now works for a31b41a91dc32107fa7dcd6ad5a581c116a4ff9c which is cursed. I have no idea why this would happen.
(@v1.9) pkg> activate .
Activating project at `~/.julia/dev/MLFlowClient`
(MLFlowClient) pkg> test
Testing MLFlowClient
Status `/tmp/jl_q5UEKV/Project.toml`
[48062228] FilePathsBase v0.9.21
[cd3eb016] HTTP v1.10.5
[682c06a0] JSON v0.21.4
[64a0f543] MLFlowClient v0.4.6 `~/.julia/dev/MLFlowClient`
[605ecd9f] ShowCases v0.1.0
[5c2747f8] URIs v1.5.1
[ade2ca70] Dates
[8dfed614] Test
[cf7118a7] UUIDs
Status `/tmp/jl_q5UEKV/Manifest.toml`
[d1d4a3ce] BitFlags v0.1.8
[944b1d66] CodecZlib v0.7.4
[34da2185] Compat v4.14.0
[f0e56b4a] ConcurrentUtilities v2.4.1
[460bff9d] ExceptionUnwrapping v0.1.10
[48062228] FilePathsBase v0.9.21
[cd3eb016] HTTP v1.10.5
[692b3bcd] JLLWrappers v1.5.0
[682c06a0] JSON v0.21.4
[e6f89c97] LoggingExtras v1.0.3
[64a0f543] MLFlowClient v0.4.6 `~/.julia/dev/MLFlowClient`
[739be429] MbedTLS v1.1.9
[4d8831e6] OpenSSL v1.4.2
[69de0a69] Parsers v2.8.1
[aea7be01] PrecompileTools v1.2.1
[21216c6a] Preferences v1.4.3
[605ecd9f] ShowCases v0.1.0
[777ac1f9] SimpleBufferStream v1.1.0
[3bb67fe8] TranscodingStreams v0.10.7
[5c2747f8] URIs v1.5.1
[458c3c95] OpenSSL_jll v3.0.13+1
[56f22d72] Artifacts
[2a0f44e3] Base64
[ade2ca70] Dates
[b77e0a4c] InteractiveUtils
[8f399da3] Libdl
[56ddb016] Logging
[d6f4376e] Markdown
[a63ad114] Mmap
[ca575930] NetworkOptions v1.2.0
[de0858da] Printf
[9a3f8284] Random
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization
[6462fe0b] Sockets
[fa267f1f] TOML v1.0.3
[8dfed614] Test
[cf7118a7] UUIDs
[4ec0a83e] Unicode
[c8ffd9c3] MbedTLS_jll v2.28.2+0
[14a3606d] MozillaCACerts_jll v2022.10.11
[83775a58] Zlib_jll v1.2.13+0
Precompiling project...
1 dependency successfully precompiled in 1 seconds. 24 already precompiled.
Testing Running tests...
Test Summary: | Pass Total Time
createexperiment | 2 2 0.9s
Test Summary: | Pass Total Time
getexperiment | 5 5 0.1s
getexperiment_by_experiment_id | 2 2 0.0s
getexperiment_by_experiment_name | 2 2 0.1s
getexperiment_not_found | 1 1 0.0s
Test Summary: | Pass Total Time
getorcreateexperiment | 4 4 0.1s
Test Summary: | Pass Total Time
deleteexperiment | 1 1 0.4s
Test Summary: | Pass Total Time
restoreexperiment | 2 2 0.0s
Test Summary: | Pass Total Time
searchexperiments | 6 6 0.1s
searchexperiments_get_all | 1 1 0.0s
searchexperiments_by_filter | 2 2 0.0s
searchexperiments_by_filter_attributes | 2 2 0.0s
searchexperiments_filter_exception | 1 1 0.0s
Test Summary: | Pass Total Time
createrun | 4 4 0.6s
createrun_by_experiment_id | 2 2 0.5s
createrun_by_experiment_type | 2 2 0.0s
Test Summary: | Pass Total Time
getrun | 2 2 0.1s
Test Summary: | Pass Total Time
updaterun | 25 25 0.5s
updaterun_by_run_id | 5 5 0.4s
updaterun_by_run_info | 5 5 0.0s
updaterun_byrun | 5 5 0.0s
updaterun_by_run_info_and_defined_status | 5 5 0.0s
updaterun_by_run_and_defined_status | 5 5 0.0s
Test Summary: | Pass Total Time
deleterun | 2 2 0.2s
deleterun_by_run_info | 1 1 0.2s
deleterun_by_run | 1 1 0.0s
Test Summary: | Pass Total Time
searchruns | 10 10 1.5s
searchruns_by_experiment_id | 1 1 0.3s
searchruns_by_experiment | 1 1 0.1s
searchruns_by_experiments_array | 1 1 0.2s
searchruns_by_filter | 1 1 0.0s
searchruns_by_filter_params | 1 1 0.1s
searchruns_filter_exception | 1 1 0.0s
runs_get_methods | 4 4 0.1s
Test Summary: | Pass Total Time
logparam | 8 8 0.1s
logparam_by_run_id_and_key_value | 2 2 0.0s
logparam_by_run_info_and_key_value | 2 2 0.0s
logparam_by_run_and_key_value | 2 2 0.0s
logparam_by_union_and_dict_key_value | 2 2 0.0s
Test Summary: | Pass Total Time
logmetric | 12 12 0.2s
logmetric_by_run_id_and_key_value | 3 3 0.1s
logmetric_by_run_info_and_key_value | 3 3 0.0s
logmetric_by_run_and_key_value | 3 3 0.0s
logmetric_by_union_and_key_arrayvalue | 3 3 0.0s
Test Summary: | Pass Broken Total Time
logartifact | 5 1 6 0.3s
logartifact_by_run_and_filenameanddata | 1 1 0.0s
logartifact_by_run_id_and_file | 1 1 0.1s
logartifact_by_run_and_file | 1 1 0.0s
logartifact_by_run_info_and_file | 1 1 0.0s
logartifact_using_IOBuffer | 1 1 0.0s
logartifact_error | 1 1 0.0s
Test Summary: | Pass Total Time
logbatch | 4 4 0.6s
logbatch_by_types | 2 2 0.4s
logbatch_by_dicts | 2 2 0.2s
Test Summary: | Pass Total Time
listartifacts | 3 3 0.2s
listartifacts_by_run_id | 1 1 0.2s
listartifacts_by_run | 1 1 0.0s
listartifacts_by_run_info | 1 1 0.0s
Testing MLFlowClient tests passed
Hi.
The error is happening because the previous run doesn't ended correctly. To improve this here, we need to define a post-test routine to delete the experiments even when a test fails.
This can be flagged as an improvement in the next version for the test suite, but it's not a bug.
Right. The tests were written with the assumption that the mlflow test instance will be wiped out after test runs with a separate process and not the tests themselves. This way if the tests fail, one could debug what happened using test output and existing objects in mlflow before wiping out mlflow. So the behaviour was actually intentional. The local development workflow is:
have an mlflow instance running
run the tests
wipe out the instance
run the tests
[...]
The same thing happens when the tests are run in github. A new mlflow instance is spun up and then its automatically wiped out by the job rather than cleaned up by the tests.