C3 AI Documentation Home

Approve Models in the Model Registry

Approve models in the Model Registry with the ModelApproval.update method, which creates a ModelApprovalService.Record entry to track approvals.

Python
approval_metadata = c3.ModelApproval.Update.Status(modelUri = entry.uri,
                                                   modelVersion = entry.ver,
                                                   scope = "Approval Scope",
                                                   status = "Approved")
c3.ModelApproval.update(approval_metadata)

Files can optionally be attached to a ModelApproval.Status to provide supporting evidence for the approval.

Python
file = c3.File.fromString("ModelApproval/metrics_file.txt").writeString("test")
files = {"test_file": [file.url]}

approval_metadata = c3.ModelApproval.Update.Status(modelUri = entry.uri,
                                                   modelVersion = entry.ver,
                                                   scope = "Approval Scope",
                                                   status = "Approved")
                                                   
c3.ModelApproval.updateWithFiles(approval_metadata, files)

Note on using scope of ModelApproval.Status

Scope is used to differentiate for what uses the model is approved. For example, an organization may want to only approve a model for a use in certain applications.

See also

Was this page helpful?