modify SGD training to avoid using generators
Open
Nobody has claimed this yet.
help wanted
- Dominant language
- Python
- Stars
- 1k
- Forks
- 114
- Avg merge
- 19h 14m
- Merged PRs (30d)
- 1
Description
Currently, run_sgd uses generators to create a stream of minibatches, but this causes issues with jit. It may be better to refactor the code to work in terms of epochs, and then shuffle at the start, similar to this flax mnist example
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in dynamax/utils/optimize.py at run_sgd, then compare the epoch-based structure and shuffling approach in the linked Flax MNIST example. The refactor is complete when minibatch handling no longer uses generators and the SGD training flow is compatible with jit while preserving epoch-level shuffling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100