Skip to content
Back to skills

Optuna

ASecurity

"Use this skill for Optuna hyperparameter optimization workflows:

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
researchpythongoshellbashsqldebuggingapibackend

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

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

Scanned September 8, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Optuna?

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

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

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: optuna
description: "Use this skill for Optuna hyperparameter optimization workflows:
  studies, trials, samplers, pruners, storage, CLI, visualization, artifacts,
  integrations, and advanced APIs."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# Optuna Repo Skill

Use this skill when working with Optuna, a Python framework for hyperparameter optimization. It routes tasks across study/trial workflows, search algorithms, pruning, persistent storage, CLI operations, result analysis, visualization, artifacts, integrations, and advanced APIs.

## First Checks

Install or verify Optuna before using workflow-specific guidance:

```bash
python -m pip install optuna
python - <<'PY'
import optuna
print(optuna.__version__)
study = optuna.create_study(direction="minimize")
print(study.study_name)
PY
```

For a source checkout, use an editable install only when repo development or local API inspection is intended:

```bash
python -m pip install -e .
optuna --help
```

Read `references/repo-provenance.md` before deciding whether this generated skill is current for a different Optuna checkout. Use `references/package-overview.md` for package layout, optional extras, and cross-skill routing notes. Use `references/troubleshooting.md` for cross-cutting install/import, optional dependency, CLI, and runtime failures.

## Route by Task

- Use `sub-skills/optimization-workflows/SKILL.md` for objective functions, `create_study`, `Study.optimize`, `Study.ask`, `Study.tell`, callbacks, attributes, fixed/reused parameters, multi-objective basics, and extracting best trials.
- Use `sub-skills/samplers-pruners/SKILL.md` for choosing, configuring, customizing, or debugging samplers and pruners such as TPE, Grid, CMA-ES, NSGA-II, Hyperband, Median, Threshold, Patient, and Wilcoxon.
- Use `sub-skills/cli-and-storage/SKILL.md` for `optuna` CLI commands, `OPTUNA_STORAGE`, SQLite/RDB URLs, `RDBStorage`, `JournalStorage`, `GrpcStorageProxy`, storage upgrades, heartbeat, and stale-trial behavior.
- Use `sub-skills/analysis-visualization/SKILL.md` for `get_param_importances`, trial dataframes, Plotly/Matplotlib visualizations, Pareto fronts, hypervolume history, and optional visualization dependency checks.
- Use `sub-skills/artifacts-integrations/SKILL.md` for `optuna.artifacts`, filesystem/S3/GCS artifact stores, integration callback imports, missing SDKs, credentials, and local artifact roundtrips.
- Use `sub-skills/advanced-apis/SKILL.md` for terminator, search-space helpers, logging, exceptions, experimental warnings, constraints notes, and cautious use of private hypervolume utilities.

## Common Workflow Composition

- Start in `optimization-workflows` to define a correct objective and study lifecycle.
- Add `samplers-pruners` when the task asks for better search behavior, reproducibility, early stopping, constraints, or custom algorithms.
- Add `cli-and-storage` when studies must persist, resume, coordinate workers, or be controlled from shell commands.
- Add `analysis-visualization` after trials exist and the task becomes reporting, ranking, plotting, or export.
- Add `artifacts-integrations` when trials produce files or need framework/cloud integration callbacks.
- Add `advanced-apis` only for specialized Optuna APIs or cross-cutting debugging not owned by the main workflows.

## Safe Bundled Diagnostics

Run these local helpers from an environment where `optuna` is importable:

```bash
python scripts/check_optuna_env.py
python sub-skills/optimization-workflows/scripts/basic_optimization_smoke.py
python sub-skills/cli-and-storage/scripts/storage_smoke.py
python sub-skills/artifacts-integrations/scripts/filesystem_artifact_smoke.py
```

These scripts are self-contained and use temporary files or in-memory studies. They do not require cloud credentials, network access, GPUs, large datasets, or the original repository checkout.

## Optional Dependencies

The base Optuna package supports core studies, trials, in-memory storage, RDB storage dependencies, CLI, and local filesystem artifacts. Some workflows need optional packages:

- `plotly` or `matplotlib` for visualization backends.
- `pandas` for `Study.trials_dataframe`.
- `scikit-learn` for default fANOVA-style importances and `OptunaSearchCV`.
- `cmaes`, `scipy`, or `torch` for selected advanced samplers/pruners.
- `boto3`, `google-cloud-storage`, `redis`, `grpcio`, and framework packages for cloud stores, distributed storage, and integrations.

Treat missing optional packages as routing/troubleshooting signals, not as evidence that base Optuna is broken.

Files in this skill

  • SKILL.md4.5 KB
  • references/package-overview.md2.5 KB
  • references/repo-provenance.md1.7 KB
  • references/repo-routing-metadata.json466 B
  • references/troubleshooting.md2.4 KB
  • scripts/check_optuna_env.py2.1 KB
  • sub-skills/advanced-apis/SKILL.md4.7 KB
  • sub-skills/advanced-apis/references/advanced-api-reference.md10.8 KB
  • sub-skills/advanced-apis/references/troubleshooting.md7.3 KB
  • sub-skills/advanced-apis/scripts/terminator_smoke.py3.2 KB
  • sub-skills/analysis-visualization/SKILL.md3.1 KB
  • sub-skills/analysis-visualization/references/analysis-reference.md4.3 KB
  • sub-skills/analysis-visualization/references/troubleshooting.md5 KB
  • sub-skills/analysis-visualization/references/visualization-reference.md5.7 KB
  • sub-skills/analysis-visualization/scripts/analysis_smoke.py3.6 KB
  • sub-skills/analysis-visualization/scripts/visualization_smoke.py4.7 KB
  • sub-skills/artifacts-integrations/SKILL.md3.5 KB
  • sub-skills/artifacts-integrations/references/artifact-workflows.md6.3 KB
  • sub-skills/artifacts-integrations/references/integration-reference.md4.9 KB
  • sub-skills/artifacts-integrations/references/troubleshooting.md5.2 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.