Skip to content

Commit

Permalink
update version to 3.4 (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
aseemw authored May 19, 2020
1 parent a63319b commit a21651b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion coremltools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
For more information: http://developer.apple.com/documentation/coreml
"""

__version__ = '3.3'
__version__ = '3.4'

# This is the basic Core ML specification format understood by iOS 11.0
SPECIFICATION_VERSION = 1
Expand Down
15 changes: 2 additions & 13 deletions coremltools/test/neural_network/test_graph_passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import copy
import pytest
from sys import platform
from coremltools.models.utils import macos_version

DEBUG = False
np.random.seed(100)
Expand Down Expand Up @@ -205,6 +206,7 @@ def test_conv_crop_bn_relu_to_conv_bn_relu_crop(self):
np.testing.assert_equal('crop', spec.layers[3].WhichOneof('layer'))


@unittest.skipIf(platform != 'darwin' or macos_version() < (10, 15), "Requires MacOS 10.15 or later")
class Redundant_Transposees_Test(unittest.TestCase):

def _test_builder(self, builder, input_shape, expected_layer_num=None):
Expand All @@ -230,7 +232,6 @@ def _test_builder(self, builder, input_shape, expected_layer_num=None):

np.testing.assert_almost_equal(output_before, output_after, decimal=3)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_output_edge_case(self):

# For now for safety purpose, the node which are output should't be merged
Expand All @@ -249,7 +250,6 @@ def test_output_edge_case(self):

self._test_builder(builder, input_shape, 2)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_output_edge_case_2(self):

# For now for safety purpose, the node which are output should't be merged
Expand All @@ -264,7 +264,6 @@ def test_output_edge_case_2(self):

self._test_builder(builder, input_shape, 1)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_remove_single_identity_transpose(self):

# A single identity transpose (like 0,1,2) should also be removed
Expand All @@ -283,7 +282,6 @@ def test_remove_single_identity_transpose(self):

self._test_builder(builder, input_shape, 1)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_remove_three_transpose(self):

# Three transpose layer which can be removed
Expand All @@ -309,7 +307,6 @@ def test_remove_three_transpose(self):

self._test_builder(builder, input_shape, 1)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_remove_thousands_identity_transpose(self):

'''
Expand Down Expand Up @@ -357,7 +354,6 @@ def test_remove_thousands_identity_transpose(self):

self._test_builder(builder, input_shape, 1)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_remove_thousands_identity_transpose_with_activation_between(self):
'''
INPUT
Expand Down Expand Up @@ -423,7 +419,6 @@ def test_remove_thousands_identity_transpose_with_activation_between(self):
output_name='out')
self._test_builder(builder, input_shape, 2)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_remove_thousands_random_transpose_layers(self):
'''
INPUT
Expand Down Expand Up @@ -487,7 +482,6 @@ def test_remove_thousands_random_transpose_layers(self):
output_name='out')
self._test_builder(builder, input_shape, None)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_remove_thousands_random_transpose_layers_case_2(self):
'''
Same test as the previous one, but add more layers and dimension.
Expand Down Expand Up @@ -519,7 +513,6 @@ def test_remove_thousands_random_transpose_layers_case_2(self):
output_name='out')
self._test_builder(builder, input_shape, None)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_branch_structure(self):
'''
INPUT
Expand Down Expand Up @@ -577,7 +570,6 @@ def test_branch_structure(self):
output_name='dumpy')
self._test_builder(builder, input_shape, 2)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_branch_case_2(self):
'''
INPUT
Expand Down Expand Up @@ -619,7 +611,6 @@ def test_branch_case_2(self):
output_name='dumpy')
self._test_builder(builder, input_shape, 4)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_fork_structure_case_3(self):
'''
INPUT
Expand Down Expand Up @@ -692,7 +683,6 @@ def test_fork_structure_case_3(self):

self._test_builder(builder, input_shape, 4)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_fork(self):
'''
INPUT
Expand Down Expand Up @@ -755,7 +745,6 @@ def test_fork(self):
output_name='out_branch_2')
self._test_builder(builder, input_shape, 2)

@unittest.skipIf(platform != 'darwin', "Requires MacOS")
def test_fork_and_add(self):
'''
INPUT
Expand Down
6 changes: 4 additions & 2 deletions coremltools/test/sklearn/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,7 @@ def test_pipeline_rename(self):

# Check the predictions
if is_macos() and macos_version() >= (10, 13):
self.assertAlmostEquals(model.predict({'input': sample_data}),
renamed_model.predict({'renamed_input': sample_data}))
out_dict = model.predict({'input': sample_data})
out_dict_renamed = renamed_model.predict({'renamed_input': sample_data})
self.assertAlmostEqual(list(out_dict.keys()), list(out_dict_renamed.keys()))
self.assertAlmostEqual(list(out_dict.values()), list(out_dict_renamed.values()))

0 comments on commit a21651b

Please sign in to comment.