[refactor] Simplify initialization and improve API usability#26
Merged
0oshowero0 merged 14 commits intoAscend:mainfrom Feb 6, 2026
Merged
[refactor] Simplify initialization and improve API usability#260oshowero0 merged 14 commits intoAscend:mainfrom
0oshowero0 merged 14 commits intoAscend:mainfrom
Conversation
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes the TransferQueue initialization process by introducing a simplified init() function that provides a more user-friendly API. The changes consolidate the initialization logic and rename storage manager types to be more concise.
Changes:
- Added a new
transfer_queue.init()function that simplifies TransferQueue initialization with automatic controller detection and configuration management - Renamed storage manager types:
AsyncSimpleStorageManager→SimpleStorage,MooncakeStorageManager→MooncakeStore,YuanrongStorageManager→Yuanrongwith backward compatibility through deprecation warnings - Moved
process_zmq_server_infofunction fromclient.pytozmq_utils.pyfor better organization and added config.yaml for default configuration
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| transfer_queue/interface.py | New file introducing the simplified init(), get_meta(), get_data(), put(), and related wrapper functions for easier API usage |
| transfer_queue/controller.py | Added store_config() and get_config() methods to store/retrieve global TransferQueue configuration |
| transfer_queue/config.yaml | New default configuration file defining controller and backend settings |
| transfer_queue/init.py | Updated exports to include new interface functions and process_zmq_server_info |
| transfer_queue/storage/managers/factory.py | Added deprecation warnings for old manager type names with automatic fallback to new names |
| transfer_queue/storage/managers/simple_backend_manager.py | Updated registration name and added deprecation warning for storage_unit_infos config key |
| transfer_queue/storage/managers/base.py | Changed config parameter type annotation to DictConfig |
| transfer_queue/storage/managers/yuanrong_manager.py | Updated registration name from YuanrongStorageManager to Yuanrong |
| transfer_queue/storage/managers/mooncake_manager.py | Updated registration name from MooncakeStorageManager to MooncakeStore |
| transfer_queue/utils/zmq_utils.py | Added process_zmq_server_info() function moved from client.py |
| transfer_queue/client.py | Removed process_zmq_server_info() function and unused imports |
| tutorial/01_core_components.py | Simplified tutorial to use new tq.init() and module-level functions |
| tests/test_client.py | Updated test cases to use new SimpleStorage manager type name |
| requirements.txt | Added omegaconf dependency |
| pyproject.toml | Added *.yaml to package data for config file inclusion |
| README.md | Updated storage backend names in documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 23 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
In previous versions of TransferQueue, we lacked an easy-to-use initialization process. Users had to manually initialize and configure TQ, leading to verbose boilerplate code.
Reference for previous complex usage:
TQ tutorial:
TransferQueue/tutorial/01_core_components.py
Line 59 in c2bb0fa
verl integration:https://github.com/verl-project/verl/blob/e4915bd8859e75a8634ec48c20a0bbc781d66eb8/verl/experimental/transfer_queue/ray_trainer.py#L340
Key Changes
transfer_queue.init(conf).TransferQueueClientAPIs directly into the top-leveltransfer_queuenamespace (e.g.,tq.put,tq.get_meta).config.yamlto support zero-config initialization and formalize the config structure.-
AsyncSimpleStorageManager->SimpleStorage-
YuanrongStorageManager->Yuanrong-
MooncakeStorageManager->MooncakeStoreStorageManager. [Enhancement] A suggestion regarding StorageManager initialization #6Usage Example
For more details, please refer to the updated tutorials.
Config Structure
TODO
CC: @wuxibin89 @dpj135