From 660b8ea558810fe0f1b77c0fea8753888ad365ec Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 19 Apr 2024 01:36:20 +0000 Subject: [PATCH 1/2] Check if latest protobuf can pass CI. Signed-off-by: Jay Zhang --- .../templates/keras2onnx_application_tests.yml | 8 ++++---- .../azure_pipelines/templates/keras2onnx_unit_test.yml | 8 ++++---- ci_build/azure_pipelines/templates/setup.yml | 3 ++- setup.py | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml b/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml index 2c4a54e7c..3206fbe19 100644 --- a/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml +++ b/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml @@ -19,8 +19,8 @@ steps: conda config --set always_yes yes --set changeps1 no pip install onnxconverter-common pip install $(ONNX_PATH) - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator @@ -84,8 +84,8 @@ steps: echo Test numpy installation... && python -c "import numpy" pip install onnxconverter-common pip install %ONNX_PATH% - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator diff --git a/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml b/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml index adb436f0a..e8475b15f 100644 --- a/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml +++ b/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml @@ -19,8 +19,8 @@ steps: conda config --set always_yes yes --set changeps1 no pip install onnxconverter-common pip install $(ONNX_PATH) - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator @@ -67,8 +67,8 @@ steps: echo Test numpy installation... && python -c "import numpy" pip install onnxconverter-common pip install %ONNX_PATH% - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator diff --git a/ci_build/azure_pipelines/templates/setup.yml b/ci_build/azure_pipelines/templates/setup.yml index 2e2e86c98..0045ef46c 100644 --- a/ci_build/azure_pipelines/templates/setup.yml +++ b/ci_build/azure_pipelines/templates/setup.yml @@ -30,7 +30,8 @@ steps: pip uninstall -y tensorflow pip install $(CI_PIP_TF_NAME) pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip install "protobuf~=3.20" + pip install protobuf python setup.py install diff --git a/setup.py b/setup.py index 85fece3a2..777651491 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ def run(self): author='ONNX', author_email='onnx-technical-discuss@lists.lfaidata.foundation', url='https://github.com/onnx/tensorflow-onnx', - install_requires=['numpy>=1.14.1', 'onnx>=1.4.1', 'requests', 'six', 'flatbuffers>=1.12', 'protobuf~=3.20'], + install_requires=['numpy>=1.14.1', 'onnx>=1.4.1', 'requests', 'six', 'flatbuffers>=1.12', 'protobuf'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', From c3f7841d572a5de925239fa261ab6a5a580baade Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 23 May 2024 05:59:18 +0000 Subject: [PATCH 2/2] Migrate pylint to Github actions. --- .github/workflows/pylint.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 000000000..fcadf089e --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,29 @@ +name: Pylint Workflow + +on: + push: + branches: + - main + +jobs: + pylint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 # Specify the desired Python version (e.g., 3.8, 3.9) + + - name: Install dependencies + run: pip install pylint==2.4.4 + + - name: Run pylint + run: | + pip freeze + pylint --rcfile=tools/pylintrc --ignore=version.py,tflite --disable=cyclic-import tf2onnx tests/*.py tools -j 0 + displayName: 'Pylint' + +# Add other jobs or steps as needed