Skip to content

Commit b984812

Browse files
committed
Add reservation_config support to LeptonExecutor
- Add reservation_config field to LeptonExecutor dataclass - Pass reservation_config from executor to job specification - Enable users to configure reservation settings for Lepton jobs Signed-off-by: ansjindal <[email protected]>
1 parent f00ef04 commit b984812

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nemo_run/core/execution/lepton.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class LeptonExecutor(Executor):
5555
lepton_job_dir: str = field(init=False, default="")
5656
custom_spec: dict[str, Any] = field(default_factory=dict)
5757
pre_launch_commands: list[str] = field(default_factory=list) # Custom commands before launch
58+
reservation_config: Optional[dict[str, Any]] = None
5859

5960
def stop_job(self, job_id: str):
6061
"""
@@ -232,7 +233,7 @@ def create_lepton_job(self, name: str):
232233
log=None,
233234
queue_config=None,
234235
stopped=None,
235-
reservation_config=None,
236+
reservation_config=self.reservation_config,
236237
)
237238
job = LeptonJob(spec=job_spec, metadata=Metadata(id=name))
238239

0 commit comments

Comments
 (0)