Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint warning and import error in data_types_and_io tf example #1762

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

eapolinario
Copy link
Collaborator

@eapolinario eapolinario commented Oct 22, 2024

Unfortunately the example added in #1739 cannot make use of the is_container ImageSpec functionality because some of the imported types are part of the task definition, e.g.:

@task
def train_model() -> tf.keras.Model:
    model = tf.keras.Sequential(
        [tf.keras.layers.Dense(128, activation="relu"), tf.keras.layers.Dense(10, activation="softmax")]
    )
    model.compile(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"])
    return model

Notice the use of tf.keras.Model as the task output.

This PR removes the is_container check and fixes the lint warning.

@eapolinario eapolinario merged commit 9aadec2 into master Oct 22, 2024
60 checks passed
@eapolinario eapolinario deleted the fix-lint-and-import-error branch October 22, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants