setup
Install YiVal, inspect CLI commands, create/validate experiment YAML, and choose dataset/config fields.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- setup
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Install YiVal, inspect CLI commands, create/validate experiment YAML, and choose dataset/config fields.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/cli-reference.md3.2 KB
- 参考文档references/config-quickstart.md4.1 KB
- 参考文档references/data-formats.md2.8 KB
- 参考文档references/troubleshooting.md2.1 KB
- 脚本scripts/build_config_template.py2.5 KB
03 SKILL.md 正文
YiVal setup and configuration
Use this sub-skill when the user needs to install YiVal, inspect yival CLI behavior, initialize or validate YAML, choose dataset source fields, or debug early config loading before an experiment run.
Read first
- CLI reference: subcommands, flags, and defaults.
- Config quickstart: minimal YAML shapes for dataset, machine-generated, and user-input workflows.
- Data formats: CSV and Hugging Face reader details.
- Setup troubleshooting: setup-specific errors.
Useful bundled helper:
python sub-skills/setup/scripts/build_config_template.py --helpbuilds a starter YAML through YiVal's own config-generation utility after importing built-ins.
Installation checklist
- Use Python
>=3.10,<3.13. - Install YiVal in the target environment:
- from PyPI/package index:
python -m pip install yival - from a source checkout:
python -m pip install -e .
- from PyPI/package index:
- Install optional trainer extras only for approved fine-tuning:
python -m pip install 'yival[trainers]'orpython -m pip install -e '.[trainers]'. - If CLI import errors mention
pkg_resources, runpython -m pip install 'setuptools<81'. - Confirm the environment from the skill root:
python scripts/check_install.py --check-cli.
CLI setup routes
| Task | Command shape |
|---|---|
| Show root help | python -m yival --help or yival --help |
| Generate a template | yival init --config_path config.yml --function my_module.my_func --source_type dataset ... |
| Validate YAML | yival validate config.yml |
| Run a config | yival run config.yml --output_path results.pkl |
| Try packaged demos | yival demo --qa_expected_results, yival demo --basic_interactive, yival demo --auto_prompts |
| Interactive auto-config | yival gen or yival task |
Important defaults:
yival run --displayis anaction="store_true"flag with defaultTrue; CLI runs normally display Dash results unless you callExperimentRunner.run(display=False)programmatically.yival botdefaults tointeractive=Trueanddisplay=False.yival democopies a packaged demo config into the current working directory before running it.
YAML minimum contract
Every useful config needs:
description: short experiment description
custom_function: module.path.function_name
dataset:
source_type: dataset
Then add fields according to source type:
source_type: dataset: includefile_pathandreader.source_type: machine_generated: includedata_generators.source_type: user_input: normally no file path; used for interactive UI.
For prompt/model comparisons, also add variations and one or more evaluators.
Decision points
- If rows already exist, prefer
source_type: datasetwithcsv_readerand a small fixture first. - If examples must be generated from a prompt or document, route to prompt-automation before running provider-backed generation.
- If the task is mostly metric/selector design, route to evaluation-optimization.
- If YAML contains
custom_*sections, route to custom-components to verify class/config paths and registry keys. - For no-network smoke tests, run the root helper
python scripts/write_minimal_experiment.py --runfrom the skill root.
Validation workflow
- Load or generate YAML.
- Check
custom_functionimportability. For local modules, ensure the module's directory is onPYTHONPATHor run from a working directory where it imports directly. - Check dataset row keys match the custom function's parameters except
state. - Check variation names match the
StringWrapper(name=...)calls in the custom function. - Check evaluator/reader/generator ids exist in registry overview.
- Run
yival validate config.yml; if it passes, run a tiny dataset before scaling up.
Handoff to running
After setup is valid, read run for execution, result pickle names, Dash/interactive behavior, and programmatic runner choices.
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).