diffusion-gif commited on
Commit
ac78ced
·
verified ·
1 Parent(s): 2c32505

data: attach pinned training dataset index and safe recovery helpers

Browse files
CHECKSUMS.sha256 CHANGED
@@ -1,4 +1,4 @@
1
- 1e7edae3c7bea01e80cc0a18228f7ec953c3797a62b14387eabffd5c1dd653f7 README.md
2
  4e0e37529fbf86ebef6bf7cadec4dda1b762f31ed6dba7815a79732bc6b7e836 checkpoints/caption_grpo/adapter_config.json
3
  290aacd2808639e3c3e10c81c69acfdd843100b8888ad183a2e03ba6e43f5d11 checkpoints/caption_grpo/adapter_model.safetensors
4
  62671bc8d430001734a90c33c0059e563388eba42706a5c8603704018035ae8b checkpoints/caption_grpo/additional_config.json
@@ -77,4 +77,7 @@ c602d4305f59c388105765835b3b7d9cacf2181e8494014fea7f0dc57e728cb8 tools/verify_m
77
  c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSES/Apache-2.0.txt
78
  4a5b4f13ea4792a8211a69f32d2b460b6d520e57cd23c6301e707c76a6e97a55 LICENSES/MIT-OpenCLIP.txt
79
  04a70a4302ad5ce449684fc43968bde65420dae210ba0ccb55d9f5bbd908b272 LICENSES/UPSTREAM.md
80
- f6e8290dcfa126f7172e2e7c3bb8ba031a180367557ae9187ed6c797a11cfe31 bundle_manifest.json
 
 
 
 
1
+ de97f95cc56c1400755975a453d1da522b15614bf92e298a23e237fe1d9aa14f README.md
2
  4e0e37529fbf86ebef6bf7cadec4dda1b762f31ed6dba7815a79732bc6b7e836 checkpoints/caption_grpo/adapter_config.json
3
  290aacd2808639e3c3e10c81c69acfdd843100b8888ad183a2e03ba6e43f5d11 checkpoints/caption_grpo/adapter_model.safetensors
4
  62671bc8d430001734a90c33c0059e563388eba42706a5c8603704018035ae8b checkpoints/caption_grpo/additional_config.json
 
77
  c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSES/Apache-2.0.txt
78
  4a5b4f13ea4792a8211a69f32d2b460b6d520e57cd23c6301e707c76a6e97a55 LICENSES/MIT-OpenCLIP.txt
79
  04a70a4302ad5ce449684fc43968bde65420dae210ba0ccb55d9f5bbd908b272 LICENSES/UPSTREAM.md
80
+ 2569cdcdb30128ffb7d1f178a2669580ead36e532f9f8c65a67f0f25c543caaf TRAINING_DATA_INDEX.json
81
+ 67acb0f58a052ce7fd309e50cdaf473a9880bc31a8d1c7f68212d528088d275c tools/fetch_training_data.py
82
+ 4cd8ba59a93ab631419f29b61153ab8024cc7392f81fca1e0470c400144c8826 tools/restore_legacy_mix6.py
83
+ f495623211474f8cd4f76f07abeb24275e3b743bdeb7e09f5bfde3d54f85bbc3 bundle_manifest.json
README.md CHANGED
@@ -106,3 +106,23 @@ DiT、T5 的 shard 列表传给一个 `ModelConfig(path=[...])`,再加入 VAE
106
  Repository: `diffusion-gif/any2ego` (`model`, Public). All listed tensor files are complete and remote hashes verified.
107
  Source export execution booleans describe the original local export, not current Hub upload status.
108
  See `LICENSES/UPSTREAM.md` for upstream attribution and component licenses.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  Repository: `diffusion-gif/any2ego` (`model`, Public). All listed tensor files are complete and remote hashes verified.
107
  Source export execution booleans describe the original local export, not current Hub upload status.
108
  See `LICENSES/UPSTREAM.md` for upstream attribution and component licenses.
109
+
110
+ ## Historical training-data index
111
+
112
+ `TRAINING_DATA_INDEX.json` is attached to this model download. It identifies
113
+ retained ORIGINAL training JSON/CSV/Parquet, pinned protected snapshot revisions,
114
+ file hashes, original legacy observation backups and separately labeled later data.
115
+ Original restricted annotations remain private; no data-owner credentials are included.
116
+
117
+ Public registry: https://huggingface.co/datasets/diffusion-gif/training-data-index
118
+
119
+ ```bash
120
+ # For old trajectory checkpoints; inspect other dataset IDs for Any2Ego:
121
+ python tools/fetch_training_data.py --index TRAINING_DATA_INDEX.json --dataset legacy_mix6_sft --output data_download
122
+ # after owner login / dry-run inspection add --execute
123
+ ```
124
+
125
+ A pointer index cannot guarantee that an unbacked original video remains available
126
+ forever. The large Ego-Exo RGB/GT-mask collection is not mirrored here. Launch-time
127
+ content hashes were not recorded for all components; current retained snapshots
128
+ and actual verified path bindings are explicitly distinguished in the index.
TRAINING_DATA_INDEX.json ADDED
The diff for this file is too large to render. See raw diff
 
bundle_manifest.json CHANGED
@@ -176,8 +176,8 @@
176
  "files": [
177
  {
178
  "path": "README.md",
179
- "bytes": 6575,
180
- "sha256": "1e7edae3c7bea01e80cc0a18228f7ec953c3797a62b14387eabffd5c1dd653f7"
181
  },
182
  {
183
  "path": "checkpoints/caption_grpo/adapter_config.json",
@@ -568,9 +568,24 @@
568
  "path": "LICENSES/UPSTREAM.md",
569
  "bytes": 953,
570
  "sha256": "04a70a4302ad5ce449684fc43968bde65420dae210ba0ccb55d9f5bbd908b272"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
571
  }
572
  ],
573
- "total_file_bytes": 46092494717,
574
  "largest_file_bytes": 4999831048,
575
  "native_reader": "safetensors.safe_open(framework=pt, device=cpu), slices only",
576
  "validation": {
@@ -591,6 +606,13 @@
591
  "visibility": "public",
592
  "source_export_manifest_sha256": "f17006bbe222737d8dd9e4cb827bd54f090c59f02762dfef9a9c5928a1caf117",
593
  "note": "Execution booleans above refer to original local export; README distribution text normalized.",
594
- "publication_phase": "complete"
 
 
 
 
 
 
 
595
  }
596
  }
 
176
  "files": [
177
  {
178
  "path": "README.md",
179
+ "bytes": 7610,
180
+ "sha256": "de97f95cc56c1400755975a453d1da522b15614bf92e298a23e237fe1d9aa14f"
181
  },
182
  {
183
  "path": "checkpoints/caption_grpo/adapter_config.json",
 
568
  "path": "LICENSES/UPSTREAM.md",
569
  "bytes": 953,
570
  "sha256": "04a70a4302ad5ce449684fc43968bde65420dae210ba0ccb55d9f5bbd908b272"
571
+ },
572
+ {
573
+ "path": "TRAINING_DATA_INDEX.json",
574
+ "bytes": 146175,
575
+ "sha256": "2569cdcdb30128ffb7d1f178a2669580ead36e532f9f8c65a67f0f25c543caaf"
576
+ },
577
+ {
578
+ "path": "tools/fetch_training_data.py",
579
+ "bytes": 3237,
580
+ "sha256": "67acb0f58a052ce7fd309e50cdaf473a9880bc31a8d1c7f68212d528088d275c"
581
+ },
582
+ {
583
+ "path": "tools/restore_legacy_mix6.py",
584
+ "bytes": 2642,
585
+ "sha256": "4cd8ba59a93ab631419f29b61153ab8024cc7392f81fca1e0470c400144c8826"
586
  }
587
  ],
588
+ "total_file_bytes": 46092647806,
589
  "largest_file_bytes": 4999831048,
590
  "native_reader": "safetensors.safe_open(framework=pt, device=cpu), slices only",
591
  "validation": {
 
606
  "visibility": "public",
607
  "source_export_manifest_sha256": "f17006bbe222737d8dd9e4cb827bd54f090c59f02762dfef9a9c5928a1caf117",
608
  "note": "Execution booleans above refer to original local export; README distribution text normalized.",
609
+ "publication_phase": "complete",
610
+ "training_data_index": {
611
+ "repo_id": "diffusion-gif/training-data-index",
612
+ "repo_type": "dataset",
613
+ "revision": "04182e349e581ce2f5826eb4a7bed2803b2925fc",
614
+ "path": "TRAINING_DATA_INDEX.json",
615
+ "source_JSON_sha256": "2569cdcdb30128ffb7d1f178a2669580ead36e532f9f8c65a67f0f25c543caaf"
616
+ }
617
  }
618
  }
tools/fetch_training_data.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Fetch pinned training files from the JSON index; dry-run unless --execute."""
3
+ import argparse,hashlib,json,shutil
4
+ from pathlib import Path,PurePosixPath
5
+
6
+
7
+ def safe(value):
8
+ p=PurePosixPath(value)
9
+ if p.is_absolute() or '..' in p.parts or not p.parts:raise ValueError('Unsafe relative data path')
10
+ return Path(*p.parts)
11
+
12
+ def sha(path):
13
+ h=hashlib.sha256()
14
+ with Path(path).open('rb') as f:
15
+ for b in iter(lambda:f.read(8*1024*1024),b''):h.update(b)
16
+ return h.hexdigest()
17
+
18
+ def main():
19
+ p=argparse.ArgumentParser(description=__doc__)
20
+ directory=Path(__file__).absolute().parent
21
+ default_index=directory/'TRAINING_DATA_INDEX.json'
22
+ if not default_index.exists():default_index=directory.parent/'TRAINING_DATA_INDEX.json'
23
+ p.add_argument('--index',type=Path,default=default_index)
24
+ p.add_argument('--dataset',default='legacy_mix6_sft')
25
+ p.add_argument('--output',type=Path,default=Path('training_data_download'))
26
+ p.add_argument('--execute',action='store_true');a=p.parse_args()
27
+ index=json.loads(a.index.read_text());datasets={d['dataset_id']:d for d in index['datasets']}
28
+ if a.dataset=='all_private':ids={r['artifact_id'] for r in index['private_artifacts']}
29
+ elif a.dataset in datasets:ids=set(datasets[a.dataset].get('artifact_ids',[]))
30
+ else:raise ValueError('Unknown dataset ID; inspect index.datasets')
31
+ rows=[r for r in index['private_artifacts'] if r['artifact_id'] in ids]
32
+ if not rows:raise ValueError('No private snapshot artifacts for this dataset; inspect public download location')
33
+ source=index['private_snapshot']
34
+ if not source['repo_id'].startswith('diffusion-gif/training-data-vault-') or source['repo_type']!='dataset' or not source['private']:raise ValueError('Unexpected private data provider')
35
+ print(json.dumps({'dataset':a.dataset,'files':len(rows),'bytes':sum(r['bytes'] for r in rows),'source_repo':source['repo_id'],'revision':source['revision'],'login_required':True,'execute':a.execute},indent=2))
36
+ if not a.execute:return
37
+ from huggingface_hub import get_token,hf_hub_download
38
+ token=get_token()
39
+ if not token:raise RuntimeError('Run hf auth login locally using an account authorized for the private vault. Never put tokens in this file or chat.')
40
+ a.output.mkdir(parents=True,exist_ok=True)
41
+ for r in rows:
42
+ target=a.output/safe(r['path'])
43
+ if target.exists():
44
+ if not target.is_file() or target.stat().st_size!=r['bytes'] or sha(target)!=r['sha256']:raise ValueError('Existing user file differs; will not overwrite')
45
+ continue
46
+ cached=Path(hf_hub_download(repo_id=source['repo_id'],repo_type='dataset',revision=source['revision'],filename=r['path'],token=token,endpoint='https://huggingface.co'))
47
+ if cached.stat().st_size!=r['bytes'] or sha(cached)!=r['sha256']:raise ValueError('Downloaded file SHA256 mismatch')
48
+ target.parent.mkdir(parents=True,exist_ok=True);temporary=target.with_name(target.name+'.copy-partial')
49
+ shutil.copyfile(cached,temporary)
50
+ if sha(temporary)!=r['sha256']:raise ValueError('Copied file SHA256 mismatch')
51
+ temporary.replace(target);print('VERIFIED',r['path'],flush=True)
52
+ print('Done: all selected frozen files downloaded and SHA256 verified. See restore_legacy_mix6.py for a relocatable SFT working copy.')
53
+ if __name__=='__main__':main()
tools/restore_legacy_mix6.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Restore legacy SFT observations/JSON working copies; never alter frozen files."""
3
+ import argparse,hashlib,json,tarfile
4
+ from pathlib import Path
5
+
6
+ def main():
7
+ p=argparse.ArgumentParser(description=__doc__);p.add_argument('--snapshot-root',required=True,type=Path);p.add_argument('--output',required=True,type=Path);p.add_argument('--execute',action='store_true');a=p.parse_args()
8
+ src=a.snapshot_root/'legacy_mix6';locations={}
9
+ for line in (src/'observations/locations.private.jsonl').open():
10
+ r=json.loads(line);key=(r['split'],r['sid'])
11
+ if key in locations:raise ValueError('Duplicate observation ID')
12
+ if Path(r['archive']).name!=r['archive'] or Path(r['member']).name!=r['member']:raise ValueError('Unsafe archive/member path')
13
+ locations[key]=r
14
+ if not a.execute:
15
+ print(json.dumps({'records':len(locations),'output':str(a.output),'source_snapshot_modified':False,'execute':False},indent=2));return
16
+ if a.output.exists() and any(a.output.iterdir()):raise ValueError('Output must be a new/empty directory; will not overwrite user files')
17
+ a.output.mkdir(parents=True,exist_ok=True);by_archive={}
18
+ for key,r in locations.items():by_archive.setdefault(r['archive'],{})[r['member']]=(key,r)
19
+ for name,entries in by_archive.items():
20
+ with tarfile.open(src/'observations'/name,'r:') as archive:
21
+ for member in archive:
22
+ entry=entries.pop(member.name,None)
23
+ if entry is None or not member.isfile():raise ValueError('Unexpected archive entry')
24
+ (split,sid),r=entry;data=archive.extractfile(member).read()
25
+ if len(data)!=r['bytes'] or hashlib.sha256(data).hexdigest()!=r['sha256']:raise ValueError('Original NPZ checksum differs')
26
+ filename=hashlib.sha256(sid.encode()).hexdigest()[:32]+'.npz'
27
+ target=a.output/'frames'/split/filename;target.parent.mkdir(parents=True,exist_ok=True)
28
+ if target.exists():raise ValueError('Duplicate target frame file')
29
+ target.write_bytes(data)
30
+ if entries:raise ValueError('Missing observation member')
31
+ for split in ('train','heldout'):
32
+ with (src/'sft'/(split+'.jsonl')).open() as inp,(a.output/(split+'.jsonl')).open('w') as out:
33
+ for line in inp:
34
+ r=json.loads(line)
35
+ if (split,r['sid']) not in locations:raise ValueError('Input record lacks backed-up observation')
36
+ r['frames_root']=str((a.output/'frames'/split).resolve())
37
+ r['npz']=hashlib.sha256(r['sid'].encode()).hexdigest()[:32]+'.npz'
38
+ out.write(json.dumps(r,ensure_ascii=False)+'\n')
39
+ print('Restored exact NPZ bytes and re-based SFT train/heldout JSONL. Only npz/frames_root fields in WORKING copies changed; frozen originals are intact.')
40
+ if __name__=='__main__':main()