def converter_main(): warnings.filterwarnings("ignore", category=FutureWarning) warnings.filterwarnings("ignore", category=DeprecationWarning) ret_code = check_python_version() if ret_code: sys.exit(ret_code) from mo.main import main from mo.utils.cli_parser import get_all_cli_parser # pylint: disable=no-name-in-module sys.exit(main(get_all_cli_parser(), None))
if analysis_results.get_messages() is not None: for el in analysis_results.get_messages(): log.error(el, extra={'analysis_info': True}) log.error(err) log.debug(traceback.format_exc()) except FrameworkError as err: log.error(err, extra={'framework_error': True}) log.debug(traceback.format_exc()) except Exception as err: log.error("-------------------------------------------------") log.error("----------------- INTERNAL ERROR ----------------") log.error("Unexpected exception happened.") log.error( "Please contact Model Optimizer developers and forward the following information:" ) log.error(str(err)) log.error(traceback.format_exc()) log.error("---------------- END OF BUG REPORT --------------") log.error("-------------------------------------------------") telemetry.send_event('mo', 'conversion_result', 'fail') telemetry.end_session('mo') telemetry.force_shutdown(1.0) return 1 if __name__ == "__main__": from mo.utils.cli_parser import get_all_cli_parser fe_manager = FrontEndManager() sys.exit(main(get_all_cli_parser(fe_manager), fe_manager, None))
analysis_results = AnalysisResults() if analysis_results.get_messages() is not None: for el in analysis_results.get_messages(): log.error(el, extra={'analysis_info': True}) log.error(err) log.debug(traceback.format_exc()) except FrameworkError as err: log.error(err, extra={'framework_error': True}) log.debug(traceback.format_exc()) except Exception as err: log.error("-------------------------------------------------") log.error("----------------- INTERNAL ERROR ----------------") log.error("Unexpected exception happened.") log.error( "Please contact Model Optimizer developers and forward the following information:" ) log.error(str(err)) log.error(traceback.format_exc()) log.error("---------------- END OF BUG REPORT --------------") log.error("-------------------------------------------------") telemetry.send_event('mo', 'conversion_result', 'fail') telemetry.end_session('mo') telemetry.force_shutdown(1.0) return 1 if __name__ == "__main__": from mo.utils.cli_parser import get_all_cli_parser sys.exit(main(get_all_cli_parser(), None))
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import sys from mo.utils.cli_parser import get_all_cli_parser from ngraph.frontend import FrontEndManager # pylint: disable=no-name-in-module,import-error if __name__ == "__main__": from mo.main import main fem = FrontEndManager() sys.exit(main(get_all_cli_parser(fem), fem, 'pdpd'))
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import sys from mo.utils.cli_parser import get_all_cli_parser from ngraph.frontend import FrontEndManager # pylint: disable=no-name-in-module,import-error if __name__ == "__main__": from mo.main import main fem = FrontEndManager() sys.exit(main(get_all_cli_parser(fem), fem, 'paddle'))
if analysis_results.get_messages() is not None: for el in analysis_results.get_messages(): log.error(el, extra={'analysis_info': True}) log.error(err) log.debug(traceback.format_exc()) except FrameworkError as err: log.error(err, extra={'framework_error': True}) log.debug(traceback.format_exc()) except Exception as err: log.error("-------------------------------------------------") log.error("----------------- INTERNAL ERROR ----------------") log.error("Unexpected exception happened.") log.error( "Please contact Model Optimizer developers and forward the following information:" ) log.error(str(err)) log.error(traceback.format_exc()) log.error("---------------- END OF BUG REPORT --------------") log.error("-------------------------------------------------") telemetry.send_event('mo', 'conversion_result', 'fail') telemetry.end_session('mo') telemetry.force_shutdown(1.0) return 1 if __name__ == "__main__": from mo.utils.cli_parser import get_all_cli_parser fem = FrontEndManager() sys.exit(main(get_all_cli_parser(fem), fem, None))