Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing on travis-ci #20

Merged
merged 5 commits into from
Jun 20, 2017
Merged

Conversation

MrBago
Copy link
Contributor

@MrBago MrBago commented Jun 14, 2017

This PR adds a travis config file and does a little refactoring to stay within travis's memory limit and pass tests using python3.

.travis.yml Outdated
@@ -0,0 +1,29 @@
sudo: required
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is copied from graphframes.

@@ -70,7 +70,7 @@ def compareArrays(self, values1, values2):
"""
values1 & values2 are {key => numpy array}.
"""
for k, v1 in values1.iteritems():
for k, v1 in values1.items():
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For python3 compatibility.

@@ -18,7 +18,7 @@
from sparkdl.transformers.utils import InceptionV3Constants
from ..tests import SparkDLTestCase
from .image_utils import ImageNetOutputComparisonTestCase
import image_utils
from . import image_utils
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3

@@ -34,12 +32,11 @@

class NamedImageTransformerImagenetTest(SparkDLTestCase):

def test_inceptionV3_prediction(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking this test up allows unused variables to go out of scope and be GCed.

@MrBago MrBago requested a review from sueann June 14, 2017 01:49
@codecov-io
Copy link

codecov-io commented Jun 14, 2017

Codecov Report

Merging #20 into master will increase coverage by 35.06%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #20       +/-   ##
===========================================
+ Coverage   50.88%   85.95%   +35.06%     
===========================================
  Files           4       20       +16     
  Lines         169     1175     +1006     
  Branches        6        6               
===========================================
+ Hits           86     1010      +924     
- Misses         83      165       +82
Impacted Files Coverage Δ
python/tests/transformers/named_image_test.py 100% <100%> (ø)
python/tests/transformers/image_utils.py 96.25% <100%> (ø)
python/tests/transformers/tf_image_test.py 100% <100%> (ø)
python/sparkdl/utils.py 90% <100%> (ø)
python/tests/transformers/keras_image_test.py 100% <100%> (ø)
python/docs/conf.py 62.5% <0%> (ø)
python/tests/image/test_imageIO.py 97.14% <0%> (ø)
python/sparkdl/transformers/named_image.py 93.33% <0%> (ø)
python/sparkdl/image/imageIO.py 86.17% <0%> (ø)
python/sparkdl/transformers/tf_image.py 95.53% <0%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6554a62...ff6bf30. Read the comment docs.

@MrBago
Copy link
Contributor Author

MrBago commented Jun 14, 2017

@sueann Travis up and running!

@MrBago MrBago requested review from jkbradley and phi-dbq June 14, 2017 18:05
.travis.yml Outdated
@@ -0,0 +1,29 @@
sudo: required

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to add

jdk:
 - oraclejdk8 # openJDK crashes sometimes; tensorframes is compiled w.r.t JDK8

following TensorFrames Travis settings https://github.com/databricks/tensorframes/blob/master/.travis.yml

@phi-dbq
Copy link
Contributor

phi-dbq commented Jun 14, 2017

LGTM!

@MrBago MrBago force-pushed the travis-testing-and-py3 branch from bfc5dec to 42cabee Compare June 19, 2017 20:23
@MrBago
Copy link
Contributor Author

MrBago commented Jun 19, 2017

@sueann Can you take a look at this when you get a chance. I've rebased and resolved conflicts (with @phi-dbq's help).

Copy link
Collaborator

@sueann sueann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. one very minor comment. feel free to merge!

cls.imageArray = imageArray
cls.kerasPredict = kerasPredict

def test_buildtfgraphforname(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camelCase

@phi-dbq phi-dbq merged commit a9b4853 into databricks:master Jun 20, 2017
@MrBago MrBago deleted the travis-testing-and-py3 branch April 27, 2018 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants