FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[BREAKING] Refactor: Provide a general storage abstraction layer by 0oshowero0 · Pull Request #66 · TransferQueue/TransferQueue · GitHub

This repository was archived by the owner on Jan 21, 2026. It is now read-only.

[BREAKING] Refactor: Provide a general storage abstraction layer - #66

Merged
0oshowero0 merged 42 commits into
TransferQueue:devfrom
0oshowero0:han/unified_storage_abstract
Oct 25, 2025
Merged

[BREAKING] Refactor: Provide a general storage abstraction layer#66
0oshowero0 merged 42 commits into
TransferQueue:devfrom
0oshowero0:han/unified_storage_abstract

Conversation

Copy link
Copy Markdown
Member
  1. Provide TransferQueueStorageManager abs class, acts as a general entry point for storage layer
  2. Implement AsyncTransferQueueStorageSimpleUnitManager class to manage TransferQueueSimpleUnit
  3. Disentangle the complex storage related operations from TransferQueueClient, provide a general Client interface

Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>

Copy link
Copy Markdown
Member Author

TODO: UT

Copilot AI left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull Request Overview

This PR introduces a general storage abstraction layer for the Transfer Queue system, refactoring storage operations from the client to dedicated storage managers. The key goal is to decouple complex storage-related operations from the client and provide a cleaner architecture.

  • Abstract base class TransferQueueStorageManager provides common functionality for controller notifications
  • New AsyncTransferQueueStorageSimpleUnitManager manages storage units and implements the storage interface
  • Refactored client to use storage managers instead of direct storage unit communication

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
transfer_queue/storage.py Introduces storage manager abstraction and implementation
transfer_queue/metadata.py Removes storage-specific fields from metadata classes
transfer_queue/controller.py Removes storage unit management and mapping logic
transfer_queue/client.py Refactors to use storage manager instead of direct storage operations
recipe/simple_use_case/async_demo.py Updates demo to use new storage manager initialization pattern

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread transfer_queue/storage.py Outdated
Comment thread transfer_queue/storage.py
Comment thread transfer_queue/storage.py Outdated
Comment thread transfer_queue/storage.py Outdated
Comment thread transfer_queue/storage.py Outdated
Comment thread transfer_queue/metadata.py Outdated
Comment thread transfer_queue/client.py Outdated

Copy link
Copy Markdown
Member Author

TODO:

  1. Now TransferQueueClient may not be able to be passed through Ray (not serializable). Need to investigate if there is a simple way to solve it.
  2. TransferQueueClient needs a single controller_infos, while TransferQueueStorageManager requires all controller_infos. Need to reconcile.

Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
jianjunzhong and others added 3 commits October 21, 2025 16:38
refactor: renew README.md, fix import error, and fix errors in sync_demo.py
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
0oshowero0 and others added 6 commits October 21, 2025 17:02
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
…#2)

* feat: enhance handshake process with timeout and retransmission logic

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>

* fix: issues in comments

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>

* fix: fix issues in comments

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>

* Update transfer_queue/storage.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update transfer_queue/storage.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>
Co-authored-by: Han Zhenyu 韩振宇 <o0shower0o@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jianjunzhong and others added 13 commits October 23, 2025 14:32
#3)

* docs: improve docstrings for clarity and consistency across storage.py

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>

* docs: update examples in build_storage_meta_groups and _register_servers for clarity

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>

---------

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>
…StorageManager (#8)

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>
…#5)

* docs: improve docstrings for clarity and consistency across client.py

* Update transfer_queue/client.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix comments

* fix comments

---------

Co-authored-by: liuximeng <13073314+liuximeng18772102439@user.noreply.gitee.com>
Co-authored-by: Han Zhenyu 韩振宇 <o0shower0o@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>
* Enable Controller UT

* fix codecheck

* fix codecheck

---------

Co-authored-by: liuximeng <13073314+liuximeng18772102439@user.noreply.gitee.com>
…impleStorageManager (#7)

* feat: update tests for SimpleStorageUnit and add new tests for AsyncSimpleStorageManager

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>

* refactor: simplify mock operations and adjust performance test parameters for faster execution

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>

---------

Signed-off-by: jianjunzhong <jianjunzhong@foxmail.com>
* Handle TODOs in the demo

* fix codecheck

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: liuximeng <13073314+liuximeng18772102439@user.noreply.gitee.com>
Co-authored-by: Han Zhenyu 韩振宇 <o0shower0o@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
0oshowero0 requested a review from Copilot October 25, 2025 06:34

Copilot AI left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull Request Overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread transfer_queue/storage.py
elif isinstance(self.controller_infos, dict):
raw_controller_infos = self.controller_infos
self.controller_infos = {}
for controller_info in raw_controller_infos.items():

Copilot AI Oct 25, 2025

Copy link

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The .items() call returns tuples of (key, value), but the code treats controller_info as if it's the value only. This will cause incorrect type checking. Should iterate over .values() instead or destructure the tuple properly.

Suggested change
for controller_info in raw_controller_infos.items():
for controller_info in raw_controller_infos.values():

Copilot uses AI. Check for mistakes.
Comment thread transfer_queue/metadata.py Outdated
Comment thread transfer_queue/controller.py Outdated
@@ -407,8 +368,6 @@ def _generate_batch_meta(
Generate BatchMeta by resolving storage locations for given global indexes.

For each global index, looks up the corresponding storage node address using:

Copilot AI Oct 25, 2025

Copy link

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Docstring mentions looking up storage node addresses but the implementation no longer does this after refactoring. The docstring should be updated to reflect that this method now only creates metadata without storage location mapping.

Copilot uses AI. Check for mistakes.
Comment thread transfer_queue/client.py
body={"local_indexes": local_indexes},
)
@dynamic_socket(socket_name="request_handle_socket")
async def check_current_step_consumption(self, task_name: str, global_step: int):

Copilot AI Oct 25, 2025

Copy link

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Method check_current_step_consumption has async signature but the implementation is just pass. If this is intentional placeholder, add a TODO comment or docstring explaining when it will be implemented. The similar method check_current_step_production has the same issue.

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
0oshowero0 and others added 3 commits October 25, 2025 14:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
0oshowero0 merged commit fc92f03 into TransferQueue:dev Oct 25, 2025
2 checks passed
0oshowero0 deleted the han/unified_storage_abstract branch October 29, 2025 06:13
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL