-
Notifications
You must be signed in to change notification settings - Fork 230
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
compiler: Concretize SubDimensions to same object across repeated calls to concretize_subdims #2509
base: master
Are you sure you want to change the base?
Conversation
…ls to concretize_subdims
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2509 +/- ##
=======================================
Coverage 87.28% 87.29%
=======================================
Files 238 238
Lines 45703 45716 +13
Branches 4057 4057
=======================================
+ Hits 39892 39906 +14
- Misses 5126 5127 +1
+ Partials 685 683 -2 ☔ View full report in Codecov by Sentry. |
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.
Not completely sure carrying around an extra mapper is the best way but don't have a better option top of my head without lots of rework
tests/test_builtins.py
Outdated
@@ -1,7 +1,7 @@ | |||
import pytest | |||
import numpy as np | |||
from scipy.ndimage import gaussian_filter | |||
from scipy.misc import ascent | |||
from scipy.datasets import ascent |
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.
If I remember correctly this one behaves a bit differently and was leading to issues in the tests but if ci is green that's fine. The requirements need to be update though to scipy version with that import
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.
CI now fails with the old version. See here
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.
Looks good to me. As @mloubout mentioned, we should probably revisit and rework this at some point in the future, but it is a relatively minor intervention for now
requirements-optional.txt
Outdated
@@ -1,4 +1,4 @@ | |||
matplotlib | |||
pyrevolve==2.2.4 | |||
scipy | |||
scipy>=1.13.0 |
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.
I think it's too restrictive, it's a very new version, would wrap the import in try/except to handle different version import path
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.
ah sorry jsut saw that
requirements-optional.txt
Outdated
@@ -1,4 +1,4 @@ | |||
matplotlib | |||
pyrevolve==2.2.4 | |||
scipy>=1.13.0 | |||
scipy |
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.
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.
keep lower bound ofc
We discussed this in yesterday's meeting, @mloubout . My suggestion was to rather use |
Ensure that SubDimensions are consistently concretized to the same object across multiple calls to the function. This is important when using
rcompile
on equations with SubDimensions.TODO: Enhance
SymbolRegistry
by making it rebuildable, enabling operations such asrcompile
on specific subsets.