-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix passing compute to export_solver with features attached #922
Fix passing compute to export_solver with features attached #922
Conversation
compute = solver_ps.get_value(qualifier='compute', compute=kwargs.get('compute', None), default=[], **_skip_filter_checks) | ||
compute = kwargs.get('compute', solver_ps.get_value(qualifier='compute', **_skip_filter_checks)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To override a parameter value from a kwarg, we usually call parameter_name=kwargs.get('parameter_name', None)
which results in returning the value in the kwarg if provided, and otherwise the parameter value itself. However, in this case, the parameter name is compute
but that clashes with the compute tag resulting in no results. The new line should result in the same intended logic, but bypasses the filter entirely and prevents the tag collision.
The only downside to this approach being used widely is that it also bypasses validity checks, etc, but in this case those would result in errors in the following line. If this ever became a problem, we could add logic to ensure that the user-passed value for compute is a valid option and raise a useful error if it is not.
The CI build issue must be unrelated to this PR; if possible, it'd be good to first resolve the CI issue and then rerun to have a clean PR merge. Otherwise, I have no issues with the proposed fix. |
db977b6
to
e65a2be
Compare
rebased onto the fixed bugfix branch, I'll merge if/when CI is green 🟢 🤞 |
* Fix handling of include_times for RVs with compute_times/phases. [#889] * GPs on models computed in phase-space will be properly computed based on residuals in time space. [#899] * Fix units of requivfrac. [#894] * Fix adopting mask_phases from lc_geometry. [#896] * Fix population of wavelength array in load function for passbands. [#914] * Temporarily cap numpy dependency < 2.0. [#930] * Fix installation of phoebe-server CLI script to launch from UI. [#929] * Fix passing compute to export_solver with features attached. [#922] * sigmas_lnf: change handling of noise-nuissance parameter for RVs to no longer depend on the RV amplitude. [#901] * Remove duplicated phoebe-server code. [#940] * Fix python 3.12+ support by updating invalid escape sequences. [#948] * Improved precision in calculation of constraints. [#945] --------- Co-authored-by: Kelly Hambleton (Prsa) <kmhambleton@gmail.com> Co-authored-by: David Jones <Raindogjones@users.noreply.github.com> Co-authored-by: Andrej Prsa <aprsa@villanova.edu> Co-authored-by: Matthias Fabry <matthias.fabry@villanova.edu> Co-authored-by: Matthias Fabry <matthias.fabry@kuleuven.be> Co-authored-by: Miroslav Broz <miroslav.broz@email.cz>
commit 34281b8 Merge: 1584f6c 22fa0db Author: Kyle Conroy <kyleconroy@gmail.com> Date: Mon Oct 7 15:16:16 2024 -0400 Merge 2.4.15 into release-2.5 commit 22fa0db Author: Kyle Conroy <kyleconroy@gmail.com> Date: Mon Oct 7 11:20:56 2024 -0400 modified publish workflow (#952) * modified publish workflow using same as https://github.com/aprsa/ndpolator/blob/main/.github/workflows/on_release.yaml * address build wheel warnings * bump ubuntu runner to 24.04 * upgrade cibuildwheel * skip failing builds commit fbde243 Author: Kyle Conroy <kyleconroy@gmail.com> Date: Thu Oct 3 15:48:13 2024 -0400 2.4.15 bugfix release (#907) * Fix handling of include_times for RVs with compute_times/phases. [#889] * GPs on models computed in phase-space will be properly computed based on residuals in time space. [#899] * Fix units of requivfrac. [#894] * Fix adopting mask_phases from lc_geometry. [#896] * Fix population of wavelength array in load function for passbands. [#914] * Temporarily cap numpy dependency < 2.0. [#930] * Fix installation of phoebe-server CLI script to launch from UI. [#929] * Fix passing compute to export_solver with features attached. [#922] * sigmas_lnf: change handling of noise-nuissance parameter for RVs to no longer depend on the RV amplitude. [#901] * Remove duplicated phoebe-server code. [#940] * Fix python 3.12+ support by updating invalid escape sequences. [#948] * Improved precision in calculation of constraints. [#945] --------- Co-authored-by: Kelly Hambleton (Prsa) <kmhambleton@gmail.com> Co-authored-by: David Jones <Raindogjones@users.noreply.github.com> Co-authored-by: Andrej Prsa <aprsa@villanova.edu> Co-authored-by: Matthias Fabry <matthias.fabry@villanova.edu> Co-authored-by: Matthias Fabry <matthias.fabry@kuleuven.be> Co-authored-by: Miroslav Broz <miroslav.broz@email.cz> commit bf850e1 Author: Kyle Conroy <kyleconroy@gmail.com> Date: Thu Oct 3 11:02:38 2024 -0400 release GH actions workflow (#949)
This PR fixes a traceback that occurred when calling
b.export_solver(compute='...', ...)
with features attached.This closes #920.