Skip to content

Commit 73b8233

Browse files
LoquatsMrBago
authored andcommitted
Remove python2 support and update python/spark versions (#206)
remove python2 testing in travis CI test with python3.7 instead of python3.6 update spark version to 2.4.4. instead of 2.4.3
1 parent 3522666 commit 73b8233

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ language: minimal
77
env:
88
global:
99
- DOCKER_COMPOSE_VERSION=1.22.0
10+
- PYTHON_VERSION=3.7
1011
matrix:
11-
- PYTHON_VERSION=3.6 TEST_SUITE=pylint
12-
- PYTHON_VERSION=2.7 TEST_SUITE=pylint
13-
- PYTHON_VERSION=3.6 TEST_SUITE=python-tests
14-
- PYTHON_VERSION=2.7 TEST_SUITE=python-tests
15-
- PYTHON_VERSION=3.6 TEST_SUITE=scala-tests
12+
- TEST_SUITE=pylint
13+
- TEST_SUITE=python-tests
14+
- TEST_SUITE=scala-tests
1615

1716
services:
1817
- docker

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RUN /opt/conda/bin/conda create -n sparkdl python=$PYTHON_VERSION && \
4040

4141
# Install Spark and update env variables.
4242
ENV SCALA_VERSION 2.11.8
43-
ENV SPARK_VERSION 2.4.3
43+
ENV SPARK_VERSION 2.4.4
4444
ENV SPARK_BUILD "spark-${SPARK_VERSION}-bin-hadoop2.7"
4545
ENV SPARK_BUILD_URL "https://dist.apache.org/repos/dist/release/spark/spark-${SPARK_VERSION}/${SPARK_BUILD}.tgz"
4646
RUN wget --quiet $SPARK_BUILD_URL -O /tmp/spark.tgz && \

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import ReleaseTransformations._
55

6-
val sparkVer = sys.props.getOrElse("spark.version", "2.4.3")
6+
val sparkVer = sys.props.getOrElse("spark.version", "2.4.4")
77
val sparkBranch = sparkVer.substring(0, 3)
88
val defaultScalaVer = sparkBranch match {
99
case "2.3" => "2.11.8"

dev/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def print_if(cond, *args):
122122

123123
def _get_required_env(default=False, interactive=False, override=False, verbose=False):
124124
default_env = {'PYSPARK_PYTHON': 'python',
125-
'SPARK_VERSION': '2.3.1',
125+
'SPARK_VERSION': '2.4.4',
126126
'SPARK_HOME': os.path.join(HOME, 'bin/spark-2.3.1-bin-hadoop2.7/'),
127127
'SCALA_VERSION': '2.11.8'}
128128

python/sparkdl/estimators/keras_image_file_estimator.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ def __next__(self):
6969
self.counter += 1
7070
return self.models[index]
7171

72-
def next(self):
73-
"""For python2 compatibility."""
74-
return self.__next__()
75-
7672

7773
class KerasImageFileEstimator(Estimator, HasInputCol, HasOutputCol, HasLabelCol, HasKerasModel,
7874
HasKerasOptimizer, HasKerasLoss, CanLoadImage, HasOutputMode):

0 commit comments

Comments
 (0)