Label schema operations

Label schemas are experiment-scoped UI rendering hints for the labeling UI (MLflow 3.14+).

MLFlowClient.createlabelschemaFunction
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: MLFlow configuration.
  • experiment_id: Parent experiment ID.
  • name: Schema name (unique within the experiment).
  • type: Schema type (FEEDBACK or EXPECTATION, see LabelSchemaType).
  • input: The input configuration as a dictionary with exactly one variant key (pass_fail, categorical, numeric, or text), 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.

source
MLFlowClient.listlabelschemasFunction
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: MLFlow configuration.
  • 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 LabelSchema entities.
  • The next page token if there are more results.
source
MLFlowClient.updatelabelschemaFunction
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: MLFlow configuration.
  • 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 (see createlabelschema).

Returns

An instance of type LabelSchema.

source
MLFlowClient.deletelabelschemaFunction
deletelabelschema(instance::MLFlow, schema_id::String)

Delete a LabelSchema by ID. This is a no-op if the schema does not exist.

Arguments

  • instance: MLFlow configuration.
  • schema_id: The label schema ID.

Returns

true if successful. Otherwise, raises exception.

source