Accelerate documentation

Experiment Tracking

You are viewing v0.12.0 version. A newer version v1.2.1 is available.
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Experiment Tracking

The Base Tracker Class

class accelerate.tracking.GeneralTracker

< >

( )

A base Tracker class to be used for all logging integration implementations.

Each function should take in **kwargs that will automatically be passed in from a base dictionary provided to Accelerator

finish

< >

( )

Should run any finalizing functions within the tracking API. If the API should not have one, just don’t overwrite that method.

log

< >

( values: dict step: typing.Optional[int] **kwargs )

Parameters

  • values (Dictionary str to str, float, or int) — Values to be logged as key-value pairs. The values need to have type str, float, or int.
  • step (int, optional) — The run step. If included, the log will be affiliated with this step.

Logs values to the current run. Base log implementations of a tracking API should go in here, along with special behavior for the `step parameter.

store_init_configuration

< >

( values: dict )

Parameters

  • values (Dictionary str to bool, str, float or int) — Values to be stored as initial hyperparameters as key-value pairs. The values need to have type bool, str, float, int, or None.

Logs values as hyperparameters for the run. Implementations should use the experiment configuration functionality of a tracking API.

Integrated Trackers

class accelerate.tracking.TensorBoardTracker

< >

( run_name: str logging_dir: typing.Union[str, os.PathLike, NoneType] **kwargs )

Parameters

  • run_name (str) — The name of the experiment run
  • logging_dir (str, os.PathLike) — Location for TensorBoard logs to be stored. kwargs — Additional key word arguments passed along to the tensorboard.SummaryWriter.__init__ method.

A Tracker class that supports tensorboard. Should be initialized at the start of your script.

__init__

< >

( run_name: str logging_dir: typing.Union[str, os.PathLike, NoneType] **kwargs )

class accelerate.tracking.WandBTracker

< >

( run_name: str **kwargs )

Parameters

  • run_name (str) — The name of the experiment run. kwargs — Additional key word arguments passed along to the wandb.init method.

A Tracker class that supports wandb. Should be initialized at the start of your script.

__init__

< >

( run_name: str **kwargs )

class accelerate.tracking.CometMLTracker

< >

( run_name: str **kwargs )

Parameters

  • run_name (str) — The name of the experiment run. kwargs — Additional key word arguments passed along to the Experiment.__init__ method.

A Tracker class that supports comet_ml. Should be initialized at the start of your script.

API keys must be stored in a Comet config file.

__init__

< >

( run_name: str **kwargs )