From fbd88746263fec0f72f2f01bcc382e88e902ab50 Mon Sep 17 00:00:00 2001 From: Ramesh Sampath Date: Fri, 19 Apr 2024 04:39:34 -0700 Subject: [PATCH] Update keras import to fix build error. `from keras import ops` or `import keras` are valid, but `import keras.ops` is no longer valid since ops is not a module in keras namespace, but points to the public API. PiperOrigin-RevId: 626326912 --- lit_nlp/examples/models/instrumented_keras_lms.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lit_nlp/examples/models/instrumented_keras_lms.py b/lit_nlp/examples/models/instrumented_keras_lms.py index 44236311..f9b4cbcd 100644 --- a/lit_nlp/examples/models/instrumented_keras_lms.py +++ b/lit_nlp/examples/models/instrumented_keras_lms.py @@ -6,8 +6,7 @@ from typing import Sequence from absl import logging -import keras.backend -import keras.ops +import keras from lit_nlp.api import model as lit_model from lit_nlp.api import types as lit_types from lit_nlp.lib import utils as lit_utils