diff --git a/doc/api/smartsim_api.rst b/doc/api/smartsim_api.rst index 787ef182e..2af7295df 100644 --- a/doc/api/smartsim_api.rst +++ b/doc/api/smartsim_api.rst @@ -538,12 +538,18 @@ SmartSim includes built-in utilities for supporting PyTorch in training and infe Slurm ===== -.. currentmodule:: smartsim.slurm +.. currentmodule:: smartsim.wlm.slurm .. autosummary:: get_allocation release_allocation - -.. automodule:: smartsim.slurm + validate + get_default_partition + get_hosts + get_queue + get_tasks + get_tasks_per_node + +.. automodule:: smartsim.wlm.slurm :members: diff --git a/doc/changelog.rst b/doc/changelog.rst index a45a30850..85e3994fa 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -18,6 +18,7 @@ To be released at some future point in time Description +- Remove deprecated SmartSim modules - SmartSim Documentation refactor - Update the version of Redis from `7.0.4` to `7.2.4` - Update Experiment API typing @@ -25,6 +26,8 @@ Description Detailed Notes +- Removed deprecated SmartSim modules: slurm and mpirunSettings. + (SmartSim-PR514_) - Implemented new structure of SmartSim documentation. Added examples images and further detail of SmartSim components. - Update Redis version to `7.2.4`. This change fixes an issue in the Redis @@ -36,6 +39,7 @@ Detailed Notes (SmartSim-PR-PR504_) - Update the generic `t.Any` typehints in Experiment API. (SmartSim-PR501_) +.. _SmartSim-PR514: https://github.com/CrayLabs/SmartSim/pull/514 .. _SmartSim-PR463: https://github.com/CrayLabs/SmartSim/pull/463 .. _SmartSim-PR507: https://github.com/CrayLabs/SmartSim/pull/507 .. _SmartSim-PR504: https://github.com/CrayLabs/SmartSim/pull/504 diff --git a/smartsim/settings/mpirunSettings.py b/smartsim/settings/mpirunSettings.py deleted file mode 100644 index 994d62bba..000000000 --- a/smartsim/settings/mpirunSettings.py +++ /dev/null @@ -1,41 +0,0 @@ -# BSD 2-Clause License -# -# Copyright (c) 2021-2024, Hewlett Packard Enterprise -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -from warnings import simplefilter, warn - -from ..log import get_logger - -# pylint: disable-next=unused-import -from .mpiSettings import MpiexecSettings, MpirunSettings, OrterunSettings - -logger = get_logger(__name__) - -simplefilter("once", DeprecationWarning) -warn( - "mpirunSettings will be deprecated; use mpiSettings instead.", - DeprecationWarning, - stacklevel=2, -) diff --git a/smartsim/slurm.py b/smartsim/slurm.py deleted file mode 100644 index 6a32d0213..000000000 --- a/smartsim/slurm.py +++ /dev/null @@ -1,45 +0,0 @@ -# BSD 2-Clause License -# -# Copyright (c) 2021-2024, Hewlett Packard Enterprise -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -from warnings import simplefilter, warn - -# pylint: disable-next=unused-import -from .wlm.slurm import ( - _get_alloc_cmd, - _get_system_partition_info, - get_allocation, - get_default_partition, - release_allocation, - validate, -) - -simplefilter("once", category=DeprecationWarning) -DEPRECATION_MSG = ( - "`smartsim.slurm` has been deprecated and will be removed in a future release.\n" - "Please update your code to use `smartsim.wlm.slurm`" -) -warn(DEPRECATION_MSG, category=DeprecationWarning, stacklevel=2) diff --git a/smartsim/wlm/slurm.py b/smartsim/wlm/slurm.py index 9308eea98..098056c9e 100644 --- a/smartsim/wlm/slurm.py +++ b/smartsim/wlm/slurm.py @@ -60,12 +60,12 @@ def get_allocation( The options can be used to pass extra settings to the workload manager such as the following for Slurm: - - nodelist="nid00004" + - nodelist="nid00004" For arguments without a value, pass None or and empty string as the value. For Slurm: - - exclusive=None + - exclusive=None :param nodes: number of nodes for the allocation, defaults to 1 :type nodes: int, optional diff --git a/tests/test_slurm_get_alloc.py b/tests/test_slurm_get_alloc.py index aa12ce362..561e3d984 100644 --- a/tests/test_slurm_get_alloc.py +++ b/tests/test_slurm_get_alloc.py @@ -26,7 +26,7 @@ import pytest -from smartsim.slurm import _get_alloc_cmd +from smartsim.wlm.slurm import _get_alloc_cmd # The tests in this file belong to the group_b group pytestmark = pytest.mark.group_b diff --git a/tests/test_slurm_validation.py b/tests/test_slurm_validation.py index 02baddce6..fbb6406c6 100644 --- a/tests/test_slurm_validation.py +++ b/tests/test_slurm_validation.py @@ -28,7 +28,11 @@ import pytest from smartsim.error.errors import LauncherError -from smartsim.slurm import _get_system_partition_info, get_default_partition, validate +from smartsim.wlm.slurm import ( + _get_system_partition_info, + get_default_partition, + validate, +) # The tests in this file belong to the group_b group pytestmark = pytest.mark.group_b