Model version operations
MLFlowClient.getlatestmodelversions
— Functiongetlatestmodelversions(instance::MLFlow, name::String;
stages::Array{String}=String[])
Arguments
instance:
MLFlow
configuration.stages:
List of stages.
Returns
Latest ModelVersion
for each requests stage.
MLFlowClient.createmodelversion
— Functioncreatemodelversion(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 ofTag
to associate with the model version.run_link:
Link to theRun
that generated theModelVersion
.description:
Optional description forModelVersion
.
Returns
ModelVersion
created.
MLFlowClient.getmodelversion
— Functiongetmodelversion(instance::MLFlow, name::String, version::String)
Arguments
instance:
MLFlow
configuration.name:
Name of theRegisteredModel
.version:
ModelVersion
number.
Returns
ModelVersion
requested.
MLFlowClient.updatemodelversion
— Functionupdatemodelversion(instance::MLFlow, name::String, version::String;
description::Union{String, Missing}=missing)
Arguments
instance:
MLFlow
configuration.name:
Name of theRegisteredModel
.version:
ModelVersion
number.description:
Optional description forModelVersion
.
Returns
ModelVersion
generated for this model in registry.
MLFlowClient.deletemodelversion
— Functiondeletemodelversion(instance::MLFlow, name::String, version::String)
Arguments
instance:
MLFlow
configuration.name:
Name of theRegisteredModel
.version:
ModelVersion
number.
Returns
true
if successful. Otherwise, raises exception.
MLFlowClient.searchmodelversions
— Functionsearchmodelversions(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 theMLFlow
instance. - The next page token if there are more results.
MLFlowClient.getdownloaduriformodelversionartifacts
— Functiongetdownloaduriformodelversionartifacts(instance::MLFlow, name::String, version::String)
Arguments
instance:
MLFlow
configuration.name:
Name of theRegisteredModel
.version:
ModelVersion
number.
Returns
URI corresponding to where artifacts for this ModelVersion
are stored.
MLFlowClient.transitionmodelversionstage
— Functiontransitionmodelversionstage(instance::MLFlow, name::String, version::String,
stage::String, archive_existing_versions::Bool)
Arguments
instance:
MLFlow
configuration.name:
Name of theRegisteredModel
.version:
ModelVersion
number.stage:
TransitionModelVersion
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
.
MLFlowClient.setmodelversiontag
— Functionsetmodelversiontag(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 theTag
.value:
String value of the tag being logged.
Returns
true
if successful. Otherwise, raises exception.
MLFlowClient.deletemodelversiontag
— Functiondeletemodelversiontag(instance::MLFlow, name::String, version::String, key::String)
Arguments
instance:
MLFlow
configuration.name:
Name of theRegisteredModel
that the tag was logged under.version:
ModelVersion
number that the tag was logged under.key:
Name of theTag
.
Returns
true
if successful. Otherwise, raises exception.
MLFlowClient.getmodelversionbyalias
— Functiongetmodelversionbyalias(instance::MLFlow, name::String, alias::String)
Arguments
instance:
MLFlow
configuration.name:
Name of theRegisteredModel
.alias:
Name of the alias.
Returns
ModelVersion
requested.