Logging operations
MLFlowClient.logmetric
— Functionlogmetric(instance::MLFlow, run_id::String, key::String, value::Float64;
timestamp::Int64=round(Int, now() |> datetime2unix),
step::Union{Int64, Missing}=missing)
logmetric(instance::MLFlow, run::Run, key::String, value::Float64;
timestamp::Int64=round(Int, now() |> datetime2unix),
step::Union{Int64, Missing}=missing)
Log a Metric
for a Run
. A Metric
is a key-value pair (string key, float value) with an associated timestamp. Examples include the various metrics that represent ML model accuracy. A Metric
can be logged multiple times.
Arguments
instance
:MLFlow
configuration.run_id
: ID of theRun
under which to log theMetric
.key
: Name of theMetric
.value
: Double value of theMetric
being logged.timestamp
: Unix timestamp in milliseconds at the timeMetric
was logged.step
: Step at which to log theMetric
.
Returns
true
if successful. Otherwise, raises exception.
MLFlowClient.logbatch
— Functionlogbatch(instance::MLFlow, run_id::String; metrics::MLFlowUpsertData{Metric},
params::MLFlowUpsertData{Param}, tags::MLFlowUpsertData{Tag})
logbatch(instance::MLFlow, run::Run; metrics::Array{Metric},
params::MLFlowUpsertData{Param}, tags::MLFlowUpsertData{Tag})
Log a batch of metrics, params, and tags for a Run
. In case of error, partial data may be written.
For more information about this function, check MLFlow official documentation.
Arguments
instance
:MLFlow
configuration.run_id
: ID of theRun
to log under.metrics
: A collection ofMetric
to log.params
: A collection ofParam
to log.tags
: A collection ofTag
to log.
Note: A single request can contain up to 1000 metrics, and up to 1000 metrics, params, and tags in total.
Returns
true
if successful. Otherwise, raises exception.
MLFlowClient.loginputs
— Functionloginputs(instance::MLFlow, run_id::String; datasets::Array{DatasetInput})
loginputs(instance::MLFlow, run::Run; datasets::Array{DatasetInput})
Arguments
instance
:MLFlow
configuration.run_id
: ID of theRun
to log under this field is required.datasets
: A collection ofDatasetInput
to log.
Returns
true
if successful. Otherwise, raises exception.
MLFlowClient.logparam
— Functionlogparam(instance::MLFlow, run_id::String, key::String, value::String)
logparam(instance::MLFlow, run::Run, key::String, value::String)
logparam(instance::MLFlow, run_id::String, param::Param)
logparam(instance::MLFlow, run::Run, param::Param)
Log a Param
used for a Run
. A Param
is a key-value pair (string key, string value). Examples include hyperparameters used for ML model training and constant dates and values used in an ETL pipeline. A Param
can be logged only once for a Run
.
Arguments
instance
:MLFlow
configuration.run_id
: ID of theRun
under which to log theParam
.key
: Name of theParam
.value
: String value of theParam
being logged.
Returns
true
if successful. Otherwise, raises exception.