Skip to content

Use synthetic data in keras integ test #367

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

Merged
merged 4 commits into from
Aug 28, 2018
Merged

Conversation

yangaws
Copy link
Contributor

@yangaws yangaws commented Aug 28, 2018

Issue #, if available:

Description of changes:
Keras integ tests failed for not downloading cifar10 data. Will use synthetic data instead to fix this problem. The synthetic data is generated in same way as tf_cifar integ test.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yangaws yangaws requested a review from laurenyu August 28, 2018 20:00
@codecov-io
Copy link

codecov-io commented Aug 28, 2018

Codecov Report

Merging #367 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #367      +/-   ##
=========================================
+ Coverage   92.85%   92.9%   +0.05%     
=========================================
  Files          51      51              
  Lines        3568    3568              
=========================================
+ Hits         3313    3315       +2     
+ Misses        255     253       -2
Impacted Files Coverage Δ
src/sagemaker/amazon/common.py 97.01% <0%> (+0.74%) ⬆️
src/sagemaker/utils.py 93.15% <0%> (+1.36%) ⬆️

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 d67d9b8...6501c6b. Read the comment docs.

@nadiaya
Copy link
Contributor

nadiaya commented Aug 28, 2018

But customers are expected to download data from s3.
Changing to use synthetic data makes tests less relevant to the real user workflow.

@laurenyu
Copy link
Contributor

@nadiaya we have other tests that do download data from S3. This change matches what the TF CIFAR test does, which was a change introduced to make our tests more reliable and run faster.

def _filenames(mode, data_dir):
"""Returns a list of filenames based on 'mode'."""
data_dir = os.path.join(data_dir, 'cifar-10-batches-bin')
def _generate_synthetic_data(mode, batch_size):
Copy link
Contributor

Choose a reason for hiding this comment

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

can you put this in a different file that's used by both the TF and Keras tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are actually different. For the keras model created, the label type should match feature which is float32. Since I will talk with Marcio about whether to use real cifar10 data in tests, I think this PR is just a quick fix for current failure. We probably don't need to have a separate file with this function (and with additional parameters for type).

I will update this part after talking with Marcio in the future.

@nadiaya nadiaya merged commit c52e9f2 into aws:master Aug 28, 2018
pdasamzn pushed a commit to pdasamzn/sagemaker-python-sdk that referenced this pull request Nov 1, 2018
* Use synthetic data in keras integ test

* Add new line at end of file

* Use PREDICT_INPUTS as prediction input tensor name
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