Skip to content

Add fallback for missing source info in check_batch #5861

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Mar 26, 2025

  • When dumping core artifacts in check_batch, handle cases where source_info
    is not available by using a fallback filename with the sample index.

Category:

Other (e.g. Documentation, Tests, Configuration)

Description:

  • When dumping core artifacts in check_batch, handle cases where source_info
    is not available by using a fallback filename with the sample index.

Additional information:

Affected modules and functionalities:

  • dali/test/python/test_utils.py

Key points relevant for the review:

Tests:

  • Existing tests apply
    • all tests that uses dump_as_core_artifacts
  • 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

@JanuszL
Copy link
Contributor Author

JanuszL commented Mar 26, 2025

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [26057779]: BUILD STARTED

@@ -351,7 +351,10 @@ def _verify_batch_size(batch):
if hasattr(batch2[i], "source_info"):
error_msg += f"\nRHS data source: {batch2[i].source_info()}"

dump_as_core_artifacts(batch1[i].source_info(), left, right, sample_idx=i)
filename = (
batch1[i].source_info() if hasattr(batch1[i], "source_info") else f"'unknown{i}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
batch1[i].source_info() if hasattr(batch1[i], "source_info") else f"'unknown{i}"
batch1[i].source_info() if hasattr(batch1[i], "source_info") else f"unknown{i}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

- When dumping core artifacts in check_batch, handle cases where source_info
  is not available by using a fallback filename with the sample index.

Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL
Copy link
Contributor Author

JanuszL commented Mar 26, 2025

!build

@mzient mzient self-assigned this Mar 26, 2025
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [26058103]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [26058103]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [26058103]: BUILD PASSED

@JanuszL JanuszL merged commit 96212db into NVIDIA:main Apr 1, 2025
7 checks passed
@JanuszL JanuszL deleted the fix_dumping branch April 1, 2025 06:51
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