Skip to navigation

nemo_gym.utils.server_process

View as Markdown

Whether this process is a Gym server worker, and the environment variables that tell it.

The main server process sets these variables before uvicorn starts its workers, so each worker knows its role and the entrypoint it serves.

Module Contents

Functions

Data

IS_NEMO_GYM_FASTAPI_ENTRYPOINT_KEY_NAME

IS_NEMO_GYM_FASTAPI_WORKER_KEY_NAME

NEMO_GYM_FASTAPI_NUM_WORKERS

API

nemo_gym.utils.server_process._has_injected_global_config_env() -> bool
nemo_gym.utils.server_process.get_nemo_gym_fastapi_num_workers() -> int
nemo_gym.utils.server_process.is_nemo_gym_fastapi_entrypoint(
file: str
) -> bool
nemo_gym.utils.server_process.is_nemo_gym_fastapi_worker() -> bool
nemo_gym.utils.server_process.set_is_nemo_gym_fastapi_entrypoint(
file: str
) -> None
nemo_gym.utils.server_process.set_is_nemo_gym_fastapi_worker() -> None
nemo_gym.utils.server_process.set_nemo_gym_fastapi_num_workers(
num_workers: int
) -> None
nemo_gym.utils.server_process.IS_NEMO_GYM_FASTAPI_ENTRYPOINT_KEY_NAME = 'IS_NEMO_GYM_FASTAPI_ENTRYPOINT'
nemo_gym.utils.server_process.IS_NEMO_GYM_FASTAPI_WORKER_KEY_NAME = 'IS_NEMO_GYM_FASTAPI_WORKER'
nemo_gym.utils.server_process.NEMO_GYM_FASTAPI_NUM_WORKERS = 'NEMO_GYM_FASTAPI_NUM_WORKERS'