Run
Cubyc's Run
class is the only class you need to interact with to track your experiments.
Think of it as the central hub for all your needs including tracking scripts and functions, logging metrics, and querying results.
Run
Initialize a Run instance.
PARAMETER | DESCRIPTION |
---|---|
params |
A dictionary of hyperparameters to track, where the key-value pairs are the hyperparameter names and values.
Pass
TYPE:
|
tags |
Tags to associate with the experiment.
TYPE:
|
remote |
The URL or list of URLs of the remote repositories to save the experiment to. Must be valid GitHub, GitLab, or Bitbucket URL for which you have write access.
TYPE:
|
verbose |
If True, prints detailed information about the experiment run.
TYPE:
|
Example
Cubyc offers three ways to define experiment runs: you can explicitly specify the start and end of the run, utilize a context manager, or define it as a function. All three approaches are equally effective and capture the same information.
Create a Run
and call its start
and end
methods to define the start and end of your run.
Use Python's with
statement to define a context manager for your experiment.
Define your experiment as a function and use the @run.track
decorator to track it.
start
Starts the experiment run.
See Also
- Run.end : Ends an experiment run.
Examples:
Place the start
and end
functions around the code you want to track.
log
Logs the specified variable values to the experiment.
PARAMETER | DESCRIPTION |
---|---|
variables |
A dictionary of variable, where the key-value pairs are the variable names and values.
TYPE:
|
kwargs |
Additional variables to log.
TYPE:
|
Examples:
Call the run's log method with a dictionary containing the metrics you want to track.
from cubyc import run
run = run(remote="https://github.com/owner/project.git")
run.start(tags=["example", "log_method"])
run.log({"accuracy": 0.9, "loss": 0.1})
Alternatively, yield a dictionary containing the desired metrics if you are tracking functions.