diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a9c28692..f278ee244 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,44 +11,59 @@ permissions: jobs: build: - + # For the sake of simplicity in testing, the Paddle2ONNX packaging program will temporarily run on Ubuntu-latest. + # However, to ensure the stability of the packaging system, we will need to fix the Ubuntu version in the future. runs-on: ubuntu-latest + # For the sake of simplicity in testing, the Paddle2ONNX packaging program will temporarily only package executable files for Python 3.8. + # In the future, we will need to extend support to cover Python 3.8 through Python 3.10. steps: - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Checkout Paddle2ONNX - uses: actions/checkout@v4 - with: - submodules: true - path: paddle2onnx - - - name: Checkout Protobuf - uses: actions/checkout@v4 - with: - repository: protocolbuffers/protobuf - ref: v3.16.0 - path: protobuf - - - name: Build Protobuf - working-directory: ./protobuf - run: | - #============ - cmake ./cmake -B build_wd -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install_dir - cmake --build ./build_wd - cmake --build ./build_wd -- install - echo "$PWD/install_dir/bin" >> $GITHUB_PATH - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel auditwheel auditwheel-symbols - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - - name: Build Paddle2ONNX - working-directory: ./paddle2onnx - run: | - python setup.py install + - name: Setup Python 3.8 + uses: actions/setup-python@v5 + with: + python-version: '3.8' + + # Checkout the latest branch of Paddle2ONNX. + - name: Checkout Paddle2ONNX + uses: actions/checkout@v4 + with: + submodules: true + path: paddle2onnx + + # Checkout the branch(v3.16.0) of Paddle2ONNX. + - name: Checkout Protobuf + uses: actions/checkout@v4 + with: + repository: protocolbuffers/protobuf + ref: v3.16.0 + path: protobuf + + # Build Protobuf, detailed process can refer to the [Paddle2ONNX construction documentation](https://github.com/PaddlePaddle/Paddle2ONNX/blob/develop/docs/zh/compile.md). + - name: Build Protobuf + working-directory: ./protobuf + run: | + #============ + cmake ./cmake -B build_wd -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install_dir + cmake --build ./build_wd + cmake --build ./build_wd -- install + echo "$PWD/install_dir/bin" >> $GITHUB_PATH + + # Install Dependencies for Python + - name: Install Dependencies for Python + run: | + python -m pip install --upgrade pip + pip install setuptools wheel auditwheel auditwheel-symbols build + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + # Build Paddle2ONNX + - name: Build Paddle2ONNX + working-directory: ./paddle2onnx + run: | + python -m build + python -m pip install dist/*.whl + + # Install Test + - name: Run Test + working-directory: ./paddle2onnx/tests + run: | + bash run.sh python \ No newline at end of file diff --git a/.gitignore b/.gitignore index a6d7ed15a..5ea3acdee 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ paddle2onnx.egg-info/* *_*.onnx *.log version.py -paddle2onnx/mappers_registry.h +paddle2onnx/mappers_registry.h \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 93b9e7267..8d01c9dce 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,11 @@ -[submodule "third/onnx"] - path = third/onnx +[submodule "third_party/onnx"] + path = third_party/onnx url = https://github.com/onnx/onnx.git branch = da889e6b95750350726d149bf447bf0cd1245964 -[submodule "third/optimizer"] - path = third/optimizer +[submodule "third_party/optimizer"] + path = third_party/optimizer url = https://github.com/onnx/optimizer.git branch = a37748b2c3a80dad4274401c45c5026c7a506730 -[submodule "third/pybind11"] - path = third/pybind11 +[submodule "third_party/pybind11"] + path = third_party/pybind11 url = https://github.com/pybind/pybind11.git - branch = master diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ef7d01ad..8e14d09da 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,17 +58,17 @@ if(NOT TARGET onnx_proto) endif() set(CMAKE_POSITION_INDEPENDENT_CODE ON) - add_subdirectory(${PROJECT_SOURCE_DIR}/third/onnx) + add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/onnx) endif() include_directories(${PROJECT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -include_directories(${PROJECT_SOURCE_DIR}/third/optimizer) +include_directories(${PROJECT_SOURCE_DIR}/third_party/optimizer) add_subdirectory(${PROJECT_SOURCE_DIR}/paddle2onnx/proto) -file(GLOB_RECURSE ALL_SRCS ${PROJECT_SOURCE_DIR}/paddle2onnx/*.cc ${PROJECT_SOURCE_DIR}/third/optimizer/onnxoptimizer/*.cc) +file(GLOB_RECURSE ALL_SRCS ${PROJECT_SOURCE_DIR}/paddle2onnx/*.cc ${PROJECT_SOURCE_DIR}/third_party/optimizer/onnxoptimizer/*.cc) list(REMOVE_ITEM ALL_SRCS ${PROJECT_SOURCE_DIR}/paddle2onnx/cpp2py_export.cc) -list(REMOVE_ITEM ALL_SRCS ${PROJECT_SOURCE_DIR}/third/optimizer/onnxoptimizer/cpp2py_export.cc) +list(REMOVE_ITEM ALL_SRCS ${PROJECT_SOURCE_DIR}/third_party/optimizer/onnxoptimizer/cpp2py_export.cc) include_directories(${CMAKE_CURRENT_BINARY_DIR}) file(READ "${PROJECT_SOURCE_DIR}/VERSION_NUMBER" PADDLE2ONNX_VERSION) @@ -189,9 +189,9 @@ if(BUILD_PADDLE2ONNX_PYTHON) target_include_directories(paddle2onnx_cpp2py_export PUBLIC ${pybind11_INCLUDE_DIRS}) else() - if(EXISTS ${PROJECT_SOURCE_DIR}/third/pybind11/include/pybind11/pybind11.h) + if(EXISTS ${PROJECT_SOURCE_DIR}/third_party/pybind11/include/pybind11/pybind11.h) target_include_directories(paddle2onnx_cpp2py_export PUBLIC - ${PROJECT_SOURCE_DIR}/third/pybind11/include) + ${PROJECT_SOURCE_DIR}/third_party/pybind11/include) else() message(FATAL_ERROR "cannot find pybind") endif() diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..81497ee64 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,8 @@ +recursive-include cmake * +recursive-include paddle2onnx * +recursive-include third_party * +recursive-include tools * + +include LICENSE +include VERSION_NUMBER +include CMakeLists.txt \ No newline at end of file diff --git a/README.md b/README.md index 08af33eaa..ff27ea428 100755 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ TensorRT/OpenVINO/MNN/TNN/NCNN,以及其它对 ONNX 开源格式进行支持 # 2 环境依赖 -- PaddlePaddle 2.6.0 +- PaddlePaddle == 2.6.0 - onnxruntime >= 1.10.0 # 3 安装 diff --git a/paddle2onnx/__init__.py b/paddle2onnx/__init__.py index 21433493a..b9aa96382 100755 --- a/paddle2onnx/__init__.py +++ b/paddle2onnx/__init__.py @@ -17,10 +17,8 @@ from .convert import dygraph2onnx from .convert import program2onnx from .version import version -from .version import git_version __version__ = version -__commit_id__ = git_version def export(model_file, diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..68876acb3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel", + "cmake>=3.16", + "setuptools-scm" +] +build-backend = "setuptools.build_meta" + +[project] +name = "paddle2onnx" +dynamic = ["version"] +description = "Export PaddlePaddle to ONNX" +readme = "README.md" +authors = [ + {name = "paddle-infer", email = "paddle-infer@baidu.com"}, +] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", +] +license = {text = "Apache License v2.0"} +requires-python = ">=3.8" +dependencies = [ + "onnxruntime>=1.10.0", +] + +[project.scripts] +paddle2onnx = "paddle2onnx.command:main" + +[tool.setuptools.dynamic] +version = {file = "VERSION_NUMBER"} + +[tool.setuptools.packages.find] +include = ["paddle2onnx*"] + +[tool.setuptools_scm] +write_to = "paddle2onnx/version.py" + +[tool.mypy] +files = "setup.py" +python_version = "3.8" +strict = true +show_error_codes = true +enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] +warn_unreachable = true \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100755 index e69de29bb..000000000 diff --git a/setup.py b/setup.py index 0b979a350..77f0f9b97 100755 --- a/setup.py +++ b/setup.py @@ -45,9 +45,6 @@ CMAKE = find_executable('cmake3') or find_executable('cmake') MAKE = find_executable('make') -setup_requires = [] -extras_require = {} - ################################################################################ # Global variables for controlling the build variant ################################################################################ @@ -56,19 +53,6 @@ # However going forward the recomemded way to is to set this to False\0 USE_MSVC_STATIC_RUNTIME = bool(os.getenv('USE_MSVC_STATIC_RUNTIME', '1') == '1') ONNX_NAMESPACE = os.getenv('ONNX_NAMESPACE', 'paddle2onnx') -################################################################################ -# Version -################################################################################ - -try: - git_version = subprocess.check_output( - ['git', 'rev-parse', 'HEAD'], cwd=TOP_DIR).decode('ascii').strip() -except (OSError, subprocess.CalledProcessError): - git_version = None - -with open(os.path.join(TOP_DIR, 'VERSION_NUMBER')) as version_file: - VersionInfo = namedtuple('VersionInfo', ['version', 'git_version'])( - version=version_file.read().strip(), git_version=git_version) ################################################################################ # Pre Check @@ -108,21 +92,6 @@ def finalize_options(self): pass -class create_version(ONNXCommand): - def run(self): - with open(os.path.join(SRC_DIR, 'version.py'), 'w') as f: - f.write( - dedent('''\ - # This file is generated by setup.py. DO NOT EDIT! - from __future__ import absolute_import - from __future__ import division - from __future__ import print_function - from __future__ import unicode_literals - version = '{version}' - git_version = '{git_version}' - '''.format(**dict(VersionInfo._asdict())))) - - class cmake_build(setuptools.Command): """ Compiles everything when `python setupmnm.py build` is run using cmake. @@ -164,8 +133,7 @@ def run(self): '-DBUILD_PADDLE2ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE={}'.format(ONNX_NAMESPACE), - '-DPY_EXT_SUFFIX={}'.format( - sysconfig.get_config_var('EXT_SUFFIX') or ''), + '-DPY_EXT_SUFFIX={}'.format(sysconfig.get_config_var('EXT_SUFFIX') or ''), ] cmake_args.append('-DCMAKE_BUILD_TYPE=%s' % build_type) if WINDOWS: @@ -200,7 +168,6 @@ def run(self): class build_py(setuptools.command.build_py.build_py): def run(self): - self.run_command('create_version') self.run_command('cmake_build') generated_python_files = \ @@ -258,7 +225,6 @@ def run(self): cmdclass = { - 'create_version': create_version, 'cmake_build': cmake_build, 'build_py': build_py, 'develop': develop, @@ -275,46 +241,11 @@ def run(self): name=str('paddle2onnx.paddle2onnx_cpp2py_export'), sources=[]) ] -################################################################################ -# Packages -################################################################################ - -# no need to do fancy stuff so far -packages = setuptools.find_packages() - -################################################################################ -# Test -################################################################################ - -setup_requires.append('pytest-runner') - -if sys.version_info[0] == 3: - # Mypy doesn't work with Python 2 - extras_require['mypy'] = ['mypy==0.600'] - ################################################################################ # Final ################################################################################ setuptools.setup( - name="paddle2onnx", - version=VersionInfo.version, - description="Export PaddlePaddle to ONNX", ext_modules=ext_modules, cmdclass=cmdclass, - packages=packages, - include_package_data=True, - setup_requires=setup_requires, - extras_require=extras_require, - author='paddle-infer', - author_email='paddle-infer@baidu.com', - url='https://github.com/PaddlePaddle/Paddle2ONNX.git', - # install_requires=['six', 'protobuf', 'onnx<=1.9.0'], - install_requires=['six'], - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - ], - license='Apache 2.0', - entry_points={'console_scripts': ['paddle2onnx=paddle2onnx.command:main']}) +) diff --git a/setup_dev.py b/setup_dev.py deleted file mode 100644 index 99bad0169..000000000 --- a/setup_dev.py +++ /dev/null @@ -1,319 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# This file referred to github.com/onnx/onnx.git - -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - -from distutils.spawn import find_executable -from distutils import sysconfig, log -import setuptools -import setuptools.command.build_py -import setuptools.command.develop -import setuptools.command.build_ext - -from collections import namedtuple -from contextlib import contextmanager -import glob -import os -import shlex -import subprocess -import sys -import platform -from textwrap import dedent -import multiprocessing - -TOP_DIR = os.path.realpath(os.path.dirname(__file__)) -SRC_DIR = os.path.join(TOP_DIR, 'paddle2onnx') -CMAKE_BUILD_DIR = os.path.join(TOP_DIR, '.setuptools-cmake-build') - -WINDOWS = (os.name == 'nt') - -CMAKE = find_executable('cmake3') or find_executable('cmake') -MAKE = find_executable('make') - -setup_requires = [] -extras_require = {} - -################################################################################ -# Global variables for controlling the build variant -################################################################################ - -# Default value is set to TRUE\1 to keep the settings same as the current ones. -# However going forward the recomemded way to is to set this to False\0 -USE_MSVC_STATIC_RUNTIME = bool(os.getenv('USE_MSVC_STATIC_RUNTIME', '1') == '1') -ONNX_NAMESPACE = os.getenv('ONNX_NAMESPACE', 'paddle2onnx') -################################################################################ -# Version -################################################################################ - -try: - git_version = subprocess.check_output( - ['git', 'rev-parse', 'HEAD'], cwd=TOP_DIR).decode('ascii').strip() -except (OSError, subprocess.CalledProcessError): - git_version = None - -with open(os.path.join(TOP_DIR, 'VERSION_NUMBER')) as version_file: - VersionInfo = namedtuple('VersionInfo', ['version', 'git_version'])( - version=version_file.read().strip(), git_version=git_version) - -################################################################################ -# Pre Check -################################################################################ - -assert CMAKE, 'Could not find "cmake" executable!' - -################################################################################ -# Utilities -################################################################################ - - -@contextmanager -def cd(path): - if not os.path.isabs(path): - raise RuntimeError('Can only cd to absolute path, got: {}'.format(path)) - orig_path = os.getcwd() - os.chdir(path) - try: - yield - finally: - os.chdir(orig_path) - - -################################################################################ -# Customized commands -################################################################################ - - -class ONNXCommand(setuptools.Command): - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - -class create_version(ONNXCommand): - def run(self): - with open(os.path.join(SRC_DIR, 'version.py'), 'w') as f: - f.write( - dedent('''\ - # This file is generated by setup.py. DO NOT EDIT! - from __future__ import absolute_import - from __future__ import division - from __future__ import print_function - from __future__ import unicode_literals - version = '{version}' - git_version = '{git_version}' - '''.format(**dict(VersionInfo._asdict())))) - - -class cmake_build(setuptools.Command): - """ - Compiles everything when `python setupmnm.py build` is run using cmake. - Custom args can be passed to cmake by specifying the `CMAKE_ARGS` - environment variable. - The number of CPUs used by `make` can be specified by passing `-j` - to `setup.py build`. By default all CPUs are used. - """ - user_options = [(str('jobs='), str('j'), - str('Specifies the number of jobs to use with make'))] - - built = False - - def initialize_options(self): - self.jobs = None - - def finalize_options(self): - if sys.version_info[0] >= 3: - self.set_undefined_options('build', ('parallel', 'jobs')) - if self.jobs is None and os.getenv("MAX_JOBS") is not None: - self.jobs = os.getenv("MAX_JOBS") - self.jobs = multiprocessing.cpu_count() if self.jobs is None else int( - self.jobs) - - def run(self): - if cmake_build.built: - return - cmake_build.built = True - if not os.path.exists(CMAKE_BUILD_DIR): - os.makedirs(CMAKE_BUILD_DIR) - - with cd(CMAKE_BUILD_DIR): - build_type = 'Release' - # configure - cmake_args = [ - CMAKE, - '-DPYTHON_INCLUDE_DIR={}'.format(sysconfig.get_python_inc()), - '-DPYTHON_EXECUTABLE={}'.format(sys.executable), - '-DBUILD_PADDLE2ONNX_PYTHON=ON', - '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', - '-DONNX_NAMESPACE={}'.format(ONNX_NAMESPACE), - '-DPY_EXT_SUFFIX={}'.format( - sysconfig.get_config_var('EXT_SUFFIX') or ''), - ] - cmake_args.append('-DCMAKE_BUILD_TYPE=%s' % build_type) - if WINDOWS: - cmake_args.extend([ - # we need to link with libpython on windows, so - # passing python version to window in order to - # find python in cmake - '-DPY_VERSION={}'.format('{0}.{1}'.format(* \ - sys.version_info[:2])), - ]) - if platform.architecture()[0] == '64bit': - cmake_args.extend(['-A', 'x64', '-T', 'host=x64']) - else: - cmake_args.extend(['-A', 'Win32', '-T', 'host=x86']) - if 'CMAKE_ARGS' in os.environ: - extra_cmake_args = shlex.split(os.environ['CMAKE_ARGS']) - # prevent crossfire with downstream scripts - del os.environ['CMAKE_ARGS'] - log.info('Extra cmake args: {}'.format(extra_cmake_args)) - cmake_args.extend(extra_cmake_args) - cmake_args.append(TOP_DIR) - subprocess.check_call(cmake_args) - - build_args = [CMAKE, '--build', os.curdir] - if WINDOWS: - build_args.extend(['--config', build_type]) - build_args.extend(['--', '/maxcpucount:{}'.format(self.jobs)]) - else: - build_args.extend(['--', '-j', str(self.jobs)]) - subprocess.check_call(build_args) - - -class build_py(setuptools.command.build_py.build_py): - def run(self): - self.run_command('create_version') - self.run_command('cmake_build') - - generated_python_files = \ - glob.glob(os.path.join(CMAKE_BUILD_DIR, 'paddle2onnx', '*.py')) + \ - glob.glob(os.path.join(CMAKE_BUILD_DIR, 'paddle2onnx', '*.pyi')) - - for src in generated_python_files: - dst = os.path.join(TOP_DIR, os.path.relpath(src, CMAKE_BUILD_DIR)) - self.copy_file(src, dst) - - return setuptools.command.build_py.build_py.run(self) - - -class develop(setuptools.command.develop.develop): - def run(self): - self.run_command('build_py') - setuptools.command.develop.develop.run(self) - - -class build_ext(setuptools.command.build_ext.build_ext): - def run(self): - self.run_command('cmake_build') - setuptools.command.build_ext.build_ext.run(self) - - def build_extensions(self): - for ext in self.extensions: - fullname = self.get_ext_fullname(ext.name) - filename = os.path.basename(self.get_ext_filename(fullname)) - - lib_path = CMAKE_BUILD_DIR - if os.name == 'nt': - debug_lib_dir = os.path.join(lib_path, "Debug") - release_lib_dir = os.path.join(lib_path, "Release") - if os.path.exists(debug_lib_dir): - lib_path = debug_lib_dir - elif os.path.exists(release_lib_dir): - lib_path = release_lib_dir - src = os.path.join(lib_path, filename) - dst = os.path.join( - os.path.realpath(self.build_lib), "paddle2onnx", filename) - self.copy_file(src, dst) - - -class mypy_type_check(ONNXCommand): - description = 'Run MyPy type checker' - - def run(self): - """Run command.""" - onnx_script = os.path.realpath( - os.path.join( - os.path.dirname(os.path.abspath(__file__)), - "tools/mypy-onnx.py")) - returncode = subprocess.call([sys.executable, onnx_script]) - sys.exit(returncode) - - -cmdclass = { - 'create_version': create_version, - 'cmake_build': cmake_build, - 'build_py': build_py, - 'develop': develop, - 'build_ext': build_ext, - 'typecheck': mypy_type_check, -} - -################################################################################ -# Extensions -################################################################################ - -ext_modules = [ - setuptools.Extension( - name=str('paddle2onnx.paddle2onnx_cpp2py_export'), sources=[]) -] - -################################################################################ -# Packages -################################################################################ - -# no need to do fancy stuff so far -packages = setuptools.find_packages() - -################################################################################ -# Test -################################################################################ - -setup_requires.append('pytest-runner') - -if sys.version_info[0] == 3: - # Mypy doesn't work with Python 2 - extras_require['mypy'] = ['mypy==0.600'] - -################################################################################ -# Final -################################################################################ - -setuptools.setup( - name="paddle2onnx", - version=VersionInfo.version, - description="Export PaddlePaddle to ONNX", - ext_modules=ext_modules, - cmdclass=cmdclass, - packages=packages, - include_package_data=True, - setup_requires=setup_requires, - extras_require=extras_require, - author='paddle-infer', - author_email='paddle-infer@baidu.com', - url='https://github.com/PaddlePaddle/Paddle2ONNX.git', - # install_requires=['six', 'protobuf', 'onnx<=1.9.0'], - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - ], - license='Apache 2.0', - entry_points={'console_scripts': ['paddle2onnx=paddle2onnx.command:main']}) diff --git a/tests/run.sh b/tests/run.sh index 16b94f6d8..a10f741e9 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -64,10 +64,10 @@ bug=0 # Install Python Packet export PY_CMD=$1 -$PY_CMD -m pip install pytest -i https://pypi.tuna.tsinghua.edu.cn/simple -$PY_CMD -m pip install onnx onnxruntime tqdm filelock -i https://pypi.tuna.tsinghua.edu.cn/simple -$PY_CMD -m pip install paddlepaddle==2.6.0 -i https://pypi.tuna.tsinghua.edu.cn/simple -$PY_CMD -m pip install six hypothesis -i https://pypi.tuna.tsinghua.edu.cn/simple +$PY_CMD -m pip install pytest +$PY_CMD -m pip install onnx onnxruntime tqdm filelock +$PY_CMD -m pip install paddlepaddle==2.6.0 +$PY_CMD -m pip install six hypothesis export ENABLE_DEV=ON diff --git a/third/onnx b/third/onnx deleted file mode 160000 index 5b1346e30..000000000 --- a/third/onnx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5b1346e30d66e4ec550f6b63c3883b258a2e8e3e diff --git a/third/optimizer b/third/optimizer deleted file mode 160000 index ca134ccfe..000000000 --- a/third/optimizer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ca134ccfe723b9f49bff54973379a49e7d80088d diff --git a/third/pybind11 b/third/pybind11 deleted file mode 160000 index f306012b5..000000000 --- a/third/pybind11 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f306012b55beccf93ffa5ce63d3a21450620eb61 diff --git a/third_party/onnx b/third_party/onnx new file mode 160000 index 000000000..da889e6b9 --- /dev/null +++ b/third_party/onnx @@ -0,0 +1 @@ +Subproject commit da889e6b95750350726d149bf447bf0cd1245964 diff --git a/third_party/optimizer b/third_party/optimizer new file mode 160000 index 000000000..a37748b2c --- /dev/null +++ b/third_party/optimizer @@ -0,0 +1 @@ +Subproject commit a37748b2c3a80dad4274401c45c5026c7a506730 diff --git a/third_party/pybind11 b/third_party/pybind11 new file mode 160000 index 000000000..f33f6afb6 --- /dev/null +++ b/third_party/pybind11 @@ -0,0 +1 @@ +Subproject commit f33f6afb667b6b5c0da7dee98dc02f51b4cc0e96