invrs-opt 0.10.0__py3-none-any.whl → 0.10.1__py3-none-any.whl

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.
invrs_opt/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  Copyright (c) 2023 The INVRS-IO authors.
4
4
  """
5
5
 
6
- __version__ = "v0.10.0"
6
+ __version__ = "v0.10.1"
7
7
  __author__ = "Martin F. Schubert <mfschubert@gmail.com>"
8
8
 
9
9
  from invrs_opt import parameterization as parameterization
@@ -317,7 +317,10 @@ def parameterized_lbfgsb(
317
317
  latent_params = _init_latents(params)
318
318
  metadata, latents = param_base.partition_density_metadata(latent_params)
319
319
  latents, jax_lbfgsb_state = jax.pure_callback(
320
- _init_state_pure, _example_state(latents, maxcor), latents
320
+ _init_state_pure,
321
+ _example_state(latents, maxcor),
322
+ latents,
323
+ vmap_method="sequential",
321
324
  )
322
325
  latent_params = param_base.combine_density_metadata(metadata, latents)
323
326
  return (
@@ -346,7 +349,7 @@ def parameterized_lbfgsb(
346
349
  flat_latent_grad: PyTree,
347
350
  value: jnp.ndarray,
348
351
  jax_lbfgsb_state: JaxLbfgsbDict,
349
- ) -> Tuple[PyTree, NumpyLbfgsbDict]:
352
+ ) -> Tuple[NDArray, NumpyLbfgsbDict]:
350
353
  assert onp.size(value) == 1
351
354
  scipy_lbfgsb_state = ScipyLbfgsbState.from_jax(jax_lbfgsb_state)
352
355
  flat_latent_params = scipy_lbfgsb_state.x.copy()
@@ -355,6 +358,7 @@ def parameterized_lbfgsb(
355
358
  value=onp.array(value, dtype=onp.float64),
356
359
  )
357
360
  updated_flat_latent_params = scipy_lbfgsb_state.x
361
+ flat_latent_updates: NDArray
358
362
  flat_latent_updates = updated_flat_latent_params - flat_latent_params
359
363
  return flat_latent_updates, scipy_lbfgsb_state.to_dict()
360
364
 
@@ -403,6 +407,7 @@ def parameterized_lbfgsb(
403
407
  flat_latents_grad,
404
408
  value,
405
409
  jax_lbfgsb_state,
410
+ vmap_method="sequential",
406
411
  )
407
412
  latent_updates = unflatten_fn(flat_latent_updates)
408
413
  latent_params = _apply_updates(
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: invrs_opt
3
- Version: 0.10.0
3
+ Version: 0.10.1
4
4
  Summary: Algorithms for inverse design
5
5
  Author-email: "Martin F. Schubert" <mfschubert@gmail.com>
6
6
  Maintainer-email: "Martin F. Schubert" <mfschubert@gmail.com>
7
- License: GNU LESSER GENERAL PUBLIC LICENSE
7
+ License: GNU LESSER GENERAL PUBLIC LICENSE
8
8
  Version 2.1, February 1999
9
9
 
10
10
  Copyright (C) 1991, 1999 Free Software Foundation, Inc.
@@ -513,7 +513,7 @@ Keywords: topology,optimization,jax,inverse design
513
513
  Requires-Python: >=3.7
514
514
  Description-Content-Type: text/markdown
515
515
  License-File: LICENSE
516
- Requires-Dist: jax<=0.4.35
516
+ Requires-Dist: jax>=0.4.35
517
517
  Requires-Dist: jaxlib
518
518
  Requires-Dist: numpy
519
519
  Requires-Dist: requests
@@ -521,19 +521,19 @@ Requires-Dist: optax
521
521
  Requires-Dist: scipy
522
522
  Requires-Dist: totypes
523
523
  Requires-Dist: types-requests
524
- Provides-Extra: dev
525
- Requires-Dist: bump-my-version; extra == "dev"
526
- Requires-Dist: darglint; extra == "dev"
527
- Requires-Dist: mypy; extra == "dev"
528
- Requires-Dist: pre-commit; extra == "dev"
529
524
  Provides-Extra: tests
530
525
  Requires-Dist: parameterized; extra == "tests"
531
526
  Requires-Dist: pytest; extra == "tests"
532
527
  Requires-Dist: pytest-cov; extra == "tests"
533
528
  Requires-Dist: pytest-subtests; extra == "tests"
529
+ Provides-Extra: dev
530
+ Requires-Dist: bump-my-version; extra == "dev"
531
+ Requires-Dist: darglint; extra == "dev"
532
+ Requires-Dist: mypy; extra == "dev"
533
+ Requires-Dist: pre-commit; extra == "dev"
534
534
 
535
535
  # invrs-opt - Optimization algorithms for inverse design
536
- `v0.10.0`
536
+ `v0.10.1`
537
537
 
538
538
  ## Overview
539
539
 
@@ -1,11 +1,11 @@
1
- invrs_opt/__init__.py,sha256=8rVngIALR7klCVPflhoqcaf745snBRiTOkwQuq6xYvE,586
1
+ invrs_opt/__init__.py,sha256=bd6NWb7l6z0v6kQif3vfX3xgxdlZrp9L9EFt_Ds20UU,586
2
2
  invrs_opt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  invrs_opt/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  invrs_opt/experimental/client.py,sha256=tbtH13FrA65XmTZfTO71CxJ78jeAEj3Zf85R-MTwbiU,4909
5
5
  invrs_opt/experimental/labels.py,sha256=dQDAMPyFMV6mXnMy295z8Ap205DRdVzysXny_Be8FmY,562
6
6
  invrs_opt/optimizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  invrs_opt/optimizers/base.py,sha256=uFfkN2LwWzAtwh6ktwWNy2iHNOY-sW3JzI46iSFkgok,1306
8
- invrs_opt/optimizers/lbfgsb.py,sha256=C85Ejvq9kJO6BorrLwxeaHLzMCQwFfJ7227JDHACCd0,36840
8
+ invrs_opt/optimizers/lbfgsb.py,sha256=kIluuCL1TjkNrdiwqsHEzqz7PEnPa0txpGa3rAw1GXU,36983
9
9
  invrs_opt/optimizers/wrapped_optax.py,sha256=781-8v_TlHsGaQF9Se9_iOEvtOLOr-BesTLudYarSlg,13685
10
10
  invrs_opt/parameterization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  invrs_opt/parameterization/base.py,sha256=jSwrEO86lGkYQG5gWsHvcIMWpZnnbdiKpn--2qaU02g,5362
@@ -13,8 +13,8 @@ invrs_opt/parameterization/filter_project.py,sha256=XL3HTEBLrF-q_75TjhOWLNdfUOSE
13
13
  invrs_opt/parameterization/gaussian_levelset.py,sha256=-6foekLTFoZDtMKuoMEvdxMJt0_zTxrKNJo0Vn-Rv80,26073
14
14
  invrs_opt/parameterization/pixel.py,sha256=YWkyBhfYtzI8cQ-M90PAZqRAbabwVaUh0UiYIGegQHI,1955
15
15
  invrs_opt/parameterization/transforms.py,sha256=8GzaIsUuuXvMCLiqAEEfxmi9qE9KqHzbuTj_m0GjH3w,8216
16
- invrs_opt-0.10.0.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
17
- invrs_opt-0.10.0.dist-info/METADATA,sha256=LN2Csi1bX4q2iagAKnwNl-jXZxKQmkxtX-fYq9QX7hs,32643
18
- invrs_opt-0.10.0.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
19
- invrs_opt-0.10.0.dist-info/top_level.txt,sha256=hOziS2uJ_NgwaW9yhtOfeuYnm1X7vobPBcp_6eVWKfM,10
20
- invrs_opt-0.10.0.dist-info/RECORD,,
16
+ invrs_opt-0.10.1.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
17
+ invrs_opt-0.10.1.dist-info/METADATA,sha256=gCJPUnv5b3erC7R4Fb-Hlhbo9uAjYK0fgTYL0qFg7Jg,32661
18
+ invrs_opt-0.10.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
19
+ invrs_opt-0.10.1.dist-info/top_level.txt,sha256=hOziS2uJ_NgwaW9yhtOfeuYnm1X7vobPBcp_6eVWKfM,10
20
+ invrs_opt-0.10.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.2.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5