Fixing new pylint errors.

This commit is contained in:
Christopher Choquette Choo 2019-07-27 14:14:05 -04:00
parent 92f97ae32c
commit 71c4a11eb9
5 changed files with 61 additions and 63 deletions

View file

@ -180,7 +180,7 @@ class BoltonModel(Model): # pylint: disable=abstract-method
n_samples=None,
steps_per_epoch=None,
**kwargs): # pylint: disable=arguments-differ
"""Fit with a generator..
"""Fit with a generator.
This method is the same as fit except for when the passed dataset
is a generator. See super method and fit for more details.

View file

@ -175,12 +175,12 @@ class InitTests(keras_parameterized.TestCase):
},
])
def test_compile(self, n_outputs, loss, optimizer):
"""test compilation of BoltonModel.
"""Test compilation of BoltonModel.
Args:
n_outputs: number of output neurons
loss: instantiated TestLoss instance
optimizer: instanced TestOptimizer instance
optimizer: instantiated TestOptimizer instance
"""
# test compilation of valid tf.optimizer and tf.loss
with self.cached_session():
@ -206,7 +206,7 @@ class InitTests(keras_parameterized.TestCase):
Args:
n_outputs: number of output neurons
loss: instantiated TestLoss instance
optimizer: instanced TestOptimizer instance
optimizer: instantiated TestOptimizer instance
"""
# test compilaton of invalid tf.optimizer and non instantiated loss.
with self.cached_session():
@ -505,7 +505,6 @@ class FitTests(keras_parameterized.TestCase):
'num_classes': 2,
'err_msg': 'Detected array length:'},
])
def test_class_errors(self,
class_weights,
class_counts,
@ -516,10 +515,10 @@ class FitTests(keras_parameterized.TestCase):
This test passes invalid params which should raise the expected errors.
Args:
class_weights: the class_weights to use
class_counts: count of number of samples for each class
num_classes: number of outputs neurons
err_msg:
class_weights: the class_weights to use.
class_counts: count of number of samples for each class.
num_classes: number of outputs neurons.
err_msg: The expected error message.
"""
clf = models.BoltonModel(1, 1)
with self.assertRaisesRegexp(ValueError, err_msg): # pylint: disable=deprecated-method

View file

@ -310,8 +310,7 @@ class Bolton(optimizer_v2.OptimizerV2):
Args:
noise_distribution: the noise distribution to pick.
see _accepted_distributions and get_noise for
possible values.
see _accepted_distributions and get_noise for possible values.
epsilon: privacy parameter. Lower gives more privacy but less utility.
layers: list of Keras/Tensorflow layers. Can be found as model.layers
class_weights: class_weights used, which may either be a scalar or 1D