ExperimentTracker¶
gepa.logging.experiment_tracker.ExperimentTracker(use_wandb: bool = False, wandb_api_key: str | None = None, wandb_init_kwargs: dict[str, Any] | None = None, use_mlflow: bool = False, mlflow_tracking_uri: str | None = None, mlflow_experiment_name: str | None = None)
¶
Unified experiment tracking that supports both wandb and mlflow.
Source code in gepa/logging/experiment_tracker.py
Attributes¶
use_wandb = use_wandb
instance-attribute
¶
use_mlflow = use_mlflow
instance-attribute
¶
wandb_api_key = wandb_api_key
instance-attribute
¶
wandb_init_kwargs = wandb_init_kwargs or {}
instance-attribute
¶
mlflow_tracking_uri = mlflow_tracking_uri
instance-attribute
¶
mlflow_experiment_name = mlflow_experiment_name
instance-attribute
¶
Functions¶
__enter__()
¶
__exit__(exc_type, exc_val, exc_tb)
¶
initialize()
¶
start_run()
¶
Start a new run.
Source code in gepa/logging/experiment_tracker.py
log_metrics(metrics: dict[str, Any], step: int | None = None)
¶
Log metrics to the active backends.
Source code in gepa/logging/experiment_tracker.py
end_run()
¶
End the current run.
Source code in gepa/logging/experiment_tracker.py
is_active() -> bool
¶
Check if any backend has an active run.