run
Run YiVal experiments through the CLI or Python APIs, interpret result artifacts, and use interactive/Dash/bot workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- run
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Run YiVal experiments through the CLI or Python APIs, interpret result artifacts, and use interactive/Dash/bot workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/output-and-ui.md1.6 KB
- 参考文档references/runner-api.md2.2 KB
- 参考文档references/runtime-workflows.md2.1 KB
- 参考文档references/troubleshooting.md2.2 KB
- 脚本scripts/inspect_pickle.py1.6 KB
03 SKILL.md 正文
YiVal run workflows
Use this sub-skill when the config is ready and the user wants to run YiVal, inspect outputs, resume from saved experiment data, use the Dash/interactive UI, or call ExperimentRunner / LiteExperimentRunner programmatically.
Read first
- Runtime workflows: CLI and API execution patterns.
- Runner API:
ExperimentRunner,LiteExperimentRunner, state, output pickle behavior. - Output and UI: result structures, Dash, Streamlit/bot, interactive mode.
- Runtime troubleshooting: run-time failures and fixes.
Safe pre-run checks
- Run installation smoke from the skill root:
python scripts/check_install.py. - Validate YAML using the setup sub-skill.
- Run a tiny no-network fixture from the skill root:
python scripts/write_minimal_experiment.py --run. - For provider-backed configs, verify environment variables and set small
number_of_examples/number_of_variationsfirst.
CLI run patterns
yival validate config.yml
yival run config.yml --output_path results.pkl
For non-blocking/headless automation, prefer Python API:
from yival.experiment.experiment_runner import ExperimentRunner
runner = ExperimentRunner("config.yml")
runner.run(display=False, interactive=False, output_path="results.pkl", experiment_input_path="")
Why: CLI --display defaults to True, so it may start Dash and block until the UI server exits.
Programmatic runner selection
| Need | Use |
|---|---|
| YAML-driven full experiment | ExperimentRunner(config_path).run(...) |
| Existing in-memory data/evaluator/config | LiteExperimentRunner(...).run_experiment(enable_selector=True/False) |
| Async custom function | ExperimentRunner.run(async_eval=True) and ensure the custom function is coroutine-compatible |
| Reuse saved experiment pickle | ExperimentRunner.run(experiment_input_path="previous.pkl", ...) |
| Interactive user input | dataset.source_type: user_input or yival demo --basic_interactive |
| Chat/bot over experiment output | yival bot config.yml after checking UI constraints |
Runtime sequence inside ExperimentRunner
- Load one or more configs with
load_and_validate_configs(). - Register custom components from the YAML.
- Build
EvaluatorandExperimentState. - Build all variation combinations from the state.
- Process data with
DataProcessorunless reusing an experiment pickle. - Call the custom function for each data row / combination.
- Evaluate individual results and aggregate metrics into an
Experiment. - Apply selection strategy, enhancer, and optional trainer when configured.
- Write pickle output and optionally launch Dash/interactive/bot UI.
Output interpretation
output_path="results.pkl"writesresults_0.pklfor the first config.- Each
ExperimentResultcontainsinput_data,combination,raw_output,latency,token_usage, andevaluator_outputs. Experiment.combination_aggregated_metricsis where AHP selection reads metrics such asaverage_token_usage,average_latency, and aggregated evaluator names.Experiment.selection_output.best_combinationis a stringified combination key when a selection strategy runs.
When to route elsewhere
- If the config will generate examples or prompt variations, read prompt-automation.
- If selecting metrics, evaluators, human ratings, or enhancers is the main issue, read evaluation-optimization.
- If custom components fail to register or import, read custom-components.
- If the user asks for fine-tuning/training, state that it is optional and heavy, then require explicit approval for trainer extras, credentials, downloads, GPU, and cost before proceeding.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).