I would like to use MLFlow (with Python) to log time series with time interval equal to 1 day.
My idea would be to create a new run with a certain ID and to use function log_metric
every day (say, with a cron job) with a new value. Once my run is terminated, can I "reopen" it and log a new metric ?
What I have in mind is:
# Day 1
import mlflow
tracking_uri = "my_uri"
mlflow.set_tracking_uri(tracking_uri)
xp_id = 0
mlflow.start_run(run_name="test", experiment_id=xp_id)
mlflow.log_metric("test_metric", 1)
mlflow.end_run()
And the following days:
import mlflow
def log_daily_metric(daily_value_metric):
tracking_uri = "my_uri"
mlflow.set_tracking_uri(tracking_uri)
xp_id = 0
mlflow.restart_run(run_name="test", experiment_id=xp_id) # /!\ function mlflow.restart does not exist
mlflow.log_metric("test_metric", daily_value_metric)
mlflow.end_run()
so that run "test"
would have new metrics logged every day.
Any idea to achieve this ?