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

--skipna FLAG added to weatherbench scripts. #187

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Oct 11, 2024

--skipna FLAG added to weatherbench scripts.

To evaluate.py. Using this means NaN values are skipped in most metrics.

  • The exceptions are
    • RankHistograms ignores it (and logs if there are NaNs)
    • SEEPS already effectively uses skipna

To other scripts

  • compute_averages
  • compute_ensemble_mean
  • resample_in_time

The API convention is:

  • Public methods have skipna=False default
  • Private methods require skipna. Along the way, I updated a number of private methods to require all args. This lets typing ensure I've passed args down from public -> private.

@copybara-service copybara-service bot force-pushed the test_683670091 branch 4 times, most recently from 98fd0d8 to 35256b7 Compare October 11, 2024 23:53
@copybara-service copybara-service bot changed the title --skipna FLAG added in many places. --skipna FLAG added to weatherbench scripts. Oct 11, 2024
@copybara-service copybara-service bot force-pushed the test_683670091 branch 4 times, most recently from c8aca3b to e379c03 Compare October 18, 2024 15:44
To `evaluate.py`. Using this means NaN values are skipped in most metrics.
  * The exceptions are
    * `RankHistograms` ignores it (and logs if there are NaNs)
    * SEEPS already effectively uses skipna

To other scripts
* `compute_averages`
* `compute_ensemble_mean`
* `resample_in_time`

The API convention is:
* Public methods have `skipna=False` default
* Private methods require `skipna`. Along the way, I updated a number of private methods to require all args. This lets typing ensure I've passed args down from public -> private.

PiperOrigin-RevId: 687319197
@copybara-service copybara-service bot merged commit 5190bba into main Oct 18, 2024
@copybara-service copybara-service bot deleted the test_683670091 branch October 18, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant