Skip to content

vllm.ray.ray_env

Functions:

_parse_csv(value)

Split a comma-separated string into a set of stripped, non-empty tokens.

get_env_vars_to_copy(exclude_vars=None, additional_vars=None, destination=None)

Return the env var names to copy from the driver to Ray actors.

The result is the union of:

  1. Env vars registered in vllm.envs.environment_variables.
  2. Env vars in os.environ matching a prefix in DEFAULT_ENV_VAR_PREFIXES + VLLM_RAY_EXTRA_ENV_VAR_PREFIXES_TO_COPY.
  3. Individual names in DEFAULT_EXTRA_ENV_VARS + VLLM_RAY_EXTRA_ENV_VARS_TO_COPY.
  4. Caller-supplied additional_vars (e.g. platform-specific).

Minus any names in exclude_vars or RAY_NON_CARRY_OVER_ENV_VARS.

Parameters:

  • exclude_vars

    (set[str] | None, default: None ) –

    Env vars to exclude (e.g. worker-specific ones).

  • additional_vars

    (set[str] | None, default: None ) –

    Extra individual env var names to copy. Useful for caller-specific vars (e.g. platform env vars).

  • destination

    (str | None, default: None ) –

    Label used in log messages only.