#client #server #rest #experiment #mlflow #ml-flow #trs

trs-mlflow

This crate contains an asynchronous client which implements 2.0 REST API of MlFlow server

19 releases (4 breaking)

new 0.5.3 Jan 8, 2025
0.5.2 Jan 2, 2025
0.5.1 Dec 31, 2024
0.4.1 Dec 21, 2024
0.1.1 Dec 5, 2024

#457 in Web programming

Download history 40/week @ 2024-11-29 622/week @ 2024-12-06 310/week @ 2024-12-13 488/week @ 2024-12-20 205/week @ 2024-12-27 194/week @ 2025-01-03

1,316 downloads per month

MIT license

60KB
1.5K SLoC

trs-mlflow

This crate contains an asynchronous client which implements 2.0 REST API of MlFlow server.

The whole api description can be found here: https://mlflow.org/docs/latest/rest-api.html

Usage example:

use trs_mlflow::{run::CreateRun, Client};

let client = Client::new("http://localhost:5000/api");

let experiment_id = client
    .create_experiment(&"foo", vec![])
    .await
    .expect("BUG: Cannot create experiment");

let create = CreateRun::new()
    .run_name("bar")
    .experiment_id(&experiment_id)
    .build();

let run = client
    .create_run(create)
    .await
    .expect("BUG: Cannot create run");

If you want to run tests you need to run MlFlow server locally, which can be done by running this command:

./server/run.sh

This command creates a new venv, installs server and then runs it.

License: MIT


lib.rs:

This crate contains an unofficial asynchronous mlflow client which uses 2.0 API.

The whole API description can be found here: https://mlflow.org/docs/latest/rest-api.html

Usage example:

use trs_mlflow::{run::CreateRun, Client};

let client = Client::new("http://localhost:5000/api");

let experiment_id = client
    .create_experiment(&"foo", vec![])
    .await
    .expect("BUG: Cannot create experiment");

let create = CreateRun::new()
    .run_name("bar")
    .experiment_id(&experiment_id)
    .build();

let run = client
    .create_run(create)
    .await
    .expect("BUG: Cannot create run");

Testing

If you want to run tests you need to run MlFlow server locally, which can be done by running this command:

./server/run.sh

This command creates a new venv, installs server and then runs it.

Disclaimer

This is heavy WIP crate as I'm still trying to figure out how to wrap some API methods.

Dependencies

~10–23MB
~316K SLoC