Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M metaseq
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 95
    • Issues 95
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • metaseq
  • Merge requests
  • !361

fix bug when counting sequences_consumed near the end of an epoch

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/zdevito/dataloader3 into main Sep 29, 2022
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes 2

Created by: zdevito

I misunderstood how the DataLoader worked. I thought it just round-robin each of the workers in turn for the next batch. This is true until one of the workers runs out of batches. At that point it continues by asking other workers for batches until they all ran out. Previously I thought that it would just stop when the first worker ran out. This means that the code was accounting for sequences_consumed on each worker inaccurately at the very end of an epoch when some workers have no data.

This is a small patch that fixes the bug and makes it more robust by passing the worker_id to the StreamingCountingIterator instead of having it try to mimic the logic of which worker the batch came from.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/zdevito/dataloader3