sparse-carpenter-66912
04/22/2025, 10:56 AMkeras.Model
(or a keras.Sequential
) from a task:
ValueError: Failed to convert outputs of task 'src.training.train_model.train_model' at position 0.
Failed to convert type <class 'keras.src.models.sequential.Sequential'> to type <class 'keras.src.models.sequential.Sequential'>.
Error Message: Invalid filepath extension for saving. Please add either a `.keras` extension for the native Keras format (recommended) or a `.h5` extension. Use `model.export(filepath)` if you want to export a SavedModel for use with TFLite/TFServing/etc. Received: filepath=/tmp/flytevounvueb/local_flytekit/6db7fff3d645ff2970ff0d578df334bc..
It seems like the filepath is missing an extension such as .keras
.
Is this a bug that I can't return a keras.Model
from a task?sparse-carpenter-66912
04/23/2025, 7:22 AMkeras.Model
. How can I fix this?sparse-carpenter-66912
04/23/2025, 8:48 AMFlyteFile
for the model file instead of the model itself. But this requires that the follow-up tasks load the model from the file every time which is not idealthankful-minister-83577
thankful-minister-83577
thankful-minister-83577
sparse-carpenter-66912
04/23/2025, 9:56 PMthankful-minister-83577
sparse-carpenter-66912
04/24/2025, 7:36 AM