{
  "$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": "``helia-edge`` command line. Keras and TensorFlow are imported only by commands that need them.",
      "name": "cli",
      "path": "helia_edge.cli",
      "submodules": [],
      "summary": "helia-edge command line.",
      "symbols": [
        {
          "description": "",
          "examples": [],
          "id": "helia_edge.cli.app",
          "kind": "attribute",
          "language": "python",
          "members": [],
          "name": "app",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "app = typer.Typer(no_args_is_help=True, add_completion=False, help='heliaEDGE model export tools.')",
          "source": {
            "line": 14,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L14"
          },
          "summary": ""
        },
        {
          "description": "",
          "examples": [],
          "id": "helia_edge.cli.export_app",
          "kind": "attribute",
          "language": "python",
          "members": [],
          "name": "export_app",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "export_app = typer.Typer(no_args_is_help=True, help='Create and reproduce exports with their records.')",
          "source": {
            "line": 15,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L15"
          },
          "summary": ""
        },
        {
          "description": "",
          "examples": [],
          "id": "helia_edge.cli.DEFAULT_IO",
          "kind": "constant",
          "language": "python",
          "members": [],
          "name": "DEFAULT_IO",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "DEFAULT_IO = {'fp32': 'float32', 'fp16': 'float16', 'a8w8': 'int8', 'a16w8': 'int16'}",
          "source": {
            "line": 18,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L18"
          },
          "summary": ""
        },
        {
          "description": "How ``helia-edge export create`` traces the model.",
          "examples": [],
          "id": "helia_edge.cli.Mode",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.cli.Mode.KERAS",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "KERAS",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "KERAS = 'keras'",
              "source": {
                "line": 24,
                "path": "helia_edge/cli.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L24"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.cli.Mode.CONCRETE",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "CONCRETE",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "CONCRETE = 'concrete'",
              "source": {
                "line": 25,
                "path": "helia_edge/cli.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L25"
              },
              "summary": ""
            }
          ],
          "name": "Mode",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "Mode()",
          "source": {
            "line": 21,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L21"
          },
          "summary": "How helia-edge export create traces the model."
        },
        {
          "description": "Build SPEC, load its weights, export it and write model.tflite, model.weights.h5 and record.json.\n\nExit 1 when the install does not identify its code under --require-provenance, or the export is refused.",
          "examples": [],
          "id": "helia_edge.cli.export_create",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "export_create",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "export_create(\n    spec: Annotated[Path, typer.Argument(help='ModelSpec file (YAML or JSON).', exists=True, dir_okay=False)],\n    weights: Annotated[Path, typer.Option(help='A .weights.h5 file, or with --mapping the source file it imports.', exists=True)],\n    precision: Annotated[Precision, typer.Option(help='Numeric format of the export.')],\n    out: Annotated[Path, typer.Option(help='Output directory.')],\n    io_dtype: Annotated[str | None, typer.Option(help='I/O dtype; by default int8, int16 or the float type.')] = None,\n    mapping: Annotated[str | None, typer.Option(help=\"Weight mapping of the spec's family to import with.\")] = None,\n    calibration: Annotated[Path | None, typer.Option(help='Calibration .npy for a8w8 and a16w8.', exists=True)] = None,\n    resets: Annotated[list[int] | None, typer.Option(help='Calibration step that resets the state; repeat.')] = None,\n    golden_inputs: Annotated[Path | None, typer.Option(help='Signal .npy for a golden@2 sequence.', exists=True)] = None,\n    golden_resets: Annotated[list[int] | None, typer.Option(help='Golden step that resets the state; repeat.')] = None,\n    batch_size: Annotated[int, typer.Option(help='Batch of the exported model.', min=1, max=2 ** 31 - 1)] = 1,\n    mode: Annotated[Mode, typer.Option(help='How the model is traced.')] = Mode.KERAS,\n    strict: Annotated[bool, typer.Option(help='For a8w8 and a16w8, refuse operators without an integer kernel.')] = True,\n    state_tie_tolerance: Annotated[float, typer.Option(help=\"Largest relative scale change when tying a state pair's scales.\")] = 0.01,\n    require_provenance: Annotated[bool, typer.Option(help='Refuse unless helia-edge is a release or a git install at a commit.')] = False,\n) -> None",
          "source": {
            "line": 39,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L39"
          },
          "summary": "Build SPEC, load its weights, export it and write model.tflite, model.weights.h5 and record.json."
        },
        {
          "description": "Export a record's model again and compare.\n\nExit 0 same, 1 different, 2 environment differs or cannot export, 3 missing or mismatched input,\n4 the export failed (with its traceback).",
          "examples": [],
          "id": "helia_edge.cli.export_reproduce",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "export_reproduce",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "export_reproduce(\n    record: Annotated[Path, typer.Argument(help='record.json written by `export create` or export().')],\n    weights: Annotated[Path, typer.Option(help='The weights file the record names (by digest or sha256).')],\n    calibration: Annotated[Path | None, typer.Option(help='The calibration .npy the record names.')] = None,\n    golden_inputs: Annotated[Path | None, typer.Option(help=\"The golden's input .npy, to compare the golden.\")] = None,\n    allow_env_mismatch: Annotated[bool, typer.Option(help='Compare even if the environment differs; differences are listed.')] = False,\n) -> None",
          "source": {
            "line": 119,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L119"
          },
          "summary": "Export a record's model again and compare."
        },
        {
          "description": "Print the JSON Schema of the export record (helia-edge/export-record@1).",
          "examples": [],
          "id": "helia_edge.cli.export_schema",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "export_schema",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "export_schema() -> None",
          "source": {
            "line": 154,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L154"
          },
          "summary": "Print the JSON Schema of the export record (helia-edge/export-record@1)."
        },
        {
          "description": "Print a .tflite model's inputs, outputs and operators as JSON.",
          "examples": [],
          "id": "helia_edge.cli.inspect_model",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "inspect_model",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "inspect_model(model: Annotated[Path, typer.Argument(help='A .tflite model.', exists=True, dir_okay=False)]) -> None",
          "source": {
            "line": 162,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L162"
          },
          "summary": "Print a .tflite model's inputs, outputs and operators as JSON."
        },
        {
          "description": "Print versions, the KERAS_BACKEND variable and installed optional capabilities.",
          "examples": [],
          "id": "helia_edge.cli.info",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "info",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "info() -> None",
          "source": {
            "line": 185,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L185"
          },
          "summary": "Print versions, the KERASBACKEND variable and installed optional capabilities."
        },
        {
          "description": "Entry point of the ``helia-edge`` command.",
          "examples": [],
          "id": "helia_edge.cli.main",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "main",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "main() -> None",
          "source": {
            "line": 212,
            "path": "helia_edge/cli.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/cli.py#L212"
          },
          "summary": "Entry point of the helia-edge command."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
