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

bug fix tensorflow trainer #492

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Conversation

arnaudvl
Copy link
Contributor

Addresses #491 . Requires that, when an explicit dataset is passed to the TensorFlow trainer, it returns (x, y). This behaviour is the same as what is expected for the PyTorch trainer where we pass a dataloader returning (x, y). Compatible with the usage of the trainer in the outlier, adversarial and drift detectors.

@arnaudvl arnaudvl requested a review from jklaise April 27, 2022 11:28
@@ -57,6 +57,7 @@ def trainer(
callbacks
Callbacks used during training.
"""
return_xy = False if not isinstance(dataset, tf.keras.utils.Sequence) and y_train is None else True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be probably simplified to ... if not dataset and ... (would ignore None and empty dataset) ? Similarly could write ... and not y_train ... to use the same pattern. (That being said I see if not isinstance(...) is used on the line below too, so happy to keep this to avoid further changes).

@arnaudvl arnaudvl merged commit a0e7082 into SeldonIO:master Apr 27, 2022
@ascillitoe ascillitoe added this to the v0.9.2 milestone Apr 27, 2022
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.

None yet

3 participants