applied black
This commit is contained in:
parent
4fcd1e79d3
commit
d11333981f
@ -8,7 +8,6 @@ class DummyEstimator:
|
||||
|
||||
|
||||
class EstimatorAdapterMock(EstimatorAdapter):
|
||||
|
||||
def __init__(self, estimator):
|
||||
super().__init__(estimator=estimator)
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ import abc
|
||||
|
||||
|
||||
class Preprocessor(abc.ABC):
|
||||
|
||||
@staticmethod
|
||||
@abc.abstractmethod
|
||||
def preprocess(batch):
|
||||
|
||||
@ -45,14 +45,16 @@ def estimator_adapter(estimator_type, keras_model, output_batch_generator, monke
|
||||
@pytest.fixture
|
||||
def keras_model(input_size):
|
||||
import warnings
|
||||
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
import os
|
||||
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
|
||||
|
||||
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
|
||||
|
||||
import tensorflow as tf
|
||||
|
||||
tf.keras.backend.set_image_data_format('channels_last')
|
||||
tf.keras.backend.set_image_data_format("channels_last")
|
||||
|
||||
inputs = tf.keras.Input(shape=input_size)
|
||||
conv = tf.keras.layers.Conv2D(3, 3)
|
||||
|
||||
@ -17,7 +17,6 @@ def test_predict(estimator, input_batch, expected_predictions):
|
||||
|
||||
@pytest.mark.parametrize("batch_size", [0, 1, 2, 16, 32, 64])
|
||||
def test_batch_format(input_batch):
|
||||
|
||||
def channels_are_last(input_batch):
|
||||
return input_batch.shape[-1] == 3
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ def test_chunk_iterable_no_split():
|
||||
|
||||
def test_chunk_iterable_last_partial():
|
||||
a, b, c, d = chunk_iterable(range(10), chunk_size=3)
|
||||
assert d == (9, )
|
||||
assert d == (9,)
|
||||
|
||||
|
||||
def test_chunk_iterable_empty():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user