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

branch off new slycot version #1689

Merged
merged 4 commits into from
Aug 29, 2022
Merged

Conversation

artpelling
Copy link
Member

@artpelling artpelling commented Jul 15, 2022

I saw that a new slycot version was released last week. It includes my bugfix PR for an incorrectly set ldwork variable in the discrete-time case. If we update our requirements to version 0.5.0 or higher, we can remove the workaround bugfix from our bindings.

The new release does not seem to contain drastic changes, although they have switched to a different license and version of SLICOT and there seems to be an issue with NumPy 1.23.0 (but not 1.23.1 and greater).

https://github.com/python-control/Slycot/releases/tag/v0.5.0

@github-actions github-actions bot added the infrastructure Buildsystem, packages and CI label Jul 15, 2022
@artpelling artpelling added pr:fix Fixes a bug pr:removal Removes a feature dependencies Pull requests that update a dependency file and removed pr:fix Fixes a bug labels Jul 15, 2022
@renefritze
Copy link
Member

Will the current workaround break with 0.5.0?
Could we branch the code on the slycot version instead?

@pmli
Copy link
Member

pmli commented Jul 17, 2022

Will the current workaround break with 0.5.0?

No, it shouldn't.

Could we branch the code on the slycot version instead?

That might be better, to support more Slycot versions. Or we could postpone merging this PR until there are a few more releases of Slycot, in a year or two.

@renefritze
Copy link
Member

Will the current workaround break with 0.5.0?

No, it shouldn't.

Great, so there's no rush to get this in before the release.

Could we branch the code on the slycot version instead?

That might be better, to support more Slycot versions. Or we could postpone merging this PR until there are a few more releases of Slycot, in a year or two.

I would prefer the version branch for now. We can add a deprecation warning for slicot 0.4 sometime after.

That sound good @artpelling, @pmli ?

@renefritze renefritze added this to the 2022.2 milestone Jul 18, 2022
@artpelling
Copy link
Member Author

That sound good @artpelling, @pmli ?

Yes sounds good, will get on that soon. This really is low priority, everything should continue to work fine even if we do nothing. :)

@renefritze
Copy link
Member

Maybe you could also look at the warnings we get from slycot when you get to this?
Starting in line 1477
conda.log.txt

@github-actions github-actions bot removed the infrastructure Buildsystem, packages and CI label Jul 22, 2022
@artpelling artpelling changed the title Remove slycot bugfix branch off new slycot version Jul 22, 2022
@artpelling
Copy link
Member Author

artpelling commented Jul 22, 2022

@renefritze I just wanted to test the changes locally, but all the lyapunov related tests are skipped, because I don't have pymess. The decorators

@skip_if_missing('SLYCOT')
@skip_if_missing('PYMESS')

make it such that the tests are skipped if either package is missing. What would be the best way to change this behaviour? Should I conditionally edit the solver lists in pymortests/lyapunov.py?

For now, I worked around it and tests pass for all slycot versions.

@renefritze
Copy link
Member

Sorry @artpelling, I tried to contact you on gitter.
Yes, conditionally setting the solver backends would be my solution as well. And then removing the skip decorators altogether.

@pmli
Copy link
Member

pmli commented Jul 22, 2022

Maybe you could also look at the warnings we get from slycot when you get to this?
Starting in line 1477
conda.log.txt

@lbalicki might know what to do about the issue with the unstable_heat demo:

src/pymortests/demos.py::test_demos[unstable_heat:'50 10']
  /usr/share/miniconda3/envs/pyMOR-ci/lib/python3.8/site-packages/slycot/exceptions.py:241: SlycotResultWarning:
  The computed solution may be inaccurate due to poor
  scaling or eigenvalues too close to the boundary of
  the  imaginary axis.

@renefritze
Copy link
Member

Just fyi: if you rebase on main, the newer slycot version will also be included in the CI images for gitlab CI.

@artpelling
Copy link
Member Author

I guess this can be merged now? Do we have some workflow for reminding ourselves to add deprecation warnings for Slycot in 2023.1 or something?

@renefritze
Copy link
Member

I guess this can be merged now?

Let's check the log in a bit if this works in Gitlab too.

Do we have some workflow for reminding ourselves to add deprecation warnings for Slycot in 2023.1 or something?

Not explicitly. Just create a new issue and add that to the release milestone?

@artpelling artpelling added pr:fix Fixes a bug and removed pr:removal Removes a feature dependencies Pull requests that update a dependency file labels Aug 29, 2022
Copy link
Member

@renefritze renefritze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logs look good. Thanks Art!

@codecov
Copy link

codecov bot commented Aug 29, 2022

Codecov Report

Merging #1689 (57ac9e0) into main (7c8bbba) will decrease coverage by 5.78%.
The diff coverage is 50.00%.

Additional details and impacted files
Impacted Files Coverage Δ
src/pymor/bindings/slycot.py 80.64% <50.00%> (-2.69%) ⬇️
src/pymordemos/neural_networks.py 0.00% <0.00%> (-96.43%) ⬇️
src/pymordemos/fenics_nonlinear.py 0.00% <0.00%> (-96.06%) ⬇️
src/pymor/models/neural_network.py 2.27% <0.00%> (-92.05%) ⬇️
src/pymordemos/neural_networks_fenics.py 0.00% <0.00%> (-91.55%) ⬇️
src/pymordemos/neural_networks_instationary.py 0.00% <0.00%> (-85.82%) ⬇️
src/pymor/reductors/neural_network.py 0.42% <0.00%> (-85.54%) ⬇️
src/pymortests/mpi_run_demo_tests.py 2.12% <0.00%> (-78.73%) ⬇️
src/pymor/discretizers/fenics/cg.py 0.00% <0.00%> (-75.87%) ⬇️
src/pymor/parallel/mpi.py 26.47% <0.00%> (-73.53%) ⬇️
... and 58 more

@renefritze renefritze merged commit 7201942 into pymor:main Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants