pub struct MlflowTrackingClient { /* private fields */ }Expand description
Provides access to a MLflow tracking server via REST API.
Support Mlflow API version 2.0.
Implementations§
Source§impl MlflowTrackingClient
impl MlflowTrackingClient
pub fn new(base_url: impl AsRef<str>) -> Self
Sourcepub fn basic_auth(
self,
user_name: impl AsRef<str>,
password: impl AsRef<str>,
) -> Self
pub fn basic_auth( self, user_name: impl AsRef<str>, password: impl AsRef<str>, ) -> Self
Sets user name and password for basic authentication of the tracking server.
Sourcepub fn set_experiment(
self,
name: impl AsRef<str>,
) -> Result<Self, GetExperimentIdError>
pub fn set_experiment( self, name: impl AsRef<str>, ) -> Result<Self, GetExperimentIdError>
Sets an experiment with the given name to this struct.
Sourcepub fn get_experiment(&self, name: impl AsRef<str>) -> Option<Experiment>
pub fn get_experiment(&self, name: impl AsRef<str>) -> Option<Experiment>
Gets [Experiment] by name from the tracking server.
If the experiment with given name does not exist in the trackingserver, it will be created.
TODO: Better error handling
Sourcepub fn create_recorder<E, R>(
&self,
run_name: impl AsRef<str>,
) -> Result<MlflowTrackingRecorder<E, R>>where
E: Env,
R: ReplayBufferBase,
pub fn create_recorder<E, R>(
&self,
run_name: impl AsRef<str>,
) -> Result<MlflowTrackingRecorder<E, R>>where
E: Env,
R: ReplayBufferBase,
Create MlflowTrackingRecorder corresponding to a run.
If name is empty (""), a run name is generated by the tracking server.
If a Run with name exists in the tracking server, the run is used
to create the recorder. If two or more runs with name exists,
this method panics.
You need to set an experiment using MlflowTrackingClient::set_experiment()
before calling this method.
This method uses MLFLOW_DEFAULT_ARTIFACT_ROOT environment variable as the directory
where artifacts, like model parameters, will be saved. It is recommended to set this
environment variable mlruns directory to which the tracking server persists experiment
and run data.