-
Notifications
You must be signed in to change notification settings - Fork 54
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
Switch segmentation to use xarray internally #417
base: RC_v1.6.0
Are you sure you want to change the base?
Switch segmentation to use xarray internally #417
Conversation
# Conflicts: # tobac/utils/internal/general_internal.py
…d missing values.
…ation_seg_refactor # Conflicts: # tobac/feature_detection.py # tobac/segmentation/watershed_segmentation.py # tobac/utils/decorators.py
Linting results by Pylint:Your code has been rated at 8.72/10 (previous run: 8.72/10, +0.00) |
The codecov results indicate to me that we will need to specifically exclude the versions of xarray/iris that cause a conversion incompatibility when we release 1.6.0. |
Awesome work, let me know if you would like me to start reviewing :) |
…ation_seg_refactor # Conflicts: # setup.py # tobac/analysis.py # tobac/feature_detection.py # tobac/segmentation/watershed_segmentation.py # tobac/utils/decorators.py
Note: 360 day calendar issues and times not matching up between feature detection and segmentation |
…ation_seg_refactor # Conflicts: # tobac/segmentation/watershed_segmentation.py
…ation_seg_refactor
@freemansw1, was this already ready for a re-review (maybe after #354 is merged) or not quite yet? I can have a look at what is going on with the Jupyter CI since it seems to be caused by the bulk statistics. For some reason, the tobac/tobac/utils/bulk_statistics.py Lines 214 to 217 in 201c601
tobac/tobac/utils/decorators.py Line 178 in 201c601
We do not use the decorator when the bulk statistics are computed within the feature detection/ segmentation, so the offline computation is the only notebook that fails. It is odd, though, because the input format looks the same as in the working version and the unit test for that function also passes. I will look more into this. |
Thanks, @JuliaKukulies . I'm hesitant to mark this ready for review until #354 is merged, but happy for you to look into the bulk statistics issue. |
…ation_seg_refactor
OK, I'm working on more thoroughly testing this now that #354 is merged. One issue that I'm consistently noticing is issues between nanosecond/microsecond conversions. This is a note to myself to add the ability to find segmentation that is padded or some other approach to this. |
…ys forces a us conversion, this only converts if we are in iris mode.
…' into xarray_segmentation_seg_refactor
@freemansw1 do you know what is going on with the matrix test fail here? I get the same for #448 and #449 (although the local tests all pass). It would be nice to solve this to prepare so we can get ready for the release by the end of this week maybe |
I noticed the same issue a few weeks back in #444. It's due to a depreciated feature in the newest numpy version which affects transform feature points if no points are actually removed. I'll try and either create a PR to fix it this week, or provide more details if someone else has time to fix it first |
Thank you @w-k-jones! If you have already looked at this and an idea how to fix it, this would be great. If you do not have any time for it, maybe you can create an issue and describe what needs to be fixed so I could go from there. |
Noting potential incompatibilities here:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## RC_v1.6.0 #417 +/- ##
=============================================
+ Coverage 58.74% 59.37% +0.62%
=============================================
Files 20 25 +5
Lines 3629 3884 +255
=============================================
+ Hits 2132 2306 +174
- Misses 1497 1578 +81
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Very nice all around. My comments are all fairly minor, and I'd like to hear your views on whether they need addressing
Thanks, @w-k-jones. Agreed with all of your comments. |
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.
Thanks for the changes. I assume that the remaining failing tests will be resolved after merging the fixes in the RC_v1.6.0
branch. Happy for this to be merged
In line with #354, this PR switches segmentation to use xarray internally and also does some light refactoring of the segmentation package.
This PR includes #354 so that I could make sure that it all worked together. #354 should be merged first, so I am marking this as a draft PR until that is merged.