{"record":{"id":"bdf7fbd0c23cc4c5","repo":"vllm-project/vllm","slug":"unable-to-use-nsight-profiling-unless-workers-run","errorCode":null,"errorMessage":"Unable to use nsight profiling unless workers run with Ray.","messagePattern":"Unable to use nsight profiling unless workers run with Ray\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/parallel.py","lineNumber":1032,"sourceCode":"            raise ValueError(\n                \"Unrecognized distributed executor backend \"\n                f\"{self.distributed_executor_backend}. Supported \"\n                \"values are 'ray', 'mp' 'uni', 'external_launcher', \"\n                \" custom Executor subclass or its import path.\"\n            )\n        if self.use_ray:\n            from vllm.v1.executor import ray_utils\n\n            ray_utils.assert_ray_available()\n\n        if not current_platform.use_custom_allreduce():\n            self.disable_custom_all_reduce = True\n            logger.debug(\n                \"Disabled the custom all-reduce kernel because it is not \"\n                \"supported on current platform.\"\n            )\n        if self.ray_workers_use_nsight and not self.use_ray:\n            raise ValueError(\n                \"Unable to use nsight profiling unless workers run with Ray.\"\n            )\n\n        return self\n\n    def reconfigure_for_independent_dp_rank(self) -> None:\n        \"\"\"Reconfigure for a single independent non-MoE DP rank.\"\"\"\n        # Capture these before changing DP fields.\n        nnodes = self.nnodes_within_dp\n        node_rank = self.node_rank_within_dp\n        self.data_parallel_size = 1\n        self.data_parallel_size_local = 1\n        self.data_parallel_rank = 0\n        self.nnodes = nnodes\n        self.node_rank = node_rank\n","sourceCodeStart":1014,"sourceCodeEnd":1048,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/parallel.py#L1014-L1048","documentation":"ParallelConfig raises this when ray_workers_use_nsight is enabled but the deployment is not using Ray. Nsight worker profiling is implemented by injecting nsight commands into Ray worker processes, so it depends on the Ray executor to propagate profiling to each worker.","triggerScenarios":"Passing --ray-workers-use-nsight (or ray_workers_use_nsight=True in config) while distributed_executor_backend is anything other than ray, or while use_ray is False.","commonSituations":"Copying a profiling recipe from a Ray-based vLLM deployment into a local single-node mp/uni launch; leaving the flag on in a config file when switching executors.","solutions":["Remove --ray-workers-use-nsight, or set ray_workers_use_nsight=False.","If you need nsight with Ray, also pass --distributed-executor-backend ray.","For non-Ray profiling, use the torch profiler config instead (profiler='torch' with torch_profiler_dir)."],"exampleFix":"# before\nvllm serve model --ray-workers-use-nsight --distributed-executor-backend mp\n\n# after\nvllm serve model --distributed-executor-backend ray --ray-workers-use-nsight","handlingStrategy":"validation","validationCode":"def validate_nsight(use_nsight: bool, use_ray: bool) -> None:\n    if use_nsight and not use_ray:\n        raise SystemExit(\"--ray-workers-use-nsight requires --distributed-executor-backend ray\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Bind nsight flags to the Ray backend in launch templates (assert backend == 'ray' when the flag is set)."],"tags":["profiling","nsight","ray","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}