diff --git a/raps/dataloaders/mit_supercloud/loader.py b/raps/dataloaders/mit_supercloud/loader.py index cc0c1dc41c9b3e88707c992bd4557576c01ba49c..605721084c6585a57d2494cca4756783530b64fc 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, diff --git a/raps/telemetry.py b/raps/telemetry.py index c6815cdd92d064862e264f303ff2344d2624e2b1..f485daa9e9b68965bd80fac79e5e7943a2d7b6d9 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) diff --git a/tests/systems/test_main_basic_run.py b/tests/systems/test_main_basic_run.py index 8993949d1482cfa01495888ef0205b6f33452cbc..8e319521908739a74032b4baec387c70158a2687 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 79c10b787b5a07dcc1568170e1d66f63ae729020..1411d8cbbb1189f676fd2a7a78fb134ccf5c3932 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 25153253170427bf6856a8fe4050d6bc0c7d6579..2491d7a509109beb7c879eabd75aced86a37a2e0 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 82c30de7493c93f356ceab2302cf111b658dd3c2..31db05ebdbb93dd825b3e118f384a4c464803dfd 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 50ca5b0cc95d4e71018f0c565d59f6c1dca47b0d..5b12b55256ff5d7b2bbbdf42afc86a30d87f65da 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 459d295318cb55e994f57fa546c088098c60acc8..9276011296d76ba3bc9da9d2cd219e38d69e6a40 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 d3ef9632eb40e260af9bdc5dcb44d1789eb1950d..a1366158543626d0bb2b0d8bb546e4a4d084164e 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_main_withdata_run.py b/tests/systems/test_main_withdata_run.py index 928d1496aa1f476390a744f3495f6da219d96e21..299d34cbfd7e58888102ce6f218daad9c62b039b 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}" diff --git a/tests/systems/test_multi_part_sim_basic_run.py b/tests/systems/test_multi_part_sim_basic_run.py index 9b9db130fea6b1610f09b73921fbdef1f9564eb3..e8e64e95bc653c01884354de84f8ef70d5a95d77 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 1871725120b1d46b261d94c534abc7e1e87f241d..3f53e99c656b28b15ed04fb0848f11e4be922587 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 f93e07ed8f16ed281f55757dcad4f0da91a027f6..f862acacd7cfd768aa853b813f034d132ca6ed48 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 cac610468434a9433c6143e476208db4be98bcfc..415fbfe011562a46c8333edefcc1ad9b8894beef 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):