AQIT 0.1.0
Loading...
Searching...
No Matches
train.py
Go to the documentation of this file.
1# Copyright (c) 2025-present Aquin Labs Private Limited. All Rights Reserved.
2# This file is part of the Aquin Engine. Unauthorized copying, modification,
3# distribution, or use of this file, via any medium, is strictly prohibited.
4# Proprietary and confidential. See LICENSE for terms.
5
6"""SDK: train from a Recipe (same engine as `aquin train`)."""
7
8from __future__ import annotations
9
10from pathlib import Path
11from typing import Any
12
13from aquin.recipe.schema import RunRecord
14from aquin.recipe.store import load_run
15from aquin.recipe.train import train_recipe as _train
16
17
18def run(recipe: str | Path, *, dry_run: bool = False) -> dict[str, Any]:
19 """Execute a Recipe YAML/JSON. Returns the RunRecord as a dict."""
20 record = _train(recipe, dry_run=dry_run)
21 return record.to_dict()
23
24def show(run_id: str) -> dict[str, Any]:
25 """Load a saved run (gate, checkpoint, inspect)."""
26 return load_run(run_id).to_dict()
27
29def train_recipe(recipe: str | Path, **kwargs: Any) -> RunRecord:
30 return _train(recipe, **kwargs)
RunRecord train_recipe(str|Path recipe, **Any kwargs)
Definition train.py:33
dict[str, Any] show(str run_id)
Definition train.py:28