Fix Failing RPi CI (#13088)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/13094/head
Lakshantha Dissanayake 10 months ago committed by GitHub
parent 11623eeb00
commit 027d4a6304
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/ci.yaml
  2. 4
      ultralytics/engine/exporter.py

@ -253,7 +253,7 @@ jobs:
- name: Install requirements
run: |
python -m pip install --upgrade pip wheel
pip install -e ".[export]" pytest
pip install --no-cache-dir -e ".[export]" pytest mlflow pycocotools "ray[tune]"
- name: Check environment
run: |
yolo checks

@ -75,6 +75,7 @@ from ultralytics.utils import (
ARM64,
DEFAULT_CFG,
IS_JETSON,
IS_RASPBERRYPI,
LINUX,
LOGGER,
MACOS,
@ -1011,10 +1012,11 @@ class Exporter:
"""Add metadata to *.tflite models per https://www.tensorflow.org/lite/models/convert/metadata."""
import flatbuffers
if MACOS: # TFLite Support bug https://github.com/tensorflow/tflite-support/issues/954#issuecomment-2108570845
if MACOS or IS_RASPBERRYPI: # TODO: should this be 'if ARM64:'?
from tflite_support import metadata # noqa
from tflite_support import metadata_schema_py_generated as schema # noqa
else:
# TFLite Support bug https://github.com/tensorflow/tflite-support/issues/954#issuecomment-2108570845
from tensorflow_lite_support.metadata import metadata_schema_py_generated as schema # noqa
from tensorflow_lite_support.metadata.python import metadata # noqa

Loading…
Cancel
Save