Pipelines
frogbox.pipelines.pipeline
Pipeline
Bases: ABC
Pipeline abstract base class.
gather_for_metrics
Gathers input_data and potentially drops duplicates in the last
batch if on a distributed system. Should be used for gathering the
inputs and targets for metric calculation.
Wrapper around Accelerator.gather_for_metrics.
install_callback
install_callback(
event,
callback,
engine="trainer",
only_main_process=False,
**kwargs
)
Install callback in pipeline.
Parameters:
-
(eventMatchableEvent) –Event to trigger callback.
-
(callbackcallable) –Callback function. Should take a single argument
pipelineand return nothing. -
(enginestr, default:'trainer') –Which engine to install callback in. Defaults to "trainer".
-
(only_main_processbool, default:False) –Install only in main process. Only affects distributed setups.
-
(kwargskeyword arguments, default:{}) –Optional keyword arguments to be passed to callback.
frogbox.pipelines.supervised
SupervisedPipeline
SupervisedPipeline(
config, checkpoint=None, checkpoint_keys=None
)
Bases: Pipeline
Supervised pipeline.
Parameters:
-
(configSupervisedConfig) –Pipeline configuration.
-
(checkpointpath - like, default:None) –Path to experiment checkpoint.
-
(checkpoint_keyslist of str, default:None) –List of keys for objects to load from checkpoint. Defaults to all keys.