Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow compute kwargs to be passed to GenericObjective and ObjectiveFromUser #1367

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

f0uriest
Copy link
Member

Resolves #1224

@f0uriest
Copy link
Member Author

@ddudt you made the linked issue, do you have a use case we can use as a test?

@f0uriest f0uriest marked this pull request as draft November 14, 2024 03:04
Copy link
Contributor

github-actions bot commented Nov 14, 2024

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_midres         |     -3.50 +/- 5.74     | -2.22e-02 +/- 3.64e-02 |  6.13e-01 +/- 3.0e-02  |  6.35e-01 +/- 2.1e-02  |
 test_build_transform_fft_highres        |     -1.39 +/- 3.04     | -1.36e-02 +/- 2.98e-02 |  9.65e-01 +/- 2.3e-02  |  9.78e-01 +/- 1.9e-02  |
 test_equilibrium_init_lowres            |     +1.05 +/- 2.93     | +4.05e-02 +/- 1.13e-01 |  3.89e+00 +/- 7.5e-02  |  3.85e+00 +/- 8.4e-02  |
 test_objective_compile_atf              |     -0.33 +/- 3.99     | -2.56e-02 +/- 3.15e-01 |  7.86e+00 +/- 2.4e-01  |  7.88e+00 +/- 2.1e-01  |
 test_objective_compute_atf              |     +5.76 +/- 4.26     | +6.06e-04 +/- 4.48e-04 |  1.11e-02 +/- 4.1e-04  |  1.05e-02 +/- 1.9e-04  |
 test_objective_jac_atf                  |     +2.71 +/- 4.03     | +5.02e-02 +/- 7.46e-02 |  1.90e+00 +/- 6.5e-02  |  1.85e+00 +/- 3.7e-02  |
 test_perturb_1                          |     +4.05 +/- 2.54     | +5.67e-01 +/- 3.56e-01 |  1.46e+01 +/- 2.3e-01  |  1.40e+01 +/- 2.7e-01  |
 test_proximal_jac_atf                   |     +0.52 +/- 0.97     | +4.19e-02 +/- 7.85e-02 |  8.17e+00 +/- 5.1e-02  |  8.13e+00 +/- 6.0e-02  |
 test_proximal_freeb_compute             |     +1.38 +/- 1.39     | +2.72e-03 +/- 2.73e-03 |  2.00e-01 +/- 1.9e-03  |  1.97e-01 +/- 1.9e-03  |
 test_build_transform_fft_lowres         |     -1.43 +/- 5.41     | -7.74e-03 +/- 2.92e-02 |  5.32e-01 +/- 2.3e-02  |  5.40e-01 +/- 1.8e-02  |
 test_equilibrium_init_medres            |     +0.37 +/- 2.78     | +1.55e-02 +/- 1.16e-01 |  4.19e+00 +/- 5.0e-02  |  4.18e+00 +/- 1.0e-01  |
 test_equilibrium_init_highres           |     +0.21 +/- 1.37     | +1.15e-02 +/- 7.48e-02 |  5.47e+00 +/- 6.5e-02  |  5.46e+00 +/- 3.7e-02  |
 test_objective_compile_dshape_current   |     -0.94 +/- 1.22     | -3.67e-02 +/- 4.76e-02 |  3.87e+00 +/- 2.7e-02  |  3.91e+00 +/- 3.9e-02  |
 test_objective_compute_dshape_current   |     +0.29 +/- 2.79     | +1.04e-05 +/- 1.02e-04 |  3.65e-03 +/- 3.3e-05  |  3.64e-03 +/- 9.6e-05  |
 test_objective_jac_dshape_current       |     +0.01 +/- 7.74     | +2.69e-06 +/- 3.20e-03 |  4.14e-02 +/- 1.9e-03  |  4.14e-02 +/- 2.5e-03  |
 test_perturb_2                          |     -3.53 +/- 2.93     | -6.94e-01 +/- 5.75e-01 |  1.90e+01 +/- 2.0e-01  |  1.96e+01 +/- 5.4e-01  |
 test_proximal_freeb_jac                 |     -1.57 +/- 1.51     | -1.19e-01 +/- 1.14e-01 |  7.46e+00 +/- 8.9e-02  |  7.58e+00 +/- 7.2e-02  |
 test_solve_fixed_iter                   |     -0.46 +/- 58.27    | -2.33e-02 +/- 2.96e+00 |  5.05e+00 +/- 2.1e+00  |  5.08e+00 +/- 2.1e+00  |

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.57%. Comparing base (2741269) to head (69574a7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1367   +/-   ##
=======================================
  Coverage   95.57%   95.57%           
=======================================
  Files          96       96           
  Lines       24405    24409    +4     
=======================================
+ Hits        23325    23329    +4     
  Misses       1080     1080           
Files with missing lines Coverage Δ
desc/objectives/_generic.py 97.67% <100.00%> (+0.07%) ⬆️

... and 2 files with indirect coverage changes

@dpanici
Copy link
Collaborator

dpanici commented Nov 20, 2024

Power balance compute quantity - string kwarg may have issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't pass compute kwargs to GenericObjective or ObjectiveFromUser
3 participants