Skip to content

Commit

Permalink
issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
amandarichardsonn committed Sep 18, 2024
1 parent 4710ad0 commit 32f9d24
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 19 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ module = [
"smartsim._core.launcher.sge.*",
"smartsim._core.launcher.slurm.*",
"smartsim._core.launcher.step.*",
"smartsim._core.launcher.stepInfo",
"smartsim._core.launcher.stepMapping",
"smartsim._core.launcher.taskManager",
"smartsim._core.launcher.step_info",
"smartsim._core.launcher.step_mapping",
"smartsim._core.launcher.task_manager",
"smartsim._core.utils.serialize",
"smartsim._core.utils.telemetry.*",
"smartsim.database.*",
"smartsim.settings.sgeSettings",
"smartsim.settings.sge_settings",
"smartsim._core.control.controller_utils",
"smartsim.entity.dbnode",
]
Expand Down
2 changes: 1 addition & 1 deletion smartsim/_core/control/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
from threading import RLock, Thread
from types import FrameType

from ..launcher.step import Step
from ...database import FeatureStore
from ...entity import EntitySequence, FSNode, SmartSimEntity
from ...log import ContextThread, get_logger
from ...status import TERMINAL_STATUSES, InvalidJobStatus, JobStatus
from ..config import CONFIG
from ..launcher import Launcher, LocalLauncher
from ..launcher.step import Step
from ..utils.network import get_ip_from_host
from .job import Job, JobEntity

Expand Down
4 changes: 2 additions & 2 deletions smartsim/_core/control/preview_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import jinja2.utils as u
from jinja2 import pass_eval_context

from ..config import CONFIG
from . import Manifest
from ...error.errors import PreviewFormatError
from ...log import get_logger
from ..config import CONFIG
from . import Manifest
from .job import Job

logger = get_logger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions smartsim/_core/launcher/dragon/dragon_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

# pylint: enable=import-error
# isort: on
from ....log import get_logger
from ....status import TERMINAL_STATUSES, JobStatus
from ...config import get_config
from ...schemas import (

Check warning on line 51 in smartsim/_core/launcher/dragon/dragon_backend.py

View check run for this annotation

Codecov / codecov/patch

smartsim/_core/launcher/dragon/dragon_backend.py#L48-L51

Added lines #L48 - L51 were not covered by tests
DragonHandshakeRequest,
Expand All @@ -61,8 +63,6 @@
DragonUpdateStatusResponse,
)
from ...utils.helpers import create_short_id_str

Check warning on line 65 in smartsim/_core/launcher/dragon/dragon_backend.py

View check run for this annotation

Codecov / codecov/patch

smartsim/_core/launcher/dragon/dragon_backend.py#L65

Added line #L65 was not covered by tests
from ....log import get_logger
from ....status import TERMINAL_STATUSES, JobStatus

logger = get_logger(__name__)

Expand Down
6 changes: 4 additions & 2 deletions smartsim/_core/launcher/dragon/dragon_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import zmq
import zmq.auth.thread

from . import dragon_sockets
from ....error.errors import SmartSimError
from ....log import get_logger
from ...config import get_config
Expand All @@ -56,6 +55,7 @@
DragonShutdownRequest,
)
from ...utils.network import find_free_port, get_best_interface_and_address
from . import dragon_sockets

if t.TYPE_CHECKING:
from typing_extensions import Self
Expand Down Expand Up @@ -224,7 +224,9 @@ def _start_connector_socket(self, socket_addr: str) -> zmq.Socket[t.Any]:
connector_socket: t.Optional[zmq.Socket[t.Any]] = None
self._reset_timeout(config.dragon_server_startup_timeout)
self._get_new_authenticator(-1)
connector_socket = dragon_sockets.get_secure_socket(self._context, zmq.REP, True)
connector_socket = dragon_sockets.get_secure_socket(

Check warning on line 227 in smartsim/_core/launcher/dragon/dragon_connector.py

View check run for this annotation

Codecov / codecov/patch

smartsim/_core/launcher/dragon/dragon_connector.py#L227

Added line #L227 was not covered by tests
self._context, zmq.REP, True
)
logger.debug(f"Binding connector to {socket_addr}")
connector_socket.bind(socket_addr)
if connector_socket is None:
Expand Down
2 changes: 1 addition & 1 deletion smartsim/_core/launcher/dragon/dragon_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from smartsim.error import errors
from smartsim.types import LaunchedJobID

from ..step_mapping import StepMap
from ....error import LauncherError, SmartSimError
from ....log import get_logger
from ....settings import (
Expand All @@ -59,6 +58,7 @@
from ..slurm.slurm_launcher import SlurmLauncher
from ..step import DragonBatchStep, DragonStep, LocalStep, Step
from ..step_info import StepInfo
from ..step_mapping import StepMap
from .dragon_connector import DragonConnector, _SchemaT

if t.TYPE_CHECKING:
Expand Down
3 changes: 1 addition & 2 deletions smartsim/_core/launcher/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
import abc
import typing as t

from .step_mapping import StepMap
from ...entity import SmartSimEntity
from ...error import AllocationError, LauncherError, SSUnsupportedError
from ...settings import SettingsBase
from .step import Step
from .step_info import StepInfo, UnmanagedStepInfo
from .step_mapping import StepMapping
from .step_mapping import StepMap, StepMapping
from .task_manager import TaskManager


Expand Down
10 changes: 5 additions & 5 deletions smartsim/_core/launcher/step/dragon_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
import sys
import typing as t

from ...schemas.dragon_requests import (
DragonRunPolicy,
DragonRunRequest,
request_registry,
)
from ....error.errors import SSUnsupportedError
from ....log import get_logger
from ....settings import (
Expand All @@ -43,6 +38,11 @@
SbatchSettings,
Singularity,
)
from ...schemas.dragon_requests import (
DragonRunPolicy,
DragonRunRequest,
request_registry,
)
from .step import Step

logger = get_logger(__name__)
Expand Down

0 comments on commit 32f9d24

Please sign in to comment.