Logger (original) (raw)

Back to top

Edit this page

Toggle table of contents sidebar

class composer.Logger(state, destinations=None)[source]#

An interface to record training data.

The Trainer, instances of Callback, and instances of Algorithm invoke the logger to record data such as the epoch, training loss, and custom metrics as provided by individual callbacks and algorithms. This class does not store any data itself; instead, it routes all data to the destinations. Each destination (e.g. the FileLogger,InMemoryLogger) is responsible for storing the data itself (e.g. writing it to a file or storing it in memory).

Parameters

destinations#

A sequence of LoggerDestination to where logging calls will be sent.

Type

_Sequence_[LoggerDestination]

has_file_upload_destination()[source]#

Determines if the logger has a destination which supports uploading files.

Needed for checking if a model can be exported via this logger.

Returns

bool – Whether any of the destinations support uploading files.

log_images(images, name='Images', channels_last=False, step=None, masks=None, mask_class_labels=None, use_table=True)[source]#

Log images. Logs any tensors or arrays as images.

Parameters

upload_file(remote_file_name, file_path, *, overwrite=False)[source]#

Upload file_path as a file named remote_file_name.

Both file_path and remote_file_name can be specified as format strings. See format_name_with_dist() for more information.

Parameters