apache / beam

Apache Beam is a unified programming model for Batch and Streaming data processing.
https://beam.apache.org/
Apache License 2.0
7.88k stars 4.27k forks source link

[Task]: Support Keras 3 in TFModelHandlers #30616

Open riteshghorse opened 8 months ago

riteshghorse commented 8 months ago

What needs to happen?

Right now, if the models are not saved in .keras format, keras 3 will throw an error as observed in #30613. Allow loading both kind of models (models saved in SavedModel format and .keras) in TFModelHandlers.

Remove the keras<3.0.0 dependency from here once the support is added.

Issue Priority

Priority: 2 (default / most normal work should be filed as P2)

Issue Components

riteshghorse commented 8 months ago

Actually this work as is for Keras 3. The problem is when the users try to use the deprecated SavedModel format with tensorflow>=2.16 as mentioned here. So actual work here is to raise a meaningful exception if this compatibility contract is broken.