avalanche.benchmarks.scenarios.EagerCLStream
- class avalanche.benchmarks.scenarios.EagerCLStream(name: str, exps: Sequence[TCLExperience], benchmark: CLScenario | None = None, set_stream_info: bool = True, slice_ids: Iterable[int] | None = None)[source]
A CL stream build from a pre-initialized list of experience.
NOTE: streams should not be used by training strategies since they provide access to past, current, and future data.
- __init__(name: str, exps: Sequence[TCLExperience], benchmark: CLScenario | None = None, set_stream_info: bool = True, slice_ids: Iterable[int] | None = None)[source]
Create a CL stream given a list of experiences. :param name: name of the stream. :param exps: list of experiences. :param benchmark: a reference to the benchmark. :param set_stream_info: if True, set the origin_stream and
current_experience identifier for each experience. If False, the attributes are left unchanged.
- Parameters:
slice_ids – The indices of experiences to include. from the original stream. Defaults to None. For internal use.
Methods
__init__
(name, exps[, benchmark, ...])Create a CL stream given a list of experiences. :param name: name of the stream. :param exps: list of experiences. :param benchmark: a reference to the benchmark. :param set_stream_info: if True, set the origin_stream and current_experience identifier for each experience. If False, the attributes are left unchanged. :param slice_ids: The indices of experiences to include. from the original stream. Defaults to None. For internal use.
count
(value)index
(value, [start, [stop]])Raises ValueError if the value is not present.
Attributes
exps
slice_ids
Describes which experiences are contained in the current stream slice.
name
The name of the stream (for instance: "train", "test", "valid", ...).
exps_iter
The iterable from which experiences will be obtained.
benchmark
A reference to the benchmark.
set_stream_info
If True, will set the current_experience and origin_stream fields on experience objects before returning them.