Support binding agent to core
This commit is contained in:
parent
ed5081f1b8
commit
695046a123
@ -21,6 +21,7 @@ scheduler:
|
|||||||
repetitions: 3
|
repetitions: 3
|
||||||
agents_per_job: 3
|
agents_per_job: 3
|
||||||
reps_per_agent: 1
|
reps_per_agent: 1
|
||||||
|
bind_agent_to_core: True
|
||||||
|
|
||||||
wandb:
|
wandb:
|
||||||
project: '{config[name]}'
|
project: '{config[name]}'
|
||||||
|
@ -294,6 +294,9 @@ class Slate():
|
|||||||
|
|
||||||
Runner = self.runners[runnerName]
|
Runner = self.runners[runnerName]
|
||||||
|
|
||||||
|
if orig_config.consume('scheduler.bind_agent_to_core', False):
|
||||||
|
os.sched_setaffinity(0, [p_ind % os.cpu_count()])
|
||||||
|
|
||||||
for r in rep_ids:
|
for r in rep_ids:
|
||||||
self.run_id = r
|
self.run_id = r
|
||||||
config = copy.deepcopy(orig_config)
|
config = copy.deepcopy(orig_config)
|
||||||
@ -324,6 +327,9 @@ class Slate():
|
|||||||
|
|
||||||
Runner = self.runners[runnerName]
|
Runner = self.runners[runnerName]
|
||||||
|
|
||||||
|
if orig_config.consume('scheduler.bind_agent_to_core', False):
|
||||||
|
os.sched_setaffinity(0, [p_ind % os.cpu_count()])
|
||||||
|
|
||||||
with wandb.init(
|
with wandb.init(
|
||||||
project=project,
|
project=project,
|
||||||
reinit=self.consume(wandbC, 'reinit', DEFAULT_REINIT),
|
reinit=self.consume(wandbC, 'reinit', DEFAULT_REINIT),
|
||||||
|
Loading…
Reference in New Issue
Block a user