-
Notifications
You must be signed in to change notification settings - Fork 768
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentation-backloggedFor internal use. Reserved for community team workflow.For internal use. Reserved for community team workflow.priority/p1
Description
Describe the bug
Following the example from https://www.union.ai/docs/flyte/user-guide/data-input-output/tensorflow/ I tried returning a keras.Model, but receive the following error due to a naming problem:
ValueError: Failed to convert outputs of task 'src.workflows.tutorial_example.train_model' at position 0.
Failed to convert type <class 'keras.src.models.sequential.Sequential'> to type <class 'keras.src.models.model.Model'>.
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/flytek4ddfb4d/local_flytekit/6f804fd14418b087683c300d6a2547fe..It seems that the path that flyte gives to keras' save function does not end with an allowed extension such as keras (which it can't infer anyway).
Is the workaround/fix to save the model and give back a folder/file instead? Then the docs should reflect that.
Expected behavior
To save the keras model as task output to feed it to another task.
Additional context to reproduce
- Follow tutorial from https://www.union.ai/docs/flyte/user-guide/data-input-output/tensorflow/ (only requires the
train_model-function) - Run the workflow
Screenshots
No response
Are you sure this issue hasn't been raised already?
- Yes
Have you read the Code of Conduct?
- Yes
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentation-backloggedFor internal use. Reserved for community team workflow.For internal use. Reserved for community team workflow.priority/p1
Type
Projects
Status
Backlog