Module support for multiple ptd files#14713
Conversation
Pull Request resolved: #14158 Support multiple PTD files in Module. Context: https://docs.google.com/document/d/19RLLdWNHQoRi8Ufz4oE-gGjOz0IShjN_NZi5jlgMBZI/edit?tab=t.0 This change updates the following private variables in Module: ``` std::string data_path --> std::unordered_set<std::string> data_files_ std::unique_ptr<DataLoader> data_map_loader --> std::vectror<std::unique_ptr<DataLoader>> data_map_loaders_ std::unique_ptr<NamedDataMap> data_map --> std::vector<std::unique_ptr<NamedDataMap> named_data_maps_ ``` And introduces a new private variable. When we have multiple NamedDataMaps, they need to be merged into one, for use in method, etc. This is not implemented yet. ``` std::unique_ptr<NamedDataMap> merged_data_map_ ``` The process of using a PTD file is: ``` std::string file --> wrapped in DataLoader --> wrapped in NamedDataMap. ``` At each stage we can have multiple. This diff also introduces a new Module constructor that takes in `std::unordered_set<std::string> named_data_map_paths_` TODO: add a MergedDataMap to extension/module that can merge all the data maps together. ghstack-source-id: 313188117 @exported-using-ghexport Differential Revision: [D82059808](https://our.internmc.facebook.com/intern/diff/D82059808/)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14713
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 4d944dc with merge base f7c009e ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
@pytorchbot cherry-pick --onto release/1.0 -c examples |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot cherry-pick --onto release/1.0 -c critical |
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #14158 by @lucylq ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/lucylq/110/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/110/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/110/orig Differential Revision: [D82059808](https://our.internmc.facebook.com/intern/diff/D82059808/) @diff-train-skip-merge Co-authored-by: lucylq <lfq@meta.com> (cherry picked from commit 421539e)
Cherry picking #14713The cherry pick PR is at #14836 and it is recommended to link a critical cherry pick PR with an issue. The following tracker issues are updated: Details for Dev Infra teamRaised by workflow job |
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: pytorch#14158 by @lucylq ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/lucylq/110/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/110/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/110/orig Differential Revision: [D82059808](https://our.internmc.facebook.com/intern/diff/D82059808/) @diff-train-skip-merge Co-authored-by: lucylq <lfq@meta.com>
This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #14158 by @lucylq
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/lucylq/110/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/110/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/110/orig
Differential Revision: D82059808
@diff-train-skip-merge