DP-100 · Question #488
You manage an Azure Machine Learning workspace. You build a custom model you must log with MLflow. The custom model includes the following: - The model is not natively supported by MLflow. - The model
The correct answer is A. model loader. When creating a custom MLflow flavor for a model that cannot be serialized with Pickle and is not natively supported by MLflow, you define a loader_module - the model loader (A). The loader module is a Python module that MLflow calls to load the model from its saved artifacts dir
Question
Options
- Amodel loader
- Bartifacts
- Cmodel wrapper
- Dcustom signatures
How the community answered
(26 responses)- A69% (18)
- B4% (1)
- C15% (4)
- D12% (3)
Explanation
When creating a custom MLflow flavor for a model that cannot be serialized with Pickle and is not natively supported by MLflow, you define a loader_module - the model loader (A). The loader module is a Python module that MLflow calls to load the model from its saved artifacts directory. It exposes a _load_pyfunc function that reconstructs the model object at inference time, bypassing the need for Pickle serialization. This is the required component for a fully custom MLflow flavor. Artifacts (B) are the files saved alongside the model (weights, configs) but do not define how the model is loaded. A model wrapper (C) (mlflow.pyfunc.PythonModel subclass) is an alternative pyfunc approach but does not constitute a custom flavor with its own loader module. Custom signatures (D) define input/output schemas and are optional metadata, not a loading mechanism.
Topics
Community Discussion
No community discussion yet for this question.