nemo_gym.server_runtime.entrypoint_flags
nemo_gym.server_runtime.entrypoint_flags
Reading literal class flags, such as ray_enabled, from a server entrypoint’s source without importing it.
Module Contents
Functions
API
The literal boolean assigned to name in a class body, annotated or not, or None when there is none.
The boolean class attribute name declared by the server an entrypoint starts, read from source.
Gym settles some things before any server exists, and each server runs in its own venv, so this reads the
source instead of importing it. It finds the classes the entrypoint calls run_webserver() on and checks
their literal name declarations (name = True or name: ClassVar[bool] = True in the class body).
Returns True when any of them declares True, False when all of them declare False, and None when that can’t be settled from the source alone, such as an inherited declaration, a class imported from another module, or an unreadable entrypoint.
The names of the classes an entrypoint calls run_webserver() on, read from source; empty if unreadable.