Logging operations

MLFlowClient.logmetricFunction
logmetric(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 the Run under which to log the Metric.
  • key: Name of the Metric.
  • value: Double value of the Metric being logged.
  • timestamp: Unix timestamp in milliseconds at the time Metric was logged.
  • step: Step at which to log the Metric.

Returns

true if successful. Otherwise, raises exception.

source
MLFlowClient.logbatchFunction
logbatch(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 the Run to log under.
  • metrics: A collection of Metric to log.
  • params: A collection of Param to log.
  • tags: A collection of Tag 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.

source
MLFlowClient.loginputsFunction
loginputs(instance::MLFlow, run_id::String; datasets::Array{DatasetInput})
loginputs(instance::MLFlow, run::Run; datasets::Array{DatasetInput})

Arguments

  • instance: MLFlow configuration.
  • run_id: ID of the Run to log under this field is required.
  • datasets: A collection of DatasetInput to log.

Returns

true if successful. Otherwise, raises exception.

source
MLFlowClient.logparamFunction
logparam(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 the Run under which to log the Param.
  • key: Name of the Param.
  • value: String value of the Param being logged.

Returns

true if successful. Otherwise, raises exception.

source