Skip to content

Fix webdataset python index creation script - #4226

Merged
JanuszL merged 2 commits into
NVIDIA:mainfrom
JanuszL:fix_wds_idx_gen
Sep 8, 2022
Merged

JanuszL merged 2 commits into
NVIDIA:mainfrom
JanuszL:fix_wds_idx_gen

Conversation

@JanuszL

@JanuszL JanuszL commented Sep 4, 2022

Copy link
Copy Markdown
Contributor
  • fixes wrong offset calculation in webdataset python
    index creation script. The right formula for the data
    offset calculation should be the output of (block-number + 1) * 512
    while it was calculated as (next ``block-number`) * 512 - data size
    (what doesn't work when the first entry is preceded by additional data
    like in POSIX.1-2001 archive

Signed-off-by: Janusz Lisiecki [email protected]

Category:

Bug fix (non-breaking change which fixes an issue)

Description:.

  • fixes wrong offset calculation in webdataset python
    index creation script. The right formula for the data
    offset calculation should be the output of (block-number + 1) * 512
    while it was calculated as (next ``block-number`) * 512 - data size
    (what doesn't work when the first entry is preceded by additional data
    like in POSIX.1-2001 archive

Additional information:

Affected modules and functionalities:

  • tools/webdataset index creation script

Key points relevant for the review:

  • NA

Tests:

  • Existing tests apply
      • test_webdataset_requirements.py (but I don't know how to generate tar file with non-0 offset for the initial entry)
  • 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: N/A

Relates to #4215

@JanuszL

JanuszL commented Sep 4, 2022

Copy link
Copy Markdown
Contributor Author

!build

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [5833825]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [5833825]: BUILD FAILED

@JanuszL

JanuszL commented Sep 4, 2022

Copy link
Copy Markdown
Contributor Author

!build

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [5833923]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [5833923]: BUILD FAILED

- fixes wrong offset calculation in webdataset python
  index creation script. The right formula for the data
  offset calculation should be the output of (`block-number` + 1) * 512
  while it was calculated as (next ``block-number`) * 512 - data size
  (what doesn't work when the first entry is preceded by additional data
  like in POSIX.1-2001 archive

Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL

JanuszL commented Sep 5, 2022

Copy link
Copy Markdown
Contributor Author

!build

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [5836203]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [5836203]: BUILD PASSED

Comment thread tools/wds2idx.py Resolved
Comment thread tools/wds2idx.py Resolved
Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL

JanuszL commented Sep 6, 2022

Copy link
Copy Markdown
Contributor Author

!build

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [5844338]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [5844338]: BUILD PASSED

@JanuszL
JanuszL merged commit dbf2ae8 into NVIDIA:main Sep 8, 2022
@JanuszL
JanuszL deleted the fix_wds_idx_gen branch September 8, 2022 12:19
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