Skip to content

More robust environment installs for ASV benchmarks - #1776

Merged
cmdupuis3 merged 5 commits into
UXARRAY:mainfrom
cmdupuis3:cmd/bench-install-all-extras
Sep 23, 2026
Merged

cmdupuis3 merged 5 commits into
UXARRAY:mainfrom
cmdupuis3:cmd/bench-install-all-extras

Conversation

@cmdupuis3

@cmdupuis3 cmdupuis3 commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1777

Overview

This PR solves #1777 and also (hopefully) optimizes the ASV CI a bit. Basically, ASV installs its own environments for benchmarking, which means it was unaware of how the optional dependencies work. Instead, we have to write its pip install line manually, but we also have the option to cache the results for the subsequent commits in the ASV runs.

PR Checklist

General

  • An issue is created and linked
  • Added appropriate labels (if your uxarray repo permissions allow it)
  • Filled out Overview and Expected Usage (if applicable) sections

Testing & Benchmarking

  • There is adequate test coverage of changes from this PR (add new tests if needed)
  • If this PR could affect performance, ran ASV benchmarks and confirmed they show expected behavior (add a new benchmark if necessary)

Documentation and Examples

  • Docstrings updated with any function changes, and included in all new functions

AI Disclosure

AI Usage: Claude Opus 5

  • I have tested and take responsibility for all AI-generated content in my PR.

cmdupuis3 and others added 2 commits September 21, 2026 14:32
UXARRAY#1548 moved cartopy, matplotlib, spatialpandas and the rest of the
geospatial/plotting stack out of the core dependencies and into the "geo"
and "viz" extras. It did not touch benchmarks/asv.conf.json, and asv does
not use the ci/environment.yml environment that runs it -- it built its
own from "matrix", which listed xarray and netcdf4 and nothing else, and
then pip-installed the wheel there, which since UXARRAY#1548 resolves core
dependencies only.

So two benchmarks have been reporting "failed" rather than a time, on
every commit including main:

    mpas_ocean.GeoDataFrame.time_to_geodataframe
        OptionalDependencyNotFoundError: Failed to import: spatialpandas.
    mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection
        OptionalDependencyNotFoundError: Failed to import: cartopy, matplotlib.

Point asv at ci/environment.yml instead. Benchmarks then run against the
package set the project is actually tested against, and a dependency has
to be added in one place rather than two -- which fixes the class of drift
rather than the two instances of it that happen to be visible today.

Conda now supplies the dependencies, so the project is installed with
--no-deps, as the test job in ci.yml already does. Without that, pip would
resolve the wheel's requirements from PyPI and, together with the
--force-reinstall asv continuous needs (asv UXARRAYgh-1421), lay PyPI wheels over
conda's builds on every commit.

The matrix keeps only what the environment file does not carry. xarray and
netcdf4 come from the file now. python-build, wheel and setuptools_scm are
named explicitly because asv seeds an environment with wheel and pip only
when it builds that environment without a file.

Note that ci/environment.yml pins no Python version on purpose, and asv
only injects "pythons" when there is no environment file, so conda now
resolves the interpreter. Benchmarks move from 3.11 to whatever that
resolves to, matching the environment asv itself runs in. A given
comparison stays internally valid -- asv continuous installs both commits
into the same environment -- but absolute timings are not comparable with
results recorded before this.

Co-Authored-By: Claude Opus 5 <[email protected]>
asv does not benchmark in the uxarray_build environment set up by this
workflow; it builds its own under benchmarks/env/, and every run gets a
fresh runner, so that environment is solved and linked from scratch each
time. Pointing asv at ci/environment.yml did not change that -- it changed
which packages go in, not how often they go in.

Restore the directory instead. Once it is present, Environment.create()
returns without calling _setup() as soon as asv-env-info.json matches the
configured tool, python and requirements (asv/environment.py), so the
whole solve is skipped.

That check does not inspect the installed packages, so the key carries
everything that determines them: ci/environment.yml for the package set
and asv.conf.json for the matrix and for which environment file is in use.
There are deliberately no restore-keys -- a prefix match would restore an
environment built from an older ci/environment.yml and asv would reuse it
without noticing, which is the failure this is meant to avoid.

Co-Authored-By: Claude Opus 5 <[email protected]>
@cmdupuis3 cmdupuis3 self-assigned this Sep 21, 2026
@cmdupuis3 cmdupuis3 added bug Something isn't working run-benchmark Run ASV benchmark workflow labels Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

ASV Benchmarking

Benchmark Comparison Results

Benchmarks that have improved:

Change Before [9a43300] After [393614a] Ratio Benchmark (Parameter)
- 351M 283M 0.81 import.Imports.track_peakmem_import_uxarray
- 764k 688k 0.9 mpas_ocean.NeighborhoodDask.track_peakmem_mean('480km', 'grid_chunks')

Benchmarks that have stayed the same:

Change Before [9a43300] After [393614a] Ratio Benchmark (Parameter)
4.14±0.02ms 4.08±0.02ms 0.99 bench_connectivity.Connectivity.time_edge_face('120km')
1.61±0.03ms 1.59±0.02ms 0.99 bench_connectivity.Connectivity.time_edge_face('480km')
3.10±0.02ms 3.13±0.02ms 1.01 bench_connectivity.Connectivity.time_edge_node('120km')
1.22±0.01ms 1.21±0.01ms 0.99 bench_connectivity.Connectivity.time_edge_node('480km')
3.12±0.02ms 3.12±0.01ms 1.00 bench_connectivity.Connectivity.time_face_edge('120km')
1.22±0.01ms 1.19±0ms 0.98 bench_connectivity.Connectivity.time_face_edge('480km')
4.81±0.02ms 4.77±0.03ms 0.99 bench_connectivity.Connectivity.time_face_face('120km')
1.88±0.01ms 1.86±0.01ms 0.99 bench_connectivity.Connectivity.time_face_face('480km')
49.0±1μs 45.8±0.7μs 0.93 bench_connectivity.Connectivity.time_face_node('120km')
44.3±1μs 42.6±1μs 0.96 bench_connectivity.Connectivity.time_face_node('480km')
407±10μs 422±40μs 1.04 bench_connectivity.Connectivity.time_n_nodes_per_face('120km')
313±10μs 293±5μs 0.93 bench_connectivity.Connectivity.time_n_nodes_per_face('480km')
3.98±0.02ms 3.96±0.02ms 0.99 bench_connectivity.Connectivity.time_node_edge('120km')
1.57±0.02ms 1.55±0.02ms 0.99 bench_connectivity.Connectivity.time_node_edge('480km')
53.5±0.1ms 52.8±0.08ms 0.99 bench_connectivity.Connectivity.time_node_face('120km')
3.59±0.05ms 3.53±0.03ms 0.98 bench_connectivity.Connectivity.time_node_face('480km')
8.67±0.08ms 8.69±0.09ms 1.00 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
2.45±0.01ms 2.44±0.04ms 1.00 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
5.35±5s 10.9±9ms ~0.00 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
1.19±0.01ms 1.16±0.03ms 0.98 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
57.3k 57.3k 1.00 face_bounds.FaceBounds.track_nbytes_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
12.3k 12.3k 1.00 face_bounds.FaceBounds.track_nbytes_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
123k 123k 1.00 face_bounds.FaceBounds.track_nbytes_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
128 128 1.00 face_bounds.FaceBounds.track_nbytes_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
1.27M 1.27M 1.00 face_bounds.FaceBounds.track_nbytes_grid_with_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
50.1k 50.1k 1.00 face_bounds.FaceBounds.track_nbytes_grid_with_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
1.48M 1.48M 1.00 face_bounds.FaceBounds.track_nbytes_grid_with_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
712 712 1.00 face_bounds.FaceBounds.track_nbytes_grid_with_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
1.94M 1.94M 1.00 face_bounds.FaceBounds.track_peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
1.93M 1.93M 1.00 face_bounds.FaceBounds.track_peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
2.1M 2.1M 1.00 face_bounds.FaceBounds.track_peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
35.5k 35.5k 1.00 face_bounds.FaceBounds.track_peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
351M 325M 0.93 face_bounds.FaceBoundsColdStartRss.track_peakmem_open_and_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
366M 369M 1.01 face_bounds.FaceBoundsColdStartRss.track_peakmem_open_and_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
351M 327M 0.93 face_bounds.FaceBoundsColdStartRss.track_peakmem_open_and_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
351M 326M 0.93 face_bounds.FaceBoundsColdStartRss.track_peakmem_open_and_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
898±20ns 871±30ns 0.97 geometry_kernels.AccucrossKernels.time_accucross
2.06±0.04μs 2.04±0.07μs 0.99 geometry_kernels.AccucrossKernels.time_accucross_pair
391±40ns 317±40ns ~0.81 geometry_kernels.EFTPrimitives.time_acc_sqrt_re
323±10ns 312±20ns 0.96 geometry_kernels.EFTPrimitives.time_diff_of_products
294±10ns 272±8ns 0.93 geometry_kernels.EFTPrimitives.time_two_prod
275±20ns 291±30ns 1.06 geometry_kernels.EFTPrimitives.time_two_sum
505±20ns 533±10ns 1.06 geometry_kernels.GCAConstLatIntersection.time_accux_constlat_kernel
670±7ns 673±30ns 1.00 geometry_kernels.GCAConstLatIntersection.time_gca_const_lat_intersection
700±30ns 661±30ns 0.94 geometry_kernels.GCAConstLatIntersection.time_try_gca_const_lat_intersection
609±20ns 598±30ns 0.98 geometry_kernels.GCAGCAIntersection.time_accux_gca_kernel
915±30ns 900±40ns 0.98 geometry_kernels.GCAGCAIntersection.time_gca_gca_intersection
940±20ns 929±20ns 0.99 geometry_kernels.GCAGCAIntersection.time_try_gca_gca_intersection
42.1±0.5μs 40.9±0.6μs 0.97 geometry_kernels.OrientPredicates.time_on_minor_arc
43.2±0.7μs 41.9±0.7μs 0.97 geometry_kernels.OrientPredicates.time_orient3d_on_sphere
3.66±0.01ms 3.67±0.03ms 1.00 geometry_samebody.SameBodyConstLat.time_accux_dispatch
657±2μs 657±3μs 1.00 geometry_samebody.SameBodyConstLat.time_accux_kernel
3.56±0ms 3.55±0.01ms 1.00 geometry_samebody.SameBodyConstLat.time_fp64_dispatch
101±0.03μs 101±0.4μs 1.01 geometry_samebody.SameBodyConstLat.time_fp64_kernel
46.2±0.1ms 48.8±1ms 1.06 geometry_samebody_gcagca.SameBodyGcaGca.time_accux_dispatch
4.43±0ms 4.44±0.01ms 1.00 geometry_samebody_gcagca.SameBodyGcaGca.time_accux_kernel
43.1±0.04ms 44.6±1ms 1.04 geometry_samebody_gcagca.SameBodyGcaGca.time_fp64_dispatch
535±10μs 534±10μs 1.00 geometry_samebody_gcagca.SameBodyGcaGca.time_fp64_kernel
681±5ms 683±5ms 1.00 import.Imports.timeraw_import_uxarray
2.33±0.02ms 2.32±0.01ms 1.00 mpas_ocean.CheckNorm.time_check_norm('120km')
1.57±0.06ms 1.51±0.01ms 0.96 mpas_ocean.CheckNorm.time_check_norm('480km')
952±10μs 946±3μs 0.99 mpas_ocean.ConnectivityConstruction.time_face_face_connectivity('120km')
441±8μs 435±10μs 0.99 mpas_ocean.ConnectivityConstruction.time_face_face_connectivity('480km')
579±10μs 561±7μs 0.97 mpas_ocean.ConnectivityConstruction.time_n_nodes_per_face('120km')
484±7μs 481±7μs 0.99 mpas_ocean.ConnectivityConstruction.time_n_nodes_per_face('480km')
3.95±0.05ms 3.83±0.03ms 0.97 mpas_ocean.ConstructFaceLatLon.time_cartesian_averaging('120km')
3.03±0.04ms 2.95±0.2ms 0.97 mpas_ocean.ConstructFaceLatLon.time_cartesian_averaging('480km')
90.2±0.2ms 91.3±2ms 1.01 mpas_ocean.ConstructFaceLatLon.time_welzl('120km')
8.96±0.1ms 8.55±0.4ms 0.95 mpas_ocean.ConstructFaceLatLon.time_welzl('480km')
11.3±0.3ms 11.0±0.03ms 0.97 mpas_ocean.ConstructTreeStructures.time_ball_tree('120km')
695±20μs 678±20μs 0.97 mpas_ocean.ConstructTreeStructures.time_ball_tree('480km')
9.00±0.8ms 8.13±0.03ms ~0.90 mpas_ocean.ConstructTreeStructures.time_kd_tree('120km')
555±40μs 511±20μs 0.92 mpas_ocean.ConstructTreeStructures.time_kd_tree('480km')
471±4ms 473±4ms 1.00 mpas_ocean.CrossSections.time_const_lat('120km', 1)
245±1ms 239±5ms 0.98 mpas_ocean.CrossSections.time_const_lat('120km', 2)
122±1ms 124±1ms 1.01 mpas_ocean.CrossSections.time_const_lat('120km', 4)
426±5ms 418±6ms 0.98 mpas_ocean.CrossSections.time_const_lat('480km', 1)
211±7ms 210±7ms 1.00 mpas_ocean.CrossSections.time_const_lat('480km', 2)
108±0.7ms 109±2ms 1.01 mpas_ocean.CrossSections.time_const_lat('480km', 4)
351M 345M 0.98 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('120km', 1)
351M 345M 0.98 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('120km', 2)
351M 345M 0.98 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('120km', 4)
351M 328M 0.93 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('480km', 1)
351M 328M 0.93 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('480km', 2)
351M 328M 0.94 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('480km', 4)
24.7±0.02ms 24.8±0.03ms 1.01 mpas_ocean.DualMesh.time_dual_mesh_construction('120km')
2.60±0.07ms 2.60±0.06ms 1.00 mpas_ocean.DualMesh.time_dual_mesh_construction('480km')
12.3±0.8ms 12.5±1ms 1.02 mpas_ocean.FaceAreas.time_face_areas('120km')
3.31±0.2ms 3.30±0.1ms 1.00 mpas_ocean.FaceAreas.time_face_areas('480km')
229k 229k 1.00 mpas_ocean.FaceAreas.track_nbytes_face_areas('120km')
14.3k 14.3k 1.00 mpas_ocean.FaceAreas.track_nbytes_face_areas('480km')
2.12M 2.12M 1.00 mpas_ocean.FaceAreas.track_peakmem_face_areas('120km')
695k 696k 1.00 mpas_ocean.FaceAreas.track_peakmem_face_areas('480km')
655±3ms 655±0.8ms 1.00 mpas_ocean.GeoDataFrame.time_to_geodataframe('120km', False)
39.4±0.7ms 39.8±0.4ms 1.01 mpas_ocean.GeoDataFrame.time_to_geodataframe('120km', True)
57.8±0.6ms 57.5±0.2ms 0.99 mpas_ocean.GeoDataFrame.time_to_geodataframe('480km', False)
4.40±0.3ms 4.21±0.1ms 0.96 mpas_ocean.GeoDataFrame.time_to_geodataframe('480km', True)
10.5±0.1ms 10.8±0.2ms 1.03 mpas_ocean.Gradient.time_gradient('120km')
1.46±0ms 1.49±0.02ms 1.02 mpas_ocean.Gradient.time_gradient('480km')
457k 457k 1.00 mpas_ocean.Gradient.track_nbytes_gradient('120km')
28.7k 28.7k 1.00 mpas_ocean.Gradient.track_nbytes_gradient('480km')
3.2M 3.2M 1.00 mpas_ocean.Gradient.track_peakmem_gradient('120km')
204k 204k 1.00 mpas_ocean.Gradient.track_peakmem_gradient('480km')
351M 341M 0.97 mpas_ocean.GradientColdStartRss.track_peakmem_gradient('120km')
351M 320M 0.91 mpas_ocean.GradientColdStartRss.track_peakmem_gradient('480km')
292±8μs 292±6μs 1.00 mpas_ocean.HoleEdgeIndices.time_construct_hole_edge_indices('120km')
121±3μs 120±3μs 0.99 mpas_ocean.HoleEdgeIndices.time_construct_hole_edge_indices('480km')
166±1μs 165±3μs 0.99 mpas_ocean.Integrate.time_integrate('120km')
143±1μs 144±3μs 1.01 mpas_ocean.Integrate.time_integrate('480km')
18.4M 18.4M 1.00 mpas_ocean.Integrate.track_nbytes_integrate('120km')
1.2M 1.2M 1.00 mpas_ocean.Integrate.track_nbytes_integrate('480km')
128±2ms 128±1ms 1.00 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'exclude')
128±2ms 127±1ms 0.99 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'include')
127±2ms 127±1ms 1.00 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'split')
9.45±0.1ms 9.25±0.09ms 0.98 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'exclude')
9.25±0.07ms 9.13±0.05ms 0.99 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'include')
9.16±0.08ms 9.20±0.1ms 1.01 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'split')
132±1ms 131±1ms 0.99 mpas_ocean.NeighborhoodBuild.time_build('120km', 1.0)
801±7ms 795±2ms 0.99 mpas_ocean.NeighborhoodBuild.time_build('120km', 15.0)
312±20ms 291±2ms 0.93 mpas_ocean.NeighborhoodBuild.time_build('120km', 5.0)
8.65±0.1ms 8.61±0.06ms 0.99 mpas_ocean.NeighborhoodBuild.time_build('480km', 1.0)
16.0±0.06ms 16.1±0.1ms 1.01 mpas_ocean.NeighborhoodBuild.time_build('480km', 15.0)
10.8±0.04ms 10.8±0.06ms 1.00 mpas_ocean.NeighborhoodBuild.time_build('480km', 5.0)
128±0.7ms 127±0.1ms 0.99 mpas_ocean.NeighborhoodBuild.time_query_radius('120km', 1.0)
765±3ms 762±4ms 1.00 mpas_ocean.NeighborhoodBuild.time_query_radius('120km', 15.0)
284±3ms 282±0.2ms 0.99 mpas_ocean.NeighborhoodBuild.time_query_radius('120km', 5.0)
8.36±0.04ms 8.35±0.06ms 1.00 mpas_ocean.NeighborhoodBuild.time_query_radius('480km', 1.0)
15.7±0.05ms 15.6±0.01ms 1.00 mpas_ocean.NeighborhoodBuild.time_query_radius('480km', 15.0)
10.5±0.04ms 10.4±0.03ms 0.99 mpas_ocean.NeighborhoodBuild.time_query_radius('480km', 5.0)
1.19 1.19 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('120km', 1.0)
612.76 612.76 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('120km', 15.0)
74.17 74.17 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('120km', 5.0)
1.0 1.0 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('480km', 1.0)
37.29 37.29 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('480km', 15.0)
6.57 6.57 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('480km', 5.0)
728k 728k 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('120km', 1.0)
141M 141M 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('120km', 15.0)
17.4M 17.4M 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('120km', 5.0)
43k 43k 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('480km', 1.0)
563k 563k 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('480km', 15.0)
123k 123k 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('480km', 5.0)
5.72M 5.72M 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('120km', 1.0)
145M 145M 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('120km', 15.0)
21.5M 21.5M 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('120km', 5.0)
362k 362k 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('480km', 1.0)
825k 824k 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('480km', 15.0)
384k 384k 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('480km', 5.0)
35.3±0.3ms 35.4±0.2ms 1.00 mpas_ocean.NeighborhoodDask.time_mean('120km', 'grid_chunks')
16.1±0.07ms 16.2±0.1ms 1.01 mpas_ocean.NeighborhoodDask.time_mean('120km', 'numpy')
32.8±0.2ms 32.3±0.4ms 0.98 mpas_ocean.NeighborhoodDask.time_mean('120km', 'time_chunks')
9.62±0.1ms 9.52±0.07ms 0.99 mpas_ocean.NeighborhoodDask.time_mean('480km', 'grid_chunks')
516±4μs 510±8μs 0.99 mpas_ocean.NeighborhoodDask.time_mean('480km', 'numpy')
6.77±0.2ms 6.79±0.07ms 1.00 mpas_ocean.NeighborhoodDask.time_mean('480km', 'time_chunks')
5.77M 5.84M 1.01 mpas_ocean.NeighborhoodDask.track_peakmem_mean('120km', 'grid_chunks')
2.75M 2.75M 1.00 mpas_ocean.NeighborhoodDask.track_peakmem_mean('120km', 'numpy')
5.69M 5.69M 1.00 mpas_ocean.NeighborhoodDask.track_peakmem_mean('120km', 'time_chunks')
177k 177k 1.00 mpas_ocean.NeighborhoodDask.track_peakmem_mean('480km', 'numpy')
554k 542k 0.98 mpas_ocean.NeighborhoodDask.track_peakmem_mean('480km', 'time_chunks')
8.33±0.03s 8.59±0.1s 1.03 mpas_ocean.NeighborhoodReduce.time_dataset_reduce('120km', 'mean')
9.01±0.01s 9.09±0.01s 1.01 mpas_ocean.NeighborhoodReduce.time_dataset_reduce('120km', 'median')
145±0.9ms 144±0.2ms 0.99 mpas_ocean.NeighborhoodReduce.time_dataset_reduce('480km', 'mean')
150±0.3ms 150±1ms 1.00 mpas_ocean.NeighborhoodReduce.time_dataset_reduce('480km', 'median')
830±4ms 825±2ms 0.99 mpas_ocean.NeighborhoodReduce.time_neighborhood_reduce('120km', 'mean')
1.00±0.01s 993±2ms 0.99 mpas_ocean.NeighborhoodReduce.time_neighborhood_reduce('120km', 'median')
16.6±0.1ms 16.5±0.03ms 1.00 mpas_ocean.NeighborhoodReduce.time_neighborhood_reduce('480km', 'mean')
17.7±0.03ms 17.7±0.03ms 1.00 mpas_ocean.NeighborhoodReduce.time_neighborhood_reduce('480km', 'median')
27.8±0.3ms 28.0±0.4ms 1.01 mpas_ocean.NeighborhoodReduce.time_reduce('120km', 'mean')
198±0.7ms 198±0.4ms 1.00 mpas_ocean.NeighborhoodReduce.time_reduce('120km', 'median')
376±6μs 361±7μs 0.96 mpas_ocean.NeighborhoodReduce.time_reduce('480km', 'mean')
1.49±0.03ms 1.48±0.01ms 0.99 mpas_ocean.NeighborhoodReduce.time_reduce('480km', 'median')
239k 239k 1.00 mpas_ocean.NeighborhoodReduce.track_peakmem_reduce('120km', 'mean')
245k 245k 1.00 mpas_ocean.NeighborhoodReduce.track_peakmem_reduce('120km', 'median')
19.3k 19.4k 1.00 mpas_ocean.NeighborhoodReduce.track_peakmem_reduce('480km', 'mean')
19.8k 19.9k 1.00 mpas_ocean.NeighborhoodReduce.track_peakmem_reduce('480km', 'median')
344±2μs 344±5μs 1.00 mpas_ocean.PointInPolygon.time_face_search_lonlat('120km')
335±3μs 324±2μs 0.97 mpas_ocean.PointInPolygon.time_face_search_lonlat('480km')
326±5μs 323±9μs 0.99 mpas_ocean.PointInPolygon.time_face_search_xyz('120km')
313±5μs 302±7μs 0.96 mpas_ocean.PointInPolygon.time_face_search_xyz('480km')
112±0.4ms 106±0.9ms 0.94 mpas_ocean.RemapDownsample.time_bilinear_remapping
13.4±0.04ms 13.6±1ms 1.01 mpas_ocean.RemapDownsample.time_inverse_distance_weighted_remapping
12.2±0.1ms 12.1±0.04ms 0.99 mpas_ocean.RemapDownsample.time_nearest_neighbor_remapping
1.01±0s 1.01±0s 1.00 mpas_ocean.RemapUpsample.time_bilinear_remapping
21.6±0.1ms 22.7±0.7ms 1.05 mpas_ocean.RemapUpsample.time_inverse_distance_weighted_remapping
9.58±0.07ms 9.73±0.8ms 1.01 mpas_ocean.RemapUpsample.time_nearest_neighbor_remapping
7.26±0.09ms 7.22±0.1ms 1.00 mpas_ocean.ZonalAverage.time_zonal_average('120km')
4.22±0.09ms 3.97±0.1ms 0.94 mpas_ocean.ZonalAverage.time_zonal_average('480km')
351M 347M 0.99 mpas_ocean.ZonalAveragePeakMem.track_peakmem_zonal_average('120km')
351M 330M 0.94 mpas_ocean.ZonalAveragePeakMem.track_peakmem_zonal_average('480km')
5.72±0.02ms 5.70±0.02ms 1.00 quad_hexagon.QuadHexagon.time_open_dataset
4.77±0.04ms 4.90±0.03ms 1.03 quad_hexagon.QuadHexagon.time_open_grid
408 408 1.00 quad_hexagon.QuadHexagon.track_nbytes_open_dataset
392 392 1.00 quad_hexagon.QuadHexagon.track_nbytes_open_grid
73.2k 72.9k 1.00 quad_hexagon.QuadHexagon.track_peakmem_open_dataset
72.3k 72.2k 1.00 quad_hexagon.QuadHexagon.track_peakmem_open_grid

@cmdupuis3 cmdupuis3 changed the title Cmd/bench install all extras More robust environment installs for ASV benchmarks Sep 21, 2026
@cmdupuis3
cmdupuis3 marked this pull request as ready for review September 21, 2026 22:27

@Sevans711 Sevans711 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks reasonable, and seeing that the benchmarks all ran successfully here, I'm happy to approve!

One tiny non-blocking comment: is there a reason to use actions/cache@v4 instead of actions/cache@v6 here? The asv-benchmarking.yml file uses v6.

@Sevans711 Sevans711 added the benchmarking Related to benchmarks, memory usage, and/or time profiling label Sep 22, 2026
@cmdupuis3

Copy link
Copy Markdown
Collaborator Author

@Sevans711 Looks like an oversight, updated to v6

@dylannelson dylannelson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, happy to see these changes. Thanks!

@cmdupuis3
cmdupuis3 merged commit ea641ce into UXARRAY:main Sep 23, 2026
17 checks passed
cmdupuis3 added a commit to cmdupuis3/uxarray that referenced this pull request Oct 6, 2026
Main now carries squash-merged versions of work this branch had unsquashed
(cached benchmark I/O UXARRAY#1700, lazy/cached neighborhood kernels UXARRAY#1708/UXARRAY#1768,
asv env installs UXARRAY#1776, connectivity peakmem benchmarks UXARRAY#1661). Conflicts
resolved in main's favor except where the branch adds sharding:

- asv-benchmarking-pr.yml: keep the sharded setup/shard/merge jobs; adopt
  UXARRAY#1776's asv env cache key (ci/environment.yml + asv.conf.json, no
  restore-keys) in both jobs; drop a duplicated CPU topology step.
- asv-benchmarking.yml: take main's unguarded fixture priming; apply the same
  env cache key fix.
- asv.conf.json: take main's matrix and comments; keep the branch's BLAS
  thread pins in env_nobuild.
- .gitignore: keep the per-shard config/results entries.
- bench_connectivity.py: accept deletion; superseded by connectivity.py.
- neighbors.py, _fixtures.py, _warmup.py, mpas_ocean.py, geometry_samebody*:
  take main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cmdupuis3 added a commit to cmdupuis3/uxarray that referenced this pull request Oct 6, 2026
cmd/bench_io is stale: its content landed on main as UXARRAY#1700 and has since been
superseded there (UXARRAY#1768 neighborhood kernels, UXARRAY#1776 asv env). This branch
already carries main, so every conflict resolves to the branch's side and the
tree is unchanged; the merge only records bench_io's history so PR #2 against
it is mergeable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cmdupuis3
cmdupuis3 deleted the cmd/bench-install-all-extras branch October 29, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarking Related to benchmarks, memory usage, and/or time profiling bug Something isn't working run-benchmark Run ASV benchmark workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optional dependencies causing certain benchmarks to fail

3 participants