Skip to content

Commit 3b15a68

Browse files
committed
remove redundant
1 parent 4845a7c commit 3b15a68

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/sagemaker/hyperpod/training/quota_allocation_util.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
13-
import logging
1413
import re
15-
import traceback
1614
from sagemaker.hyperpod.cli.constants.command_constants import NVIDIA_GPU_RESOURCE_LIMIT_KEY, NEURON_RESOURCE_LIMIT_KEY
1715
from sagemaker.hyperpod.cli.utils import (
1816
setup_logger
@@ -140,12 +138,11 @@
140138
}
141139

142140
def _has_compute_resource_quota_allocation_resources(memory_in_gib: Optional[float], vcpu: Optional[float], accelerators: Optional[int]) -> bool:
143-
result = (
141+
return (
144142
(memory_in_gib is not None) or
145143
(vcpu is not None ) or
146144
(accelerators is not None and accelerators > 0) # Fix: treat accelerators=0 as not specified
147145
)
148-
return result
149146

150147
# Gets resources from compute quotas that user provided; if not all provided, calculates defaults.
151148
def _get_resources_from_compute_quotas(instance_type: str,

0 commit comments

Comments
 (0)