Skip to content

Commit

Permalink
Merge pull request #43 from TGSAI/41_metadata
Browse files Browse the repository at this point in the history
Fixed incorrect parent key getting serialized in .zattrs
  • Loading branch information
BrianMichell authored Jul 31, 2024
2 parents 9d1a512 + f5a48c7 commit a43b2b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mdio/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,13 @@ class Variable {
if (isCloudStore) {
outpath = ".zattrs";
}

if (output_json["attributes"].contains("metadata")) {
auto metadata = output_json["attributes"]["metadata"];
output_json["attributes"].erase("metadata");
output_json["attributes"].merge_patch(metadata);
}

return tensorstore::kvstore::Write(
store.kvstore(), outpath,
absl::Cord(output_json["attributes"].dump()));
Expand Down

0 comments on commit a43b2b5

Please sign in to comment.