-
Notifications
You must be signed in to change notification settings - Fork 229
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
examples: Fix opt
arg-passing for elastic and TTI
#1425
Conversation
opt
arg-passing for elastic and TTI
Codecov Report
@@ Coverage Diff @@
## master #1425 +/- ##
==========================================
- Coverage 87.01% 86.05% -0.97%
==========================================
Files 188 188
Lines 27072 27072
Branches 3674 3674
==========================================
- Hits 23557 23297 -260
- Misses 3089 3349 +260
Partials 426 426
Continue to review full report at Codecov.
|
a94f85f
to
fb16e0a
Compare
examples/seismic/tti/wavesolver.py
Outdated
@@ -52,7 +52,7 @@ def op_fwd(self, kernel='centered', save=False): | |||
"""Cached operator for forward runs with buffered wavefield""" | |||
return ForwardOperator(self.model, save=save, geometry=self.geometry, | |||
space_order=self.space_order, | |||
kernel=kernel, **self._kwargs) | |||
**self._kwargs) |
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.
NOTE FR: This kernel arg causes memoization error if I keep it.
NOt sure how to solve it.
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.
WDYM memoization error, please put it back so can be debugged it should be there (and in adjoint as well)
examples/seismic/tti/tti_example.py
Outdated
@@ -17,15 +18,16 @@ def tti_setup(shape=(50, 50, 50), spacing=(20.0, 20.0, 20.0), tn=250.0, | |||
# Source and receiver geometries | |||
geometry = setup_geometry(model, tn) | |||
|
|||
return AnisotropicWaveSolver(model, geometry, space_order=space_order) | |||
return AnisotropicWaveSolver(model, geometry, space_order=space_order, | |||
kernel=kernel, **kwargs) |
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.
It's not used in the init of the solver so no kernel shouldn't be there
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 thought your previous comment meant that I should add it here (?).
Which one is the signature?
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 meant need to be in the signature of tti_setup
so that doesn't end up in kwargs
examples/seismic/tti/wavesolver.py
Outdated
@@ -52,7 +52,7 @@ def op_fwd(self, kernel='centered', save=False): | |||
"""Cached operator for forward runs with buffered wavefield""" | |||
return ForwardOperator(self.model, save=save, geometry=self.geometry, | |||
space_order=self.space_order, | |||
kernel=kernel, **self._kwargs) | |||
**self._kwargs) |
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.
WDYM memoization error, please put it back so can be debugged it should be there (and in adjoint as well)
467f713
to
166aa9d
Compare
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.
@mloubout what's missing here?
Fixes the
opt
argument-passing to TTI and elastic.