Skip to content

Pipeline API

egolearn.pipeline.build(cfg)

egolearn.pipeline.validate(pipe)

Check that every name the config references actually exists, at every boundary between pipeline stages (routes, slots, views, heads, encoders, ...).

egolearn.pipeline.Pipeline dataclass

admission instance-attribute

composer instance-attribute

ctx instance-attribute

driver instance-attribute

embedders instance-attribute

init_from = None class-attribute instance-attribute

label_stores instance-attribute

loader instance-attribute

losses instance-attribute

memories instance-attribute

mode property

model instance-attribute

probes = field(default_factory=list) class-attribute instance-attribute

recipe instance-attribute

routes instance-attribute

stream instance-attribute

tokenizer instance-attribute

views instance-attribute

warnings = field(default_factory=list) class-attribute instance-attribute

summary()

egolearn.pipeline.PipelineError

Bases: RuntimeError

egolearn.core.context.Context

clock = Clock(total_observations) instance-attribute

device = torch.device(device if (torch.cuda.is_available() or device == 'cpu') else 'cpu') instance-attribute

seed = int(seed) instance-attribute

derive_seed(name)

A stable integer seed from (run seed, name). Parallel work items (e.g. one frame's decode+augment) each get their own derived seed, so their randomness depends only on what the item IS, never on which worker ran it or in what order.

fresh_rng(name)

A NEW generator seeded from (seed, name) -- not cached, not snapshotted. For one-shot derived randomness that must regenerate identically on resume, like an epoch's shuffle order: a cached generator would be restored in its already-consumed state and shuffle differently the second time.

load_clock(state)

Restore only the clock. The resume path needs the clock first (the replay must know how far to go) but the RNG states last -- see utils/snapshot.py for the ordering and why.

load_state_dict(state)

rng(name)

Named python RNG, e.g. ctx.rng('memory.segments.sampler'). Cached: the same name returns the same stateful generator, and its state is saved in snapshots.

state_dict()

torch_gen(name)