You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/)
0 commit comments