Skip to content

Commit

Permalink
Attempt to fix MO CI #2
Browse files Browse the repository at this point in the history
  • Loading branch information
nosovmik committed Apr 14, 2021
1 parent 34d211f commit 18e9e62
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions model-optimizer/mo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from mo.graph.graph import Graph
from mo.middle.pattern_match import for_graph_and_each_sub_graph_recursively
from mo.pipeline.common import prepare_emit_ir, get_ir_version
from mo.pipeline.unified import unified_pipeline, moc_pipeline
from mo.pipeline.unified import unified_pipeline
from mo.utils import import_extensions
from mo.utils.cli_parser import get_placeholder_shapes, get_tuple_values, get_model_name, \
get_common_cli_options, get_caffe_cli_options, get_tf_cli_options, get_mxnet_cli_options, get_kaldi_cli_options, \
Expand Down Expand Up @@ -88,7 +88,7 @@ def prepare_ir(argv: argparse.Namespace):

fem = argv.feManager
new_front_ends = []
if not argv.use_legacy_frontend and not fem == None:
if not argv.use_legacy_frontend and fem is not None:
new_front_ends = fem.availableFrontEnds()

if not any([is_tf, is_caffe, is_mxnet, is_kaldi, is_onnx]):
Expand Down Expand Up @@ -247,9 +247,10 @@ def prepare_ir(argv: argparse.Namespace):
from mo.front.onnx.register_custom_ops import get_front_classes
import_extensions.load_dirs(argv.framework, extensions, get_front_classes)

if argv.framework not in new_front_ends or argv.use_legacy_frontend:
if argv.feManager is None or argv.framework not in new_front_ends or argv.use_legacy_frontend:
graph = unified_pipeline(argv)
else:
from mo.pipeline.unified import moc_pipeline
graph = moc_pipeline(argv)
return graph

Expand Down

0 comments on commit 18e9e62

Please sign in to comment.