From a9a7dfbc6b51a65b3040d09396a01556597903e9 Mon Sep 17 00:00:00 2001 From: Jesse Hines Date: Mon, 25 Aug 2025 13:40:57 -0400 Subject: [PATCH 1/4] Rename tests to be unique --- tests/systems/test_main_basic_run.py | 2 +- tests/systems/test_main_cooling_run.py | 2 +- tests/systems/test_main_cooling_uncertainty_run.py | 2 +- tests/systems/test_main_network_withdata_run.py | 2 +- tests/systems/test_main_noui_run.py | 2 +- tests/systems/test_main_time_delta_sub_second_run.py | 2 +- tests/systems/test_main_time_ff_delta_run.py | 2 +- tests/systems/test_multi_part_sim_basic_run.py | 2 +- tests/systems/test_multi_part_sim_network_run.py | 2 +- tests/systems/test_multi_part_sim_withdata_run.py | 2 +- tests/systems/test_telemetry_withdata_run.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/systems/test_main_basic_run.py b/tests/systems/test_main_basic_run.py index 8993949..8e31952 100644 --- a/tests/systems/test_main_basic_run.py +++ b/tests/systems/test_main_basic_run.py @@ -11,7 +11,7 @@ pytestmark = [ ] -def test_main_run(system, system_config,random_id): +def test_main_basic_run(system, system_config,random_id): if not system_config.get("main", False): pytest.skip(f"{system} does not support basic main run.") diff --git a/tests/systems/test_main_cooling_run.py b/tests/systems/test_main_cooling_run.py index 79c10b7..1411d8c 100644 --- a/tests/systems/test_main_cooling_run.py +++ b/tests/systems/test_main_cooling_run.py @@ -12,7 +12,7 @@ pytestmark = [ ] -def test_main_run(system, system_config, random_id): +def test_main_cooling_run(system, system_config, random_id): if not system_config.get("cooling", False): pytest.skip(f"{system} does not support cooling.") diff --git a/tests/systems/test_main_cooling_uncertainty_run.py b/tests/systems/test_main_cooling_uncertainty_run.py index 2515325..2491d7a 100644 --- a/tests/systems/test_main_cooling_uncertainty_run.py +++ b/tests/systems/test_main_cooling_uncertainty_run.py @@ -12,7 +12,7 @@ pytestmark = [ ] -def test_main_run(request, system, system_config, random_id): +def test_main_cooling_uncertainty_run(request, system, system_config, random_id): print(f"Markexpr: {request.config.option.markexpr}") if not system_config.get("uncertainty", False) or not system_config.get("cooling", False): pytest.skip(f"{system} does not support cooling or uncertainty.") diff --git a/tests/systems/test_main_network_withdata_run.py b/tests/systems/test_main_network_withdata_run.py index 82c30de..31db05e 100644 --- a/tests/systems/test_main_network_withdata_run.py +++ b/tests/systems/test_main_network_withdata_run.py @@ -14,7 +14,7 @@ pytestmark = [ ] -def test_main_run(system, system_config, system_file, random_id): +def test_main_network_withdata_run(system, system_config, system_file, random_id): if not system_config.get("net", False): pytest.skip(f"{system} does not support basic net run.") diff --git a/tests/systems/test_main_noui_run.py b/tests/systems/test_main_noui_run.py index 50ca5b0..5b12b55 100644 --- a/tests/systems/test_main_noui_run.py +++ b/tests/systems/test_main_noui_run.py @@ -11,7 +11,7 @@ pytestmark = [ ] -def test_main_run(system, system_config, random_id): +def test_main_noui_run(system, system_config, random_id): if not system_config.get("main", False): pytest.skip(f"{system} does not support basic main run.") diff --git a/tests/systems/test_main_time_delta_sub_second_run.py b/tests/systems/test_main_time_delta_sub_second_run.py index 459d295..9276011 100644 --- a/tests/systems/test_main_time_delta_sub_second_run.py +++ b/tests/systems/test_main_time_delta_sub_second_run.py @@ -23,7 +23,7 @@ pytestmark = [ ("100ms", "1ms"), ("100ms", "1s"), ], ids=["1ds","3ds","1cs","1ms","1cs-for-10ds","1ms-for-10cs","1ms-for-100ms","1s-for-100ms"]) -def test_main_time_delta_run(system, system_config, time_arg, tdelta_arg, random_id): +def test_main_time_delta_sub_second_run(system, system_config, time_arg, tdelta_arg, random_id): if not system_config.get("time_delta", False): pytest.skip(f"{system} does not support time_delta run.") diff --git a/tests/systems/test_main_time_ff_delta_run.py b/tests/systems/test_main_time_ff_delta_run.py index d3ef963..a136615 100644 --- a/tests/systems/test_main_time_ff_delta_run.py +++ b/tests/systems/test_main_time_ff_delta_run.py @@ -21,7 +21,7 @@ pytestmark = [ ("10h", "3h", "1h"), pytest.param("3d", "1d", "1d", marks=pytest.mark.long, id="1d (long)"), ], ids=["1","1s","10s","1m","1h","3h","1d"]) -def test_main_time_delta_run(system, system_config, time_arg, tdelta_arg, +def test_main_time_ff_delta_run(system, system_config, time_arg, tdelta_arg, ff_arg, random_id): if not system_config.get("time_delta", False): pytest.skip(f"{system} does not support time_delta run.") diff --git a/tests/systems/test_multi_part_sim_basic_run.py b/tests/systems/test_multi_part_sim_basic_run.py index 9b9db13..e8e64e9 100644 --- a/tests/systems/test_multi_part_sim_basic_run.py +++ b/tests/systems/test_multi_part_sim_basic_run.py @@ -11,7 +11,7 @@ pytestmark = [ ] -def test_multi_part_sim_run(system, system_config): +def test_multi_part_sim_basic_run(system, system_config): if not system_config.get("multi-part-sim", False): pytest.skip(f"{system} does not support basic multi-part-sim run.") diff --git a/tests/systems/test_multi_part_sim_network_run.py b/tests/systems/test_multi_part_sim_network_run.py index 1871725..3f53e99 100644 --- a/tests/systems/test_multi_part_sim_network_run.py +++ b/tests/systems/test_multi_part_sim_network_run.py @@ -11,7 +11,7 @@ pytestmark = [ ] -def test_multi_part_sim_run(system, system_config, random_id): +def test_multi_part_sim_network_run(system, system_config, random_id): if not system_config.get("multi-part-sim", False): pytest.skip(f"{system} does not support basic multi-part-sim run.") diff --git a/tests/systems/test_multi_part_sim_withdata_run.py b/tests/systems/test_multi_part_sim_withdata_run.py index f93e07e..f862aca 100644 --- a/tests/systems/test_multi_part_sim_withdata_run.py +++ b/tests/systems/test_multi_part_sim_withdata_run.py @@ -12,7 +12,7 @@ pytestmark = [ ] -def test_multi_part_sim_run(system, system_config, system_file): +def test_multi_part_sim_withdata_run(system, system_config, system_file): if not system_config.get("multi-part-sim", False): pytest.skip(f"{system} does not support basic multi-part-sim run even without data.") if not system_config.get("withdata", False): diff --git a/tests/systems/test_telemetry_withdata_run.py b/tests/systems/test_telemetry_withdata_run.py index cac6104..415fbfe 100644 --- a/tests/systems/test_telemetry_withdata_run.py +++ b/tests/systems/test_telemetry_withdata_run.py @@ -11,7 +11,7 @@ pytestmark = [ ] -def test_main_withdata_run(system, system_config, system_file, random_id): +def test_telemetry_main_withdata_run(system, system_config, system_file, random_id): if not system_config.get("telemetry", False): pytest.skip(f"{system} does not support telemetry run.") if not system_config.get("withdata", False): -- GitLab From ecf4cbd67116ae211529d85cebb0e8b19eaa5b5e Mon Sep 17 00:00:00 2001 From: Jesse Hines Date: Mon, 25 Aug 2025 14:04:34 -0400 Subject: [PATCH 2/4] Fix replay param --- tests/systems/test_main_withdata_run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/systems/test_main_withdata_run.py b/tests/systems/test_main_withdata_run.py index 928d149..299d34c 100644 --- a/tests/systems/test_main_withdata_run.py +++ b/tests/systems/test_main_withdata_run.py @@ -28,7 +28,7 @@ def test_main_withdata_run(system, system_config, system_file, random_id): "python", "main.py", "--time", "1m", "--system", system, - "-f", ','.join(file_list), + "-f", ','.join(str(p) for p in file_list), "-o", random_id ], capture_output=True, text=True, stdin=subprocess.DEVNULL) assert result.returncode == 0, f"Failed on {system}: {result.stderr}" -- GitLab From af5c23eb8eee070f61ec7abb641234093b0ce265 Mon Sep 17 00:00:00 2001 From: Jesse Hines Date: Mon, 25 Aug 2025 14:22:50 -0400 Subject: [PATCH 3/4] Fix telemetry ignoring output arg --- raps/telemetry.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/raps/telemetry.py b/raps/telemetry.py index c6815cd..f485daa 100644 --- a/raps/telemetry.py +++ b/raps/telemetry.py @@ -70,10 +70,18 @@ class Telemetry: self.system = kwargs.get('system') self.config = kwargs.get('config') outname = kwargs.get('output') - if outname is None or outname == "": - self.dirname = create_casename() - else: + if outname: self.dirname = outname + elif kwargs.get("replay"): + # Try to extract date from given name to use as case directory + matched_date = re.search(r"\d{4}-\d{2}-\d{2}", kwargs['replay'][0]) + if matched_date: + self.dirname = f"sim={matched_date.group(0)}" + else: + self.dirname = create_casename() + else: + self.dirname = create_casename() + try: self.dataloader = importlib.import_module(f"raps.dataloaders.{self.system}", package=__package__) except ImportError as e: @@ -287,15 +295,6 @@ class Telemetry: break if trigger_custom_dataloader: # custom data loader - # Try to extract date from given name to use as case directory - matched_date = re.search(r"\d{4}-\d{2}-\d{2}", args.replay[0]) - if matched_date: - extracted_date = matched_date.group(0) - self.dirname = "sim=" + extracted_date - else: - extracted_date = f"Date not found, dirname is: {self.dirname}" - print(extracted_date) - print(*args.replay) try: jobs, timestep_start_from_data, timestep_end_from_data = self.load_data(args.replay) -- GitLab From d22b10dd3cc8adecc8513151cc862d0eda0c94ca Mon Sep 17 00:00:00 2001 From: Jesse Hines Date: Mon, 25 Aug 2025 14:27:41 -0400 Subject: [PATCH 4/4] Fix mit_supercloud data loader --- raps/dataloaders/mit_supercloud/loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raps/dataloaders/mit_supercloud/loader.py b/raps/dataloaders/mit_supercloud/loader.py index cc0c1dc..6057210 100644 --- a/raps/dataloaders/mit_supercloud/loader.py +++ b/raps/dataloaders/mit_supercloud/loader.py @@ -593,7 +593,7 @@ def load_data(local_dataset_path, **kwargs): time_limit=rec.get("time_limit", 0), start_time=t0 - start_ts, end_time=t1 - start_ts, - wall_time=max(0, t1-t0), + expected_run_time=max(0, t1-t0), trace_time=len(cpu_tr)*quanta, trace_start_time=0, trace_end_time=len(cpu_tr)*quanta, -- GitLab