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

Support checkpointing in PaddlePaddle iterator #5279

Merged
merged 5 commits into from
Feb 9, 2024

Conversation

szkarpinski
Copy link
Collaborator

@szkarpinski szkarpinski commented Jan 16, 2024

Category:

New feature (non-breaking change which adds functionality)

Description:

Checkpointing support was already implemented in BaseIterator in #5061, but wasn't tested for frameworks other than Pytorch. In this PR I add tests for PaddlePaddle Iterator and fix a problem with ES checkpointing. This work is very similar to #5282

When an iterator is created and there's no data in the external source, DALI reports "no data in pipeline" error. The problem is that if we checkpoint after the last iteration and restore from such checkpoint, there's no data in the external source but it's not an error. In this PR I silence this error if we're restoring from checkpoint. Exactly the same change was made in #5213 and #5282

Additional information:

Affected modules and functionalities:

PaddlePaddle Iterator

Key points relevant for the review:

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: DALI-3751

@szkarpinski szkarpinski marked this pull request as ready for review January 26, 2024 10:28
@szkarpinski
Copy link
Collaborator Author

@klecki @banasraf Thanks for the approvals, I'll merge #5298 first and then this one

Signed-off-by: Szymon Karpiński <skarpinski@nvidia.com>
Signed-off-by: Szymon Karpiński <skarpinski@nvidia.com>
Signed-off-by: Szymon Karpiński <skarpinski@nvidia.com>
Signed-off-by: Szymon Karpiński <skarpinski@nvidia.com>
@szkarpinski
Copy link
Collaborator Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [12664006]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [12664006]: BUILD FAILED

Signed-off-by: Szymon Karpiński <skarpinski@nvidia.com>
@szkarpinski
Copy link
Collaborator Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [12676712]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [12676712]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [12676712]: BUILD PASSED

@szkarpinski
Copy link
Collaborator Author

szkarpinski commented Feb 8, 2024

@banasraf @klecki I've successfully rebased on #5298, but with one non-trivial change. It turned out that self.counter_ was reset to 0 by Paddle iterator, overwriting the value restored in _DaliBaseIterator.__init__. I removed this line.

When Paddle iterator was added (#1371), there was no _DaliBaseIterator, so the iterator needed to handle the counter on its own. When _DaliBaseIterator was created (#1831), self.counter_ = 0 was duplicated. It was redundant in Paddle, but didn't cause problems until now.

Can I ask for re-approval for that?

@szkarpinski szkarpinski merged commit 08e8ea2 into NVIDIA:main Feb 9, 2024
7 checks passed
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.

4 participants