Add eq_fixed option to BoundaryError#2264
Conversation
Memory benchmark result| Test Name | %Δ | Master (MB) | PR (MB) | Δ (MB) | Time PR (s) | Time Master (s) |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
test_objective_jac_w7x | 2.59 % | 3.846e+03 | 3.945e+03 | 99.66 | 32.55 | 29.23 |
test_proximal_jac_w7x_with_eq_update | -0.23 % | 6.521e+03 | 6.506e+03 | -15.07 | 156.20 | 152.46 |
test_proximal_freeb_jac | -0.05 % | 1.340e+04 | 1.339e+04 | -6.89 | 84.76 | 79.31 |
test_proximal_freeb_jac_blocked | -0.51 % | 7.729e+03 | 7.689e+03 | -39.58 | 71.10 | 69.08 |
test_proximal_freeb_jac_batched | -0.33 % | 7.646e+03 | 7.621e+03 | -25.32 | 71.30 | 67.98 |
test_proximal_jac_ripple | 0.79 % | 3.536e+03 | 3.563e+03 | 27.81 | 56.16 | 53.35 |
test_proximal_jac_ripple_bounce1d | -1.44 % | 3.798e+03 | 3.744e+03 | -54.83 | 68.32 | 69.74 |
test_eq_solve | 0.19 % | 1.950e+03 | 1.954e+03 | 3.75 | 58.00 | 58.48 |For the memory plots, go to the summary of |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2264 +/- ##
==========================================
- Coverage 94.30% 94.30% -0.01%
==========================================
Files 101 101
Lines 28866 28901 +35
==========================================
+ Hits 27223 27255 +32
- Misses 1643 1646 +3
🚀 New features to boost your workflow:
|
YigitElma
left a comment
There was a problem hiding this comment.
You can also add a test like test_toroidal_flux to check all paths run fine.
|
I think the reason tests are failing is that constants["field"] is a SumMagneticField and it expects a list for the params. So, the parameter assignment needs a bit more care. For this objective, field can be something like [MixedCoilSet(), ToroidalMagneticField()]. |
…it test accordingly.
…Control/DESC into ia/BoundaryError-eq_fixed to sync with master
YigitElma
left a comment
There was a problem hiding this comment.
About the formatting and linting check, if you run the following, they will happen automatically everytime you commit something.
pip install pre-commit
pre-commit install
These and some other useful instructions can be found on the Contributing Guide.
YigitElma
left a comment
There was a problem hiding this comment.
Note to other devs: The failing test is related to jax-finufft version 1.2.0 and not caused by this PR. We should solve that problem separetaly or wait CI to run that test on a different python version (which doesn't install jax-finufft 1.2.0)
|
|
||
| New Features | ||
|
|
||
| - Added option for ``eq_fixed`` added to ``BoundaryError`` to remove equilibrium as a degree of freedom from boundary error objective. |
There was a problem hiding this comment.
| - Added option for ``eq_fixed`` added to ``BoundaryError`` to remove equilibrium as a degree of freedom from boundary error objective. | |
| - Adds ``eq_fixed`` argument to ``BoundaryError`` to remove the equilibrium from the optimization. This can be used instead of adding a ``FixParameter(eq)`` constraint. |
Or you can just fix the typo
An option to remove the equilibrium as an optimizable DOF when computing BoundaryError is included.