Skip to content
Back to skills

Model Operations

ASecurity

"Operate PyOD model persistence, thresholding, score combination,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
developmentpythonrustbashbackend

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill model-operations --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Operations?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Model Operations
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-model-operations/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-model-operations)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: model-operations
description: "Operate PyOD model persistence, thresholding, score combination,
  optional extras, and validation safely."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 2-Clause
---

# PyOD Model Operations

Use this sub-skill when a PyOD task is about operating fitted detectors after or around training: saving and loading models, validating recovered artifacts, choosing non-contamination thresholders, combining multiple detector scores, enabling optional operational extras, and diagnosing model-operation failures.

Route detector selection, baseline fit/predict recipes, and tabular model-family choice to `classic-detectors` or `automated-lifecycle`. Route graph, time-series, embedding, audio, and deep-backend constraints to `specialized-modalities` before applying persistence or operational validation guidance here.

## Operating Rules

1. Treat every pickle/joblib artifact as executable code. Use `pyod.utils.persistence.load(..., trusted=True)` or `compat_load(..., trusted=True)` only for artifacts from a trusted training pipeline, registry, or owner. `trusted=True` is an acknowledgement, not a scan or sandbox.
2. Prefer `pyod.utils.persistence.save` / `load` for new artifacts. Raw `joblib.dump` / `joblib.load` is a fallback only when you intentionally need the raw format and accept the missing envelope metadata.
3. Validate a loaded model before use: check the class, fitted attributes, score shape, finite scores, and at least one known probe batch if available.
4. Install optional extras explicitly and exactly. Base PyOD does not install `combo`, `pythresh`, `suod`, or `xgboost`; failures in those areas are usually dependency-scope failures, not detector logic failures.
5. Standardize detector-score matrices before using score-combination functions unless the scores are already on a deliberately comparable scale.

## Bundled References and Scripts

- [references/persistence.md](references/persistence.md): use for `save`, `load`, `compat_load`, trust boundaries, sklearn Tree dtype compatibility, metadata, strict mode, and raw joblib caveats.
- [references/thresholding-and-combination.md](references/thresholding-and-combination.md): use for `pyod.models.thresholds`, PyThresh-backed contamination objects, `pyod.models.combination`, required score shapes, and validation checks.
- [references/optional-extras.md](references/optional-extras.md): use when imports fail or a task asks for SUOD acceleration, XGBOD supervised operation, combo score combination, or pythresh thresholding.
- [references/troubleshooting.md](references/troubleshooting.md): use to map operational symptoms to recovery actions for persistence, thresholding, combination, optional extras, and post-load validation.
- [scripts/persistence_smoke.py](scripts/persistence_smoke.py): safe deterministic smoke check that fits a tiny detector, saves and loads it through PyOD persistence, verifies the trust guard, compares predictions, and writes only a temporary file.

## Quick Safe Checks

Run the bundled script from any working directory in an environment with PyOD installed:

```bash
python scripts/persistence_smoke.py --help
python scripts/persistence_smoke.py --json
```

A passing run proves the local PyOD install can perform a trusted temporary persistence round-trip for a classic detector. It does not prove that an arbitrary external artifact is safe, compatible, or semantically valid.

Files in this skill

  • SKILL.md3.4 KB
  • references/optional-extras.md6.6 KB
  • references/persistence.md6.9 KB
  • references/thresholding-and-combination.md8.2 KB
  • references/troubleshooting.md8.2 KB
  • scripts/persistence_smoke.py5.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.