Skip to content

Conversation

@fjwillemsen
Copy link
Collaborator

This PR introduces substantial updates to further standardize and extend this software for evaluation of auto-tuning algorithms, in particular by the following:

  • Visualization and reporting of results are modular, scores can be obtained programmatically using report_experiments.
  • New benchmark_hub repository and submodule hosting brute-forced benchmarking resources.
  • Extended and improved visualizations:
    • Heatmaps for comparison per search space and / or over time
    • Head-to-head plots for direct comparisons on practical impact (beta)
    • New color handling based on existing color maps
  • Improved Experiments Schema:
    • Strategy grouping and coloring
    • Extended visualization settings such as visual minima and maxima
  • Further improvements:
    • Switched to NumPy 2.0
    • Python 3.12 support
    • Auto-retry on missing data, smart cutoff handling, better error messages
    • Execution Engine Enhancements
    • Time-based cutoffs and runtime conversion
    • Flexible support for optimization direction, cutoffs, objectives, and valid result thresholds
    • Reformatted code with Ruff, improved test coverage

jhozzova and others added 30 commits August 20, 2024 11:56
Integration of the new schema and KTT support
@fjwillemsen fjwillemsen requested a review from Copilot July 7, 2025 15:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR standardizes NaN usage in tests, refactors integration test paths and parameterization, and extends visualization/reporting with richer schema and format support.

  • Updated tests to use consistent np.nan, improved file path management, and enhanced parametric plotting tests.
  • Refactored core modules (runner, searchspace_statistics, visualize_experiments, report_experiments) to support T4 format, JSON schema validation, and new visualization scopes (heatmaps, head-to-head).
  • Added comprehensive JSON schemas (experiments.json, T4.json) and default experiment definitions.

Reviewed Changes

Copilot reviewed 51 out of 53 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/autotuning_methodology/unit/test_curves.py Standardize NaN literal usage in unit tests
tests/autotuning_methodology/integration/test_visualization.py Parametrize and enhance integration tests for plots
tests/autotuning_methodology/integration/test_run_experiment.py Refactor experiment path setup and CLI argument tests
tests/autotuning_methodology/integration/test_report.py Switch from get_strategies to get_experimental_groups
src/autotuning_methodology/visualize_experiments.py Extend visualization settings and plotting logic
src/autotuning_methodology/validators.py Add JSON schema validation helpers
src/autotuning_methodology/searchspace_statistics.py Support T4 format loading and time-unit conversion
src/autotuning_methodology/runner.py Refactor tuning interfaces and fix path logic
src/autotuning_methodology/report_experiments.py Update aggregation key to use application names
src/autotuning_methodology/formats_interface.py Introduce T4 format loader
src/autotuning_methodology/schemas/experiments.json Major schema update for experiment setup files
src/autotuning_methodology/schemas/T4.json Add T4 results schema
src/autotuning_methodology/experiments_defaults.json Add default experiment configuration
Comments suppressed due to low confidence (1)

tests/autotuning_methodology/integration/test_run_experiment.py:64

  • In teardown_module, _remove_dir asserts experiment_path exists but it may not have been created, causing teardown failures. Guard with if experiment_path.exists() or pass ignore_permission_error=True.
    assert mockfiles_path_source.exists()

Comment on lines 89 to +92
for plot_filepath in plot_filepaths:
assert plot_filepath.exists(), f"{plot_filepath} does not exist"
assert (
plot_filepath.exists()
), f"{plot_filepath} does not exist, files in folder: {[f.name for f in plot_filepath.parent.iterdir() if f.is_file()]}"
Copy link

Copilot AI Jul 7, 2025

Choose a reason for hiding this comment

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

The inner loop overrides the parameterized plot_filepath and tests all files each time. Remove the loop and assert existence only on the passed-in plot_filepath.

Copilot uses AI. Check for mistakes.
experiment_filepath = str(experiment_filepath_test)
experiment = get_experiment(experiment_filepath)
strategies = get_strategies(experiment)
strategies = get_experimental_groups(experiment) # TODO fix this test that used to use get_strategies
Copy link

Copilot AI Jul 7, 2025

Choose a reason for hiding this comment

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

[nitpick] There's a stale TODO indicating this test needs fixing. Either implement the intended behavior or remove the comment to keep tests up to date.

Suggested change
strategies = get_experimental_groups(experiment) # TODO fix this test that used to use get_strategies
strategies = get_experimental_groups(experiment)

Copilot uses AI. Check for mistakes.
Comment on lines 89 to 90
filename_results: str = f"{folder}../last_run/_tune_configuration-results.json",
filename_metadata: str = f"{folder}../last_run/_tune_configuration-metadata.json",
Copy link

Copilot AI Jul 7, 2025

Choose a reason for hiding this comment

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

The default path literal is missing a path separator before ... It should be f"{folder}/../last_run/..." to resolve the directory correctly.

Suggested change
filename_results: str = f"{folder}../last_run/_tune_configuration-results.json",
filename_metadata: str = f"{folder}../last_run/_tune_configuration-metadata.json",
filename_results: str = str(folder / "../last_run/_tune_configuration-results.json"),
filename_metadata: str = str(folder / "../last_run/_tune_configuration-metadata.json"),

Copilot uses AI. Check for mistakes.
@fjwillemsen fjwillemsen marked this pull request as ready for review September 3, 2025 10:31
@fjwillemsen fjwillemsen merged commit 5c6cf6c into main Sep 3, 2025
4 checks passed
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.

3 participants