trackers package
Submodules
trackers.callbacks module
trackers.wandb module
- class trackers.wandb.WandbTracker(project_name, hyperparameters, tags, group, *args, **kwargs)[source]
Bases:
object- observe_model(model, log_freq=1000)[source]
Observes the given model using Weights & Biases (wandb) library.
- Parameters:
model (nn.Module) – The model to be observed.
log_freq (int, optional) – The frequency at which to log the model. Defaults to 1000.
- Return type:
None
- log(metrics)[source]
Logs the given metrics using WandB.
- Parameters:
metrics (dict) – A dictionary containing the metrics to be logged.
- Returns:
None
- Return type:
None
- log_images(images)[source]
Logs a grid of images and individual images to WandB.
- Parameters:
images (torch.Tensor) – A tensor containing the images to be logged.
- Raises:
AssertionError – If the number of images is not a square number.
- Return type:
None
- get_experiment_name()[source]
Get the name of the current experiment.
- Returns:
The name of the experiment.
- Return type:
Module contents
- class trackers.WandbTracker(project_name, hyperparameters, tags, group, *args, **kwargs)[source]
Bases:
object- observe_model(model, log_freq=1000)[source]
Observes the given model using Weights & Biases (wandb) library.
- Parameters:
model (nn.Module) – The model to be observed.
log_freq (int, optional) – The frequency at which to log the model. Defaults to 1000.
- Return type:
None
- log(metrics)[source]
Logs the given metrics using WandB.
- Parameters:
metrics (dict) – A dictionary containing the metrics to be logged.
- Returns:
None
- Return type:
None
- log_images(images)[source]
Logs a grid of images and individual images to WandB.
- Parameters:
images (torch.Tensor) – A tensor containing the images to be logged.
- Raises:
AssertionError – If the number of images is not a square number.
- Return type:
None
- get_experiment_name()[source]
Get the name of the current experiment.
- Returns:
The name of the experiment.
- Return type:
- trackers.get_tracker_class(tracker)[source]
Get tracker class by name.
- Parameters:
tracker (str) – The name of the tracker.
- Returns:
The tracker class.
- Return type:
- Raises:
ValueError – If the tracker is not found.