File tree 3 files changed +13
-5
lines changed
cli/compatibility/v2/modifiers
3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ def node_should_be_modified(self, node):
274
274
the ``sagemaker.amazon.common`` module.
275
275
"""
276
276
return node .module == "sagemaker.amazon.common" and any (
277
- [ alias .name in OLD_AMAZON_CLASS_NAMES for alias in node .names ]
277
+ alias .name in OLD_AMAZON_CLASS_NAMES for alias in node .names
278
278
)
279
279
280
280
def modify_node (self , node ):
@@ -368,7 +368,11 @@ class SerializerImportInserter(_ImportInserter):
368
368
"""
369
369
370
370
def __init__ (self ):
371
- # Amazon SerDe are not defined in the sagemaker.serializers module.
371
+ """Initialize the ``class_names`` and ``import_node`` attributes.
372
+
373
+ Amazon-specific serializers are ignored because they are not defined in
374
+ the ``sagemaker.serializers`` module.
375
+ """
372
376
class_names = {
373
377
class_name
374
378
for class_name in NEW_CLASS_NAMES - NEW_AMAZON_CLASS_NAMES
@@ -398,7 +402,11 @@ class DeserializerImportInserter(_ImportInserter):
398
402
"""
399
403
400
404
def __init__ (self ):
401
- # Amazon SerDe are not defined in the sagemaker.serializers module.
405
+ """Initialize the ``class_names`` and ``import_node`` attributes.
406
+
407
+ Amazon-specific deserializers are ignored because they are not defined
408
+ in the ``sagemaker.deserializers`` module.
409
+ """
402
410
class_names = {
403
411
class_name
404
412
for class_name in NEW_CLASS_NAMES - NEW_AMAZON_CLASS_NAMES
Original file line number Diff line number Diff line change 24
24
from sagemaker .utils import DeferredError
25
25
26
26
try :
27
- import scipy
27
+ import scipy . sparse
28
28
except ImportError as e :
29
29
scipy = DeferredError (e )
30
30
Original file line number Diff line number Diff line change 18
18
19
19
import numpy as np
20
20
import pytest
21
- import scipy
21
+ import scipy . sparse
22
22
23
23
from sagemaker .serializers import (
24
24
CSVSerializer ,
You can’t perform that action at this time.
0 commit comments