unilab.base.reset_selectors.ResetMaskBuffer¶
- class unilab.base.reset_selectors.ResetMaskBuffer[source]¶
Bases:
objectReusable fixed-width bool reset mask owned by one conversion site.
scatter/resolverewrite the internal storage in place and return it; the returned tensor aliases that storage and stays valid only until the next call on the same buffer. Every site whose masks may be live at the same time owns a separate instance: the env reset-transaction entry, the env-owned event-term scratch, each manager, and each class-based term. Buffer lifetime follows its owner (the env or manager instance), so separate env instances never share storage.Methods
__init__(num_envs, device)resolve(selector, *, owner)Resolve a public reset selector like
resolve_reset_mask.scatter(env_ids)Rewrite the buffer from row indices and return the aliased mask.
Attributes