class LuxonisTracker:
Constructor: LuxonisTracker(project_name, project_id, run_name, run_id, ...)
Logger wrapper for TensorBoard, WandB, and MLflow.
LuxonisTracker stores run metadata, initializes the selected logging
integrations lazily, and keeps a local fallback cache for MLflow logs
that fail transiently.
| Static Method | rank |
Wrap a function so only processes with rank=0 execute it. |
| Method | __init__ |
Create a tracker for one or more logging integrations. |
| Method | close |
Finalize logging and save unsent logs locally. |
| Method | log |
Log a hyperparameter dictionary. |
| Method | log |
Log one image. |
| Method | log |
Log multiple images. |
| Method | log |
Log a matrix to the enabled logging services. |
| Method | log |
Log one scalar metric value. |
| Method | log |
Log multiple scalar metrics. |
| Method | log |
Log any data stored in local_logs to MLflow. |
| Method | log |
Log to MLflow with retries. |
| Method | save |
Save metrics, parameters, images, artifacts, and matrices locally. |
| Method | store |
Store log data locally if logging to MLflow fails. |
| Method | upload |
Upload an artifact to the logging service. |
| Method | upload |
Upload an artifact specifically to MLflow. |
| Instance Variable | is |
Whether MLflow logging is enabled. |
| Instance Variable | is |
Whether the current run belongs to a sweep. |
| Instance Variable | is |
Whether TensorBoard logging is enabled. |
| Instance Variable | is |
Whether WandB logging is enabled. |
| Instance Variable | local |
Locally cached MLflow payloads that will be retried or written to disk on close. |
| Instance Variable | mlflow |
Whether MLflow initialization has succeeded. |
| Instance Variable | mlflow |
MLflow tracking URI used when MLflow logging is enabled. |
| Instance Variable | project |
Project identifier used by WandB and MLflow. |
| Instance Variable | project |
Project name used by WandB and MLflow. |
| Instance Variable | rank |
Process rank. Only rank 0 writes through rank-gated logging methods. |
| Instance Variable | run |
Directory for local run artifacts. |
| Instance Variable | run |
MLflow run identifier, used to resume an existing run. |
| Instance Variable | run |
Name of the current run. |
| Instance Variable | save |
Root directory where local run outputs are stored. |
| Instance Variable | wandb |
WandB entity used for logging. |
| Property | experiment |
Creates new experiments or returns active ones if already created. |
| Property | name |
Run name. |
| Property | version |
Tracker version. |
| Method | _get |
Return the most recently created run name. |
| Method | _get |
Return the number ID for the next run. |
| Method | _get |
Generate a new run name. |
| Instance Variable | _experiment |
Undocumented |
str | None = None, project_id: str | None = None, run_name: str | None = None, run_id: str | None = None, save_directory: PathType = 'output', is_tensorboard: bool = False, is_wandb: bool = False, is_mlflow: bool = False, is_sweep: bool = False, wandb_entity: str | None = None, mlflow_tracking_uri: str | None = None, rank: int = 0):
¶
Create a tracker for one or more logging integrations.
| Parameters | |
projectstr | None | Project name used for WandB and MLflow. |
projectstr | None | Project ID used for WandB and MLflow. |
runstr | None | Run name. If omitted, rank 0 generates a new name and other ranks use the latest run name. |
runstr | None | MLflow run ID used to continue a previous run. |
savePathType | Directory where local outputs are saved. |
isbool | Whether to use TensorBoard logging. |
isbool | Whether to use WandB logging. |
isbool | Whether to use MLflow logging. |
isbool | Whether the current run is part of a sweep. |
wandbstr | None | WandB entity to use. |
mlflowstr | None | MLflow tracking URI to use. |
rank:int | Process rank used in distributed training. |
| Raises | |
ValueError | If WandB or MLflow is enabled but neither
project_name nor project_id is provided. |
ValueError | If WandB is enabled without wandb_entity. |
ValueError | If MLflow is enabled without
mlflow_tracking_uri. |
ValueError | If no logging integration is enabled. |
Log a hyperparameter dictionary.
| Parameters | |
params:dict[ | Hyperparameter key-value pairs. |
Log one image.
Note
step is omitted when logging with WandB to avoid problems with inconsistent incrementation.
| Parameters | |
name:str | Image caption. For MLflow, this should include a slash-separated base path and image caption. |
img:np.ndarray | Image data of shape (H, W, C). |
step:int | Current step. |
Log multiple images.
| Parameters | |
imgs:dict[ | Mapping from image captions to image data of shape (H, W, C). |
step:int | Current step. |
Log a matrix to the enabled logging services.
| Parameters | |
matrix:np.ndarray | Matrix to log, usually of shape (M, N). |
name:str | Name used for the matrix artifact. |
step:int | Current step. |
extradict | None | Optional dictionary of additional data to include in the logged matrix artifact. |
Log one scalar metric value.
Note
step is omitted when logging with WandB to avoid problems with inconsistent incrementation.
| Parameters | |
name:str | Metric name. |
value:float | Metric value. |
step:int | Current step. |
Log multiple scalar metrics.
| Parameters | |
metrics:dict[ | Metric key-value pairs. |
step:int | Current step. |
Upload an artifact to the logging service.
| Parameters | |
path:PathType | Path to the artifact. |
name:str | None | Artifact name. If None, uses the file stem for WandB and the file name for MLflow. |
typ:str | The type of the artifact. Only used for WandB. |
Upload an artifact specifically to MLflow.
| Parameters | |
path:PathType | Path to the artifact. |
name:str | None | Artifact name. If None, uses the file name. |