Skip to content

Commit

Permalink
Remove JAX constraints in Exporter (ultralytics#8309)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored and hmurari committed Apr 17, 2024
1 parent 266940c commit 969f5e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
3 changes: 1 addition & 2 deletions ultralytics/engine/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,7 @@ def export_edgetpu(self, tflite_model="", prefix=colorstr("Edge TPU:")):
@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

Expand Down

0 comments on commit 969f5e1

Please sign in to comment.