File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 15
15
import logging
16
16
import os
17
17
from typing import Dict , Set , Type
18
+ import json
18
19
import boto3
19
20
from sagemaker .base_deserializers import BaseDeserializer , JSONDeserializer
20
21
from sagemaker .jumpstart .enums import (
33
34
JSONSerializer ,
34
35
)
35
36
from sagemaker .session import Session
36
- import json
37
37
38
38
39
39
JUMPSTART_LOGGER = logging .getLogger ("sagemaker.jumpstart" )
61
61
62
62
def _load_region_config (filepath : str ) -> Set [JumpStartLaunchedRegionInfo ]:
63
63
"""Load the JumpStart region config from a JSON file."""
64
- JUMPSTART_LOGGER .debug (f"Loading JumpStart region config from '{ filepath } '." )
64
+ debug_msg = f"Loading JumpStart region config from '{ filepath } '."
65
+ JUMPSTART_LOGGER .debug (debug_msg )
65
66
try :
66
67
with open (filepath ) as f :
67
68
config = json .load (f )
@@ -75,7 +76,7 @@ def _load_region_config(filepath: str) -> Set[JumpStartLaunchedRegionInfo]:
75
76
)
76
77
for region , data in config .items ()
77
78
}
78
- except Exception :
79
+ except Exception : # pylint: disable=W0703
79
80
JUMPSTART_LOGGER .error ("Unable to load JumpStart region config." , exc_info = True )
80
81
return set ()
81
82
You can’t perform that action at this time.
0 commit comments