incremental
IncrementalEnvironment()
Bases: TransformedObservable
, Stepable
, Iterable[DataFrame]
Base class for incremental environments.
Incremental environments are environments that can be advanced by a step and provide a stream of data. The data can be observed at each step.
Initialize the incremental environment.
Source code in src/flowcean/core/environment/incremental.py
28 29 30 |
|
collect(n=None, *, progress_bar=True)
Collect data from the environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
int | None
|
Number of steps to collect. If None, all steps are collected. |
None
|
progress_bar
|
bool | dict[str, Any]
|
Whether to show a progress bar. If a dictionary is provided, it will be passed to the progress bar. |
True
|
Returns:
Type | Description |
---|---|
Dataset
|
The collected dataset. |
Source code in src/flowcean/core/environment/incremental.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
num_steps()
Return the number of steps in the environment.
Returns:
Type | Description |
---|---|
int | None
|
The number of steps in the environment, or None if the number of |
int | None
|
steps is unknown. |
Source code in src/flowcean/core/environment/incremental.py
62 63 64 65 66 67 68 69 |
|