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

Standardize batch format. Introduce batch postprocessing. #107

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

ibro45
Copy link
Collaborator

@ibro45 ibro45 commented Mar 18, 2024

Description

Defined a clear batch format requirement. A batch must be a Dict containing "input" (required), "target" (optional), and/or "id" (optional).

Simplified the criterion calculation - "target" will be passed to the criterion if it's in the batch instead of checking if criterion has a target argument.

LighterSystem's postprocessing now includes batch in addition to the existing criterion, metrics, and logging. This allows easy manipulation of the batch data primarily to get it in the correct format where that is not possible/convenient with Transforms - for example torchvision's CIFAR10 dataset.

Related Issue

None

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

Checklist

  • I've read the CODE_OF_CONDUCT.md document.
  • I've read the CONTRIBUTING.md guide.
  • I've updated the code style using make codestyle.
  • I've written tests for all new methods and classes that I created.
  • I've written the docstring in Google format for all the methods and classes that I used.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 18, 2024
@ibro45 ibro45 merged commit 7748fbf into main Mar 25, 2024
7 checks passed
@ibro45 ibro45 deleted the refactor_batch branch March 25, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant