nemo_gym.base_environment_server
nemo_gym.base_environment_server
Shared lifecycle for environment servers.
Module Contents
Classes
Data
API
Bases: SimpleServer, Generic[EpisodeRequestT, EpisodeResponseT]
Expose a typed episode protocol with shared limits and cleanup.
Run one concrete environment protocol.
Bases: BaseRunServerInstanceConfig
Configure protocol-neutral episode limits.
Hold bounded process-local cleanup callbacks for one episode.
Callbacks:
- are process-local Python objects, although they may issue remote close requests;
- run sequentially in LIFO order within one total cleanup timeout;
- must be idempotent because a timed-out remote request may have succeeded;
- are lost on process or host failure, so remote owners need expiry or reaping.
Callback failures are logged and do not stop later callbacks. Cleanup has no durable retry after this context is discarded.
Close one registered participant at a protocol boundary.
Run this idempotent callback once.
The episode timeout bounds calls made during the protocol. The context’s cleanup timeout bounds callbacks left for final unwinding.
Bases: Exception
Carry a failure that belongs in the native episode response.