| Name | invrs-opt JSON |
| Version |
0.12.0
JSON |
| download |
| home_page | None |
| Summary | Algorithms for inverse design |
| upload_time | 2025-10-20 18:30:22 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.7 |
| license | MIT License
Copyright (c) 2025 invrs.io LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
| keywords |
topology
optimization
jax
inverse design
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# invrs-opt - Optimization algorithms for inverse design


## Overview
The `invrs-opt` package defines an optimizer API intended for topology optimization, inverse design, or AI-guided design. It (currently) implements the L-BFGS-B optimization algorithm along with some variants. The API is intended to be general so that new algorithms can be accommodated, and is inspired by the functional optimizer approach used in jax. Example usage is as follows:
```python
initial_params = ...
optimizer = invrs_opt.lbfgsb()
state = optimizer.init(initial_params)
for _ in range(steps):
params = optimizer.params(state)
value, grad = jax.value_and_grad(loss_fn)(params)
state = optimizer.update(grad=grad, value=value, params=params, state=state)
```
Optimizers in `invrs-opt` are compatible with custom types defined in the [totypes](https://github.com/invrs-io/totypes) package. The basic `lbfgsb` optimizer enforces bounds for custom types, while the `density_lbfgsb` optimizer implements a filter-and-threshold operation for `DensityArray2D` types to ensure that solutions have the correct length scale.
## Install
```
pip install invrs_opt
```
Raw data
{
"_id": null,
"home_page": null,
"name": "invrs-opt",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "\"Martin F. Schubert\" <mfschubert@gmail.com>",
"keywords": "topology, optimization, jax, inverse design",
"author": null,
"author_email": "\"Martin F. Schubert\" <mfschubert@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/73/ea/dd733f61786b9293c249f70ccc4abc419208f2a8a7fe94b4355f987c0bfa/invrs_opt-0.12.0.tar.gz",
"platform": null,
"description": "# invrs-opt - Optimization algorithms for inverse design\n\n\n\n## Overview\n\nThe `invrs-opt` package defines an optimizer API intended for topology optimization, inverse design, or AI-guided design. It (currently) implements the L-BFGS-B optimization algorithm along with some variants. The API is intended to be general so that new algorithms can be accommodated, and is inspired by the functional optimizer approach used in jax. Example usage is as follows:\n\n```python\ninitial_params = ...\n\noptimizer = invrs_opt.lbfgsb()\nstate = optimizer.init(initial_params)\n\nfor _ in range(steps):\n params = optimizer.params(state)\n value, grad = jax.value_and_grad(loss_fn)(params)\n state = optimizer.update(grad=grad, value=value, params=params, state=state)\n```\n\nOptimizers in `invrs-opt` are compatible with custom types defined in the [totypes](https://github.com/invrs-io/totypes) package. The basic `lbfgsb` optimizer enforces bounds for custom types, while the `density_lbfgsb` optimizer implements a filter-and-threshold operation for `DensityArray2D` types to ensure that solutions have the correct length scale.\n\n## Install\n```\npip install invrs_opt\n```\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 invrs.io LLC\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Algorithms for inverse design",
"version": "0.12.0",
"project_urls": null,
"split_keywords": [
"topology",
" optimization",
" jax",
" inverse design"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b581cc51158c606443e0c3b360851c605b05e89b6f6a73c8da156c4ddcc1871b",
"md5": "9bcc8afd1f1db40fd2a7c13797b5637e",
"sha256": "8527615e2c4df1fec69191024b2ba5d8f28f9c5f608e90a445538be397c67fca"
},
"downloads": -1,
"filename": "invrs_opt-0.12.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9bcc8afd1f1db40fd2a7c13797b5637e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 32776,
"upload_time": "2025-10-20T18:30:22",
"upload_time_iso_8601": "2025-10-20T18:30:22.042959Z",
"url": "https://files.pythonhosted.org/packages/b5/81/cc51158c606443e0c3b360851c605b05e89b6f6a73c8da156c4ddcc1871b/invrs_opt-0.12.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "73eadd733f61786b9293c249f70ccc4abc419208f2a8a7fe94b4355f987c0bfa",
"md5": "1675ed8320c579d21634c1f1ff4befce",
"sha256": "f6b42f728b76f9da61578df80f8d6f78c1991e3dec2c9d75523829c722f48642"
},
"downloads": -1,
"filename": "invrs_opt-0.12.0.tar.gz",
"has_sig": false,
"md5_digest": "1675ed8320c579d21634c1f1ff4befce",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26933,
"upload_time": "2025-10-20T18:30:22",
"upload_time_iso_8601": "2025-10-20T18:30:22.964901Z",
"url": "https://files.pythonhosted.org/packages/73/ea/dd733f61786b9293c249f70ccc4abc419208f2a8a7fe94b4355f987c0bfa/invrs_opt-0.12.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-20 18:30:22",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "invrs-opt"
}