Name | hypster JSON |
Version |
0.3.8
JSON |
| download |
home_page | None |
Summary | A flexible configuration system for Python projects |
upload_time | 2025-08-28 09:48:39 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT |
keywords |
ai
configuration
machine-learning
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<img src="https://raw.githubusercontent.com/gilad-rubin/hypster/master/assets/hypster_with_text.png" alt="Hypster Logo" width="600"/>
</p>
<div align="center">
<div>
<a href="https://gilad-rubin.gitbook.io/hypster"><strong>Docs</strong></a> ·
<a href="https://github.com/gilad-rubin/hypster/issues/new?template=bug_report.md"><strong>Report Bug</strong></a> ·
<a href="https://github.com/gilad-rubin/hypster/issues/new?template=feature_request.md"><strong>Feature Request</strong></a> ·
<a href="https://github.com/gilad-rubin/hypster/blob/hypster-v2/CHANGELOG.md"><strong>Changelog</strong></a>
</div>
</div>
</p>
<p align="center">
<a href="https://deepwiki.com/gilad-rubin/hypster" style="text-decoration:none;display:inline-block">
<img src="https://img.shields.io/badge/chat%20with%20our%20AI%20docs-%E2%86%92-72A1FF?style=for-the-badge&logo=readthedocs&logoColor=white"
alt="chat with our AI docs" width="220">
</a>
</p>
<p align="center">
<a href="https://github.com/gilad-rubin/hypster/actions/workflows/ci.yml"><img src="https://github.com/gilad-rubin/hypster/actions/workflows/ci.yml/badge.svg" alt="CI"/></a>
<a href="https://codecov.io/gh/gilad-rubin/hypster"><img src="https://codecov.io/gh/gilad-rubin/hypster/graph/badge.svg" alt="codecov"/></a>
<a href="https://pypi.org/project/hypster/"><img src="https://img.shields.io/pypi/v/hypster.svg" alt="PyPI version"/></a>
<a href="https://pypi.org/project/hypster/"><img src="https://img.shields.io/pypi/pyversions/hypster.svg" alt="Python versions"/></a>
<a href="https://deepwiki.com/gilad-rubin/hypster"><img src="https://deepwiki.com/badge.svg" alt="DeepWiki"/></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License: MIT"/></a>
<a href="https://codspeed.io/gilad-rubin/hypster"><img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed"/></a>
</p>
<p align="center">
<em>
Hypster is a lightweight configuration framework for <b>optimizing AI & ML workflows</b>
</em>
</p>
> ⚠️ Hypster is in active development and not yet battle-tested in production.
> If you’re gaining value and want to promote it to production, please reach out!
## Key Features
- 🐍 **Pythonic API**: Intuitive & minimal syntax that feels natural to Python developers
- 🪆 **Hierarchical, Conditional Configurations**: Support for nested and swappable configurations
- 📐 **Type Safety**: Built-in type hints and validation
- 🧪 **Hyperparameter Optimization Built-In**: Native, first-class optuna support
## Installation
You can install Hypster using uv:
```bash
uv add hypster
# optional HPO backend
uv add 'hypster[optuna]'
```
Or using pip:
```bash
pip install hypster
```
## Quick Start
Define a configuration function and instantiate it with overrides:
```python
from hypster import HP, instantiate
from llm import LLM
def llm_config(hp: HP):
model_name = hp.select(["gpt-4o-mini", "gpt-4o"], name="model_name")
temperature = hp.float(0.7, name="temperature", min=0.0, max=1.0)
max_tokens = hp.int(256, name="max_tokens", min=1, max=4096)
llm = LLM(model_name=model_name, temperature=temperature, max_tokens=max_tokens)
return llm
llm = instantiate(llm_config, values={"model_name": "gpt-4o-mini", "temperature": 0.3})
llm.invoke("How's your day going?")
```
## HPO with Optuna
```python
import optuna
from hypster.hpo.types import HpoInt, HpoFloat, HpoCategorical
from hypster.hpo.optuna import suggest_values
def objective(trial: optuna.Trial) -> float:
values = suggest_values(trial, config=model_cfg)
model = instantiate(model_cfg, values=values)
X, y = make_classification(
n_samples=400, n_features=20, n_informative=10, random_state=42
)
return cross_val_score(model, X, y, cv=3, n_jobs=-1).mean()
study = optuna.create_study(direction="maximize")
study.optimize(objective, n_trials=30)
```
## Inspiration
Hypster draws inspiration from Meta's [hydra](https://github.com/facebookresearch/hydra) and [hydra-zen](https://github.com/mit-ll-responsible-ai/hydra-zen) framework.
The API design is influenced by [Optuna's](https://github.com/optuna/optuna) "define-by-run" API.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "hypster",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, configuration, machine-learning",
"author": null,
"author_email": "Gilad Rubin <me@giladrubin.com>",
"download_url": "https://files.pythonhosted.org/packages/c8/ac/1dd2751a9c3571bef9d8fcc866a3bf8cc5c84685c7c05aa7e46ac1083376/hypster-0.3.8.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/gilad-rubin/hypster/master/assets/hypster_with_text.png\" alt=\"Hypster Logo\" width=\"600\"/>\n</p>\n\n<div align=\"center\">\n <div>\n <a href=\"https://gilad-rubin.gitbook.io/hypster\"><strong>Docs</strong></a> \u00b7\n <a href=\"https://github.com/gilad-rubin/hypster/issues/new?template=bug_report.md\"><strong>Report Bug</strong></a> \u00b7\n <a href=\"https://github.com/gilad-rubin/hypster/issues/new?template=feature_request.md\"><strong>Feature Request</strong></a> \u00b7\n <a href=\"https://github.com/gilad-rubin/hypster/blob/hypster-v2/CHANGELOG.md\"><strong>Changelog</strong></a>\n </div>\n</div>\n\n</p>\n\n<p align=\"center\">\n <a href=\"https://deepwiki.com/gilad-rubin/hypster\" style=\"text-decoration:none;display:inline-block\">\n <img src=\"https://img.shields.io/badge/chat%20with%20our%20AI%20docs-%E2%86%92-72A1FF?style=for-the-badge&logo=readthedocs&logoColor=white\"\n alt=\"chat with our AI docs\" width=\"220\">\n </a>\n\n</p>\n<p align=\"center\">\n <a href=\"https://github.com/gilad-rubin/hypster/actions/workflows/ci.yml\"><img src=\"https://github.com/gilad-rubin/hypster/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"/></a>\n <a href=\"https://codecov.io/gh/gilad-rubin/hypster\"><img src=\"https://codecov.io/gh/gilad-rubin/hypster/graph/badge.svg\" alt=\"codecov\"/></a>\n <a href=\"https://pypi.org/project/hypster/\"><img src=\"https://img.shields.io/pypi/v/hypster.svg\" alt=\"PyPI version\"/></a>\n <a href=\"https://pypi.org/project/hypster/\"><img src=\"https://img.shields.io/pypi/pyversions/hypster.svg\" alt=\"Python versions\"/></a>\n <a href=\"https://deepwiki.com/gilad-rubin/hypster\"><img src=\"https://deepwiki.com/badge.svg\" alt=\"DeepWiki\"/></a>\n <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-green.svg\" alt=\"License: MIT\"/></a>\n <a href=\"https://codspeed.io/gilad-rubin/hypster\"><img src=\"https://img.shields.io/endpoint?url=https://codspeed.io/badge.json\" alt=\"CodSpeed\"/></a>\n</p>\n\n<p align=\"center\">\n <em>\n Hypster is a lightweight configuration framework for <b>optimizing AI & ML workflows</b>\n </em>\n</p>\n\n> \u26a0\ufe0f Hypster is in active development and not yet battle-tested in production.\n> If you\u2019re gaining value and want to promote it to production, please reach out!\n\n## Key Features\n\n- \ud83d\udc0d **Pythonic API**: Intuitive & minimal syntax that feels natural to Python developers\n- \ud83e\ude86 **Hierarchical, Conditional Configurations**: Support for nested and swappable configurations\n- \ud83d\udcd0 **Type Safety**: Built-in type hints and validation\n- \ud83e\uddea **Hyperparameter Optimization Built-In**: Native, first-class optuna support\n\n## Installation\n\nYou can install Hypster using uv:\n\n```bash\nuv add hypster\n# optional HPO backend\nuv add 'hypster[optuna]'\n```\n\nOr using pip:\n\n```bash\npip install hypster\n```\n\n## Quick Start\n\nDefine a configuration function and instantiate it with overrides:\n\n```python\nfrom hypster import HP, instantiate\nfrom llm import LLM\n\ndef llm_config(hp: HP):\n model_name = hp.select([\"gpt-4o-mini\", \"gpt-4o\"], name=\"model_name\")\n temperature = hp.float(0.7, name=\"temperature\", min=0.0, max=1.0)\n max_tokens = hp.int(256, name=\"max_tokens\", min=1, max=4096)\n llm = LLM(model_name=model_name, temperature=temperature, max_tokens=max_tokens)\n return llm\n\nllm = instantiate(llm_config, values={\"model_name\": \"gpt-4o-mini\", \"temperature\": 0.3})\nllm.invoke(\"How's your day going?\")\n```\n\n## HPO with Optuna\n\n```python\nimport optuna\nfrom hypster.hpo.types import HpoInt, HpoFloat, HpoCategorical\nfrom hypster.hpo.optuna import suggest_values\n\n\ndef objective(trial: optuna.Trial) -> float:\n values = suggest_values(trial, config=model_cfg)\n model = instantiate(model_cfg, values=values)\n X, y = make_classification(\n n_samples=400, n_features=20, n_informative=10, random_state=42\n )\n return cross_val_score(model, X, y, cv=3, n_jobs=-1).mean()\n\nstudy = optuna.create_study(direction=\"maximize\")\nstudy.optimize(objective, n_trials=30)\n```\n\n## Inspiration\n\nHypster draws inspiration from Meta's [hydra](https://github.com/facebookresearch/hydra) and [hydra-zen](https://github.com/mit-ll-responsible-ai/hydra-zen) framework.\nThe API design is influenced by [Optuna's](https://github.com/optuna/optuna) \"define-by-run\" API.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A flexible configuration system for Python projects",
"version": "0.3.8",
"project_urls": {
"Homepage": "https://github.com/gilad-rubin/hypster",
"Issues": "https://github.com/gilad-rubin/hypster/issues",
"Repository": "https://github.com/gilad-rubin/hypster"
},
"split_keywords": [
"ai",
" configuration",
" machine-learning"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "444cd5b991f735e5a27cfb6ecbedc34621b5c03106c7726b027a229ee8075d0a",
"md5": "dfc3adb5169bc4b7c0b44394649a2d27",
"sha256": "41b8063024dc58e4ae666ae2b5f5ec8911b1172035738c9357a737b1055fcc78"
},
"downloads": -1,
"filename": "hypster-0.3.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dfc3adb5169bc4b7c0b44394649a2d27",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 16421,
"upload_time": "2025-08-28T09:48:38",
"upload_time_iso_8601": "2025-08-28T09:48:38.224475Z",
"url": "https://files.pythonhosted.org/packages/44/4c/d5b991f735e5a27cfb6ecbedc34621b5c03106c7726b027a229ee8075d0a/hypster-0.3.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c8ac1dd2751a9c3571bef9d8fcc866a3bf8cc5c84685c7c05aa7e46ac1083376",
"md5": "9b221195e497ad63c792e8bc5ab544bb",
"sha256": "fb176cadb8ce072dbeb6c4b14668d569a5dc86366aba2082e93c3f87119d31bf"
},
"downloads": -1,
"filename": "hypster-0.3.8.tar.gz",
"has_sig": false,
"md5_digest": "9b221195e497ad63c792e8bc5ab544bb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 15152,
"upload_time": "2025-08-28T09:48:39",
"upload_time_iso_8601": "2025-08-28T09:48:39.564629Z",
"url": "https://files.pythonhosted.org/packages/c8/ac/1dd2751a9c3571bef9d8fcc866a3bf8cc5c84685c7c05aa7e46ac1083376/hypster-0.3.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-28 09:48:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gilad-rubin",
"github_project": "hypster",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hypster"
}