| 120 | }; |
| 121 | |
| 122 | struct YALMData { |
| 123 | json metadata; |
| 124 | std::unordered_map<std::string, Tensor> tensors; |
| 125 | |
| 126 | YALMData(const std::string& dirname, bool lock_model_weights); |
| 127 | |
| 128 | private: |
| 129 | // Update YALMData with tensors from a file |
| 130 | // If read_metadata is true, also update metadata from this file |
| 131 | // Returns 0 if successful, other if failed |
| 132 | int update_from_file(const std::string& filename, bool read_metadata, bool lock_model_weights); |
| 133 | |
| 134 | // Initialize YALMData from all files in a directory |
| 135 | // Metadata is read from the first file (in sorted order) |
| 136 | // Returns 0 if successful, other if failed |
| 137 | int from_directory(const std::string& dirname, bool lock_model_weights); |
| 138 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected