composer.utils#

Modules

composer.utils.checkpoint

Utilities for working with training checkpoints.

composer.utils.collect_env

Helpers to gather system information for debugging and bug reporting.

composer.utils.dist

Helper methods for torch.distributed.

composer.utils.file_helpers

Helpers for working with files.

composer.utils.import_helpers

Dynamically import a Python object (e.g.

composer.utils.iter_helpers

Utilities for iterating over collections.

composer.utils.module_surgery

Modify model architectures.

composer.utils.object_store

Utility for uploading to and downloading from cloud object stores.

composer.utils.reproducibility

Helper utilities for configuring deterministic training to ensure reproducibility.

composer.utils.string_enum

Base class for Enums containing string values.

Helper utilities.

Functions

configure_excepthook

Collect and print system information when sys.excepthook() is called.

disable_env_report

Disable environment report generation on exception.

enable_env_report

Enable environment report generation on exception.

ensure_folder_is_empty

Ensure that the given folder is empty.

ensure_tuple

Converts x into a tuple.

format_name_with_dist

Format format_str with the run_name, distributed variables, and extra_format_kwargs.

format_name_with_dist_and_time

Format format_str with the run_name, distributed variables, timestamp, and extra_format_kwargs.

get_file

Get a file from a local folder, URL, or object store.

import_object

Dynamically import a Python object (e.g.

is_tar

Returns whether name has a tar-like extension.

iterate_with_pbar

Iterate over a batch iterator and update a tqdm.tqdm progress bar by the batch size on each step.

load_checkpoint

Load a checkpoint from a local file, URI, or cloud object store into state.

map_collection

Apply map_fn on each element in collection.

print_env

Generate system information report.

save_checkpoint

Checkpoint the training state.

Classes

ObjectStore

Utility for uploading to and downloading from object (blob) stores, such as Amazon S3.

StringEnum

Base class for Enums containing string values.

Hparams

These classes are used with yahp for YAML-based configuration.

ObjectStoreHparams

ObjectStore hyperparameters.

Exceptions

MissingConditionalImportError

composer.utils.import_helpers.MissingConditionalImportError