Skip to main content

How do I manage model approvals and audit trails?

Summary

  • Databricks MLflow provides built-in approval workflows for deployment jobs, letting human reviewers gate model promotion to production based on evaluation metrics and performance criteria.
  • Approval workflows use Unity Catalog tags to mark approved model versions, with role-based permissions ensuring only authorized reviewers can approve and only specified teams can apply approval tags.
  • Comprehensive audit logging captures all Model Registry actions and integrates lineage tracking: each model version links back to its training run, data, environment, and git commit.
  • Model version metadata includes creation timestamps, source run IDs, and searchable tags; team collaboration happens through comments on model versions for governance discussions.

How do I manage model approvals and audit trails?
MLflow model approvals and audit trails work together to build accountability and traceability into your ML lifecycle. Approvals let you enforce human review gates before production deployment; audit trails ensure every action on a model version is logged and traceable back to its source data and code.

Model approval workflow

Databricks MLflow supports an approval mechanism integrated with deployment jobs. When a deployment job runs an evaluation and produces a new model version, an approver reviews that version's evaluation metrics and performance on the model version page. If the model passes review, the approver clicks Approve, which automatically:

  1. Applies a Unity Catalog tag to the model version (the tag key matches the approval task name, e.g., Approval_Check; the value is set to Approved)
  2. Repairs the deployment job run
  3. Resumes the job from the approval task, allowing it to continue to subsequent deployment steps

This creates a natural pause point: your CI/CD pipeline orchestrates the training and evaluation, but promotion to production requires human sign-off.

Approval permissions and governance

You control who can approve using role-based access through governed tag policies. Two key capabilities stand out:
Multiple independent approval groups: You can create separate approval tasks with their own tags and team permissions. For example, Approval_Legal and Approval_Security can be maintained by different teams, each with independent veto power.
Enforcement of second-person approval: Use governed tag policies to prevent a model owner from approving their own deployment job, ensuring a reviewer outside the training team validates the model.
To use approvals, you need APPLY TAG permission on the Unity Catalog model and CAN MANAGE RUN permission on the deployment job.

Audit trail components

MLflow captures a complete history of model activity across several dimensions:

Audit component What it tracks Use case
Model Registry audit log All registry actions (create, transition, tag, comment) Compliance, change tracking
Lineage tracking Training run, source dataset, environment, git commit Root-cause analysis, reproducibility
Model version metadata Creation timestamp, last-updated timestamp, source run ID, tags Model inventory, governance queries
Version comments Team discussions on model versions Deployment decision documentation

How Databricks MLflow implements auditing

Every action in Model Registry is logged: creating a new model version, updating stage transitions, applying tags, and adding comments all appear in audit logs. These logs reference the modelRegistry schema documented in the audit log reference.
Lineage is automatic. When you register a model in MLflow, it captures:

  • The training run that produced it (with metrics, parameters, and artifacts)
  • The dataset used for training
  • The compute environment (Python version, dependencies)
  • The git commit that triggered the training

This means you can trace any production model back to exactly which code commit created it, which data it trained on, and how it performed during evaluation. Combined with Unity Catalog's row-level and column-level access control, this gives you a complete audit trail for regulatory and operational purposes.
Model versions also carry metadata:

  • creation_timestamp and last_updated_timestamp: Recorded in milliseconds since epoch
  • source_run_id: The ID of the run that logged this model
  • tags: A dictionary of searchable key-value pairs for categorization and governance

Integration with team workflows

MLflow enables team collaboration on model governance through comments on model versions. Before promoting a model to production, your team can discuss performance, data quality concerns, or compliance flags directly on the model version page. These comments are part of the audit trail, creating a record of governance decisions.
Searchable tags on models and model versions help you manage large catalogs: tag approved models, mark those with known issues, categorize by domain or use case. Governance policies can then enforce which tags are required before promotion.

FAQs

What happens if no approver approves a model within a certain time frame?

MLflow itself does not have a time-based expiration for approval gates. Your deployment job remains paused at the approval task until an authorized approver reviews and clicks Approve, or until the job is manually cancelled or resumed. You can monitor stalled approvals via the job run page.

Can I have multiple approval gates in a single deployment job?

Yes. You can create multiple independent approval tasks within a deployment job, each with its own tag policy and team permissions. This is useful for workflows where legal review, security review, and business sign-off must all happen before production deployment.

Are audit logs immutable once they are created?

Yes. Model Registry audit logs are immutable in Databricks. This ensures compliance with audit trail requirements in regulated industries like finance and healthcare.

How long are audit logs retained?

Audit logs are retained according to your workspace's retention policy, typically indefinitely or per your data governance settings. Consult your workspace administrator or Databricks documentation for your specific retention period.

Can I query audit logs programmatically to build custom dashboards?

Yes. The audit log API and the modelRegistry schema in the audit log reference enable you to query approvals, transitions, and tag changes programmatically. You can build dashboards to track approval velocity, model promotion rates, and governance compliance.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.