Skip to content
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

Tutorial on filtering on CPU vs. GPU #69

Merged
merged 12 commits into from
Jun 8, 2021

Conversation

NoraLoose
Copy link
Member

This adds a new tutorial which updates GPU examples from tutorial_irregular_grid.ipynb:

  • move GPU examples to separate tutorial (tutorial_GPU.ipynb)
  • use POP data (from figshare) rather than NeverWorld2 data
  • expand narrative

The tutorial does not include rigorous performance tests (as planned in #45), but rather cleans up an existing tutorial that shows how to filter on CPUs vs. GPUs. We could later add links to the performance tests once we have them. I'm also happy to adjust this tutorial (if needed) once we have made progress on #45.

- the GPU examples were previously part of tutorial_irregular_grid.ipynb
- now moved to own tutorial to structure documentation better
- use POP data rather than NeverWorld2 data for GPU examples
- tutorial does not include performance tests - we could link to
  such tests later once we have them
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,5769 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to use a context manager for file writing

with open('POP_SST.nc', wb) as fp:
    fp.write(file.contents)

Reply via ReviewNB

@@ -0,0 +1,5769 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could consider putting all of these into a dictionary (e.g. options = dict(...)) and then passing it in the next cell as Filter(..., **options) 


Reply via ReviewNB

@@ -0,0 +1,5769 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we explain more explicitly why we are filtering SST * area rather than just SST. This could be very confusing to new users.

(Side note: it seems like this should be handled by the kernel, not by the user.)


Reply via ReviewNB

@rabernat
Copy link
Contributor

Great work Nora! Just a few minor comments.

@NoraLoose NoraLoose added the documentation Improvements or additions to documentation label May 19, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2021

Codecov Report

Merging #69 (955071b) into master (e276d1a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #69   +/-   ##
=======================================
  Coverage   98.47%   98.47%           
=======================================
  Files           7        7           
  Lines         719      719           
=======================================
  Hits          708      708           
  Misses         11       11           
Flag Coverage Δ
unittests 98.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e276d1a...955071b. Read the comment docs.

@NoraLoose
Copy link
Member Author

Same comment as in #68: I addressed all comments except for issue #71. Okay to merge this tutorial in the meantime, and update it once #71 is solved?

@iangrooms
Copy link
Member

Okay to merge this tutorial in the meantime, and update it once #71 is solved?

That makes sense to me. Use different PRs for different problems: Add tutorial with this PR; updated REGULAR/simple fixed factor with a separate PR.

@iangrooms iangrooms merged commit 1365cbe into ocean-eddy-cpt:master Jun 8, 2021
@NoraLoose NoraLoose deleted the tutorial-gpu branch June 8, 2021 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants