Added workaround for pass-through & small clean up#34
Conversation
|
/build |
4 similar comments
|
/build |
|
/build |
|
/build |
|
/build |
| use_parallel_external_source: bool = True, | ||
| prefetch_queue_depth: int = 2, | ||
| print_sample_data_group_format: bool = False, | ||
| copy_external_source_passthrough_outputs: bool = False, |
There was a problem hiding this comment.
Should we set the default value to True?
It looks like some versions of DALI have a bug that can cause this issue. Would it be possible to automatically adjust this default value based on the DALI version check, instead of simply setting it to false by default? Otherwise, users who are not familiar with the project may encounter abnormal numerical results the first time they use it.
There was a problem hiding this comment.
For example,
import nvidia.dali as dali
from packaging.version import Version
_DALI_VERSION = Version(dali.__version__)
_DALI_PASSTHROUGH_BUG_FIXED = _DALI_VERSION >= Version("X.Y.Z")There was a problem hiding this comment.
Good point! Currently, the issue is still present in the newest DALI version. Once it is resolved, we can add the version-based default.
For now, I adjusted the default behavior: If this parameter is not set, all outputs are copied.
However, I would also like to avoid unnecessary overhead. For that, I added a differentiation between setting copy_external_source_passthrough_outputs to True intentionally and leaving it at the default (None). If left at the default, a warning is shown about potential unneeded overhead, and setting any other related parameter (passthrough_copy_field_names etc.) raises an error.
…small clean up
- Added workaround for issue where data passed through the DALI pipeline without changes may become corrupted in some cases
- Implemented:
- Copy can be added to selected outputs (set up when creating the pipeline)
- Default: Copy all outputs and warn user about this auto-selection
- Adjusted documentation, examples and tests accordingly
- Clean-up
- Added support for assigning uint8 data to SampleDataGroup string data fields inside the pipeline; Note that:
- This is the type used for strings inside the pipeline
- Assigning to strings inside the pipeline was previously rejected by type checks
- Renamed a few identifiers & files to improve clarity & added (internal) documentation to some test helpers
Signed-off-by: Roman Schaffert <rschaffert@nvidia.com>
ac618c7 to
98bdbd5
Compare
|
/build |
|
/build |
4 similar comments
|
/build |
|
/build |
|
/build |
|
/build |
Type of Change
Please select (at least one):
Testing
Checklist for testing:
scripts/run_tests.shOptionally, add a brief description.
Documentation, Examples, Tutorials, Demos
Checklist for documentation:
Optionally, add a brief description.
Code Quality
Checklist for dependencies:
pyproject.tomlif/as neededOptionally, add a brief description.
Related Issues / Context
If applicable, link related issues, discussions etc.
DCO / Sign-Off
Please refer to the section on Signing Your Work & Developer Certificate of Origin (DCO)
in the Contribution Guide before submitting your contribution.
References
For additional details, please refer to the Contribution Guide.
The following guides are available (referenced in the Contribution Guide for further details):
docs/guides/CONTRIBUTION_GUIDE.mddocs/guides/DEVELOPMENT_GUIDE.mddocs/guides/DOCUMENTATION_SETUP_GUIDE.mddocs/guides/FORMATTING_GUIDE.mdPlease also refer to the summary checklist in the Contribution Guide,
which is a guideline for what to consider when submitting your contribution and covers the same topics as the checklists above.