Model version operations

MLFlowClient.createmodelversionFunction
createmodelversion(instance::MLFlow, name::String, source::String;
    run_id::Union{String, Missing}=missing, tags::MLFlowUpsertData{Tag}=Tag[],
    run_link::Union{String, Missing}=missing,
    description::Union{String, Missing}=missing)

Arguments

  • instance: MLFlow configuration.
  • name: Register model under this name.
  • source: URI indicating the location of the model artifacts.
  • run_id: Run id for correlation.
  • tags: List of Tag to associate with the model version.
  • run_link: Link to the Run that generated the ModelVersion.
  • description: Optional description for ModelVersion.

Returns

ModelVersion created.

source
MLFlowClient.searchmodelversionsFunction
searchmodelversions(instance::MLFlow, filter::String, max_results::Int64,
    order_by::String, page_token::String)

Arguments

  • instance: MLFlow configuration.
  • filter: String filter condition. See MLFlow documentation.
  • max_results: Maximum number of models desired.
  • order_by: List of columns to be ordered by including model name, version, stage with an optional “DESC” or “ASC” annotation, where “ASC” is the default. Tiebreaks are done by latest stage transition timestamp, followed by name ASC, followed by version DESC.
  • page_token: Pagination token to go to next page based on previous search query.

Returns

  • Vector of ModelVersion that were found in the MLFlow instance.
  • The next page token if there are more results.
source
MLFlowClient.transitionmodelversionstageFunction
transitionmodelversionstage(instance::MLFlow, name::String, version::String,
    stage::String, archive_existing_versions::Bool)

Arguments

  • instance: MLFlow configuration.
  • name: Name of the RegisteredModel.
  • version: ModelVersion number.
  • stage: Transition ModelVersion to new stage.
  • archive_existing_versions: When transitioning a model version to a particular stage, this flag dictates whether all existing model versions in that stage should be atomically moved to the “archived” stage. This ensures that at-most-one model version exists in the target stage.

Returns

Updated ModelVersion.

source
MLFlowClient.setmodelversiontagFunction
setmodelversiontag(instance::MLFlow, name::String, key::String, value::String)

Arguments

  • instance: MLFlow configuration.
  • name: Unique name of the model.
  • version: Model version number.
  • key: Name of the Tag.
  • value: String value of the tag being logged.

Returns

true if successful. Otherwise, raises exception.

source