| Name | optuna-async-helper JSON |
| Version |
0.4.0
JSON |
| download |
| home_page | None |
| Summary | A Helper Library for Optuna Async Optimization |
| upload_time | 2024-09-03 05:09:45 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.11 |
| license | MIT |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# Optuna Async Helper
A Helper Library for Optuna Async Optimization
# Install
```bash
pip install optuna-async-helper
```
# Usage
```python
from optuna_async_helper import SearchSpace, SearchSpec, optimize
def rosenbrock(x: float, y: float) -> float:
return (1 - x) ** 2 + 100 * (y - x**2) ** 2
search_space: SearchSpace = [
SearchSpec(var_name="x", var_type="float", low=-5, high=5),
SearchSpec(var_name="y", var_type="float", low=-5, high=5),
]
with tempfile.TemporaryDirectory() as tempdir:
study = optimize(
study_name="rosenbrock",
storage=f"sqlite:///example.db",
objective_func=rosenbrock,
search_space=search_space,
n_trials=50,
batch_size=4,
)
assert study.best_value < 1.0
assert abs(study.best_params["x"] - 1) < 1.0
assert abs(study.best_params["y"] - 1) < 1.0
```
For more detail, please check `optimize` and `SearchSpec` definitions.
# Development
The project is managed by [uv](https://docs.astral.sh/uv/)
Raw data
{
"_id": null,
"home_page": null,
"name": "optuna-async-helper",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "\u675c \u4e16\u6a4b Du Shiqiao <lucidfrontier.45@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/0c/ea/3d9847065ede1cf9176a48200a2f33ed4209e047fea041b13bf68f94dc66/optuna_async_helper-0.4.0.tar.gz",
"platform": null,
"description": "# Optuna Async Helper\nA Helper Library for Optuna Async Optimization\n\n# Install\n\n```bash\npip install optuna-async-helper\n```\n\n# Usage\n\n```python\nfrom optuna_async_helper import SearchSpace, SearchSpec, optimize\n\n\ndef rosenbrock(x: float, y: float) -> float:\n return (1 - x) ** 2 + 100 * (y - x**2) ** 2\n\n\nsearch_space: SearchSpace = [\n SearchSpec(var_name=\"x\", var_type=\"float\", low=-5, high=5),\n SearchSpec(var_name=\"y\", var_type=\"float\", low=-5, high=5),\n]\n\nwith tempfile.TemporaryDirectory() as tempdir:\n study = optimize(\n study_name=\"rosenbrock\",\n storage=f\"sqlite:///example.db\",\n objective_func=rosenbrock,\n search_space=search_space,\n n_trials=50,\n batch_size=4,\n )\n\n assert study.best_value < 1.0\n assert abs(study.best_params[\"x\"] - 1) < 1.0\n assert abs(study.best_params[\"y\"] - 1) < 1.0\n```\n\nFor more detail, please check `optimize` and `SearchSpec` definitions.\n\n# Development\n\nThe project is managed by [uv](https://docs.astral.sh/uv/)",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Helper Library for Optuna Async Optimization",
"version": "0.4.0",
"project_urls": {
"repository": "https://github.com/lucidfrontier45/optuna-async-helper"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "27b2a2c3d94e590edb9005a73941f10e4778a9a90f1e015a09e7669d2c472b3a",
"md5": "bd0aae1765db76622ba88e8081211b61",
"sha256": "e7ab6896584fe5e9e067cb63f956a891fbe7e5763ce1d04c6ed0b38633175439"
},
"downloads": -1,
"filename": "optuna_async_helper-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bd0aae1765db76622ba88e8081211b61",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 4008,
"upload_time": "2024-09-03T05:09:43",
"upload_time_iso_8601": "2024-09-03T05:09:43.903451Z",
"url": "https://files.pythonhosted.org/packages/27/b2/a2c3d94e590edb9005a73941f10e4778a9a90f1e015a09e7669d2c472b3a/optuna_async_helper-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0cea3d9847065ede1cf9176a48200a2f33ed4209e047fea041b13bf68f94dc66",
"md5": "2dacd3e3e9bfcd32bba49d62c9cf31df",
"sha256": "8851e018ced3ef11bda7c1482bb08d3cb4d320f6551f037a14a685ccc3f9e987"
},
"downloads": -1,
"filename": "optuna_async_helper-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "2dacd3e3e9bfcd32bba49d62c9cf31df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 5433,
"upload_time": "2024-09-03T05:09:45",
"upload_time_iso_8601": "2024-09-03T05:09:45.636611Z",
"url": "https://files.pythonhosted.org/packages/0c/ea/3d9847065ede1cf9176a48200a2f33ed4209e047fea041b13bf68f94dc66/optuna_async_helper-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-03 05:09:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lucidfrontier45",
"github_project": "optuna-async-helper",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "optuna-async-helper"
}