Fix streaming checksum in latest reproduction skill
Browse files
skills/multi-wam-joint-reproduce/scripts/verify_release.sh
CHANGED
|
@@ -17,7 +17,12 @@ assert meta["completed_steps"] == 12531
|
|
| 17 |
assert meta["artifact_identity"]["world_size"] == 24
|
| 18 |
assert meta["artifact_identity"]["optimization"]["per_device_batch"] == 5
|
| 19 |
assert meta["artifact_identity"]["loss_weights"] == {"world_flow": 1.0, "latent": 0.0, "pixel": 0.0, "action": 1.0}
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
for name, expected in meta["artifact_identity"]["implementation_sha256"].items():
|
| 22 |
actual = hash_file(w / "mira" / name)
|
| 23 |
assert actual == expected, f"source hash mismatch: {name}: {actual}"
|
|
|
|
| 17 |
assert meta["artifact_identity"]["world_size"] == 24
|
| 18 |
assert meta["artifact_identity"]["optimization"]["per_device_batch"] == 5
|
| 19 |
assert meta["artifact_identity"]["loss_weights"] == {"world_flow": 1.0, "latent": 0.0, "pixel": 0.0, "action": 1.0}
|
| 20 |
+
def hash_file(path):
|
| 21 |
+
digest = hashlib.sha256()
|
| 22 |
+
with path.open("rb") as handle:
|
| 23 |
+
for chunk in iter(lambda: handle.read(16 << 20), b""):
|
| 24 |
+
digest.update(chunk)
|
| 25 |
+
return digest.hexdigest()
|
| 26 |
for name, expected in meta["artifact_identity"]["implementation_sha256"].items():
|
| 27 |
actual = hash_file(w / "mira" / name)
|
| 28 |
assert actual == expected, f"source hash mismatch: {name}: {actual}"
|