Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions skyrl/train/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,9 @@ class InferenceEngineConfig(BaseConfig):
"""Pass-through kwargs applied to ``RouterArgs`` for the vllm-router.
Names must match ``vllm_router.RouterArgs`` fields (e.g. ``policy``, ``request_timeout_secs``)."""

profiler_config: Dict[str, Any] = field(default_factory=dict)
"""Pass through profiler config to vLLM engine."""
Comment on lines +505 to +506
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The addition of profiler_config appears redundant because engine_init_kwargs (line 487) is already designed to pass arbitrary arguments to the vLLM engine.

Furthermore, this implementation is likely to cause runtime issues:

  1. vLLM Compatibility: vLLM expects profiling parameters (such as profiler and torch_profiler_dir) as top-level arguments. If profiler_config is passed as a dictionary key to vllm.LLM or vllm.AsyncEngineArgs (via **kwargs in the engine initialization), it will trigger a TypeError for an unexpected keyword argument.
  2. Type Mismatch: The PR description shows this field being populated with a JSON string, but the type hint is Dict[str, Any]. This will lead to type errors during configuration parsing or when the code expects a dictionary.

Recommendation: Instead of adding a new field, use the existing engine_init_kwargs. If a dedicated field is strictly required for grouping, logic must be added to the engine initialization (e.g., in vllm_engine.py) to unpack these values into the top-level engine arguments.



# ---------------------------------------------------------------------------
# Generator
Expand Down
Loading