Skip to content

streaming

StreamingOfflineEnvironment(environment, batch_size)

Bases: IncrementalEnvironment

Streaming offline environment.

This environment streams data from an offline environment in batches.

Initialize the streaming offline environment.

Parameters:

Name Type Description Default
environment OfflineEnvironment

The offline environment to stream.

required
batch_size int

The batch size of the streaming environment.

required
Source code in src/flowcean/environments/streaming.py
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def __init__(
    self,
    environment: OfflineEnvironment,
    batch_size: int,
) -> None:
    """Initialize the streaming offline environment.

    Args:
        environment: The offline environment to stream.
        batch_size: The batch size of the streaming environment.
    """
    super().__init__()
    self.environment = environment
    self.batch_size = batch_size