-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjob_2_4.py
40 lines (30 loc) · 1.19 KB
/
job_2_4.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from pathlib import Path
from framework.cli.job import SensorimotorPropagationJob, BufferedSensorimotorPropagationJobSpec
logger_format = '%(asctime)s | %(levelname)s | %(module)s | %(message)s'
logger_dateformat = "%Y-%m-%d %H:%M:%S"
class Job_2_4(SensorimotorPropagationJob):
# max_sphere_radius -> RAM/G
RAM = {
1.00: 5,
1.50: 30,
1.98: 55, # 198 is the largest min edge length, so the threshold below which the graph becomes disconnected
2.00: 60,
2.50: 120,
}
def __init__(self, spec: BufferedSensorimotorPropagationJobSpec):
super().__init__(
script_number="2_4",
script_name="2_4_sensorimotor_tsp.py",
spec=spec)
@property
def _ram_requirement_g(self):
assert isinstance(self.spec, BufferedSensorimotorPropagationJobSpec)
return self.RAM[self.spec.max_radius]
if __name__ == '__main__':
jobs = [
Job_2_4(s)
for s in BufferedSensorimotorPropagationJobSpec.load_multiple(
Path(Path(__file__).parent, "job_specifications/job_journal_paper_sensorimotor.yaml"))
]
for job in jobs:
job.run_locally(extra_arguments=["--use_prepruned"])