Skip to content

Fix S3 root-level object discovery, document remote file_root, add S3 video tests - #4

Closed
jantonguirao wants to merge 5 commits into
mzient:gcs_s3_video_readerfrom
jantonguirao:s3-video-reader-fixes
Closed

jantonguirao wants to merge 5 commits into
mzient:gcs_s3_video_readerfrom
jantonguirao:s3-video-reader-fixes

Conversation

@jantonguirao

@jantonguirao jantonguirao commented Oct 29, 2026 •

Copy link
Copy Markdown

Category:

Bug fix

Description:

Follow-up to NVIDIA#6518, addressing the review comments there.

  • s3_discover_files asserted that every listed object has at least two path elements. For an object directly under file_root this aborts in debug builds and dereferences end() in release builds. The video reader makes this case reachable for s3:// roots, so such objects are now skipped, as the local and GCS discovery do.
  • The file_root argument of the video reader now mentions remote s3:// and gs:// URLs, like filenames and file_list already do.
  • Adds S3 counterparts of the GCS video reader tests (filenames, file_list, file_root, on CPU and GPU). The file_root layout includes a video directly under the root, and the last video of each device is larger than the reader's 1 MiB I/O buffer, so it needs several ranged reads.

Additional information:

Affected modules and functionalities:

  • dali/operators/reader/loader/discover_files_s3.cc: skip objects with fewer than two path elements instead of asserting.
  • dali/operators/video/reader/video_reader_decoder_op.cc: file_root docs.
  • dali/test/python/reader/test_s3.py: video fixtures and tests.

Key points relevant for the review:

  • The discover_files_s3.cc change also affects fn.readers.file on S3 for roots with objects directly under them.
  • The video helpers in test_s3.py are copied from test_gcs.py. They could be moved to a shared module if you prefer.
  • Not built or run locally. The tests need the moto server and, for the GPU variants, a GPU.

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: N/A

mzient and others added 5 commits October 2, 2026 11:03
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
…:// bucket.

Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
…_root

s3_discover_files asserted that every listed object sits at least one
subdirectory below the root. For an object directly under the root this
aborts in debug builds and dereferences end() in release builds. Skip such
objects instead, as the local and GCS discovery do. The video reader
makes this case reachable for s3:// file_root.

Mention remote URLs in the video reader's file_root documentation.

Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
Cover the filenames, file_list and file_root arguments on s3:// URLs, the
latter with a video directly under the root. The last video of each device
is larger than the reader's I/O buffer, so it needs several ranged reads.

Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 07:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@mzient
mzient force-pushed the gcs_s3_video_reader branch 2 times, most recently from 61fa9ce to 6b7c5d9 Compare October 29, 2026 08:41
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.

3 participants