Experiments

Introduction

Experiments are a way to track your experiments.

Within mlop, experiments are the main unit of work. They are created by running a script with the mlop client.

Creating an experiment

To create an experiment, you simply start the mlop client with the .init() function with the name of the experiment name and the project project.

import mlop
 
mlop.init(name="gpt4o-vision", project="VLLM")

You can pass in configurations, e.g hyperparameters the config parameter

hyperparameters = {
    "lr": 0.001,
    "epochs": 1000,
}
 
mlop.init(
    dir=".",
    name="gpt4o-vision",
    project="VLLM",
    config=hyperparameters,
)

and this will be recorded in the experiment.

mlop.Settings

One can also pass in the settings parameter to change the configuration of the logger. You most likely don't want to do this unless you are debugging the logger or self-hosting the application.


ParameterTypeDescription
dirstrThe directory to save the experiment.
namestrThe name of the experiment.
projectstrThe project to save the experiment.
configdictThe hyperparameters/configuration for the experiment.
settingsdictThe logger settings for the experiment.

This will create an experiment with the name gpt4o-vision and the project VLLM. To see more about projects, check out the projects page.

On this page