Skip to content

Conversation

zhaochenyang20
Copy link
Collaborator

Checklist Before Starting

  • Search for similar PR(s).

What does this PR do?

I cleaned up the codes used in verl/workers/rollout/sglang_rollout/sglang_rollout.py and added more comments for users. There are three questions left:

  1. line 218:
        # TODO(chenyang): is `max_turns` the max number of tool call rounds?
        # If so, I think it should be a small number like 3 or 5.
        # self.config.max_model_len // 3 is a large number.
  1. line 257
# TODO(chenyang): Strange way to calculate nnodes.
  1. When will SGLangRollout be used? I am just pondering why in SGLangRollout, SGLang's VerlEngine is not used. But in tests/workers/rollout/test_sglang_spmd.py, the VerlEngine is used.

# TODO(chenyang): is `max_turns` the max number of tool call rounds?
# If so, I think it should be a small number like 3 or 5.
# self.config.max_model_len // 3 is a large number.

Copy link
Owner

Choose a reason for hiding this comment

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

Yes. But if max_model_len is reached or the request state becomes complete, the rollout could also stop. So generally, self.config.max_model_len //3 would not come to effect. it's a kind of a placeholder in case max_turn is not specified in the configuration.

non_pad_index = torch.nonzero(prompt_token_ids != pad_token_id, as_tuple=False)[0][0]
non_pad_index = torch.nonzero(prompt_token_ids != pad_token_id, as_tuple=False)[0][
0
]
Copy link
Owner

Choose a reason for hiding this comment

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

What's this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just fix lint of verl. I don't know why a lot of lint failed but verl's CI passed.

@zyzshishui zyzshishui merged commit 6e58735 into refactor May 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants