Record validated remote loading and immutable development code provenance
Browse files
evaluation/remote_validation.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "passed",
|
| 3 |
+
"hub_sha": "26451080545fd06a2122e55e8afb8f2b4eac80e8",
|
| 4 |
+
"configs": [
|
| 5 |
+
{
|
| 6 |
+
"config": "recordings",
|
| 7 |
+
"streaming": false,
|
| 8 |
+
"rows": 264,
|
| 9 |
+
"status": "passed"
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"config": "recordings",
|
| 13 |
+
"streaming": true,
|
| 14 |
+
"rows": null,
|
| 15 |
+
"status": "passed"
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"config": "detections",
|
| 19 |
+
"streaming": false,
|
| 20 |
+
"rows": 420470,
|
| 21 |
+
"status": "passed"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"config": "detections",
|
| 25 |
+
"streaming": true,
|
| 26 |
+
"rows": null,
|
| 27 |
+
"status": "passed"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"config": "tracks",
|
| 31 |
+
"streaming": false,
|
| 32 |
+
"rows": 420470,
|
| 33 |
+
"status": "passed"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"config": "tracks",
|
| 37 |
+
"streaming": true,
|
| 38 |
+
"rows": null,
|
| 39 |
+
"status": "passed"
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"config": "posture",
|
| 43 |
+
"streaming": false,
|
| 44 |
+
"rows": 6400,
|
| 45 |
+
"status": "passed"
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"config": "posture",
|
| 49 |
+
"streaming": true,
|
| 50 |
+
"rows": null,
|
| 51 |
+
"status": "passed"
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"config": "anatomy",
|
| 55 |
+
"streaming": false,
|
| 56 |
+
"rows": 292,
|
| 57 |
+
"status": "passed"
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"config": "anatomy",
|
| 61 |
+
"streaming": true,
|
| 62 |
+
"rows": null,
|
| 63 |
+
"status": "passed"
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"config": "perturbations",
|
| 67 |
+
"streaming": false,
|
| 68 |
+
"rows": 739193,
|
| 69 |
+
"status": "passed"
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"config": "perturbations",
|
| 73 |
+
"streaming": true,
|
| 74 |
+
"rows": null,
|
| 75 |
+
"status": "passed"
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"config": "verification",
|
| 79 |
+
"streaming": false,
|
| 80 |
+
"rows": 739193,
|
| 81 |
+
"status": "passed"
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"config": "verification",
|
| 85 |
+
"streaming": true,
|
| 86 |
+
"rows": null,
|
| 87 |
+
"status": "passed"
|
| 88 |
+
}
|
| 89 |
+
],
|
| 90 |
+
"fresh_environment": true,
|
| 91 |
+
"remote_snapshot_sha256_files": 82,
|
| 92 |
+
"source_workspace_required": false
|
| 93 |
+
}
|
metadata/assembly_counts.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"version": "0.1.0-alpha.1",
|
| 3 |
-
"assembled_at": "2026-10-07T21:
|
| 4 |
"inventory_recordings": 264,
|
| 5 |
"wormid_inventory_assets": 118,
|
| 6 |
"ingested": {
|
|
|
|
| 1 |
{
|
| 2 |
"version": "0.1.0-alpha.1",
|
| 3 |
+
"assembled_at": "2026-10-07T21:32:05.000162-04:00",
|
| 4 |
"inventory_recordings": 264,
|
| 5 |
"wormid_inventory_assets": 118,
|
| 6 |
"ingested": {
|
metadata/assembly_manifest.json
CHANGED
|
@@ -217,6 +217,11 @@
|
|
| 217 |
"bytes": 4861,
|
| 218 |
"sha256": "18c9dff89e7b8e94b0fbcef936666be8bda6e1319814f5596f0e6d7439073935"
|
| 219 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
{
|
| 221 |
"path": "evaluation/risk_coverage/clean.parquet",
|
| 222 |
"bytes": 180696,
|
|
@@ -275,7 +280,7 @@
|
|
| 275 |
{
|
| 276 |
"path": "metadata/assembly_counts.json",
|
| 277 |
"bytes": 1667,
|
| 278 |
-
"sha256": "
|
| 279 |
},
|
| 280 |
{
|
| 281 |
"path": "metadata/client_manifest.json",
|
|
@@ -287,6 +292,11 @@
|
|
| 287 |
"bytes": 488272,
|
| 288 |
"sha256": "e91c0f3f6ab7a379c8b24ecb11a474fd44bf1a54c87256831a71865912cad2e5"
|
| 289 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
{
|
| 291 |
"path": "metadata/hub_before.json",
|
| 292 |
"bytes": 501,
|
|
@@ -389,8 +399,8 @@
|
|
| 389 |
},
|
| 390 |
{
|
| 391 |
"path": "src/cell_tracking/data/wormtrack_verify/assembly.py",
|
| 392 |
-
"bytes":
|
| 393 |
-
"sha256": "
|
| 394 |
},
|
| 395 |
{
|
| 396 |
"path": "src/cell_tracking/data/wormtrack_verify/client.py",
|
|
@@ -399,8 +409,8 @@
|
|
| 399 |
},
|
| 400 |
{
|
| 401 |
"path": "src/cell_tracking/data/wormtrack_verify/inventory.py",
|
| 402 |
-
"bytes":
|
| 403 |
-
"sha256": "
|
| 404 |
},
|
| 405 |
{
|
| 406 |
"path": "src/cell_tracking/evaluation/__init__.py",
|
|
|
|
| 217 |
"bytes": 4861,
|
| 218 |
"sha256": "18c9dff89e7b8e94b0fbcef936666be8bda6e1319814f5596f0e6d7439073935"
|
| 219 |
},
|
| 220 |
+
{
|
| 221 |
+
"path": "evaluation/remote_validation.json",
|
| 222 |
+
"bytes": 1791,
|
| 223 |
+
"sha256": "477d50f99c4665594088a0e496ba8220adae7406928e7280d393fc326fd23109"
|
| 224 |
+
},
|
| 225 |
{
|
| 226 |
"path": "evaluation/risk_coverage/clean.parquet",
|
| 227 |
"bytes": 180696,
|
|
|
|
| 280 |
{
|
| 281 |
"path": "metadata/assembly_counts.json",
|
| 282 |
"bytes": 1667,
|
| 283 |
+
"sha256": "da9ef7a55e398b41d623cd58cd49f81b2d57839d35ae1fddeff23cfb8631cf40"
|
| 284 |
},
|
| 285 |
{
|
| 286 |
"path": "metadata/client_manifest.json",
|
|
|
|
| 292 |
"bytes": 488272,
|
| 293 |
"sha256": "e91c0f3f6ab7a379c8b24ecb11a474fd44bf1a54c87256831a71865912cad2e5"
|
| 294 |
},
|
| 295 |
+
{
|
| 296 |
+
"path": "metadata/development_code.json",
|
| 297 |
+
"bytes": 211,
|
| 298 |
+
"sha256": "67977a3183a04f4e1059636dc19d2a87ddef54aab0456e629f30fa4ce59d11d6"
|
| 299 |
+
},
|
| 300 |
{
|
| 301 |
"path": "metadata/hub_before.json",
|
| 302 |
"bytes": 501,
|
|
|
|
| 399 |
},
|
| 400 |
{
|
| 401 |
"path": "src/cell_tracking/data/wormtrack_verify/assembly.py",
|
| 402 |
+
"bytes": 28494,
|
| 403 |
+
"sha256": "f4c0d7ed2664442621f86233b35b46c8ef6e8dddf674c78fdd5e28fe9677086a"
|
| 404 |
},
|
| 405 |
{
|
| 406 |
"path": "src/cell_tracking/data/wormtrack_verify/client.py",
|
|
|
|
| 409 |
},
|
| 410 |
{
|
| 411 |
"path": "src/cell_tracking/data/wormtrack_verify/inventory.py",
|
| 412 |
+
"bytes": 4091,
|
| 413 |
+
"sha256": "d147019c38cbbd7a8556dfaf331948286335794e37102e512ccda8297d5d5134"
|
| 414 |
},
|
| 415 |
{
|
| 416 |
"path": "src/cell_tracking/evaluation/__init__.py",
|
metadata/development_code.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"repository": "https://github.com/akgohain/cell-tracking",
|
| 3 |
+
"code_commit": "695880f9d93aad1b5dd649f4ad10c762c03b92d6",
|
| 4 |
+
"branch": "codex/wormtrack-verify-pilot",
|
| 5 |
+
"no_external_pretrained_weights": true
|
| 6 |
+
}
|
src/cell_tracking/data/wormtrack_verify/assembly.py
CHANGED
|
@@ -475,6 +475,24 @@ def build(workspace, destination):
|
|
| 475 |
components.setdefault(rid, {})["anatomy"] = table(
|
| 476 |
root, f"data/anatomy/{rid}.parquet", cloud
|
| 477 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 478 |
recording(rid).update(
|
| 479 |
qc_status="reference_cloud_validated", voxel_size_um=json.dumps(spacing[()].tolist())
|
| 480 |
)
|
|
|
|
| 475 |
components.setdefault(rid, {})["anatomy"] = table(
|
| 476 |
root, f"data/anatomy/{rid}.parquet", cloud
|
| 477 |
)
|
| 478 |
+
chars = group["ID_labels"][()]
|
| 479 |
+
ends = group["ID_labels_index"][()]
|
| 480 |
+
start, names = 0, []
|
| 481 |
+
for end in ends:
|
| 482 |
+
names.append(b"".join(chars[start:end]).decode())
|
| 483 |
+
start = end
|
| 484 |
+
table(
|
| 485 |
+
root,
|
| 486 |
+
"metadata/optional_neuronal_names.parquet",
|
| 487 |
+
pd.DataFrame(
|
| 488 |
+
{
|
| 489 |
+
"recording_id": rid,
|
| 490 |
+
"source_neuron_id": ids.astype(str),
|
| 491 |
+
"biological_name": names,
|
| 492 |
+
"used_in_primary_evaluation": False,
|
| 493 |
+
}
|
| 494 |
+
),
|
| 495 |
+
)
|
| 496 |
recording(rid).update(
|
| 497 |
qc_status="reference_cloud_validated", voxel_size_um=json.dumps(spacing[()].tolist())
|
| 498 |
)
|
src/cell_tracking/data/wormtrack_verify/inventory.py
CHANGED
|
@@ -31,6 +31,7 @@ def inventory(workspace):
|
|
| 31 |
"""
|
| 32 |
out = Path(workspace) / "audit"
|
| 33 |
out.mkdir(parents=True, exist_ok=True)
|
|
|
|
| 34 |
for identifier in DANDI_COHORTS:
|
| 35 |
base = f"https://api.dandiarchive.org/api/dandisets/{identifier}/versions/"
|
| 36 |
versions = requests.get(base, timeout=60)
|
|
@@ -53,6 +54,17 @@ def inventory(workspace):
|
|
| 53 |
(out / f"dandi-{identifier}-assets.json").write_text(
|
| 54 |
json.dumps({"version": version, "assets": assets}, indent=2)
|
| 55 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
for identifier in ZENODO:
|
| 57 |
response = requests.get(f"https://zenodo.org/api/records/{identifier}", timeout=60)
|
| 58 |
response.raise_for_status()
|
|
@@ -64,3 +76,27 @@ def inventory(workspace):
|
|
| 64 |
response = requests.get(url, timeout=60)
|
| 65 |
response.raise_for_status()
|
| 66 |
(out / "wormid-tracking-split.csv").write_text(response.text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
"""
|
| 32 |
out = Path(workspace) / "audit"
|
| 33 |
out.mkdir(parents=True, exist_ok=True)
|
| 34 |
+
asset_provenance = {}
|
| 35 |
for identifier in DANDI_COHORTS:
|
| 36 |
base = f"https://api.dandiarchive.org/api/dandisets/{identifier}/versions/"
|
| 37 |
versions = requests.get(base, timeout=60)
|
|
|
|
| 54 |
(out / f"dandi-{identifier}-assets.json").write_text(
|
| 55 |
json.dumps({"version": version, "assets": assets}, indent=2)
|
| 56 |
)
|
| 57 |
+
for asset in assets:
|
| 58 |
+
response = requests.get(
|
| 59 |
+
f"https://api.dandiarchive.org/api/assets/{asset['asset_id']}/", timeout=60
|
| 60 |
+
)
|
| 61 |
+
response.raise_for_status()
|
| 62 |
+
value = response.json()
|
| 63 |
+
asset_provenance[asset["asset_id"]] = {
|
| 64 |
+
key: value.get(key)
|
| 65 |
+
for key in ["digest", "wasAttributedTo", "wasGeneratedBy", "datePublished"]
|
| 66 |
+
}
|
| 67 |
+
(out / "dandi-asset-provenance.json").write_text(json.dumps(asset_provenance, indent=2))
|
| 68 |
for identifier in ZENODO:
|
| 69 |
response = requests.get(f"https://zenodo.org/api/records/{identifier}", timeout=60)
|
| 70 |
response.raise_for_status()
|
|
|
|
| 76 |
response = requests.get(url, timeout=60)
|
| 77 |
response.raise_for_status()
|
| 78 |
(out / "wormid-tracking-split.csv").write_text(response.text)
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
def snapshot_hub(workspace, repo_id="pytc/trackingBench"):
|
| 82 |
+
"""Record the immutable Hub state before edits; does not publish or expose tokens."""
|
| 83 |
+
from huggingface_hub import HfApi, hf_hub_download
|
| 84 |
+
|
| 85 |
+
api = HfApi()
|
| 86 |
+
info = api.dataset_info(repo_id, files_metadata=True)
|
| 87 |
+
readme = Path(
|
| 88 |
+
hf_hub_download(repo_id, "README.md", repo_type="dataset", revision=info.sha)
|
| 89 |
+
).read_text()
|
| 90 |
+
snapshot = {
|
| 91 |
+
"repo_id": repo_id,
|
| 92 |
+
"sha": info.sha,
|
| 93 |
+
"private": info.private,
|
| 94 |
+
"card": info.card_data.to_dict() if info.card_data else {},
|
| 95 |
+
"readme": readme,
|
| 96 |
+
"files": [
|
| 97 |
+
{"path": f.rfilename, "size": f.size, "blob_id": f.blob_id} for f in info.siblings
|
| 98 |
+
],
|
| 99 |
+
}
|
| 100 |
+
Path(workspace).mkdir(parents=True, exist_ok=True)
|
| 101 |
+
(Path(workspace) / "hub-before.json").write_text(json.dumps(snapshot, indent=2))
|
| 102 |
+
return snapshot
|