Skip to content

Commit a6c472c

Browse files
author
Al Rigazzi
committed
Remove proxyable command
1 parent 9f9fd67 commit a6c472c

4 files changed

Lines changed: 3 additions & 28 deletions

File tree

smartsim/_core/launcher/step/alpsStep.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from ....error import AllocationError
3333
from ....log import get_logger
3434
from ....settings import AprunSettings, RunSettings, Singularity
35-
from .step import Step, proxyable_launch_cmd
35+
from .step import Step
3636

3737
logger = get_logger(__name__)
3838

@@ -57,7 +57,6 @@ def _get_mpmd(self) -> t.List[RunSettings]:
5757
"""
5858
return self.run_settings.mpmd
5959

60-
@proxyable_launch_cmd
6160
def get_launch_cmd(self) -> t.List[str]:
6261
"""Get the command to launch this step
6362

smartsim/_core/launcher/step/localStep.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
from ....settings import Singularity
3232
from ....settings.base import RunSettings
33-
from .step import Step, proxyable_launch_cmd
33+
from .step import Step
3434

3535

3636
class LocalStep(Step):
@@ -43,7 +43,6 @@ def __init__(self, name: str, cwd: str, run_settings: RunSettings):
4343
def env(self) -> t.Dict[str, str]:
4444
return self._env
4545

46-
@proxyable_launch_cmd
4746
def get_launch_cmd(self) -> t.List[str]:
4847
cmd = []
4948

smartsim/_core/launcher/step/mpiStep.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from ....log import get_logger
3434
from ....settings import MpiexecSettings, MpirunSettings, OrterunSettings
3535
from ....settings.base import RunSettings
36-
from .step import Step, proxyable_launch_cmd
36+
from .step import Step
3737

3838
logger = get_logger(__name__)
3939

@@ -56,7 +56,6 @@ def __init__(self, name: str, cwd: str, run_settings: RunSettings) -> None:
5656

5757
_supported_launchers = ["PBS", "SLURM", "LSB", "SGE"]
5858

59-
@proxyable_launch_cmd
6059
def get_launch_cmd(self) -> t.List[str]:
6160
"""Get the command to launch this step
6261

smartsim/_core/launcher/step/step.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from __future__ import annotations
2828

2929
import copy
30-
import functools
3130
import os.path as osp
3231
import pathlib
3332
import time
@@ -127,24 +126,3 @@ def add_to_batch(self, step: Step) -> None:
127126
:param step: a job step instance e.g. SrunStep
128127
"""
129128
raise SmartSimError("add_to_batch not implemented for this step type")
130-
131-
132-
_StepT = t.TypeVar("_StepT", bound=Step)
133-
134-
135-
def proxyable_launch_cmd(
136-
fn: t.Callable[[_StepT], t.List[str]], /
137-
) -> t.Callable[[_StepT], t.List[str]]:
138-
@functools.wraps(fn)
139-
def _get_launch_cmd(self: _StepT) -> t.List[str]:
140-
"""
141-
Generate a launch command that executes the `JobStep` directly.
142-
143-
Steps implementing `get_launch_cmd` and decorated with
144-
`proxyable_launch_cmd` support direct launching."""
145-
original_cmd_list = fn(self)
146-
147-
# Always use direct launch
148-
return original_cmd_list
149-
150-
return _get_launch_cmd

0 commit comments

Comments
 (0)