Pipelines

BaseDataGeneration

Bases: BasePipeline.BasePipeline

class BaseDataGeneration.BaseDataGeneration(environment_config: BaseEnvironmentConfig, database_config: Optional[BaseDatabaseConfig] = None, session_dir: str = 'sessions', session_name: str = 'data_generation', new_session: bool = True, batch_nb: int = 0, batch_size: int = 0)[source]
batch_begin() None[source]

Called once at the beginning of a batch production.

batch_condition() bool[source]

Check the batch number condition.

batch_count() None[source]

Increment the batch counter.

batch_end() None[source]

Called once at the end of a batch production.

batch_produce() None[source]

Trigger the data production.

data_generation_begin() None[source]

Called once at the beginning of the data generation Pipeline.

data_generation_end() None[source]

Called once at the beginning of the data generation Pipeline.

execute() None[source]

Launch the data generation Pipeline. Each event is already implemented for a basic Pipeline but can also be rewritten via inheritance to describe a more complex Pipeline.

BasePipeline

class BasePipeline.BasePipeline(network_config: Optional[BaseNetworkConfig] = None, database_config: Optional[BaseDatabaseConfig] = None, environment_config: Optional[BaseEnvironmentConfig] = None, session_dir: str = 'sessions', session_name: str = 'default', new_session: bool = True, pipeline: str = '')[source]
execute()[source]

Launch the Pipeline.

get_data_manager() Optional[DataManager][source]

Return the DataManager associated with the Pipeline if it exists.

Returns

The DataManager associated with the Pipeline.

get_database_manager() Optional[DatabaseManager][source]

Return the DatabaseManager associated with the Pipeline if it exists.

Returns

The DatabaseManager associated with the Pipeline.

get_environment_manager() Optional[EnvironmentManager][source]

Return the EnvironmentManager associated with the Pipeline if it exists.

Returns

The EnvironmentManager associated with the Pipeline.

get_network_manager() Optional[NetworkManager][source]

Return the NetworkManager associated with the Pipeline if it exists.

Returns

The NetworkManager associated with the Pipeline.

get_stats_manager() Optional[StatsManager][source]

Return the StatsManager associated with the Pipeline if it exists.

Returns

The StatsManager associated with the Pipeline.

BasePrediction

Bases: BasePipeline.BasePipeline

class BasePrediction.BasePrediction(network_config: BaseNetworkConfig, environment_config: BaseEnvironmentConfig, database_config: Optional[BaseDatabaseConfig] = None, session_dir: str = 'session', session_name: str = 'training', step_nb: int = -1, record: bool = False)[source]
execute() None[source]

Launch the prediction Pipeline. Each event is already implemented for a basic pipeline but can also be rewritten via inheritance to describe a more complex Pipeline.

predict() None[source]

Pull the data from the manager and return the prediction.

prediction_begin() None[source]

Called once at the beginning of the prediction Pipeline.

prediction_condition() bool[source]

Condition that characterize the end of the prediction Pipeline.

prediction_end() None[source]

Called once at the end of the prediction Pipeline.

sample_begin() None[source]

Called one at the beginning of each sample.

sample_end() None[source]

Called one at the end of each sample.

BaseTrainer

Bases: BasePipeline.BasePipeline

class BaseTraining.BaseTraining(network_config: BaseNetworkConfig, database_config: BaseDatabaseConfig, environment_config: Optional[BaseEnvironmentConfig] = None, session_dir: str = 'sessions', session_name: str = 'training', new_session: bool = True, epoch_nb: int = 0, batch_nb: int = 0, batch_size: int = 0, debug: bool = False)[source]
batch_begin() None[source]

Called one at the beginning of a batch production.

batch_condition() bool[source]

Check the batch number condition.

batch_count() None[source]

Increment the batch counter.

batch_end() None[source]

Called one at the end of a batch production.

epoch_begin() None[source]

Called one at the beginning of each epoch.

epoch_condition() bool[source]

Check the epoch number condition.

epoch_count() None[source]

Increment the epoch counter.

epoch_end() None[source]

Called one at the end of each epoch.

execute() None[source]

Launch the training Pipeline. Each event is already implemented for a basic pipeline but can also be rewritten via inheritance to describe a more complex Pipeline.

optimize() None[source]

Pulls data, run a prediction and an optimizer step.

save_info_file() None[source]

Save a .txt file that provides a template for user notes and the description of all the components.

train_begin() None[source]

Called once at the beginning of the training Pipeline.

train_end() None[source]

Called once at the end of the training Pipeline.