Fixes #1419: ensure correct run status on failure for MLflow, patch pre-execution NoneType crash#1541
Fixes #1419: ensure correct run status on failure for MLflow, patch pre-execution NoneType crash#1541dedyoc wants to merge 14 commits intoapache:mainfrom
Conversation
skrawcz
left a comment
There was a problem hiding this comment.
Great thanks. Is there a unit and/or integration test we could write for this?
|
I checked the tests/plugins directory and noticed there isn't an existing test folder for h_mlflow yet. |
|
Test failed: |
|
I have added |
|
Hi @skrawcz , I've verified that the tests are now passing successfully on my fork's Action Could you please take another look when you have a moment? |
|
Cool. Mind fixing the ruff issues --- you should be able to run the pre-commit check for this: |
|
I thought they are a bit out of scope for this PR but sure, I will take care of em. |
…/dedyoc/hamilton into fix/mlflow-run-status-on-failure
skrawcz
left a comment
There was a problem hiding this comment.
thanks for the fixes 🙏 appreciate it. looks good!
|
ugh @dedyoc sorry can you rebase and fix the conflicts? |
|
maybe we didn't need to fix those issues because they're fixed on main? 🤔 |
Fixes #1419
This PR resolves an issue where the MLflow plugin incorrectly reported failed Hamilton DAG as successful ("FINISHED"). Additionally, it patches a bug that caused the plugin to crash when no config or inputs were provided.
Changes
run_after_graph_executioninh_mlflow.pyto explicitly pass the correct run status ("FINISHED"or"FAILED") tomlflow.end_run()asmlflow.end_run()defaulted to success.run_before_graph_executionto prevent anAttributeErrorwhenself.configorinputsevaluate toNone.How I tested this
MLFlowTrackeradapter.ValueErrorinside a node to simulate a crash.mlflow uithat the run correctly registered asFAILED.inputsno longer crashes the pre-execution hook.Notes
Checklist