Remove JAX constraints in Exporter (#8309)

This commit is contained in:
Glenn Jocher 2024-02-19 19:44:51 +01:00 committed by GitHub
parent d8b8b71866
commit e4a62f99f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View File

@ -113,8 +113,6 @@ jobs:
run: |
python -m pip install --upgrade pip wheel
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
# Fix SavedModel issue "partially initialized module 'jax' has no attribute 'version' (most likely due to a circular import)" in https://github.com/google/jax/discussions/14036
# pip install -U 'jax!=0.4.15' 'jaxlib!=0.4.15'
yolo export format=tflite imgsz=32 || true
- name: Check environment
run: |

View File

@ -860,8 +860,7 @@ class Exporter:
@try_export
def export_tfjs(self, prefix=colorstr("TensorFlow.js:")):
"""YOLOv8 TensorFlow.js export."""
# JAX bug requiring install constraints in https://github.com/google/jax/issues/18978
check_requirements(["jax<=0.4.21", "jaxlib<=0.4.21", "tensorflowjs"])
check_requirements("tensorflowjs")
import tensorflow as tf
import tensorflowjs as tfjs # noqa