awslabs / keras-apache-mxnet

[DEPRECATED] Amazon Deep Learning's Keras with Apache MXNet support
https://github.com/awslabs/keras-apache-mxnet/wiki
Other
290 stars 65 forks source link

dev2 branch pytest failure #140

Closed roywei closed 6 years ago

roywei commented 6 years ago

checking out our dev2 branch and running pytest tests/ found 3 tests cases failed.

tests/keras/preprocessing/image_test.py::TestImage::test_deterministic_transform 
tests/test_model_saving.py::test_model_saving_to_binary_stream 
tests/integration_tests/imagenet_utils_test.py::test_preprocess_input

Not sure when was this introduced, and we need the PR CI fixed to catch this in PR.

roywei commented 6 years ago

Error messages: 1. tests/integration_tests/imagenet_utils_test.py::test_preprocess_input

AssertionError: assert 254.0 != 254.0
E            +  where 254.0 = <built-in method max of numpy.ndarray object at 0x7faf5bcf7580>()
E            +    where <built-in method max of numpy.ndarray object at 0x7faf5bcf7580> = array([[[[ 63.,  41., 197.],\n         [ 37.,  21.,  42.],\n         [134., 167., 227.],\n         [128., 219., 104.],\n  ...\n         [178.,  54.,  73.],\n         [ 61., 100., 171.],\n         [ 45., 170., 122.],\n         [ 91.,   5., 118.]]]]).max
E            +      where array([[[[ 63.,  41., 197.],\n         [ 37.,  21.,  42.],\n         [134., 167., 227.],\n         [128., 219., 104.],\n  ...\n         [178.,  54.,  73.],\n         [ 61., 100., 171.],\n         [ 45., 170., 122.],\n         [ 91.,   5., 118.]]]]) = <built-in method astype of numpy.ndarray object at 0x7faf5bcf7260>('float')
E            +        where <built-in method astype of numpy.ndarray object at 0x7faf5bcf7260> = array([[[[ 63,  41, 197],\n         [ 37,  21,  42],\n         [134, 167, 227],\n         [128, 219, 104],\n         [ 77,..., 218, 153],\n         [178,  54,  73],\n         [ 61, 100, 171],\n         [ 45, 170, 122],\n         [ 91,   5, 118]]]]).astype
E            +  and   254.0 = <built-in method max of numpy.ndarray object at 0x7faf5bcf7210>()
E            +    where <built-in method max of numpy.ndarray object at 0x7faf5bcf7210> = array([[[[-2.0939003e+01, -2.2939003e+01, -8.4939003e+01],\n         [ 6.4060997e+01, -8.7939003e+01, -6.6939003e+01],\n...02,  2.4700000e+02,  7.7000000e+01],\n         [ 1.0700000e+02,  1.3300000e+02,  1.7000000e+01]]]],\n      dtype=float32).max

tests/integration_tests/imagenet_utils_test.py:49: AssertionError
  1. tests/test_model_saving.py::test_model_saving_to_binary_stream

 AttributeError: 'h5py.h5f.FileID' object has no attribute 'get_file_image'

tests/test_model_saving.py:173: AttributeError
  1. tests/keras/preprocessing/image_test.py::TestImage::test_deterministic_transform

AssertionError: assert False
E        +  where False = <function allclose at 0x7f2f302920d0>(array([[[0.52693604, 0.03443356, 0.22357955],\n        [0.70226045, 0.40027971, 0.41039455],\n        [0.29103731, 0.349... 0.93158523, 0.56567417],\n        [0.65712007, 0.18195966, 0.0709886 ],\n        [0.7320129 , 0.82450339, 0.77432416]]]), array([[[0.7320129 , 0.82450339, 0.77432416],\n        [0.65712007, 0.18195966, 0.0709886 ],\n        [0.56841827, 0.931... 0.34960894, 0.29794021],\n        [0.70226045, 0.40027971, 0.41039455],\n        [0.52693604, 0.03443356, 0.22357955]]]))
E        +    where <function allclose at 0x7f2f302920d0> = np.allclose
E        +    and   array([[[0.52693604, 0.03443356, 0.22357955],\n        [0.70226045, 0.40027971, 0.41039455],\n        [0.29103731, 0.349... 0.93158523, 0.56567417],\n        [0.65712007, 0.18195966, 0.0709886 ],\n        [0.7320129 , 0.82450339, 0.77432416]]]) = <bound method ImageDataGenerator.apply_transform of <keras_preprocessing.image.ImageDataGenerator object at 0x7f2e16063198>>(array([[[0.57988205, 0.47733795, 0.59695794],\n        [0.35633828, 0.14499601, 0.00806467],\n        [0.16711944, 0.149... 0.88760071, 0.47439492],\n        [0.57343872, 0.86170212, 0.79295728],\n        [0.09545834, 0.75863135, 0.06663615]]]), {'flip_vertical': True})
E        +      where <bound method ImageDataGenerator.apply_transform of <keras_preprocessing.image.ImageDataGenerator object at 0x7f2e16063198>> = <keras_preprocessing.image.ImageDataGenerator object at 0x7f2e16063198>.apply_transform

tests/keras/preprocessing/image_test.py
kalyc commented 6 years ago

Can we delete this branch/ close this issue? @roywei The current dev branch doesn't have any CI build failures - https://github.com/awslabs/keras-apache-mxnet/tree/dev

roywei commented 6 years ago

@kalyc yes, closing as it's fixed in CI. Thanks!