Skip to content Skip to sidebar Skip to footer

How Can I Throw An Exception From Within An MLflow Project?

I have an Mlflow project that raises an exception. I execute that function using mlflow.run, but I get mlflow.exceptions.ExecutionException('Run (ID '') failed'). Is

Solution 1:

Unfortunately not at the moment. mlflow run starts a new process and there is no protocol for exception passing right now. In general the other project does not even have to be in the same language.

One workaround I can think of is to pass the exception via mlflow by setting run tag. E.g.:

try:
    ...
except Exception as ex:
    mlflow.set_tag("exception", str(ex))

Post a Comment for "How Can I Throw An Exception From Within An MLflow Project?"