Skip to content

Commit

Permalink
Pin Keras 2 for new TF versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsitsi committed Aug 21, 2024
1 parent ed912c6 commit 31836bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import setuptools

tensorflow = ["tensorflow>=2.6"]
tensorflow = ["tensorflow>=2.6", "tf-keras~=2.16"]
pytorch = ["torch>=1.11", "torchdata"]
sklearn = ["scikit-learn>=1.0"]
cloud = ["tiledb-cloud"]
Expand Down
4 changes: 4 additions & 0 deletions tiledb/ml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import os

from pkg_resources import DistributionNotFound, get_distribution # type: ignore

# TODO change pkg_resources with importlib.metadata, as described here
# https://pypi.org/project/setuptools-scm/#:~:text=Retrieving%20package%20version%20at%20runtime, when we stop
# supporting Python 3.7. We the aforementioned change, we can avoid the 100ms overhead during import of the package.

os.environ["TF_USE_LEGACY_KERAS"] = "1"

try:
__version__ = get_distribution("tiledb-ml").version
except DistributionNotFound:
Expand Down

0 comments on commit 31836bd

Please sign in to comment.