AGENT SKILL

analytics

Guides SecretFlow preprocessing, statistics, and classical ML workflows that use the direct Python APIs.

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

01 前言 Front Matter

name
analytics
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Guides SecretFlow preprocessing, statistics, and classical ML workflows that use the direct Python APIs.
disable-model-invocation
true

02 资源文件 2

03 SKILL.md 正文

Analytics

Use this sub-skill when the task is about direct SecretFlow preprocessing, statistics, or classical ML APIs rather than the component CLI.

Owns

  • preprocessing helpers such as StandardScaler
  • statistics helpers such as psi_eval, table statistics, and score-card flows
  • direct ML classes in secretflow.ml.linear, secretflow.ml.cluster, secretflow.ml.naive_bayes, secretflow.ml.gaussian_process, and secretflow.ml.neighbors
  • training / prediction workflows that use the direct Python APIs
  • common optional-dependency and SPU configuration failures

Does not own

  • component CLI / component export workflows — use component-cli
  • device/object setup and federated containers — use runtime-data
  • PSI deployment, Kuscia, or TEEU orchestration — use privacy-orchestration

Trigger phrases

Use this route when a user asks things like:

  • how to scale or preprocess federated data
  • how to compute PSI or score-card metrics directly
  • how to fit SecretFlow's direct ML estimators
  • how to compare SecretFlow's model APIs with scikit-learn
  • why a model needs SPU, HEU, or a particular party layout

Reading order

  1. Read references/analytics.md for the algorithm map and workflow choices.
  2. Read the root troubleshooting page if the import or optional dependency path is broken.
  3. Use scripts/analytics_smoke.py when you need a tiny import-only proof that the analytics surface is available.

Workflow

  1. Decide whether the user wants a data transform, a metric, or a model.
  2. Identify the required party/device layout before choosing the class or metric.
  3. For preprocessing and statistics, confirm the dataframe shape and the owning parties before you fit or evaluate anything.
  4. For ML classes, start with the direct Python constructor and only escalate to a component-based path if the user specifically needs export or CLI-driven execution.

Common decisions

  • Use StandardScaler for federated tabular normalization.
  • Use psi_eval for the PSI-style score calculations already built into the direct API.
  • Use the secretflow.ml.linear classes for logistic-regression and GLM-style tasks.
  • Use KMeans, GNB, GPC, or KNNClassifer when the task names a classical estimator family directly.

Bundled files

  • references/analytics.md — algorithm catalog, input expectations, and troubleshooting.
  • scripts/analytics_smoke.py — small import and signature smoke helper.

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