Title: [Feature] Support data initializing in multiple chunks · Issue #80 · TransferQueue/TransferQueue · GitHub
Open Graph Title: [Feature] Support data initializing in multiple chunks · Issue #80 · TransferQueue/TransferQueue
X Title: [Feature] Support data initializing in multiple chunks · Issue #80 · TransferQueue/TransferQueue
Description: Background In current implementation, we allow users to use the put interface of TransferQueueClient to put the initial fields of a global batch of samples without providing BatchMeta, as illustrated in our demo. for epoch in range(1): t...
Open Graph Description: Background In current implementation, we allow users to use the put interface of TransferQueueClient to put the initial fields of a global batch of samples without providing BatchMeta, as illustrat...
X Description: Background In current implementation, we allow users to use the put interface of TransferQueueClient to put the initial fields of a global batch of samples without providing BatchMeta, as illustrat...
Opengraph URL: https://github.com/TransferQueue/TransferQueue/issues/80
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Feature] Support data initializing in multiple chunks","articleBody":"## Background\n\nIn current implementation, we allow users to use the `put` interface of `TransferQueueClient` to put the initial fields of a global batch of samples **without** providing `BatchMeta`, as illustrated in [our demo](https://github.com/TransferQueue/TransferQueue/blob/main/recipe/simple_use_case/async_demo.py#L238).\n\n```python3\nfor epoch in range(1):\n train_dataloader = 1\n for step in range(train_dataloader):\n input_ids = (\n torch.tensor([[1, 2], [3, 4], [5, 6], [7, 8], [10, 11], [100, 111], [200, 222], [300, 333]])\n ) * (step + 1)\n input_ids_repeated = torch.repeat_interleave(input_ids, self.config.num_n_samples, dim=0)\n prompt_batch = TensorDict(\n {\"input_ids\": input_ids_repeated, \"attention_mask\": input_ids_repeated},\n batch_size=input_ids_repeated.size(0),\n )\n\n asyncio.run(self.data_system_client.async_put(data=prompt_batch, global_step=step))\n\n logger.info(\"demo put prompts ok! \")\n\n```\n\nIn this scenario, `TransferQueueClient` will attempt to communicate with `TransferQueueController` to automatically retrieve the `BatchMeta` using a secret mode called _insert_ for `get_meta` function:\n\n```python3\n async def async_put(\n self,\n data: TensorDict,\n metadata: Optional[BatchMeta] = None,\n global_step: Optional[int] = None,\n ):\n if metadata is None:\n assert global_step is not None, \"global_steps must be provided if metadata is not given\"\n\n metadata = await self.async_get_meta(\n data_fields=list(data.keys()),\n batch_size=data.batch_size[0],\n global_step=global_step,\n get_n_samples=True,\n mode=\"insert\",\n )\n ...\n```\n\nHere, the returned `BatchMeta` contains **all samples** of the specified global batch. Therefore, **users must put all initial data in one go**.\n\n\n## Solution\n\nIn the future, we plan to support putting the initial data fields of a global batch in multiple chunks by retrieving parts of the BatchMeta based on the batch size of the user's input.\n\nThis is not a high-priority task at present. Please let us know if this feature is important for your use case :)\n","author":{"url":"https://github.com/0oshowero0","@type":"Person","name":"0oshowero0"},"datePublished":"2025-10-22T06:47:24Z","url":"https://github.com/TransferQueue/TransferQueue/issues/80"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:978a53a8-e8ce-aaf3-9cfd-00d31fbc8cd2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E66A:272C96:F5C594:13AF582:6B038A9D |
| html-safe-nonce | 8bcac9975098ac4b2930fee440f543ea3a6ac66663af1d708dbf433a96616aeb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjZBOjI3MkM5NjpGNUM1OTQ6MTNBRjU4Mjo2QjAzOEE5RCIsInZpc2l0b3JfaWQiOiIxNDUyMTQ1NjA3MjYyMzA5MDIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e811f77f36d9fa43337f51ee8d5ebd0e6abc0f5fe31eb3588f20a08513c59d98 |
| hovercard-subject-tag | issue:3539352638 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TransferQueue/TransferQueue/80/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f27957db716527f8160e26ad0596c77ab19d0cda608c0c2797e6752a3e0986fd/TransferQueue/TransferQueue/issues/80 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f27957db716527f8160e26ad0596c77ab19d0cda608c0c2797e6752a3e0986fd/TransferQueue/TransferQueue/issues/80 |
| og:image:alt | Background In current implementation, we allow users to use the put interface of TransferQueueClient to put the initial fields of a global batch of samples without providing BatchMeta, as illustrat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 0oshowero0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/TransferQueue/TransferQueue git https://github.com/TransferQueue/TransferQueue.git |
| octolytics-dimension-user_id | 229037144 |
| octolytics-dimension-user_login | TransferQueue |
| octolytics-dimension-repository_id | 1045955951 |
| octolytics-dimension-repository_nwo | TransferQueue/TransferQueue |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1045955951 |
| octolytics-dimension-repository_network_root_nwo | TransferQueue/TransferQueue |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width