invrs-opt 0.11.0__tar.gz → 0.12.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. invrs_opt-0.12.1/LICENSE +21 -0
  2. invrs_opt-0.12.1/PKG-INFO +57 -0
  3. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/README.md +2 -2
  4. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/pyproject.toml +2 -2
  5. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/__init__.py +2 -2
  6. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/experimental/client.py +1 -1
  7. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/experimental/labels.py +1 -1
  8. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/optimizers/base.py +1 -1
  9. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/optimizers/lbfgsb.py +1 -1
  10. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/optimizers/wrapped_optax.py +1 -1
  11. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/parameterization/base.py +1 -1
  12. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/parameterization/filter_project.py +1 -1
  13. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/parameterization/gaussian_levelset.py +1 -1
  14. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/parameterization/pixel.py +1 -1
  15. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/parameterization/transforms.py +1 -1
  16. invrs_opt-0.12.1/src/invrs_opt.egg-info/PKG-INFO +57 -0
  17. invrs_opt-0.11.0/LICENSE +0 -504
  18. invrs_opt-0.11.0/PKG-INFO +0 -561
  19. invrs_opt-0.11.0/src/invrs_opt.egg-info/PKG-INFO +0 -561
  20. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/setup.cfg +0 -0
  21. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/experimental/__init__.py +0 -0
  22. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/optimizers/__init__.py +0 -0
  23. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/parameterization/__init__.py +0 -0
  24. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt/py.typed +0 -0
  25. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt.egg-info/SOURCES.txt +0 -0
  26. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt.egg-info/dependency_links.txt +0 -0
  27. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt.egg-info/requires.txt +0 -0
  28. {invrs_opt-0.11.0 → invrs_opt-0.12.1}/src/invrs_opt.egg-info/top_level.txt +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 invrs.io LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: invrs_opt
3
+ Version: 0.12.1
4
+ Summary: Algorithms for inverse design
5
+ Author-email: "Martin F. Schubert" <mfschubert@gmail.com>
6
+ Maintainer-email: "Martin F. Schubert" <mfschubert@gmail.com>
7
+ License-Expression: MIT
8
+ Keywords: topology,optimization,jax,inverse design
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: jax>=0.4.27
13
+ Requires-Dist: jaxlib
14
+ Requires-Dist: numpy
15
+ Requires-Dist: requests
16
+ Requires-Dist: optax
17
+ Requires-Dist: scipy>=1.15.0
18
+ Requires-Dist: totypes
19
+ Requires-Dist: types-requests
20
+ Provides-Extra: tests
21
+ Requires-Dist: parameterized; extra == "tests"
22
+ Requires-Dist: pytest; extra == "tests"
23
+ Requires-Dist: pytest-cov; extra == "tests"
24
+ Requires-Dist: pytest-subtests; extra == "tests"
25
+ Provides-Extra: dev
26
+ Requires-Dist: bump-my-version; extra == "dev"
27
+ Requires-Dist: darglint; extra == "dev"
28
+ Requires-Dist: mypy; extra == "dev"
29
+ Requires-Dist: pre-commit; extra == "dev"
30
+ Dynamic: license-file
31
+
32
+ # invrs-opt - Optimization algorithms for inverse design
33
+ [![Continuous integration](https://github.com/invrs-io/opt/actions/workflows/build-ci.yml/badge.svg)](https://github.com/invrs-io/opt/actions)
34
+ [![PyPI version](https://img.shields.io/pypi/v/invrs-opt)](https://pypi.org/project/invrs-opt/)
35
+
36
+ ## Overview
37
+
38
+ 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:
39
+
40
+ ```python
41
+ initial_params = ...
42
+
43
+ optimizer = invrs_opt.lbfgsb()
44
+ state = optimizer.init(initial_params)
45
+
46
+ for _ in range(steps):
47
+ params = optimizer.params(state)
48
+ value, grad = jax.value_and_grad(loss_fn)(params)
49
+ state = optimizer.update(grad=grad, value=value, params=params, state=state)
50
+ ```
51
+
52
+ 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.
53
+
54
+ ## Install
55
+ ```
56
+ pip install invrs_opt
57
+ ```
@@ -1,6 +1,6 @@
1
1
  # invrs-opt - Optimization algorithms for inverse design
2
- ![Continuous integration](https://github.com/invrs-io/opt/actions/workflows/build-ci.yml/badge.svg)
3
- ![PyPI version](https://img.shields.io/pypi/v/invrs-opt)
2
+ [![Continuous integration](https://github.com/invrs-io/opt/actions/workflows/build-ci.yml/badge.svg)](https://github.com/invrs-io/opt/actions)
3
+ [![PyPI version](https://img.shields.io/pypi/v/invrs-opt)](https://pypi.org/project/invrs-opt/)
4
4
 
5
5
  ## Overview
6
6
 
@@ -1,12 +1,12 @@
1
1
  [project]
2
2
 
3
3
  name = "invrs_opt"
4
- version = "v0.11.0"
4
+ version = "v0.12.1"
5
5
  description = "Algorithms for inverse design"
6
6
  keywords = ["topology", "optimization", "jax", "inverse design"]
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.7"
9
- license = {file = "LICENSE"}
9
+ license = "MIT"
10
10
 
11
11
  authors = [
12
12
  {name = "Martin F. Schubert", email = "mfschubert@gmail.com"},
@@ -1,9 +1,9 @@
1
1
  """invrs_opt - Optimization algorithms for inverse design.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
- __version__ = "v0.11.0"
6
+ __version__ = "v0.12.1"
7
7
  __author__ = "Martin F. Schubert <mfschubert@gmail.com>"
8
8
 
9
9
  from invrs_opt import parameterization as parameterization
@@ -1,6 +1,6 @@
1
1
  """Defines basic client optimizers for use with an optimization service.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  import json
@@ -1,6 +1,6 @@
1
1
  """Defines labels and messages used in the context of an optimization service.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  VALUE = "value"
@@ -1,6 +1,6 @@
1
1
  """Base objects and datatypes for optimization algorithms.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  import dataclasses
@@ -1,6 +1,6 @@
1
1
  """Defines a jax-style wrapper for scipy's L-BFGS-B algorithm.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  import dataclasses
@@ -1,6 +1,6 @@
1
1
  """Defines a wrapper for optax optimizers.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  import dataclasses
@@ -1,6 +1,6 @@
1
1
  """Base types for density parameterizations.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  import dataclasses
@@ -1,6 +1,6 @@
1
1
  """Defines filter-and-project density parameterization.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  import dataclasses
@@ -1,6 +1,6 @@
1
1
  """Defines Gaussian radial basis function levelset parameterization.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  import dataclasses
@@ -1,6 +1,6 @@
1
1
  """Defines the direct pixel parameterization for density arrays.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  import dataclasses
@@ -1,6 +1,6 @@
1
1
  """Defines transforms for custom types and bare jax arrays.
2
2
 
3
- Copyright (c) 2023 The INVRS-IO authors.
3
+ Copyright (c) 2025 invrs.io LLC
4
4
  """
5
5
 
6
6
  from typing import Tuple, Union
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: invrs_opt
3
+ Version: 0.12.1
4
+ Summary: Algorithms for inverse design
5
+ Author-email: "Martin F. Schubert" <mfschubert@gmail.com>
6
+ Maintainer-email: "Martin F. Schubert" <mfschubert@gmail.com>
7
+ License-Expression: MIT
8
+ Keywords: topology,optimization,jax,inverse design
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: jax>=0.4.27
13
+ Requires-Dist: jaxlib
14
+ Requires-Dist: numpy
15
+ Requires-Dist: requests
16
+ Requires-Dist: optax
17
+ Requires-Dist: scipy>=1.15.0
18
+ Requires-Dist: totypes
19
+ Requires-Dist: types-requests
20
+ Provides-Extra: tests
21
+ Requires-Dist: parameterized; extra == "tests"
22
+ Requires-Dist: pytest; extra == "tests"
23
+ Requires-Dist: pytest-cov; extra == "tests"
24
+ Requires-Dist: pytest-subtests; extra == "tests"
25
+ Provides-Extra: dev
26
+ Requires-Dist: bump-my-version; extra == "dev"
27
+ Requires-Dist: darglint; extra == "dev"
28
+ Requires-Dist: mypy; extra == "dev"
29
+ Requires-Dist: pre-commit; extra == "dev"
30
+ Dynamic: license-file
31
+
32
+ # invrs-opt - Optimization algorithms for inverse design
33
+ [![Continuous integration](https://github.com/invrs-io/opt/actions/workflows/build-ci.yml/badge.svg)](https://github.com/invrs-io/opt/actions)
34
+ [![PyPI version](https://img.shields.io/pypi/v/invrs-opt)](https://pypi.org/project/invrs-opt/)
35
+
36
+ ## Overview
37
+
38
+ 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:
39
+
40
+ ```python
41
+ initial_params = ...
42
+
43
+ optimizer = invrs_opt.lbfgsb()
44
+ state = optimizer.init(initial_params)
45
+
46
+ for _ in range(steps):
47
+ params = optimizer.params(state)
48
+ value, grad = jax.value_and_grad(loss_fn)(params)
49
+ state = optimizer.update(grad=grad, value=value, params=params, state=state)
50
+ ```
51
+
52
+ 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.
53
+
54
+ ## Install
55
+ ```
56
+ pip install invrs_opt
57
+ ```