Refresh ACT dataset; reuse matching objects and upload new data
Browse files- .gitattributes +1 -0
- DATA_MANIFEST.json +3 -0
- README.md +60 -18
- RESTORE.py +83 -0
- provenance/hf-layout-20261021/originals_verified.json +0 -0
- provenance/hf-layout-20261021/remote_before.json +0 -0
.gitattributes
CHANGED
|
@@ -3136,3 +3136,4 @@ jev/long000_supplement_v3/hdf5/v42_first_pick_006.hdf5 filter=lfs diff=lfs merge
|
|
| 3136 |
jev/long000_supplement_v3/hdf5/v42_first_pick_012.hdf5 filter=lfs diff=lfs merge=lfs -text
|
| 3137 |
jev/long000_supplement_v3/hdf5/v42_first_place_006.hdf5 filter=lfs diff=lfs merge=lfs -text
|
| 3138 |
jev/long000_supplement_v3/hdf5/v42_first_place_012.hdf5 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 3136 |
jev/long000_supplement_v3/hdf5/v42_first_pick_012.hdf5 filter=lfs diff=lfs merge=lfs -text
|
| 3137 |
jev/long000_supplement_v3/hdf5/v42_first_place_006.hdf5 filter=lfs diff=lfs merge=lfs -text
|
| 3138 |
jev/long000_supplement_v3/hdf5/v42_first_place_012.hdf5 filter=lfs diff=lfs merge=lfs -text
|
| 3139 |
+
DATA_MANIFEST.json filter=lfs diff=lfs merge=lfs -text
|
DATA_MANIFEST.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0d661eeeb7a685e30f8208ea8362868bc88562647e8a8f129574725f43936fe
|
| 3 |
+
size 38524755
|
README.md
CHANGED
|
@@ -1,20 +1,62 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
| 4 |
---
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: ACT experiment datasets
|
| 3 |
+
task_categories:
|
| 4 |
+
- robotics
|
| 5 |
---
|
| 6 |
+
|
| 7 |
+
# ACT 数据集(2026-10-21 目录整理)
|
| 8 |
+
|
| 9 |
+
此仓库对应开发机 `/home/qianpusun/data`;`ACT/data` 是该目录的访问入口。
|
| 10 |
+
权重和实验结果另存于私有模型仓库 `jiajun0613/act-experiments`。
|
| 11 |
+
|
| 12 |
+
```text
|
| 13 |
+
libero/
|
| 14 |
+
original/ 原 libero_hdf5,原分辨率专家演示
|
| 15 |
+
hdf5_336/ 原 libero_hdf5_336,336 像素专家演示
|
| 16 |
+
hdf5_336_zstd/ 原 libero_hdf5_336_zstd,保留包内原布局与校验文件
|
| 17 |
+
vit/v3/ SteerViT v3;images/masks/shards 按任务存入 archives/
|
| 18 |
+
jev/ Long000、标准四 suite、CF 的各版补充数据
|
| 19 |
+
annotations/ 阶段边界、focus、prompt、JEV 标签、因果历史索引及数据划分
|
| 20 |
+
normalization/ 历史归一化统计
|
| 21 |
+
provenance/ 来源资料、旧迁移清单、本次内容校验清单
|
| 22 |
+
maintenance/ 运行时路径迁移映射及历史 RAM 缓存清单
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
原始 LIBERO 的 398 个文件从旧版本直接在服务端迁移,内容未变。
|
| 26 |
+
相同 SHA256 / Git blob SHA1 的文件直接保留或服务端复制;只有新增或修改的文件重新上传。
|
| 27 |
+
旧 ViT 任务归档逐成员与本机内容核验后复用,包内历史前缀由恢复脚本转换。
|
| 28 |
+
`DATA_MANIFEST.json` 记录每个传输文件的哈希及原文件数量;
|
| 29 |
+
`provenance/hf-layout-20261021/members/` 记录归档内每个原文件的 SHA256 和时间戳。
|
| 30 |
+
`DATASET_COMPLETE.json` 表示上传、原始数据校验和旧目录清理均已完成。
|
| 31 |
+
若仍存在 `MIGRATION_IN_PROGRESS.json`,表示整理尚未完成。
|
| 32 |
+
|
| 33 |
+
## 恢复数据
|
| 34 |
+
|
| 35 |
+
只下载需要的目录即可。举例,恢复 ViT:
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
hf download jiajun0613/act-datasets --repo-type dataset --local-dir ./act-datasets \
|
| 39 |
+
--include 'vit/v3/**' 'provenance/hf-layout-20261021/members/vit/v3/**' \
|
| 40 |
+
DATA_MANIFEST.json RESTORE.py
|
| 41 |
+
python ./act-datasets/RESTORE.py --snapshot ./act-datasets \
|
| 42 |
+
--output /home/qianpusun/data --prefix vit/v3
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
普通文件保持服务器目录层级。`RESTORE.py` 同时支持普通文件复制和时间戳恢复;
|
| 46 |
+
例如将 `--prefix` 改成 `annotations`、`jev`、`maintenance` 等。
|
| 47 |
+
原始 LIBERO 不在该恢复脚本的复制范围内,直接下载到数据根目录的 `libero/` 下。
|
| 48 |
+
`libero/hdf5_336_zstd` 的压缩包格式未改,使用其目录内原说明解压,再放入 `libero/hdf5_336`。
|
| 49 |
+
|
| 50 |
+
JEV `feature_cache` 及小型 pilot 特征缓存按用户要求未上传;重新生成即可。
|
| 51 |
+
保存的 `cache_verification.json` 只是历史验收记录,不表示下载后已具备缓存。
|
| 52 |
+
标准 JEV 最新训练标注为 `annotations/jev_four_suites_v2`(模型历史名称 v5-2,保留名称 normal);
|
| 53 |
+
CF 标注为 `annotations/jev_cf_v1`,数据准备完成,但 CF 训练配方尚未发布。
|
| 54 |
+
旧版本标签与标注保留以支持复现,不能将 annotations 当作下载缓存。
|
| 55 |
+
|
| 56 |
+
冻结标注、数据 manifest、源路径和哈希均保持原字节。
|
| 57 |
+
默认恢复到 `/home/qianpusun/data` 可沿用 `maintenance/layout-20261016.json`。
|
| 58 |
+
迁移到其他根目录时,需要在运行时路径映射中将 `/home/qianpusun/data` 及旧映射目标重定向到新根目录;
|
| 59 |
+
不要全局替换冻结 JSON 的路径或跳过哈希校验。模型资产、项目代码与外部 LIBERO 环境单独恢复。
|
| 60 |
+
|
| 61 |
+
重构前完整版本固定在标签 [`before-layout-20261021`](https://huggingface.co/datasets/jiajun0613/act-datasets/tree/before-layout-20261021)。
|
| 62 |
+
旧顶层迁移说明保存在 `provenance/migration-package/`,历史路径仅作来源记录。
|
RESTORE.py
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Restore selected downloaded ACT data; preserve bytes and source timestamps.
|
| 2 |
+
|
| 3 |
+
Example: python RESTORE.py --snapshot . --output /home/qianpusun/data --prefix vit/v3
|
| 4 |
+
Run once for each desired prefix, or omit --prefix for all non-LIBERO artifacts.
|
| 5 |
+
Original LIBERO HDF5 files already have their final layout and are downloaded separately.
|
| 6 |
+
"""
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
import argparse
|
| 9 |
+
import gzip
|
| 10 |
+
import hashlib
|
| 11 |
+
import json
|
| 12 |
+
import os
|
| 13 |
+
import shutil
|
| 14 |
+
import tarfile
|
| 15 |
+
|
| 16 |
+
def digest(path):
|
| 17 |
+
h=hashlib.sha256()
|
| 18 |
+
with path.open('rb') as f:
|
| 19 |
+
for b in iter(lambda:f.read(8*1024**2),b''):
|
| 20 |
+
h.update(b)
|
| 21 |
+
return h.hexdigest()
|
| 22 |
+
|
| 23 |
+
def target(root, rel):
|
| 24 |
+
p=Path(rel)
|
| 25 |
+
if p.is_absolute() or '..' in p.parts:
|
| 26 |
+
raise ValueError(f'Invalid relative path: {rel}')
|
| 27 |
+
out=root/p
|
| 28 |
+
if not out.resolve().is_relative_to(root.resolve()):
|
| 29 |
+
raise ValueError(f'Path leaves output directory: {rel}')
|
| 30 |
+
return out
|
| 31 |
+
|
| 32 |
+
def restore(snapshot, output, prefix=''):
|
| 33 |
+
manifest=json.loads((snapshot/'DATA_MANIFEST.json').read_text())
|
| 34 |
+
selected=[i for i in manifest['artifacts'] if i['source_files'] and
|
| 35 |
+
(not prefix or i['path']==prefix or i['path'].startswith(prefix.rstrip('/')+'/'))]
|
| 36 |
+
if not selected:
|
| 37 |
+
raise ValueError(f'No source artifacts match prefix: {prefix}')
|
| 38 |
+
for i,item in enumerate(selected,1):
|
| 39 |
+
src=target(snapshot,item['path'])
|
| 40 |
+
if not src.is_file() or src.stat().st_size!=item['bytes'] or digest(src)!=item['sha256']:
|
| 41 |
+
raise ValueError(f'Missing or corrupt downloaded artifact: {src}')
|
| 42 |
+
if not item.get('archive'):
|
| 43 |
+
dest=target(output,item['path']);dest.parent.mkdir(parents=True,exist_ok=True)
|
| 44 |
+
if src.resolve()!=dest.resolve():
|
| 45 |
+
tmp=dest.with_name(dest.name+'.restore-tmp');shutil.copyfile(src,tmp);tmp.replace(dest)
|
| 46 |
+
os.utime(dest,ns=(item['mtime_ns'],item['mtime_ns']))
|
| 47 |
+
else:
|
| 48 |
+
with gzip.open(target(snapshot,item['inventory']),'rt') as f:
|
| 49 |
+
expected={j['path']:j for j in map(json.loads,f)}
|
| 50 |
+
seen=set()
|
| 51 |
+
with tarfile.open(src,'r|*') as tar:
|
| 52 |
+
for member in tar:
|
| 53 |
+
if member.isdir():
|
| 54 |
+
continue
|
| 55 |
+
if not member.isfile():
|
| 56 |
+
raise ValueError(f'Unsupported member: {member.name}')
|
| 57 |
+
rel=member.name
|
| 58 |
+
for old,new in item.get('archive_prefix_mapping',{}).items():
|
| 59 |
+
if rel.startswith(old):
|
| 60 |
+
rel=new+rel[len(old):];break
|
| 61 |
+
if rel not in expected or rel in seen:
|
| 62 |
+
raise ValueError(f'Unexpected archive member: {rel}')
|
| 63 |
+
seen.add(rel);record=expected[rel]
|
| 64 |
+
if member.size!=record['bytes']:
|
| 65 |
+
raise ValueError(f'Size mismatch: {rel}')
|
| 66 |
+
dest=target(output,rel);dest.parent.mkdir(parents=True,exist_ok=True)
|
| 67 |
+
tmp=dest.with_name(dest.name+'.restore-tmp');h=hashlib.sha256()
|
| 68 |
+
with tar.extractfile(member) as incoming,tmp.open('wb') as outgoing:
|
| 69 |
+
for block in iter(lambda:incoming.read(4*1024**2),b''):
|
| 70 |
+
h.update(block);outgoing.write(block)
|
| 71 |
+
if h.hexdigest()!=record['sha256']:
|
| 72 |
+
tmp.unlink();raise ValueError(f'Hash mismatch: {rel}')
|
| 73 |
+
tmp.replace(dest);os.utime(dest,ns=(record['mtime_ns'],record['mtime_ns']))
|
| 74 |
+
if seen!=set(expected):
|
| 75 |
+
raise ValueError(f'Incomplete archive: {src}')
|
| 76 |
+
print(f'{i}/{len(selected)} restored {item["path"]}',flush=True)
|
| 77 |
+
|
| 78 |
+
if __name__=='__main__':
|
| 79 |
+
parser=argparse.ArgumentParser(description=__doc__)
|
| 80 |
+
parser.add_argument('--snapshot',type=Path,default=Path(__file__).resolve().parent)
|
| 81 |
+
parser.add_argument('--output',type=Path,required=True)
|
| 82 |
+
parser.add_argument('--prefix',default='')
|
| 83 |
+
args=parser.parse_args();restore(args.snapshot,args.output,args.prefix)
|
provenance/hf-layout-20261021/originals_verified.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
provenance/hf-layout-20261021/remote_before.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|