AQIT 0.1.0
Loading...
Searching...
No Matches
aquin.compute.simulate_inputs Namespace Reference

Functions

Path _expand (str path)
dict[str, Any] _normalize_row (dict[str, Any] row)
list[dict] load_dataset_file (str path)
Any|None _parse_structured_file (Path p)
None _collect_hints (Any obj, dict[str, Any] found, int depth=0)
dict[str, Any] _try_training_hints (Path path)
dict prepare_simulation_args (dict args)

Variables

dict _HINT_KEYS
dict _KEY_ALIASES
tuple _INSTR_FIELDS = ("instruction", "prompt", "input", "query", "question", "text")
tuple _RESP_FIELDS = ("response", "output", "answer", "completion", "target", "label")

Function Documentation

◆ _collect_hints()

None _collect_hints ( Any obj,
dict[str, Any] found,
int depth = 0 )
protected

Definition at line 133 of file simulate_inputs.py.

References _collect_hints().

Referenced by _collect_hints(), and _try_training_hints().

◆ _expand()

Path _expand ( str path)
protected

Definition at line 42 of file simulate_inputs.py.

Referenced by load_dataset_file(), and prepare_simulation_args().

◆ _normalize_row()

dict[str, Any] _normalize_row ( dict[str, Any] row)
protected

Definition at line 46 of file simulate_inputs.py.

Referenced by load_dataset_file().

◆ _parse_structured_file()

Any | None _parse_structured_file ( Path p)
protected

Definition at line 114 of file simulate_inputs.py.

Referenced by _try_training_hints().

◆ _try_training_hints()

dict[str, Any] _try_training_hints ( Path path)
protected
Best-effort scrape of rank/lr/etc. from the user's existing config :  never required.

Definition at line 148 of file simulate_inputs.py.

References _collect_hints(), and _parse_structured_file().

Referenced by prepare_simulation_args().

◆ load_dataset_file()

list[dict] load_dataset_file ( str path)
Load rows from the user's dataset file (.json, .jsonl, .csv).

Definition at line 61 of file simulate_inputs.py.

References _expand(), and _normalize_row().

Referenced by prepare_simulation_args().

◆ prepare_simulation_args()

dict prepare_simulation_args ( dict args)
Resolve --dataset and --algo paths from the user's existing pipeline.
No Aquin-specific config format :  paths only. Optional CLI flags override hints.

Definition at line 158 of file simulate_inputs.py.

References _expand(), _try_training_hints(), and load_dataset_file().

Variable Documentation

◆ _HINT_KEYS

dict aquin.compute.simulate_inputs._HINT_KEYS
protected
Initial value:
= {
"rank", "alpha", "lr", "learning_rate", "epochs", "num_train_epochs",
"dropout", "target_modules", "targetModules", "warmup_steps", "warmupSteps",
"grad_clip", "gradClip", "weight_decay", "weightDecay", "grad_accum_steps",
"gradAccumSteps", "optimizer", "scheduler", "max_seq_len", "maxSeqLen",
"use_qlora", "useQlora", "use_rlhf", "rlhf_beta",
}

Definition at line 19 of file simulate_inputs.py.

◆ _INSTR_FIELDS

tuple aquin.compute.simulate_inputs._INSTR_FIELDS = ("instruction", "prompt", "input", "query", "question", "text")
protected

Definition at line 38 of file simulate_inputs.py.

◆ _KEY_ALIASES

dict aquin.compute.simulate_inputs._KEY_ALIASES
protected
Initial value:
= {
"learning_rate": "lr",
"num_train_epochs": "epochs",
"target_modules": "targetModules",
"warmup_steps": "warmupSteps",
"grad_clip": "gradClip",
"weight_decay": "weightDecay",
"grad_accum_steps": "gradAccumSteps",
"max_seq_len": "maxSeqLen",
"use_qlora": "useQlora",
}

Definition at line 26 of file simulate_inputs.py.

◆ _RESP_FIELDS

tuple aquin.compute.simulate_inputs._RESP_FIELDS = ("response", "output", "answer", "completion", "target", "label")
protected

Definition at line 39 of file simulate_inputs.py.