Refactor holoviews backend: unify tap logic, time HoloMaps, and filter usage#754
Open
Refactor holoviews backend: unify tap logic, time HoloMaps, and filter usage#754
Conversation
…r usage - Extract duplicated PointerXY tap/hover handler from LineResult and HeatmapResult into _build_tap_plot() on the HoloviewResult base class - Extract duplicated over_time HoloMap iteration loop into _build_time_holomap() on the base class - Unify ScatterResult to use self.filter() instead of PlotFilter directly and add result_var parameter for consistency - Remove dead commented-out code (ScatterResult, LineResult, HeatmapResult) - Remove redundant to_heatmap_single() that bypassed the filter pipeline - Fix layout_plots() bug that called plot_callback twice per result var - Collapse redundant to_plot/to_X delegation: to_X is the implementation, to_plot is a thin alias (preserves MRO safety with BenchResult) - Net reduction of ~226 lines with no behavioral changes
Resolve conflicts keeping main's evolved holoviews helpers (_build_curve_overlay, _build_time_holomap with subsampling/aggregation, _mean_over_time, widget_location support) while layering on the PR's improvements: - Extract duplicated PointerXY tap handler into _build_tap_plot() on the HoloviewResult base class - Simplify to_plot() wrappers to thin **kwargs passthroughs - Replace to_heatmap_container_tap_ds / to_line_tap_ds with _to_heatmap_tap_ds / _to_line_tap_ds using _build_tap_plot - Refactor ScatterResult to use self.filter() instead of PlotFilter - Remove to_heatmap_single (bypassed the filter pipeline) - Remove dead commented-out code in ScatterResult - Fix layout_plots() calling plot_callback twice per result var - Remove tests for deleted to_heatmap_single method
Performance Report for
|
| Metric | Value |
|---|---|
| Total tests | 1204 |
| Total time | 105.31s |
| Mean | 0.0875s |
| Median | 0.0020s |
Top 10 slowest tests
| Test | Time (s) |
|---|---|
test.test_bench_examples.TestBenchExamples::test_example_meta |
21.045 |
test.test_over_time_save_perf::test_save_faster_without_aggregated_tab |
5.116 |
test.test_hash_persistent.TestCrossProcessDeterminism::test_hash_stable_across_two_processes[ResultBool] |
3.832 |
test.test_over_time_repeats.TestMaxSliderPoints::test_default_subsampling_caps_at_max |
3.124 |
test.test_generated_examples::test_generated_example[cartesian_animation/example_cartesian_animation.py] |
3.043 |
test.test_generated_examples::test_generated_example[result_types/result_image/example_result_image_to_video.py] |
2.802 |
test.test_bencher.TestBencher::test_combinations_over_time |
1.423 |
test.test_optuna_result.TestOptunaResult::test_collect_optuna_plots_with_repeats |
1.053 |
test.test_over_time_repeats.TestCurveResultOverTime::test_curve_over_time_no_repeats |
1.048 |
test.test_bencher.TestBencher::test_bench_cfg_hash |
0.943 |
Updated by Performance Tracking workflow
…efactor-holoviews-backend
Performance Report for
|
| Metric | Value |
|---|---|
| Total tests | 1204 |
| Total time | 103.99s |
| Mean | 0.0864s |
| Median | 0.0020s |
Top 10 slowest tests
| Test | Time (s) |
|---|---|
test.test_bench_examples.TestBenchExamples::test_example_meta |
20.884 |
test.test_over_time_save_perf::test_save_faster_without_aggregated_tab |
5.031 |
test.test_hash_persistent.TestCrossProcessDeterminism::test_hash_stable_across_two_processes[ResultBool] |
3.814 |
test.test_over_time_repeats.TestMaxSliderPoints::test_default_subsampling_caps_at_max |
3.081 |
test.test_generated_examples::test_generated_example[cartesian_animation/example_cartesian_animation.py] |
3.047 |
test.test_generated_examples::test_generated_example[result_types/result_image/example_result_image_to_video.py] |
2.802 |
test.test_bencher.TestBencher::test_combinations_over_time |
1.404 |
test.test_optuna_result.TestOptunaResult::test_collect_optuna_plots_with_repeats |
1.040 |
test.test_over_time_repeats.TestCurveResultOverTime::test_curve_over_time_no_repeats |
1.020 |
test.test_over_time_repeats.TestMaxSliderPoints::test_no_subsampling_when_below_default_max |
0.925 |
Updated by Performance Tracking workflow
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LineResultandHeatmapResultinto_build_tap_plot()on theHoloviewResultbase class_build_time_holomap()on the base classScatterResultto useself.filter()instead ofPlotFilterdirectly and addresult_varparameter for consistencyScatterResult,LineResult,HeatmapResult)to_heatmap_single()that bypassed the filter pipelinelayout_plots()bug that calledplot_callbacktwice per result varto_plot/to_Xdelegation:to_Xis the implementation,to_plotis a thin aliasBased on PR #750.
Test plan
🤖 Generated with Claude Code