expose TransferQueue utils#4
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR exposes TransferQueue utilities by adding four new utility modules to the experimental transfer queue package. The utilities include enums and role definitions, ZeroMQ message handling, serialization with msgpack/pickle for PyTorch tensors and TensorDict objects, and a package initialization file.
Key changes:
- Adds core utilities for transfer queue roles and production status enums
- Implements ZeroMQ utilities for distributed messaging and communication
- Provides advanced serialization utilities for PyTorch tensors and TensorDict objects
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| verl/experimental/transfer_queue/utils/init.py | Package initialization with copyright headers |
| verl/experimental/transfer_queue/utils/utils.py | Core enums, Ray placement group utilities, and tensor field extraction |
| verl/experimental/transfer_queue/utils/zmq_utils.py | ZeroMQ message types, server info, and socket creation utilities |
| verl/experimental/transfer_queue/utils/serial_utils.py | Msgpack encoder/decoder for PyTorch tensors and TensorDict serialization |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| request_type: ZMQRequestType, | ||
| sender_id: str, | ||
| body: dict[str, Any], | ||
| receiver_id: Optional[str | None] = None, |
There was a problem hiding this comment.
The type annotation Optional[str | None] is redundant. Optional[str] already includes None, so this should be simplified to Optional[str].
| receiver_id: Optional[str | None] = None, | |
| receiver_id: Optional[str] = None, |
There was a problem hiding this comment.
If not used now, we can delete this file
…oller * Support storage unit in TransferQueue * Fix importance error * Support controller in TransferQueue (#2) * Support controller in TransferQueue * Fix import * Fix comments --------- Co-authored-by: liuximeng <13073314+liuximeng18772102439@user.noreply.gitee.com> * expose TransferQueueClient (#3) * Add copyright and license information Added copyright and licensing information to the controller.py file. * update client docstring (#5) Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> * merge TransferQueue utils (#4) * [fix] Fix n_sample related problems (#8) * update client docstring Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> * fix n_sample related problems Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> --------- Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> * expose TransferQueue client/controller UT (#6) * Add metadata.py and test_simple_storage_unit.py (#9) * Add metadata.py and test_simple_storage_unit.py * Add copyright and license information to test_simple_storage_unit.py * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Han Zhenyu 韩振宇 <o0shower0o@outlook.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add reorder function to BatchMeta (#13) Co-authored-by: liuximeng <13073314+liuximeng18772102439@user.noreply.gitee.com> * [recipe, data] feat: TransferQueue - Support managing multiple data partitions for Train/Val/Test in controller (#45) Co-authored-by: liuximeng <13073314+liuximeng18772102439@user.noreply.gitee.com> * delete TQ source codes Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> * update docs Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> * update performance Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> * fix Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> --------- Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> Co-authored-by: FightingZhen <295632982@qq.com> Co-authored-by: Han Zhenyu 韩振宇 <o0shower0o@outlook.com> Co-authored-by: LLLLxmmm <130739718+LLLLxmmm@users.noreply.github.com> Co-authored-by: liuximeng <13073314+liuximeng18772102439@user.noreply.gitee.com> Co-authored-by: Han Zhenyu 韩振宇 <hanzy19@tsinghua.org.cn> Co-authored-by: zhabuye <74179177+zhabuye@users.noreply.github.com> Co-authored-by: Jianjun Zhong <87791082+jianjunzhong@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
What does this PR do?
As per title.
Checklist Before Starting
[{modules}] {type}: {description}(This will be checked by the CI){modules}includefsdp,megatron,sglang,vllm,rollout,trainer,ci,training_utils,recipe,hardware,deployment,ray,worker,single_controller,misc,perf,model,algo,env,tool,ckpt,doc,data,like[megatron, fsdp, doc]{type}is infeat,fix,refactor,chore,test[BREAKING]to the beginning of the title.[BREAKING][fsdp, megatron] feat: dynamic batchingTest
API and Usage Example
# Add code snippet or script demonstrating how to use thisDesign & Code Changes
Checklist Before Submitting
Important
Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.
pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=alwaysci-requestchannel in theverlSlack workspace. (If not accessible, please try the Feishu group (飞书群).)