Skip to content

Commit c33820b

Browse files
authored
Update black-check version, add support for Spark 3.1 Processing (#3034)
1 parent 9002d6f commit c33820b

File tree

3 files changed

+66
-2
lines changed

3 files changed

+66
-2
lines changed

src/sagemaker/image_uri_config/spark.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,35 @@
5959
"us-gov-west-1": "271483468897"
6060
},
6161
"repository": "sagemaker-spark-processing"
62+
},
63+
"3.1": {
64+
"py_versions": ["py37"],
65+
"registries": {
66+
"me-south-1": "750251592176",
67+
"ap-south-1": "105495057255",
68+
"eu-north-1": "330188676905",
69+
"eu-west-3": "136845547031",
70+
"us-east-2": "314815235551",
71+
"eu-west-1": "571004829621",
72+
"eu-central-1": "906073651304",
73+
"sa-east-1": "737130764395",
74+
"ap-east-1": "732049463269",
75+
"us-east-1": "173754725891",
76+
"ap-northeast-2": "860869212795",
77+
"eu-west-2": "836651553127",
78+
"ap-northeast-1": "411782140378",
79+
"us-west-2": "153931337802",
80+
"us-west-1": "667973535471",
81+
"ap-southeast-1": "759080221371",
82+
"ap-southeast-2": "440695851116",
83+
"ca-central-1": "446299261295",
84+
"cn-north-1": "671472414489",
85+
"cn-northwest-1": "844356804704",
86+
"eu-south-1": "753923664805",
87+
"af-south-1": "309385258863",
88+
"us-gov-west-1": "271483468897"
89+
},
90+
"repository": "sagemaker-spark-processing"
6291
}
6392
}
6493
}

tests/integ/test_spark_processing.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,19 @@ def spark_py_processor(sagemaker_session, cpu_instance_type):
8787
return spark_py_processor
8888

8989

90+
@pytest.fixture(scope="module")
91+
def spark_v3_py_processor(sagemaker_session, cpu_instance_type):
92+
spark_py_processor = PySparkProcessor(
93+
role="SageMakerRole",
94+
instance_count=2,
95+
instance_type=cpu_instance_type,
96+
sagemaker_session=sagemaker_session,
97+
framework_version="3.1",
98+
)
99+
100+
return spark_py_processor
101+
102+
90103
@pytest.fixture(scope="module")
91104
def spark_jar_processor(sagemaker_session, cpu_instance_type):
92105
spark_jar_processor = SparkJarProcessor(
@@ -100,6 +113,19 @@ def spark_jar_processor(sagemaker_session, cpu_instance_type):
100113
return spark_jar_processor
101114

102115

116+
@pytest.fixture(scope="module")
117+
def spark_v3_jar_processor(sagemaker_session, cpu_instance_type):
118+
spark_jar_processor = SparkJarProcessor(
119+
role="SageMakerRole",
120+
instance_count=2,
121+
instance_type=cpu_instance_type,
122+
sagemaker_session=sagemaker_session,
123+
framework_version="3.1",
124+
)
125+
126+
return spark_jar_processor
127+
128+
103129
@pytest.fixture
104130
def configuration() -> list:
105131
configuration = [
@@ -180,6 +206,15 @@ def configuration() -> list:
180206
return configuration
181207

182208

209+
def test_sagemaker_pyspark_v3(
210+
spark_v3_py_processor, spark_v3_jar_processor, sagemaker_session, configuration, build_jar
211+
):
212+
test_sagemaker_pyspark_multinode(spark_v3_py_processor, sagemaker_session, configuration)
213+
test_sagemaker_java_jar_multinode(
214+
spark_v3_jar_processor, sagemaker_session, configuration, build_jar
215+
)
216+
217+
183218
def test_sagemaker_pyspark_multinode(spark_py_processor, sagemaker_session, configuration):
184219
"""Test that basic multinode case works on 32KB of data"""
185220
bucket = spark_py_processor.sagemaker_session.default_bucket()

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ commands = doc8
134134
setenv =
135135
LC_ALL=C.UTF-8
136136
LANG=C.UTF-8
137-
deps = black==22.1.0
137+
deps = black==22.3.0
138138
commands =
139139
black -l 100 ./
140140

@@ -143,7 +143,7 @@ commands =
143143
setenv =
144144
LC_ALL=C.UTF-8
145145
LANG=C.UTF-8
146-
deps = black==22.1.0
146+
deps = black==22.3.0
147147
commands =
148148
black -l 100 --check ./
149149

0 commit comments

Comments
 (0)