AGENT SKILL

custom-components

Implement and register custom YiVal readers, wrappers, evaluators, generators, enhancers, selection strategies, and output parsers.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
custom-components
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Implement and register custom YiVal readers, wrappers, evaluators, generators, enhancers, selection strategies, and output parsers.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

YiVal custom components

Use this sub-skill when the user needs to extend YiVal with a custom data reader, wrapper, evaluator, data generator, variation generator, enhancer, selection strategy, or output parser, or when a YAML custom_* section fails to register.

Read first

Useful helper:

  • python sub-skills/custom-components/scripts/write_component_skeleton.py --kind evaluator --output-dir ./my_yival_components writes small starter files for selected component kinds.

Custom YAML sections

Component YAML section Base class
Reader custom_reader yival.data.base_reader.BaseReader
Wrapper custom_wrappers yival.wrappers.base_wrapper.BaseWrapper
Evaluator custom_evaluators yival.evaluators.base_evaluator.BaseEvaluator
Data generator custom_data_generators yival.data_generators.base_data_generator.BaseDataGenerator
Variation generator custom_variation_generators yival.variation_generators.base_variation_generator.BaseVariationGenerator
Selection strategy custom_selection_strategies yival.result_selectors.selection_strategy.SelectionStrategy
Enhancer custom_enhancers yival.enhancers.base_combination_enhancer.BaseCombinationEnhancer

General runtime form:

custom_evaluators:
  simple_evaluator:
    class: my_components.simple_evaluator.SimpleEvaluator
    config_cls: my_components.simple_evaluator.SimpleEvaluatorConfig

Then use the registry id in the normal section:

evaluators:
  - name: simple_evaluator
    evaluator_type: individual
    metric_calculators: []

Implementation checklist

  1. Put the custom module on PYTHONPATH or install it in the active environment.
  2. Define a dataclass config that inherits the matching YiVal base config class when one exists.
  3. Subclass the correct base class and implement the required abstract method.
  4. Set default_config on the class if config generation/default lookup should work.
  5. Add the correct custom_* YAML block with class and config_cls.
  6. Reference the custom id in dataset.reader, dataset.data_generators, variations[].generator_name, evaluators[].name, selection_strategy, or enhancer.name.
  7. Run a tiny no-network fixture before provider-backed work.

Important import-path behavior

YiVal's helper _get_class_from_path() splits a dotted class path into a module path and class name. For ordinary installed modules, use package.module.ClassName. For ad-hoc files, put the parent directory on PYTHONPATH and still use a dotted module path.

Avoid relying on absolute filesystem strings in reusable configs; install or package the custom module where possible.

Route elsewhere

  • Use setup for base YAML generation/validation.
  • Use run for executing experiments and inspecting output pickles.
  • Use evaluation-optimization for custom evaluator semantics, AHP metrics, and enhancer behavior.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351