invrs-opt


Nameinvrs-opt JSON
Version 0.5.1 PyPI version JSON
download
home_pageNone
SummaryAlgorithms for inverse design
upload_time2024-04-08 14:16:19
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2023 The INVRS-IO authors. 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
`v0.5.1`

## 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/3b/84/c3db06fbf437d28b0da5438f7b6f59c7145401d4de63d952ad97a89d3a51/invrs_opt-0.5.1.tar.gz",
    "platform": null,
    "description": "# invrs-opt - Optimization algorithms for inverse design\n`v0.5.1`\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  Copyright (c) 2023 The INVRS-IO authors.  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. ",
    "summary": "Algorithms for inverse design",
    "version": "0.5.1",
    "project_urls": null,
    "split_keywords": [
        "topology",
        " optimization",
        " jax",
        " inverse design"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "643bedc7f115bec0d5f42adddaaefb6dbe0becf2a710f8d0349fa9800b636779",
                "md5": "b7c8188466d5e4270a2fcb2a14c2a167",
                "sha256": "840d8729731828bfd7bb8d4b3ca768dfe5229c8f9845c3e3d64afc2bb984cdf3"
            },
            "downloads": -1,
            "filename": "invrs_opt-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7c8188466d5e4270a2fcb2a14c2a167",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15929,
            "upload_time": "2024-04-08T14:16:17",
            "upload_time_iso_8601": "2024-04-08T14:16:17.466312Z",
            "url": "https://files.pythonhosted.org/packages/64/3b/edc7f115bec0d5f42adddaaefb6dbe0becf2a710f8d0349fa9800b636779/invrs_opt-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b84c3db06fbf437d28b0da5438f7b6f59c7145401d4de63d952ad97a89d3a51",
                "md5": "4d3c6b2b21aa1fc2423b62e5bf6244f1",
                "sha256": "1dd4257eaff4ab55ecb4f9cd57fa0e78341d3705644a30200d52ded51d69e64f"
            },
            "downloads": -1,
            "filename": "invrs_opt-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4d3c6b2b21aa1fc2423b62e5bf6244f1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16425,
            "upload_time": "2024-04-08T14:16:19",
            "upload_time_iso_8601": "2024-04-08T14:16:19.144339Z",
            "url": "https://files.pythonhosted.org/packages/3b/84/c3db06fbf437d28b0da5438f7b6f59c7145401d4de63d952ad97a89d3a51/invrs_opt-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-08 14:16:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "invrs-opt"
}
        
Elapsed time: 0.22927s