custom-pyfunc-schema-driver(Python)

Loading...

Pyfunc custom schema driver notebook

This notebook shows you how to log, register, and deploy a Python AI agent compatible with Mosaic AI Agent Framework that accepts custom inputs and returns custom outputs.

To ensure compatibility, the agent must conform to Mosaic AI Agent Framework schema requirements, see (AWS | Azure).

Model-as-code notebook

Mosaic AI Agent Framework uses MLflows Models-as-code development workflow, which requires two notebooks:

  • A driver notebook that logs, registers, and deploys the agent (this notebook)
  • An agent notebook that defines the agent's logic
    • You can find the agent notebook for this driver, custom-pyfunc-schema-agent, on Databricks documentation (AWS | Azure)

For more information on Model-as-code, see MLflow's Models as code guide.

Requirements

This notebook requires a workspace that has been enabled for Unity Catalog.

2

Log the agent as an MLflow model

4

Register the model to Unity Catalog

Update the catalog, schema, and model_name below to register the MLflow model to Unity Catalog.

6

Deploy the agent

8