Add TaskDirReader for harbor datasets#588
Open
pan-x-c wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds support for reading tasksets organized as directories (folder-style tasksets), such as those used in Harbor-style benchmarks. It introduces a new
TaskDirReaderclass, integrates it into the buffer reading system, and provides comprehensive tests for its functionality. Additionally, it generalizes the task scheduler to support anyBufferReaderimplementation, not just file-based readers.New folder-style taskset reader:
TaskDirReaderclass intrinity/buffer/reader/task_dir_reader.py, allowing Trinity to read datasets where each task is represented by a directory. The reader supports optional indexing, batch reading, and integrates with selectors."task_dir"storage type in the buffer reader registry (trinity/buffer/reader/__init__.py) and addedTASK_DIRto theStorageTypeenum (trinity/common/constants.py). [1] [2]pyproject.tomlto mention theharborpackage for Harbor dataset support.Testing and validation:
TaskDirReaderintests/buffer/task_dir_reader_test.py, covering reading, indexing, and resume functionality.Generalization and integration:
TaskSchedulerto accept anyBufferReaderimplementation, not justFileReader, making it compatible with the newTaskDirReader. [1] [2]Checklist
Please check the following items before code is ready to be reviewed.