Skip to content

Commit b24ac3d

Browse files
committed
Requested renaming + small fix to existing plugins
1 parent b98e86b commit b24ac3d

File tree

17 files changed

+37
-39
lines changed

17 files changed

+37
-39
lines changed

examples/energibridge-profiling/RunnerConfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def start_run(self, context: RunnerContext) -> None:
8585

8686
def start_measurement(self, context: RunnerContext) -> None:
8787
"""Perform any activity required for starting measurements."""
88-
sampling_interval = context.run_variation['sampling']
88+
sampling_interval = context.execute_run['sampling']
8989

9090
profiler_cmd = f'sudo energibridge \
9191
--interval {sampling_interval} \

examples/hello-world-fibonacci/RunnerConfig.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create_run_table_model(self) -> RunTableModel:
5858
factor2 = FactorModel("problem_size", [10, 20, 30])
5959
self.run_table_model = RunTableModel(
6060
factors=[factor1, factor2],
61-
exclude_variations=[
61+
exclude_combinations=[
6262
{factor2: [10]}, # all runs having treatment "10" will be excluded
6363
{factor1: ['iter'], factor2: [30]}, # all runs having the combination ("iter", 30) will be excluded
6464
],
@@ -85,9 +85,9 @@ def start_run(self, context: RunnerContext) -> None:
8585

8686
def start_measurement(self, context: RunnerContext) -> None:
8787
"""Perform any activity required for starting measurements."""
88-
fib_type = context.run_variation["fib_type"]
89-
problem_size = context.run_variation["problem_size"]
90-
88+
fib_type = context.execute_run["fib_type"]
89+
problem_size = context.execute_run["problem_size"]
90+
9191
self.profiler = EnergiBridge(target_program=f"python examples/hello-world-fibonacci/fibonacci_{fib_type}.py {problem_size}",
9292
out_file=context.run_dir / "energibridge.csv")
9393

examples/hello-world/RunnerConfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def create_run_table_model(self) -> RunTableModel:
5757
factor2 = FactorModel("example_factor2", [True, False])
5858
self.run_table_model = RunTableModel(
5959
factors=[factor1, factor2],
60-
exclude_variations=[
60+
exclude_combinations=[
6161
{factor1: ['example_treatment1']}, # all runs having treatment "example_treatment1" will be excluded
6262
{factor1: ['example_treatment2'], factor2: [True]}, # all runs having the combination ("example_treatment2", True) will be excluded
6363
],

examples/linux-powerjoular-profiling/RunnerConfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def start_run(self, context: RunnerContext) -> None:
7979
For example, starting the target system to measure.
8080
Activities after starting the run should also be performed here."""
8181

82-
cpu_limit = context.run_variation['cpu_limit']
82+
cpu_limit = context.execute_run['cpu_limit']
8383

8484
# start the target
8585
self.target = subprocess.Popen(['python', './primer.py'],

examples/linux-ps-profiling/RunnerConfig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def create_run_table_model(self) -> RunTableModel:
6262
pin_core_factor = FactorModel("pin_core" , [True, False])
6363
self.run_table_model = RunTableModel(
6464
factors = [cpu_limit_factor, pin_core_factor],
65-
exclude_variations = [
65+
exclude_combinations = [
6666
{cpu_limit_factor: [70], pin_core_factor: [False]} # all runs having the combination <'70', 'False'> will be excluded
6767
],
6868
data_columns=["avg_cpu", "avg_mem"]
@@ -86,8 +86,8 @@ def start_run(self, context: RunnerContext) -> None:
8686
For example, starting the target system to measure.
8787
Activities after starting the run should also be performed here."""
8888

89-
cpu_limit = context.run_variation['cpu_limit']
90-
pin_core = context.run_variation['pin_core']
89+
cpu_limit = context.execute_run['cpu_limit']
90+
pin_core = context.execute_run['pin_core']
9191

9292
# start the target
9393
self.target = subprocess.Popen(['./primer'],

examples/picocm3-profiling/RunnerConfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ def start_run(self, context: RunnerContext) -> None:
9292
For example, starting the target system to measure.
9393
Activities after starting the run should also be performed here."""
9494

95-
num_workers = context.run_variation['num_workers']
96-
write_size = context.run_variation['write_size']
95+
num_workers = context.execute_run['num_workers']
96+
write_size = context.execute_run['write_size']
9797

9898
# Start stress-ng
9999
stress_cmd = f"sudo stress-ng \

experiment-runner/ConfigValidator/Config/Models/RunTableModel.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
class RunTableModel:
1212
def __init__(self,
1313
factors: List[FactorModel],
14-
exclude_variations: List[Dict[FactorModel, List[SupportsStr]]] = None,
14+
exclude_combinations: List[Dict[FactorModel, List[SupportsStr]]] = None,
1515
repetitions: int = 1,
1616
data_columns: List[str] = None,
1717
shuffle: bool = False
1818
):
19-
if exclude_variations is None:
20-
exclude_variations = {}
19+
if exclude_combinations is None:
20+
exclude_combinations = {}
2121
if data_columns is None:
2222
data_columns = []
2323

@@ -31,7 +31,7 @@ def __init__(self,
3131
raise BaseError("Duplicate data column detected!")
3232

3333
self.__factors = factors
34-
self.__exclude_variations = exclude_variations
34+
self.__exclude_combinations = exclude_combinations
3535
self.__repetitions = repetitions
3636
self.__data_columns = data_columns
3737
self.__shuffle = shuffle
@@ -44,11 +44,11 @@ def get_data_columns(self) -> List[str]:
4444

4545
def generate_experiment_run_table(self) -> List[Dict]:
4646
def __filter_list(full_list: List[Tuple]):
47-
if len(self.__exclude_variations) == 0:
47+
if len(self.__exclude_combinations) == 0:
4848
return full_list
4949

5050
to_remove_indices = []
51-
for exclusion in self.__exclude_variations:
51+
for exclusion in self.__exclude_combinations:
5252
# Construct the exclusion tuples
5353
list_of_lists = []
5454
indexes = []

experiment-runner/ConfigValidator/Config/Models/RunnerContext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
class RunnerContext:
55

6-
def __init__(self, run_variation: dict, run_nr: int, run_dir: Path):
7-
self.run_variation = run_variation
6+
def __init__(self, execute_run: dict, run_nr: int, run_dir: Path):
7+
self.execute_run = execute_run
88
self.run_nr = run_nr
99
self.run_dir = run_dir

experiment-runner/ConfigValidator/Config/RunnerConfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create_run_table_model(self) -> RunTableModel:
5858
factor2 = FactorModel("example_factor2", [True, False])
5959
self.run_table_model = RunTableModel(
6060
factors=[factor1, factor2],
61-
exclude_variations=[
61+
exclude_combinations=[
6262
{factor1: ['example_treatment1']}, # all runs having treatment "example_treatment1" will be excluded
6363
{factor1: ['example_treatment2'], factor2: [True]}, # all runs having the combination ("example_treatment2", True) will be excluded
6464
],

experiment-runner/ExperimentOrchestrator/Experiment/ExperimentController.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, config: RunnerConfig, metadata: Metadata):
5656
existing_run_table = self.csv_data_manager.read_run_table()
5757

5858
# First sanity check. If there is no "TODO" in the __done column, simply abort.
59-
todo_run_found = any([variation['__done'] != RunProgress.DONE for variation in existing_run_table])
59+
todo_run_found = any([current_run['__done'] != RunProgress.DONE for current_run in existing_run_table])
6060
if not todo_run_found:
6161
raise BaseError("The experiment was restarted, but all runs have already been completed.")
6262

@@ -125,14 +125,14 @@ def do_experiment(self):
125125
EventSubscriptionController.raise_event(RunnerEvents.BEFORE_EXPERIMENT)
126126

127127
# -- Experiment
128-
for variation in self.run_table:
129-
if variation['__done'] == RunProgress.DONE:
128+
for current_run in self.run_table:
129+
if current_run['__done'] == RunProgress.DONE:
130130
continue
131131

132132
output.console_log_WARNING("Calling before_run config hook")
133133
EventSubscriptionController.raise_event(RunnerEvents.BEFORE_RUN)
134134

135-
run_controller = RunController(variation, self.config, (self.run_table.index(variation) + 1), len(self.run_table))
135+
run_controller = RunController(current_run, self.config, (self.run_table.index(current_run) + 1), len(self.run_table))
136136
perform_run = multiprocessing.Process(
137137
target=run_controller.do_run,
138138
args=[]

0 commit comments

Comments
 (0)