Skip to content

Commit 9b60d5d

Browse files
authored
fix: resolve app_id collision when scheduling JobGroups with local executor (#404)
1 parent 7fc5426 commit 9b60d5d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

nemo_run/run/job.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def __post_init__(self):
278278
if len(executors) == 1:
279279
self.executors = executors * len(self.tasks)
280280

281-
self._dryrun_info: Optional[AppDryRunInfo] = None
281+
self._dryrun_infos: list[AppDryRunInfo] = []
282282

283283
@property
284284
def state(self) -> AppState:
@@ -371,7 +371,7 @@ def launch(
371371

372372
assert hasattr(self, "_executables") and self._executables
373373

374-
for executable, executor in self._executables:
374+
for idx, (executable, executor) in enumerate(self._executables):
375375
executor_str = get_executor_str(executor)
376376

377377
if dryrun:
@@ -385,8 +385,9 @@ def launch(
385385
log=self.tail_logs,
386386
runner=runner,
387387
)
388-
self._dryrun_info = dryrun_info
388+
self._dryrun_infos.append(dryrun_info)
389389
else:
390+
dryrun_info = self._dryrun_infos[idx] if idx < len(self._dryrun_infos) else None
390391
handle, status = launch(
391392
executable=executable,
392393
executor_name=executor_str,
@@ -395,7 +396,7 @@ def launch(
395396
wait=wait,
396397
log=self.tail_logs,
397398
runner=runner,
398-
dryrun_info=self._dryrun_info,
399+
dryrun_info=dryrun_info,
399400
)
400401
self.handles.append(handle)
401402
self.states.append(status.state if status else AppState.UNKNOWN)

0 commit comments

Comments
 (0)