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(trainers): Add support for DistributedDatasetsFromFunction in data adapters #20829

Conversation

harshaljanjani
Copy link
Contributor

Changes:

  • Added DistributedDatasetsFromFunction to the list of recognized dataset types in is_tf_dataset()
  • Added test cases to verify adapter properties and model integration support

Fixes #20134.

…a adapters

The is_tf_dataset() function in data adapters now recognizes DistributedDatasetsFromFunction as a valid TensorFlow dataset type. This allows for properly handling distributed datasets created via strategy.distribute_datasets_from_function()

- Added test case to verify distributed datasets from function support
@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.55%. Comparing base (738c313) to head (613e6b5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #20829      +/-   ##
==========================================
+ Coverage   75.99%   76.55%   +0.55%     
==========================================
  Files         559      559              
  Lines       52367    52367              
  Branches     8096     8096              
==========================================
+ Hits        39796    40087     +291     
+ Misses      10710    10348     -362     
- Partials     1861     1932      +71     
Flag Coverage Δ
keras 76.46% <ø> (+0.63%) ⬆️
keras-jax 64.25% <ø> (+<0.01%) ⬆️
keras-numpy 58.98% <ø> (?)
keras-openvino 29.81% <ø> (?)
keras-tensorflow 64.82% <ø> (+<0.01%) ⬆️
keras-torch ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@harshaljanjani
Copy link
Contributor Author

I believe the CI breakage is still happening with torch-xla. Please look into it, thanks!

@divyashreepathihalli
Copy link
Collaborator

torch fix has been merged

Copy link
Collaborator

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Jan 31, 2025
@fchollet fchollet merged commit fc1b26d into keras-team:master Jan 31, 2025
7 of 8 checks passed
@google-ml-butler google-ml-butler bot removed awaiting review ready to pull Ready to be merged into the codebase kokoro:force-run labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

datas_adapters:is_tf_dataset should also support DistributedDatasetsFromFunction
5 participants