AQIT
0.1.0
Toggle main menu visibility
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
8
from
__future__
import
annotations
9
10
from
pathlib
import
Path
11
from
typing
import
Any
12
13
from
aquin.recipe.schema
import
RunRecord
14
from
aquin.recipe.store
import
load_run
15
from
aquin.recipe.train
import
train_recipe
as
_train
16
17
18
def
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()
22
23
24
def
show
(run_id: str) -> dict[str, Any]:
25
"""Load a saved run (gate, checkpoint, inspect)."""
26
return
load_run(run_id).to_dict()
27
28
29
def
train_recipe
(recipe: str | Path, **kwargs: Any) -> RunRecord:
30
return
_train(recipe, **kwargs)
aquin.recipe.schema
Definition
schema.py:1
aquin.recipe.store
Definition
store.py:1
aquin.recipe.train
Definition
train.py:1
aquin.sdk.train.train_recipe
RunRecord train_recipe(str|Path recipe, **Any kwargs)
Definition
train.py:33
aquin.sdk.train.show
dict[str, Any] show(str run_id)
Definition
train.py:28
aquin
sdk
train.py
AQIT · Aquin Labs Private Limited · Apache 2.0 · Generated by
1.18.0