Label schema operations
Label schemas are experiment-scoped UI rendering hints for the labeling UI (MLflow 3.14+).
MLFlowClient.createlabelschema — Function
createlabelschema(instance::MLFlow, experiment_id::String, name::String, type::String,
input::Dict; instruction::Union{String,Missing}=missing,
enable_comment::Union{Bool,Missing}=missing)Create a new LabelSchema scoped to an experiment.
Arguments
instance:MLFlowconfiguration.experiment_id: Parent experiment ID.name: Schema name (unique within the experiment).type: Schema type (FEEDBACKorEXPECTATION, seeLabelSchemaType).input: The input configuration as a dictionary with exactly one variant key (pass_fail,categorical,numeric, ortext), e.g.Dict("categorical" => Dict("options" => ["good", "bad"])).instruction: Optional supplementary guidance.enable_comment: Optional flag to render a free-form comment input.
Returns
An instance of type LabelSchema.
MLFlowClient.getlabelschema — Function
getlabelschema(instance::MLFlow, schema_id::String)Get a LabelSchema by ID.
Arguments
instance:MLFlowconfiguration.schema_id: The label schema ID.
Returns
An instance of type LabelSchema.
MLFlowClient.getlabelschemabyname — Function
getlabelschemabyname(instance::MLFlow, experiment_id::String, name::String)Get a LabelSchema by (experiment_id, name).
Arguments
instance:MLFlowconfiguration.experiment_id: Parent experiment ID.name: The label schema name.
Returns
An instance of type LabelSchema.
MLFlowClient.listlabelschemas — Function
listlabelschemas(instance::MLFlow, experiment_id::String;
max_results::Union{Int,Missing}=missing,
page_token::Union{String,Missing}=missing)List LabelSchema entities for an experiment, paginated.
Arguments
instance:MLFlowconfiguration.experiment_id: Parent experiment ID.max_results: Maximum number of schemas to return.page_token: Token indicating the page of schemas to fetch.
Returns
- Vector of
LabelSchemaentities. - The next page token if there are more results.
MLFlowClient.updatelabelschema — Function
updatelabelschema(instance::MLFlow, schema_id::String;
name::Union{String,Missing}=missing,
instruction::Union{String,Missing}=missing,
enable_comment::Union{Bool,Missing}=missing,
input::Union{Dict,Missing}=missing)Sparse-update an existing LabelSchema. The schema type is immutable and cannot be updated.
Arguments
instance:MLFlowconfiguration.schema_id: The label schema ID.name: Optional new schema name.instruction: Optional new supplementary guidance.enable_comment: Optional new comment-input flag.input: Optional new input configuration (seecreatelabelschema).
Returns
An instance of type LabelSchema.
MLFlowClient.deletelabelschema — Function
deletelabelschema(instance::MLFlow, schema_id::String)Delete a LabelSchema by ID. This is a no-op if the schema does not exist.
Arguments
instance:MLFlowconfiguration.schema_id: The label schema ID.
Returns
true if successful. Otherwise, raises exception.