Fix type annotation and PEP8

This commit is contained in:
allegroai 2020-10-11 11:16:19 +03:00
parent f65e64aebe
commit 0eb1bb4492
2 changed files with 7 additions and 7 deletions

View File

@ -362,7 +362,7 @@ class PipelineController(object):
return True
def _verify_node(self, node):
# type: (Node) -> bool
# type: (PipelineController.Node) -> bool
"""
Raise ValueError on verification errors
@ -407,7 +407,7 @@ class PipelineController(object):
return not bool(set(self._nodes.keys()) - visited)
def _launch_node(self, node):
# type: (Node) -> ()
# type: (PipelineController.Node) -> ()
"""
Launch a single node (create and enqueue a TrainsJob)
@ -618,7 +618,7 @@ class PipelineController(object):
pass
def __verify_step_reference(self, node, step_ref_string):
# type: (Node, str) -> bool
# type: (PipelineController.Node, str) -> bool
"""
Verify the step reference. For example "${step1.parameters.Args/param}"
:param Node node: calling reference node (used for logging)

View File

@ -1329,19 +1329,19 @@ class PatchKerasModelIO(object):
if 'tensorflow' in sys.modules and not PatchKerasModelIO.__patched_tensorflow:
try:
# hack: make sure tensorflow.__init__ is called
import tensorflow # noqa: F401
import tensorflow # noqa: F401, F811
from tensorflow.python.keras.engine.network import Network
except ImportError:
Network = None
try:
# hack: make sure tensorflow.__init__ is called
import tensorflow # noqa: F401
import tensorflow # noqa: F401, F811
from tensorflow.python.keras.engine.functional import Functional
except ImportError:
Functional = None
try:
# hack: make sure tensorflow.__init__ is called
import tensorflow # noqa: F811
import tensorflow # noqa: F401, F811
from tensorflow.python.keras.engine.sequential import Sequential
except ImportError:
Sequential = None