tables-and-expressions
Build Hail Table and expression pipelines for imports, keys, joins, aggregations, schema inspection, previews, exports, and expression-scope troubleshooting.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- tables-and-expressions
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Build Hail Table and expression pipelines for imports, keys, joins, aggregations, schema inspection, previews, exports, and expression-scope troubleshooting.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md8.3 KB
- 参考文档references/table-workflows.md9.2 KB
- 参考文档references/troubleshooting.md9.1 KB
- 脚本scripts/table_pipeline_template.py10.8 KB
03 SKILL.md 正文
Hail Tables and Expressions
Use this sub-skill for Hail Table pipelines and row-indexed expression work: hl.import_table, hl.read_table, Table.write, Table.export, annotate, filter, select, key_by, keyed joins, group_by, hl.agg, schema inspection, small local previews, missing values, Struct fields, interval lookups, and expression source/index errors.
Before executing Hail queries, use ../setup-and-backends/SKILL.md to choose and initialize the backend. This sub-skill assumes backend setup is already handled.
Start Here
- For end-to-end import, schema, key, join, aggregation, and export recipes, read
references/table-workflows.md. - For compact signatures and method behavior, read
references/api-reference.md. - For expression-scope, missingness, import, join, preview, and write failures, read
references/troubleshooting.md. - For a safe dry-run-first starting point, adapt
scripts/table_pipeline_template.py.
Route Elsewhere
- MatrixTable rows, columns, entries, VCF/PLINK/BGEN, genotype fields, and genomic QC belong in
../genomics-analysis/SKILL.md. - Variant Dataset, sparse GVCF, combiner, and VDS dense/sparse conversion workflows belong in
../variant-datasets/SKILL.md. - Hail install/import,
hl.init, Spark/local/Batch backend choice, Java/JAR/package asset failures, and root import troubleshooting belong in../setup-and-backends/SKILL.md. hailtop.batchDAGs, local/service Batch jobs,hailctl, Dataproc, HDInsight, and cloud CLI operations belong in../batch-and-cli/SKILL.md.
Working Rules
- Rebind each table-returning transformation before using fields again:
ht = ht.filter(...), then referenceht.fieldfrom the rebound table. - Use bracket access for imported names that are not valid identifiers or that collide with methods:
ht["sample id"],ht["case.status"],ht["select"]. - Key both sides before joins or bracket-index lookup; key count, order, and Hail types must match even when key field names differ.
- Keep
hl.agginside supported aggregation contexts such asht.aggregate(...)andht.group_by(...).aggregate(...). - Prefer explicit
types={...}for stable text imports; useimpute=Trueonly for exploration and review inferred identifier types. - Inspect with
describe(),row.dtype,globals.dtype,key,head(n).show(), and smalltake(n)calls before large writes, exports, or joins.
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).