-
Notifications
You must be signed in to change notification settings - Fork 140
MAINT deprecate self.N
and self.J_pad
in 1D
#863
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
Conversation
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 approve.
self.N
in 1D, deprecate self.J_pad
next up, fix the newly introduced |
self.N
in 1D, deprecate self.J_pad
self.N
in 1D, deprecate self.J_pad
, new 1D shape checks
_get_shapes was not a good idea
self.N
in 1D, deprecate self.J_pad
, new 1D shape checksself.N
in 1D, deprecate self.J_pad
i have reduced the PR size. this runtime shape check i experimented with should happen in a separate PR, ideally a backend agnostic one |
Codecov Report
@@ Coverage Diff @@
## dev #863 +/- ##
==========================================
- Coverage 88.22% 88.08% -0.15%
==========================================
Files 64 64
Lines 2242 2249 +7
==========================================
+ Hits 1978 1981 +3
- Misses 264 268 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Looking to @janden for a final approval.
@MuawizChaudhary i think @janden already approved the overall idea, and we talked about that during the meeting yesterday. I think i can speak for him that either you or @cyrusvahidi are free to merge it |
can you resolve the conflicts? |
done |
Rebased from #854, which was relying on the old semantics ( @MuawizChaudhary please, can we make this PR next in line for merging? |
The pull request fulfills the specifications laid out by @lostanlen and @janden in issue #857 . Therefore I am merging. If there are any complaints about the design proposed here, please make an issue or discuss it during our next weekly meeting. |
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 but we're now missing docstring for N
, J
in scattering_filter_factory
.
Will make an issue. |
oops! yes good catch, needs a new doc now. thanks for merging 🙏🏻 |
As a consequence of kymatio#863.
* FIX Update examples/1d/plot_filters.py As a consequence of #863. * FIX Update examples/2d/plot_filters Add new levels key.
* redefine self.N, deprecate self.J_pad * deprecationwarning * restore self.vectorize (temporarily) * bugfix _get_input_length * J_pad = int(np.log2(self.N)) * bugfix _check_input * revert to _check_input, write _get_shapes * update _get_shapes * try calling self._get_shapes in frontends * shape_fn in _get_shapes * write tensorflow shape_fn * move _check_input into _get_shapes * remove self._check_input * bugfix tensorflow shape check * reduce PR size _get_shapes was not a good idea * reduce PR size (bis) * reduce PR size (ter) * (quater) * convert self.shape to tuple for type stability * deprecate N, store _N_padded * call scattering_filter_factory with 2**self._N_padded * documentation * bugfix `N(self)` property * bugfix call to create_filters * update scattering_filter_factory prototype * update the numpy test * bugfix input length check test * clarify DeprecationWarning * bugfix * review by rastegah * remove unnecessary import * update DeprecationWarning * update documentation * rebase from PR 854
* FIX Update examples/1d/plot_filters.py As a consequence of #863. * FIX Update examples/2d/plot_filters Add new levels key.
Fixes #857
An important deprecation to set before we release v0.3 is
J_pad
. Indeed, there won't be aJ_pad_fr
in JTFS, so it'd best to plan for symmetry in design.I have moved the shape check to its own static method. We'll be able to call this method a second time inside
self._check_input(x)
(recently merged!)