Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RunStatus of mlflow run is "FINISHED" instead of "FAILED" when the kedro run fails #121

Closed
Galileo-Galilei opened this issue Nov 21, 2020 · 2 comments · Fixed by #128
Closed
Labels
bug Something isn't working
Milestone

Comments

@Galileo-Galilei
Copy link
Owner

Description

When I launch kedro run and the run fails, the on_pipeline_error closes all the mlflow runs (to avoid interactions with further runs)

Context

I cannot distinguish failed runs from sucessful ones in the mlflow ui.

Steps to Reproduce

Launch a failing pipeline with kedro run.

Expected Result

The mlflow ui should display the run with a red cross

Actual Result

The mlflow ui displays the run with a green tick

Does the bug also happen with the last version on develop?

Yes.

Potential solution:

Replace these lines:

https://github.com/Galileo-Galilei/kedro-mlflow/blob/63dcd501bfe98bebc81f25f70020ff4141c1e91c/kedro_mlflow/framework/hooks/pipeline_hook.py#L193-L194

with

while mlflow.active_run():
    mlflow.end_run(mlflow.entities.RunStatus.FAILED)

or even better, retrieve current run status from mlflow?

@Galileo-Galilei Galileo-Galilei added the bug Something isn't working label Nov 21, 2020
@Galileo-Galilei Galileo-Galilei added this to the Release 0.5.0 milestone Nov 21, 2020
@Galileo-Galilei Galileo-Galilei changed the title RunStatus of mlflow run is "FINISHED" instead of ""FAILED" when the kedro run fails RunStatus of mlflow run is "FINISHED" instead of "FAILED" when the kedro run fails Nov 21, 2020
@takikadiri
Copy link
Collaborator

Good catch !
Since we catch the Error and manually end the run, mlflow do not receive the "error code 1" of the current process. If we no longer end run manually, mlflow will tag the run as FAILED. But since we want to control the pipeline error, we can apply your suggestion (specifiying the status as failed)

@Galileo-Galilei
Copy link
Owner Author

Yes, but we need to terminate the run manually when it failed and one use it interactively (in CLI, tis makes no difference because it gets the error code as you say) to avoid further interference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants