forked from metoppv/improver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IM-1787: Improve memory efficiency of threshold plugin (metoppv#1913)
* Making threshold more efficient. * Getting the contributions right when using masked data. * Correct unit setting bug. * Beginning to restructure. * Changing interfaces, simplifying CLI, and updating unit tests. Incomplete. * Break up the occurence within vicinity plugin to allow use of components within the threshold plugin. * Figuring out where the vicinity processing differs. * Add new exception. May be temporary. * more incremental changes. * Final fixes to vicinity processing from within the threshold plugin. * Format changes. * Remove defunct test. Add array slicing to avoid swelling memory when broadcasting arrays. * Use a slice iterator rather than list to reduce memory usage. As suggested by Stephen Moseley. * Set self.fill_masked which was lost in rebase. * Remove assumption of realization coordinate added when changing to use iterator. * Modify threshold such that it can once again accept a single threshold value rather than a list. Work through interface changes in other plugins. * Remove doc-strings relating to fuzzy-bounds, the setting of which using an argument has been removed. * Add unit tests to cover the vicinity processing applied within the threshold plugin. This was previously all performed in the CLI and thus not covered by unit tests in this specific context. * Format fixes. * Replicate percentile collapse functionality. This commit also addresses many of the review comments though the expansion / rewriting of the unit tests will be undertaken separately. The BasicThreshold plugin is also renamed to Threshold. * Added back land mask without vicinity exception. * Rewriting threshold unit tests using pytest and extending coverage. Incomplete. * Unit test replacement complete. Doc-strings and formatting changes to come. * Add docstrings and typing to the conftest functions. * Formatting corrections. * Remove broken new test added to BasicThreshold tests which is not needed due to new pytests. * Add vicinity tests using a landmask. * Partial review response. * Further review changes. * Further review tweaks. * Tweak to type checking. * Isort reorder * Review changes. * Fix my test for bounds set to None.
- Loading branch information
Showing
12 changed files
with
1,862 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.