{
  "$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": "TensorFlow ``tf.data`` adapters: generators, arrays and batches from other loaders.",
      "name": "tf_data",
      "path": "helia_edge.data.tf_data",
      "submodules": [],
      "summary": "TensorFlow tf.data adapters: generators, arrays and batches from other loaders.",
      "symbols": [
        {
          "description": "Convert inputs to tf.data.Dataset.",
          "examples": [],
          "id": "helia_edge.data.tf_data.convert_inputs_to_tf_dataset",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "convert_inputs_to_tf_dataset",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "convert_inputs_to_tf_dataset(x=None, y=None, sample_weight=None, batch_size=None)",
          "source": {
            "line": 18,
            "path": "helia_edge/data/tf_data.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/data/tf_data.py#L18"
          },
          "summary": "Convert inputs to tf.data.Dataset."
        },
        {
          "description": "Adapt caller-owned schedules to tf.data without changing sample weights.\n\nGLOBAL preserves one finite/repeated stream. FINITE partitions terminating,\npartition-independent generators; deterministic mode preserves partition order.\nnum_workers counts generators, not processes. See https://ambiqai.github.io/helia-edge/guide/input-pipeline/.",
          "examples": [],
          "id": "helia_edge.data.tf_data.create_interleaved_dataset_from_generator",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "create_interleaved_dataset_from_generator",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "create_interleaved_dataset_from_generator(\n    data_generator: Callable[[Iterator[T]], Iterable[K]],\n    id_generator: Callable[[list[T]], Iterator[T]],\n    ids: list[T],\n    spec: tf.TensorSpec | tuple[tf.TensorSpec, ...] | dict[str, tf.TensorSpec],\n    preprocess: Callable[[K], K] | None = None,\n    num_workers: int = 4,\n    *,\n    stream_mode: StreamMode | str = StreamMode.GLOBAL,\n    deterministic: bool = True,\n) -> tf.data.Dataset",
          "source": {
            "line": 56,
            "path": "helia_edge/data/tf_data.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/data/tf_data.py#L56"
          },
          "summary": "Adapt caller-owned schedules to tf.data without changing sample weights."
        },
        {
          "description": "Helper function to create dataset from static data",
          "examples": [],
          "id": "helia_edge.data.tf_data.create_dataset_from_data",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "create_dataset_from_data",
          "params": [
            {
              "description": "Numpy data",
              "name": "x",
              "type": "npt.NDArray"
            },
            {
              "description": "Numpy labels",
              "name": "y",
              "type": "npt.NDArray"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "tf.data.Dataset: Dataset",
              "type": "tf.data.Dataset"
            }
          ],
          "signature": "create_dataset_from_data(x: npt.NDArray, y: npt.NDArray, spec: tuple[tf.TensorSpec, ...]) -> tf.data.Dataset",
          "source": {
            "line": 124,
            "path": "helia_edge/data/tf_data.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/data/tf_data.py#L124"
          },
          "summary": "Helper function to create dataset from static data"
        },
        {
          "description": "Get output signature from sample outputs",
          "examples": [],
          "id": "helia_edge.data.tf_data.get_output_signature",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "get_output_signature",
          "params": [
            {
              "description": "Outputs. A tensor or tuple of tensors. Either KerasTensor, tf.Tensor, or numpy array.",
              "name": "outputs",
              "type": "keras.KerasTensor | npt.NDArray | tuple[keras.KerasTensor | npt.NDArray]"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "tf.TensorSpec: Tensor spec",
              "type": "tf.TensorSpec | tuple[tf.TensorSpec, ...]"
            }
          ],
          "signature": "get_output_signature(\n    outputs: keras.KerasTensor | npt.NDArray | tuple[keras.KerasTensor | npt.NDArray],\n) -> tf.TensorSpec | tuple[tf.TensorSpec, ...]",
          "source": {
            "line": 139,
            "path": "helia_edge/data/tf_data.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/data/tf_data.py#L139"
          },
          "summary": "Get output signature from sample outputs"
        },
        {
          "description": "Get output signature from a function",
          "examples": [],
          "id": "helia_edge.data.tf_data.get_output_signature_from_fn",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "get_output_signature_from_fn",
          "params": [
            {
              "description": "Function",
              "name": "fn",
              "type": "Callable[..., tf.Tensor]"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "tf.TensorSpec: Tensor spec",
              "type": "tf.TensorSpec | tuple[tf.TensorSpec, ...]"
            }
          ],
          "signature": "get_output_signature_from_fn(\n    fn: Callable[..., keras.KerasTensor],\n    *args=(),\n) -> tf.TensorSpec | tuple[tf.TensorSpec, ...]",
          "source": {
            "line": 165,
            "path": "helia_edge/data/tf_data.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/data/tf_data.py#L165"
          },
          "summary": "Get output signature from a function"
        },
        {
          "description": "Get output signature from a generator",
          "examples": [],
          "id": "helia_edge.data.tf_data.get_output_signature_from_gen",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "get_output_signature_from_gen",
          "params": [
            {
              "description": "Generator factory",
              "name": "gen",
              "type": "Callable[..., Iterator[Any]]"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "tf.TensorSpec: Tensor spec",
              "type": "tf.TensorSpec | tuple[tf.TensorSpec, ...]"
            }
          ],
          "signature": "get_output_signature_from_gen(\n    gen: Callable[..., Iterator[Any]],\n    *args: Any = (),\n) -> tf.TensorSpec | tuple[tf.TensorSpec, ...]",
          "source": {
            "line": 179,
            "path": "helia_edge/data/tf_data.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/data/tf_data.py#L179"
          },
          "summary": "Get output signature from a generator"
        },
        {
          "description": "Wrap a re-iterable of NumPy batches, such as a Grain dataset, as a ``tf.data.Dataset``.\n\nElements pass through in order, one ``iter(dataset)`` per pass of the returned dataset;\nnothing is batched, shuffled or read in parallel here. Do that in ``dataset``.",
          "examples": [],
          "id": "helia_edge.data.tf_data.to_tf_dataset",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "to_tf_dataset",
          "params": [
            {
              "description": "Re-iterable whose ``iter()`` starts from the first element.",
              "name": "dataset",
              "type": "Iterable[Any]"
            },
            {
              "description": "``tf.TensorSpec`` structure matching one element. Use ``None`` for a\nbatch dimension that varies, such as a smaller last batch.",
              "name": "output_signature",
              "type": "tf.TensorSpec | tuple | dict[str, Any]"
            }
          ],
          "raises": [
            {
              "description": "If TensorFlow is not installed (``helia-edge[tensorflow]``).",
              "type": "ImportError"
            }
          ],
          "returns": [
            {
              "description": "tf.data.Dataset: Built with ``tf.data.Dataset.from_generator``.",
              "type": "tf.data.Dataset"
            }
          ],
          "signature": "to_tf_dataset(dataset: Iterable[Any], output_signature: tf.TensorSpec | tuple | dict[str, Any]) -> tf.data.Dataset",
          "source": {
            "line": 193,
            "path": "helia_edge/data/tf_data.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/data/tf_data.py#L193"
          },
          "summary": "Wrap a re-iterable of NumPy batches, such as a Grain dataset, as a tf.data.Dataset."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
