{
  "$schema": "https://ambiqai.github.io/helia-ui/schema/reference-model-1.json",
  "generatedFrom": {
    "sourceCommit": "f341fb11f7f5d77a4974ba8273c4cd55d67c21f0",
    "tool": "pyref",
    "version": "1.7.3"
  },
  "language": "python",
  "modules": [
    {
      "description": "Torch ``DataLoader`` over batches produced by another loader.",
      "name": "torch_data",
      "path": "helia_edge.data.torch_data",
      "submodules": [],
      "summary": "Torch DataLoader over batches produced by another loader.",
      "symbols": [
        {
          "description": "Wrap a re-iterable of NumPy batches, such as a Grain dataset, as a Torch ``DataLoader``.\n\nThe loader adds no batching, shuffling or workers of its own: each ``iter()`` iterates\n``dataset`` once more in this process and converts its NumPy leaves to tensors, keeping the\nstructure (dicts, lists, tuples) and the order. Arrays in worker shared memory are copied\nfirst, so tensors stay valid after the next element arrives. Do batching and parallel reads\nin ``dataset``.",
          "examples": [],
          "id": "helia_edge.data.torch_data.to_torch_loader",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "to_torch_loader",
          "params": [
            {
              "description": "Re-iterable whose ``iter()`` starts from the first element.",
              "name": "dataset",
              "type": "Iterable[Any]"
            }
          ],
          "raises": [
            {
              "description": "If Torch is not installed (``helia-edge[torch]``).",
              "type": "ImportError"
            }
          ],
          "returns": [
            {
              "description": "torch.utils.data.DataLoader: With ``batch_size=None``, so elements pass through as they are.",
              "type": "torch.utils.data.DataLoader"
            }
          ],
          "signature": "to_torch_loader(dataset: Iterable[Any]) -> torch.utils.data.DataLoader",
          "source": {
            "line": 29,
            "path": "helia_edge/data/torch_data.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/data/torch_data.py#L29"
          },
          "summary": "Wrap a re-iterable of NumPy batches, such as a Grain dataset, as a Torch DataLoader."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
