composer.utils#
Helper utilities.
Functions
Indexes into the batch given the key. |
|
Indexes into the batch given the key and sets the element at that index to value. |
|
Collect and print system information when |
|
Converts flat dictionary separated by slashes to nested dictionary. |
|
Takes in a nested dict converts it to a flat dict with keys separated by slashes. |
|
Create a symlink file, which can be followed by |
|
Disable environment report generation on exception. |
|
Enable environment report generation on exception. |
|
Ensure that the given folder does not have any files conflicting with the |
|
Ensure that the given folder is empty. |
|
Converts |
|
Export a model for inference. |
|
Helper method for exporting a model for inference. |
|
Takes in local symbol table and recursively grabs any hyperparameter. |
|
Format |
|
Format |
|
Query Composer pertinent system information as a dict. |
|
Takes string or Device and returns the corresponding |
|
Get a file from a local folder, URL, or object store. |
|
Get free socket port to use as MASTER_PORT. |
|
Dynamically import a Python object (e.g. |
|
Whether |
|
Whether |
|
Whether Composer is running in a IPython/Jupyter Notebook. |
|
Returns whether |
|
Determines whether the module needed for training on TPUsโtorch_xlaโis installed. |
|
Load a checkpoint from a local file, URI, or cloud object store into |
|
Applies |
|
Automatically creates an |
|
Automatically creates a |
|
Set model.eval() for context duration, restoring model status at end. |
|
Uses |
|
Generate system information report. |
|
Decorator to retry a function with backoff and jitter. |
|
Checkpoint the training |
Classes
Enum class for the supported export formats. |
|
Class used to convert iterator of bytes into a file-like binary stream object. |
|
Utility for uploading to and downloading from object (blob) stores, such as Amazon S3. |
|
Utility for uploading to and downloading from an OCI bucket. |
|
Abstract class for implementing object stores, such as LibcloudObjectStore and S3ObjectStore. |
|
Utility for uploading to and downloading from an S3-compatible bucket using |
|
Utility for uploading to and downloading to a server via SFTP. |
|
Base class for Enums containing string values. |
Exceptions
Handles errors for external packages that might not be installed. |
|
Custom exception class to signify transient errors. |