Skip to content

Commit

Permalink
Disable incompatible benchmarks for cloud exp
Browse files Browse the repository at this point in the history
  • Loading branch information
DonggeLiu committed Aug 16, 2024
1 parent e72f5bb commit 958a2f6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion experiment/run_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,18 @@ def get_git_hash(allow_uncommitted_changes):
return ''


def _filter_incompatible_benchmarks(config: dict,
benchmarks: list[str]) -> list[str]:
"""Removes benchmarks that are incompatible with build/run environment."""
if config['local_experiment']:
return benchmarks
if 'openh264_decoder_fuzzer' in benchmarks:
benchmarks.remove('openh264_decoder_fuzzer')
if 'stb_stbi_read_fuzzer' in benchmarks:
benchmarks.remove('stb_stbi_read_fuzzer')
return benchmarks


def start_experiment( # pylint: disable=too-many-arguments
experiment_name: str,
config_filename: str,
Expand All @@ -322,7 +334,7 @@ def start_experiment( # pylint: disable=too-many-arguments

config = read_and_validate_experiment_config(config_filename)
config['fuzzers'] = fuzzers
config['benchmarks'] = benchmarks
config['benchmarks'] = _filter_incompatible_benchmarks(config, benchmarks)
config['experiment'] = experiment_name
config['git_hash'] = get_git_hash(allow_uncommitted_changes)
config['no_seeds'] = no_seeds
Expand Down

0 comments on commit 958a2f6

Please sign in to comment.