setup-and-backends
Install, import, optional dependency, backend-selection, and environment diagnostics guidance for ART users.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- setup-and-backends
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Install, import, optional dependency, backend-selection, and environment diagnostics guidance for ART users.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/install-and-backends.md7.5 KB
- 参考文档references/troubleshooting.md7.3 KB
- 脚本scripts/inspect_art_install.py9.3 KB
03 SKILL.md 正文
setup-and-backends
Use this sub-skill before any ART workflow when the user needs to install ART, verify imports, choose CPU/GPU packages, or resolve optional-backend failures.
Use this for
- Installing the public distribution
adversarial-robustness-toolboxand importing the Python moduleart. - Choosing a minimal CPU-capable stack or adding optional backend families for PyTorch, TensorFlow/Keras, boosted trees, GPy, image helpers, or TensorBoard logging.
- Running a safe install/import diagnostic with
scripts/inspect_art_install.py. - Diagnosing ImportError, missing optional dependencies, TensorFlow/NumPy/ml-dtypes conflicts, CPU-only wheels, no-CUDA hosts, and version mismatches.
Start here
-
Read
references/install-and-backends.mdto select the package group and minimal import check. -
Run the bundled diagnostic when the environment is already installed:
python scripts/inspect_art_install.py --json -
If the user is on CPU and uses a PyTorch ART estimator or PyTorch preprocessor, explicitly pass
device_type="cpu". ART'sPyTorchClassifierconstructor defaultsdevice_type="gpu"; being explicit prevents confusing CPU-only or no-CUDA diagnoses. -
If imports fail, use
references/troubleshooting.mdbefore changing framework versions.
Route away from this sub-skill
- Estimator/model wrapper construction,
clip_values, label shapes, gradient availability, and black-box vs white-box wrapper choice -> siblingestimators-and-models. - Evasion attacks, preprocessing defences, adversarial training, and attack budgets -> sibling
evasion-and-preprocessing. - Poisoning, backdoor, inference/privacy, extraction, and detectors -> sibling
poisoning-inference-extraction. - Metrics, evaluation objects, SummaryWriter workflow details, certification, and verification -> sibling
evaluation-and-certification.
Guardrails
- Do not run the original repository's tests, examples, notebooks, or maintainer scripts for setup diagnosis. Use the bundled diagnostic and tiny user-owned checks only.
- Do not install broad
allextras by default. Start with the core package plus only the backend family required by the user's selected workflow. - Treat GPU as optional acceleration unless the user's workflow explicitly requires GPU-only dependencies. A CPU-capable ART workflow should not require CUDA packages.
- Keep install commands and troubleshooting self-contained; do not depend on a source checkout being available.
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).