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

Make slices_over tests go faster #5973

Merged
merged 3 commits into from
May 30, 2024

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented May 22, 2024

🚀 Pull Request

Description

I looked at #5969 and couldn't resist...

These slowest running tests are testing slicing over 70 model levels. I assert that if the slicing does not go wrong for the first 7 levels, it is unlikely to go wrong for the next 63. So let's just test with a smaller cube. Locally, this simple change reduces the runtime of these tests by a factor of 9.


Consult Iris pull request check list


Add any of the below labels to trigger actions on this PR:

  • benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts

@trexfeathers trexfeathers self-assigned this May 29, 2024
Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

Great idea @rcomer. Some minor things for you to fix, and don't forget to hit Update branch when you're done!

docs/src/whatsnew/latest.rst Outdated Show resolved Hide resolved
lib/iris/tests/unit/cube/test_Cube.py Show resolved Hide resolved
rcomer and others added 3 commits May 30, 2024 14:51
Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
@trexfeathers trexfeathers merged commit 18ff0f8 into SciTools:main May 30, 2024
20 checks passed
@rcomer rcomer deleted the faster-slices_over-test branch May 30, 2024 14:08
stephenworsley added a commit to stephenworsley/iris that referenced this pull request Jun 10, 2024
* main: (759 commits)
  Bump scitools/workflows from 2024.05.1 to 2024.06.0 (SciTools#5986)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5980)
  Updated environment lockfiles (SciTools#5983)
  Bump scitools/workflows from 2024.05.0 to 2024.05.1 (SciTools#5984)
  Make `slices_over` tests go faster (SciTools#5973)
  Updated environment lockfiles (SciTools#5979)
  Update lock files with associated fixes (SciTools#5953)
  List 25 slowest tests (SciTools#5969)
  used a note to highlight some text (SciTools#5971)
  Lazy `iris.cube.Cube.rolling_window` (SciTools#5795)
  Add memory benchmarks (SciTools#5960)
  Whatsnew for several benchmark developments. (SciTools#5961)
  Remove "on-demand" from some benchmarks (SciTools#5959)
  Add bm_runner 'trialrun' subcommand. (SciTools#5957)
  Automatically install iris-test-data for benchmark data generation (SciTools#5958)
  Added benchmarks for collapse and aggregate (SciTools#5954)
  Use tracemalloc for memory measurements. (SciTools#5948)
  Provide a Nox `benchmarks` session as the recommended entry point (SciTools#5951)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5952)
  Remove unit benchmarks (SciTools#5949)
  ...
tkknight added a commit to tkknight/iris that referenced this pull request Jun 20, 2024
* upstream/main: (42 commits)
  Mesh saveload fix (SciTools#6004)
  used tabs for the install info (SciTools#6013)
  Fix array_equal behaviour for masked arrays (SciTools#4457)
  Bump scitools/workflows from 2024.06.1 to 2024.06.2 (SciTools#6008)
  [pre-commit.ci] pre-commit autoupdate (SciTools#6007)
  Updated environment lockfiles (SciTools#5996)
  Added more descriptive errors within concatenate (SciTools#6005)
  Bump scitools/workflows from 2024.06.0 to 2024.06.1 (SciTools#5998)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5997)
  Bump scitools/workflows from 2024.05.1 to 2024.06.0 (SciTools#5986)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5980)
  Updated environment lockfiles (SciTools#5983)
  Bump scitools/workflows from 2024.05.0 to 2024.05.1 (SciTools#5984)
  Make `slices_over` tests go faster (SciTools#5973)
  Updated environment lockfiles (SciTools#5979)
  Update lock files with associated fixes (SciTools#5953)
  List 25 slowest tests (SciTools#5969)
  used a note to highlight some text (SciTools#5971)
  Lazy `iris.cube.Cube.rolling_window` (SciTools#5795)
  Add memory benchmarks (SciTools#5960)
  ...
tkknight added a commit to tkknight/iris that referenced this pull request Jun 23, 2024
* upstream/main: (143 commits)
  Updated environment lockfiles (SciTools#6020)
  Add `MeshCoord.collapsed` (SciTools#6003)
  Bump scitools/workflows from 2024.06.2 to 2024.06.3 (SciTools#6015)
  Mesh saveload fix (SciTools#6004)
  used tabs for the install info (SciTools#6013)
  Fix array_equal behaviour for masked arrays (SciTools#4457)
  Bump scitools/workflows from 2024.06.1 to 2024.06.2 (SciTools#6008)
  [pre-commit.ci] pre-commit autoupdate (SciTools#6007)
  Updated environment lockfiles (SciTools#5996)
  Added more descriptive errors within concatenate (SciTools#6005)
  Bump scitools/workflows from 2024.06.0 to 2024.06.1 (SciTools#5998)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5997)
  Bump scitools/workflows from 2024.05.1 to 2024.06.0 (SciTools#5986)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5980)
  Updated environment lockfiles (SciTools#5983)
  Bump scitools/workflows from 2024.05.0 to 2024.05.1 (SciTools#5984)
  Make `slices_over` tests go faster (SciTools#5973)
  Updated environment lockfiles (SciTools#5979)
  Update lock files with associated fixes (SciTools#5953)
  List 25 slowest tests (SciTools#5969)
  ...
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.

2 participants