代码拉取完成,页面将自动刷新
#!/usr/bin/env python3
# ==============================================================================
# Copyright (C) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# ==============================================================================
import argparse
import errno
import os
import sys
import shutil
import glob
import platform
from distutils.sysconfig import get_python_lib
from tools.test_utils import *
def main():
'''
Tests openvino tensorflow Python 3. This script needs to be run after
running build_ovtf.py which builds the openvino_tensorflow
and installs it to a virtual environment that would be used by this script.
'''
root_pwd = os.getcwd()
build_dir = 'build_cmake'
venv_dir = 'build_cmake/venv-tf-py3'
artifacts_dir = os.path.join(build_dir, 'artifacts')
load_venv(venv_dir)
# disable dynamic fallback for OVTF and TF tests at once
openvino_tf_dynamic_fallback = os.environ.pop(
'OPENVINO_TF_DYNAMIC_FALLBACK', None)
os.environ['OPENVINO_TF_DYNAMIC_FALLBACK'] = '0'
# First run the C++ gtests
run_ovtf_cpp_gtests(artifacts_dir, './', None)
# Next run Python unit tests
run_ovtf_pytests_from_artifacts(artifacts_dir)
# Run Python tests borrowed from TF
run_tensorflow_pytests_from_artifacts(
'./', artifacts_dir + '/tensorflow/python', False)
os.environ.pop('OPENVINO_TF_DYNAMIC_FALLBACK', None)
if openvino_tf_dynamic_fallback is not None:
os.environ[
'OPENVINO_TF_DYNAMIC_FALLBACK'] = openvino_tf_dynamic_fallback
if __name__ == '__main__':
main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。