Loading raps/sim_config.py +16 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,10 @@ class SimConfig(RAPSBaseModel, abc.ABC): Downtime length. Can pass a string like 123, 27m, 3h, 7d """ @cached_property def urgent_max_runtime_int(self) -> int: return int(self.urgent_max_runtime / self.time_unit) @cached_property def downtime_first_int(self) -> int | None: return None if self.downtime_first is None else int(self.downtime_first / self.time_unit) Loading @@ -256,6 +260,14 @@ class SimConfig(RAPSBaseModel, abc.ABC): return None if self.downtime_length is None else int(self.downtime_length / self.time_unit) # Continous Job Generation urgent_reserved_nodes: int = 64 """ Number of nodes reserved exclusively for the urgent job queue """ urgent_max_runtime: SmartTimedelta = timedelta(days=2) """ Maximum allowed runtime for urgent jobs. Jobs exceeding this are demoted to the normal queue. Can pass a string like 123, 27m, 3h, 7d """ continuous_job_generation: bool = False """ Activate continuous job generation """ maxqueue: int = 50 Loading @@ -274,6 +286,7 @@ class SimConfig(RAPSBaseModel, abc.ABC): td_fields = [ "time_delta", "time", "fastforward", "downtime_first", "downtime_interval", "downtime_length", "urgent_max_runtime", ] # infer time unit from other timedelta fields if it wasn't set explicitly if data.get('time_unit') is None: Loading Loading @@ -312,6 +325,7 @@ class SimConfig(RAPSBaseModel, abc.ABC): td_fields = [ "time_delta", "time", "fastforward", "downtime_first", "downtime_interval", "downtime_length", "urgent_max_runtime", ] # Check time fields are divisible by time_unit. for field in td_fields: Loading Loading @@ -509,4 +523,6 @@ SIM_SHORTCUTS = { "plot": "p", "replay": "f", "workload": "w", "urgent-reserved-nodes": "urn", "urgent-max-runtime": "umr", } Loading
raps/sim_config.py +16 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,10 @@ class SimConfig(RAPSBaseModel, abc.ABC): Downtime length. Can pass a string like 123, 27m, 3h, 7d """ @cached_property def urgent_max_runtime_int(self) -> int: return int(self.urgent_max_runtime / self.time_unit) @cached_property def downtime_first_int(self) -> int | None: return None if self.downtime_first is None else int(self.downtime_first / self.time_unit) Loading @@ -256,6 +260,14 @@ class SimConfig(RAPSBaseModel, abc.ABC): return None if self.downtime_length is None else int(self.downtime_length / self.time_unit) # Continous Job Generation urgent_reserved_nodes: int = 64 """ Number of nodes reserved exclusively for the urgent job queue """ urgent_max_runtime: SmartTimedelta = timedelta(days=2) """ Maximum allowed runtime for urgent jobs. Jobs exceeding this are demoted to the normal queue. Can pass a string like 123, 27m, 3h, 7d """ continuous_job_generation: bool = False """ Activate continuous job generation """ maxqueue: int = 50 Loading @@ -274,6 +286,7 @@ class SimConfig(RAPSBaseModel, abc.ABC): td_fields = [ "time_delta", "time", "fastforward", "downtime_first", "downtime_interval", "downtime_length", "urgent_max_runtime", ] # infer time unit from other timedelta fields if it wasn't set explicitly if data.get('time_unit') is None: Loading Loading @@ -312,6 +325,7 @@ class SimConfig(RAPSBaseModel, abc.ABC): td_fields = [ "time_delta", "time", "fastforward", "downtime_first", "downtime_interval", "downtime_length", "urgent_max_runtime", ] # Check time fields are divisible by time_unit. for field in td_fields: Loading Loading @@ -509,4 +523,6 @@ SIM_SHORTCUTS = { "plot": "p", "replay": "f", "workload": "w", "urgent-reserved-nodes": "urn", "urgent-max-runtime": "umr", }