data-graph-interfaces
Operate DoWhy graph, pandas do-accessor, sampler, dataset, transformer, plotting, and time-series interfaces.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-graph-interfaces
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Operate DoWhy graph, pandas do-accessor, sampler, dataset, transformer, plotting, and time-series interfaces.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/data-graph-interfaces.md6.5 KB
- 参考文档references/pandas-do-sampler.md9.7 KB
- 参考文档references/time-series.md6.8 KB
- 参考文档references/troubleshooting.md11.0 KB
- 脚本scripts/smoke_graph_and_do.py4.8 KB
03 SKILL.md 正文
Data and Graph Interfaces
Use this sub-skill for the shared interface layer that sits between raw data, graphs, samplers, datasets, plotting, and time-lag helpers.
Route here
- Build or inspect causal graphs from NetworkX, DOT, GML, or DAGitty text.
- Align graph nodes, data columns, and lagged columns before downstream tasks.
- Use the pandas
.causal.doaccessor or aDoSampler. - Choose variable types, sampler methods, or stateful reuse.
- Create synthetic datasets or reduce features before graph-based workflows.
- Prepare lagged or temporal graph abstractions.
Route away
- If the user wants classic
CausalModeleffect estimation, identification,do, or refutation, route to ../effect-estimation/SKILL.md. - If the user wants
dowhy.gcmsampling, interventions, attribution, or validation, route to ../graphical-causal-models/SKILL.md. - If the user wants to learn a graph from data, treat
CausalModel.learn_graph()anddowhy.graph_learnersas deprecated. Hand discovery off to an external causal-discovery library, then return here only for import and alignment.
Read first
- references/data-graph-interfaces.md
- references/pandas-do-sampler.md
- references/time-series.md
- references/troubleshooting.md
Task selector
- Need to normalize graph input? Use
build_graph_from_str,CausalGraph, orbuild_graph. - Need interventional samples from a pandas frame? Use
df.causal.doand the do-sampler references. - Need a built-in synthetic dataset or a simple feature reducer? Use the dataset and transformer references.
- Need lagged graph or lagged column handling? Use the time-series helpers.
- Need graph plotting? Use the plotting helpers with the optional backend note in troubleshooting.
Operating protocol
- Confirm graph nodes and DataFrame columns map cleanly before handing off to a downstream causal task.
- Prefer NetworkX
DiGraphas the in-memory representation; accept DOT, GML, or DAGitty only as normalized inputs. - For pandas do-sampling, remember that
xmay be a string, list, or dict. String/list keeps the original treatment values; dict sets intervention values. - Treat
stateful=Trueas a cache for repeated calls on the same accessor, and callreset()when you want a clean sampler state. - If the user now needs effect estimation, refutation, or GCM queries, stop here and hand off to the sibling skill.
Minimal smoke check
Run the bundled smoke script to exercise graph parsing, pandas do-sampling, datasets, transformers, and temporal helpers:
python scripts/smoke_graph_and_do.py --help
Use the script as a safe starting point for quick validation or for adapting these interface patterns into another project.
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).