Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 922 Bytes

callback.rst

File metadata and controls

39 lines (24 loc) · 922 Bytes

composer.Callback

composer

Callbacks are run at each given Event, and are used to for non-essential recording functions such as logging or timing.

Callbacks differ from Algorithm in that they do not modify the training of the model. By convention, callbacks should not modify the State.

Each callback inherits from the Callback base class, and overrides functions corresponding to the event.

For example:

from composer import Callback

class MyCallback(Callback)

    def epoch_start(self, state: State, logger: Logger):
        print(f'Epoch {state.epoch}/{state.max_epochs}')

Note

To use Composer's built in callbacks, see /callbacks.

~composer.Callback ~composer.core.callback.RankZeroCallback