Nested experiments and UC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 11:59 PM
Í have a general problem.
I run a nested experiment in ML FLow, training and logging several models in a loop. Then I want to register the best in UC. No problem so far. But when I load the model I register and run prediction it dosen't work. If I only run one model, then everything works as expected.
Does anybody have a hunch about why this is the case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2025 08:40 AM
Hey @Henrik_ ,
There are a few things that could be happening here, if you share the error message/stack trace you get when it doesn’t work, I can help figure out which of these could be biting you and tailor the fix.
In the meantime, here's a quick debug checklist:
-
Print the exact run_id and artifact_path used to register the winner; confirm they point to the child run that logged that candidate.
-
Inspect the model’s signature in UC (Catalog Explorer → Model → Version → Signature) and ensure the input you pass at inference matches names and types. If missing, re-log with input_example or autologging.
-
If you see module import errors at inference, install the recorded dependencies with mlflow.pyfunc.get_model_dependencies() before loading, or use env_manager="virtualenv" for Spark UDFs.
-
Confirm the client and code are pointed to UC (mlflow.set_registry_uri("databricks-uc")) and that you’re using the 3-level UC name when registering and loading.
Could you paste the exact error text you see when calling predict, as well as how you’re building the model URI you register (the run_id and artifact_path)?