Skip to content

[recipe] Refactor recipe demo to use KV interfaces#55

Merged
0oshowero0 merged 1 commit intoAscend:mainfrom
dodatboii:refactor_recipe_rebased
Mar 25, 2026
Merged

[recipe] Refactor recipe demo to use KV interfaces#55
0oshowero0 merged 1 commit intoAscend:mainfrom
dodatboii:refactor_recipe_rebased

Conversation

@dodatboii
Copy link
Copy Markdown
Contributor

Summary

Offer a new single_controller_demo to use the high-level KV interface (tq.init / tq.kv_batch_put / KVBatchMeta) instead of the low-level native interface (TransferQueueController, SimpleStorageUnit, process_zmq_server_info).

Changes

  • Retired legacy sync_demo.py and async_demo.py
  • Replaced low-level controller/storage setup with tq.init(conf=config)
  • Switched from BatchMeta-based flow to KVBatchMeta-based flow: put prompts by UUID keys, sample global_batch_size keys via random.sample, pass KVBatchMeta through worker functions

@ascend-robot
Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

Comment thread recipe/simple_use_case/single_controller_demo.py Outdated
Comment thread recipe/simple_use_case/single_controller_demo.py
Comment thread recipe/simple_use_case/single_controller_demo.py Outdated
Comment thread recipe/simple_use_case/single_controller_demo.py Outdated
Comment thread recipe/simple_use_case/single_controller_demo.py Outdated
@ascend-robot
Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

5 similar comments
@ascend-robot
Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ascend-robot
Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

- Remove legacy sync/async demos
- Add single controller demo
- Refactor tq_conf to satisfy new structure
- Optimize meta field updates and clean up async interfaces
@dodatboii dodatboii force-pushed the refactor_recipe_rebased branch from f7fd574 to 70878d9 Compare March 25, 2026 02:44
@ascend-robot
Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@0oshowero0 0oshowero0 changed the title [fix, recipe] Refactor recipe demo to use KV interfaces [recipe] Refactor recipe demo to use KV interfaces Mar 25, 2026
@0oshowero0 0oshowero0 merged commit 75c4713 into Ascend:main Mar 25, 2026
5 of 6 checks passed
vermouth1992 pushed a commit to vermouth1992/TransferQueue that referenced this pull request Mar 28, 2026
### Summary

Offer a new single_controller_demo to use the high-level KV interface
(tq.init / tq.kv_batch_put / KVBatchMeta) instead of the low-level
native interface (TransferQueueController, SimpleStorageUnit,
process_zmq_server_info).

### Changes
- Retired legacy sync_demo.py and async_demo.py
- Replaced low-level controller/storage setup with tq.init(conf=config)
- Switched from BatchMeta-based flow to KVBatchMeta-based flow: put
prompts by UUID keys, sample global_batch_size keys via random.sample,
pass KVBatchMeta through worker functions

Signed-off-by: Chi Zhang <czhangseu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants