nerdexam
Microsoft

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

Train and deploy models

Question

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 cannot be serialized in Pickle format. - The model source code is complex. - The Python library for the model must be packaged with the model. You need to create a custom model flavor to enable logging with MLflow. What should you use?

Options

  • Amodel loader
  • Bartifacts
  • Cmodel wrapper
  • Dcustom signatures

How the community answered

(26 responses)
  • A
    69% (18)
  • B
    4% (1)
  • C
    15% (4)
  • D
    12% (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

#MLflow#Custom Models#Model Logging#Model Flavors

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice