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

Update DataLoader Usage Example in Documentation (Fixes #110) #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agentmarketbot
Copy link

Pull Request Description

Overview

This pull request addresses the feedback provided in Issue #110 concerning the DataLoader usage example in the repository's documentation. The original example did not properly utilize the enumerate function, which is essential for tracking the index of each batch while iterating through the data loader.

Changes Made

  • Updated DataLoader Example: The example in the documentation was modified to include the enumerate() function. This change ensures that users can correctly obtain both the batch index and the batch contents during iteration.

Code Changes

The documentation in the README.md file has been updated from:

for batch_idx, (x_batch, y_batch) in data_loader:
    pass

To:

for batch_idx, (x_batch, y_batch) in enumerate(data_loader):
    pass

Additional Information

  • This change was prompted by user feedback that highlighted the need for clarity in the DataLoader example. Adding enumerate enhances the usability of the provided code snippet for developers who may not be familiar with how to manage batch indices effectively.
  • The change has been reviewed for consistency with the overall documentation style and correctness.

Conclusion

With these updates, the DataLoader example is now more intuitive and functional for users referencing the documentation.

Fixes #110.

Please review the changes and let me know if there are any further modifications required or if any additional documentation needs to be updated!

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.

DataLoader example
1 participant