runtime-data
Guides SecretFlow local runtime setup, device objects, and federated data containers such as FedNdarray and federated dataframes.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- runtime-data
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides SecretFlow local runtime setup, device objects, and federated data containers such as FedNdarray and federated dataframes.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/benchmark-notes.md802 B
- 参考文档references/runtime-data.md4.1 KB
- 脚本scripts/local_quickstart.py668 B
03 SKILL.md 正文
Runtime and data
Use this sub-skill when the task is about getting SecretFlow running locally, creating devices, moving objects between devices, or shaping data into the federated containers used by later model or component workflows.
Owns
sf.init,sf.shutdown, and the basic local simulation flowPYU,SPU,HEU,TEEUreveal,to,wait, and device-object transfer rulesFedNdarray,HDataFrame,VDataFrame,MixDataFrame,partition- CSV/ORC IO and small data-loading helpers
- common direct-device and partition-alignment failures
Does not own
- component CLI / evaluation / export workflows — use
component-cli - preprocessing/statistics/model training — use
analytics - PSI, Kuscia, TEEU deployment, or production orchestration — use
privacy-orchestration
Trigger phrases
Use this route when a user asks things like:
- how to start SecretFlow locally
- how to reveal or transfer objects between devices
- how to build a vertical or horizontal dataframe
- how to read CSV or ORC into a federated structure
- why
to(SPU)orto(HEU)failed - how to align partitions or select columns across parties
Reading order
- Read
references/runtime-data.mdfor the API map and flow choices. - Read
references/troubleshooting.mdin the root skill when install/runtime symptoms are not clearly local to this workflow. - Use
scripts/local_quickstart.pyas the tiny smoke helper when you need to confirm that a local runtime works from the target environment.
Workflow
- Confirm the party/device layout first. Decide whether the workflow is a simple local simulation or an explicit multi-party cluster config.
- Put data on a plain device first, then move it onward. Direct placement on SPU or HEU is intentionally rejected by the runtime.
- For federated dataframes, verify which party owns each partition before you start selecting, joining, or assigning columns.
- If a task only needs a tiny end-to-end proof, run the bundled quickstart smoke helper and inspect its output before moving on to a larger workflow.
- When the task later needs component evaluation or model training, hand off to the sibling sub-skill rather than expanding this one.
Common decisions
- Use
address='local'for the fastest local simulation proof. - Use
cluster_configonly when the task truly depends on explicit party addresses and ports. - Prefer
PYUas the staging device for plain Python objects and small data. - Treat
revealas a last-mile inspection tool, not as the default data path.
Bundled files
references/runtime-data.md— API table, quick-start flow, and runtime caveats.scripts/local_quickstart.py— minimal local hello-world smoke helper.
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).