From e90a0e74e76fe5060cc921c361359e9cac1aefc5 Mon Sep 17 00:00:00 2001 From: Felipe Vieira Frujeri Date: Wed, 9 Jul 2025 18:35:09 -0700 Subject: [PATCH] Fix error message fro in VllmGenerationWorker. Signed-off-by: Felipe Vieira Frujeri --- nemo_rl/models/generation/vllm.py | 3 ++- nemo_rl/models/generation/vllm_backend.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nemo_rl/models/generation/vllm.py b/nemo_rl/models/generation/vllm.py index 9125b67665..4dcbf57ed4 100644 --- a/nemo_rl/models/generation/vllm.py +++ b/nemo_rl/models/generation/vllm.py @@ -287,7 +287,8 @@ def _patch_vllm_init_workers_ray(): raise ImportError( "vLLM is not installed. Please check that the py_executable in the runtime_env of VllmGenerationWorker " "covers the vllm dependency. You may have to update nemo_rl/distributed/ray_actor_environment_registry.py. " - "If you are working interactively, you can install by running `uv sync --extra vllm` anywhere in the repo." + "This error can also happen if the venv creation was aborted or errored out in the middle. In that case, " + "please run at least once with the environment variable NRL_FORCE_REBUILD_VENVS=true set to force the rebuild of the environment." ) vllm_kwargs: dict[str, Any] = copy.deepcopy(self.cfg.get("vllm_kwargs", {})) diff --git a/nemo_rl/models/generation/vllm_backend.py b/nemo_rl/models/generation/vllm_backend.py index 8aaa34cd15..76b712327f 100644 --- a/nemo_rl/models/generation/vllm_backend.py +++ b/nemo_rl/models/generation/vllm_backend.py @@ -21,7 +21,8 @@ raise ImportError( "vLLM is not installed. Please check that the py_executable in the runtime_env of VllmGenerationWorker " "covers the vllm dependency. You may have to update nemo_rl/distributed/ray_actor_environment_registry.py. " - "If you are working interactively, you can install by running `uv sync --extra vllm` anywhere in the repo." + "This error can also happen if the venv creation was aborted or errored out in the middle. In that case, " + "please run at least once with the environment variable NRL_FORCE_REBUILD_VENVS=true set to force the rebuild of the environment." )