avalanche.benchmarks.scenarios.CLStream
- class avalanche.benchmarks.scenarios.CLStream(name: str, exps_iter: Iterable[TCLExperience], benchmark: CLScenario[TCLStream] | None = None, set_stream_info: bool = True)[source]
A CL stream is a named iterator of experiences.
In general, many streams may be generator and not explicit lists to avoid keeping many objects in memory.
NOTE: streams should not be used by training strategies since they provide access to past, current, and future data.
- __init__(name: str, exps_iter: Iterable[TCLExperience], benchmark: CLScenario[TCLStream] | None = None, set_stream_info: bool = True)[source]
Creates an instance of a experience stream.
- Parameters:
name – The name of the stream.
exps_iter – The iterable from which experiences will be obtained.
benchmark – The benchmarks defining this stream.
set_stream_info – If True, will set the current_experience and origin_stream fields on experience objects before returning them. Defaults to True.
Methods
__init__
(name, exps_iter[, benchmark, ...])Creates an instance of a experience stream.
Attributes
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.