Change dump output format to dict with value and metadata (#18879)

This commit is contained in:
fzyzcjy
2026-02-16 13:30:47 +08:00
committed by GitHub
parent 02816abc0d
commit 949792d0c6
4 changed files with 70 additions and 3 deletions
@@ -34,6 +34,8 @@ class DumpLoader:
path = self._directory / row["filename"]
output = torch.load(path, weights_only=False)
if isinstance(output, dict) and "value" in output:
output = output["value"]
print(
f"[DumpLoader] load from {path=} (query: {name=} {kwargs=}, output: {type(output)})"