forked from ppwwyyxx/detectron2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make the offload function customizable for DatasetFromList
Summary: Pull Request resolved: facebookresearch#4626 Previously we use `serialize: bool` to control if we want to offload the `DatasetFromList` storage to numpy. This diff generalize the "serialize" to "offload", and make the "offload function" customizable so that we can switch between implementations. The setting of `offload function` is done by context manager in order to avoid passing this argument all the way down. Reviewed By: sstsai-adl Differential Revision: D40818736 fbshipit-source-id: ed1b47eea86546def6c06f78bc12d6edf267df28
- Loading branch information
1 parent
c54429b
commit 2b98c27
Showing
2 changed files
with
95 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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