Pin jax and jaxlib to fix tensorflowjs exports (#6988)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Laughing 2023-12-15 01:35:45 +08:00 committed by GitHub
parent 765b98f44e
commit d6be91d786
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

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