ConfigSpace
Creation and manipulation of parameter configuration spaces for automated algorithm configuration and hyperparameter tuning.
What it is and what it does
ConfigSpace is a Python library for defining and working with configuration spaces—structured representations of algorithm parameters and hyperparameters. It provides a domain-specific language to declare parameters as continuous ranges, discrete integers, or categorical choices, and then sample valid configurations from that space. The library is commonly used in automated machine learning and hyperparameter optimization workflows, where you need to systematically explore parameter combinations.
The package depends on numpy, scipy, and pyparsing for numerical operations and parsing, plus typing_extensions and more_itertools for compatibility and iteration utilities. It supports Python 3.9 and later, is actively maintained, and carries no known security vulnerabilities. The library is permissive-licensed under BSD 3-clause, with a subset of code (the nx subpackage) also under BSD from NetworkX.
Use it for:
- Define hyperparameter spaces for machine learning model tuning in AutoML pipelines
- Sample random or structured configurations for algorithm benchmarking and empirical evaluation
- Represent parameter constraints and dependencies in black-box optimization frameworks like SMAC
- Build configuration search spaces for neural architecture search or algorithm selection tasks
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
ConfigSpace defines and manipulates configuration spaces for hyperparameter optimization and algorithm configuration, supporting continuous, discrete, and categorical parameters with sampling and constraint handling.
Yes. ConfigSpace is a stable, actively maintained library with low install friction, no security issues, and a permissive license. It is purpose-built for hyperparameter optimization and algorithm configuration workflows. Install it if you are working on AutoML, hyperparameter tuning, or algorithm configuration tasks and need a structured way to define and sample parameter spaces.
Install
configspace on PyPI
pip
pip install configspaceuv
uv add configspacepoetry
poetry add configspaceInstalling ConfigSpace
Before you install
Low friction installation with a pure-Python wheel and five common scientific dependencies (numpy, scipy, pyparsing, typing_extensions, more_itertools). Actively maintained with recent commits and no known vulnerabilities.
License in practice
BSD 3-clause permissive license with an exception: files in ConfigSpace.nx are copied from networkx and licensed under a separate BSD license. Both are permissive and suitable for commercial and private use.
Quickstart
from ConfigSpace import ConfigurationSpace
cs = ConfigurationSpace(
name="myspace",
space={
"a": (0.1, 1.5),
"b": (2, 10),
"c": ["mouse", "cat", "dog"],
},
)
configs = cs.sample_configuration(2)
Verify before relying
- Whether ConfigSpace integrates with specific hyperparameter optimization frameworks beyond SMAC
- Performance characteristics when handling very large configuration spaces
- Support for conditional parameters or hierarchical constraints
Package facts
| License | # ConfigSpace Copyright (c) 2014-2021, ConfigSpace developers Matthias Feurer Katharina Eggensperger and others (see commit history). All rights reserved. Redistribution and use in source and binary… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — numpy, pyparsing, scipy, typing_extensions, more_itertools |
| Maintenance | actively maintained — 238 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 241,655/month — #8,872 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: configspace-1.2.2-py3-none-any.whl
Keywords: algorithm, configuration, hyperparameter, optimization, empirical, evaluation, black, box
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
keras-tunerKerasTuner automates hyperparameter…
permissive · top 15,000 on PyPI
hyperoptHyperopt performs serial and parallel…
permissive · top 5,000 on PyPI
optunaOptuna is a hyperparameter optimization…
permissive · top 5,000 on PyPI
ax-platformAx is a platform for adaptive experimentation…
permissive · top 15,000 on PyPI
bayesian-optimizationBayesian optimization using Gaussian processes…
permissive · top 15,000 on PyPI
hydra-optuna-sweeperIntegrates Optuna hyperparameter optimization…
permissive · top 15,000 on PyPI
cmaesProvides CMA-ES (Covariance Matrix Adaptation…
permissive · top 5,000 on PyPI
sweepsGenerates hyperparameter sweep suggestions…
permissive · top 15,000 on PyPI
azureml-train-automlAutomatically discovers and trains the best…
unclear · top 15,000 on PyPI
fiddleFiddle is a Python-first configuration library…
permissive · top 5,000 on PyPI