Skip to content

Commit

Permalink
Make CI happy
Browse files Browse the repository at this point in the history
  • Loading branch information
MattToast committed Oct 10, 2024
1 parent 0f0dda9 commit 34334fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smartsim/_core/launcher_/slurm/slurm_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from smartsim.log import get_logger
from smartsim.status import JobStatus
from smartsim.types import LaunchedJobID
from typing_extensions import TypeAlias

if t.TYPE_CHECKING:
from smartsim.experiment import Experiment
Expand Down Expand Up @@ -118,7 +119,7 @@ def start(self) -> None:
)


_SlurmCommandType: t.TypeAlias = SrunCommand
_SlurmCommandType: TypeAlias = SrunCommand
"""Types that are capable of being launched by the `SlurmLauncher`"""


Expand Down
2 changes: 2 additions & 0 deletions tests/test_slurm_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def test_slurm_launcher_can_start_a_command(monkeypatch, make_srun_command):
)
launcher = SlurmLauncher()
srun = make_srun_command(["-N", "1", "-n", "1"], ["echo", "spam", "eggs"])
monkeypatch(srun, "start", lambda *_, **__: ...)
id_ = launcher.start(srun)
info = launcher._launched[id_]
assert info.slurm_id == "mock-step-id"
Expand All @@ -145,6 +146,7 @@ def test_slurm_launcher_errors_if_cannot_parse_id(monkeypatch, make_srun_command
monkeypatch.setattr(time, "sleep", lambda *_, **__: ...)
launcher = SlurmLauncher()
srun = make_srun_command(["-N", "1", "-n", "1"], ["echo", "spam", "eggs"])
monkeypatch(srun, "start", lambda *_, **__: ...)
with pytest.raises(
errors.LauncherError, match=r"Could not find id of launched job step"
):
Expand Down

0 comments on commit 34334fa

Please sign in to comment.