RyanWW commited on
Commit
c72cf14
·
verified ·
1 Parent(s): cd17015

Remove internal file README_UPLOAD.md

Browse files
Files changed (1) hide show
  1. README_UPLOAD.md +0 -134
README_UPLOAD.md DELETED
@@ -1,134 +0,0 @@
1
- # SimulationMetadata 上传指南
2
-
3
- ## 文件夹内容
4
-
5
- ```
6
- SimulationMetadata/
7
- ├── objects/ # 物体元数据
8
- │ ├── background_objects.json
9
- │ ├── object_placement/ # 物体放置规则
10
- │ └── objects_list/ # 物体列表和映射
11
- ├── scenes/ # 场景数据
12
- │ ├── annotations/ # 场景标注(JSON + 可视化图片)
13
- │ ├── filter/ # 过滤后的数据
14
- │ └── image_quality_ratings.json # 图片质量评分
15
- └── taxonomy/ # 分类体系
16
- ├── taxonomy.json
17
- ├── all_objects.json
18
- └── *.csv (各种属性表)
19
- ```
20
-
21
- ## 上传到 Hugging Face
22
-
23
- ### 方法 1:使用脚本(推荐)
24
-
25
- ```bash
26
- cd /home/xwang378/scratch/2025/Taxonomy/Data/SimulationMetadata
27
- bash upload.sh
28
- ```
29
-
30
- ### 方法 2:直接运行 Python
31
-
32
- ```bash
33
- cd /home/xwang378/scratch/2025/Taxonomy/Data/SimulationMetadata
34
- python upload_hf.py
35
- ```
36
-
37
- ### 方法 3:后台运行(推荐用于大文件夹)
38
-
39
- ```bash
40
- cd /home/xwang378/scratch/2025/Taxonomy/Data/SimulationMetadata
41
- nohup python upload_hf.py > upload_log.txt 2>&1 &
42
-
43
- # 查看进度
44
- tail -f upload_log.txt
45
- ```
46
-
47
- ## 前提条件
48
-
49
- 1. **安装 huggingface_hub**
50
- ```bash
51
- pip install huggingface_hub
52
- ```
53
-
54
- 2. **登录 Hugging Face**
55
- ```bash
56
- huggingface-cli login
57
- ```
58
- 或设置环境变量:
59
- ```bash
60
- export HF_TOKEN="your_token_here"
61
- ```
62
-
63
- 3. **确保仓库存在**
64
- - 仓库名:`TaxonomyProject/SimulationMetadata`
65
- - 类型:Dataset
66
- - 权限:Write access
67
-
68
- ## 特性
69
-
70
- ✅ **智能上传**:使用 `upload_large_folder` 优化大文件夹上传
71
- ✅ **并行上传**:8 个线程并发上传
72
- ✅ **断点续传**:中断后可重新运行,自动跳过已上传文件
73
- ✅ **自动排除**:排除脚本、缓存、日志等不必要文件
74
- ✅ **进度显示**:实时显示上传进度
75
-
76
- ## 预计时间
77
-
78
- 取决于:
79
- - 文件总数:~数千个文件
80
- - 总大小:~数 GB
81
- - 网络速度:~10-50 MB/s
82
-
83
- **预计时间**:30分钟 - 2小时
84
-
85
- ## 故障排除
86
-
87
- ### 问题 1:登录失败
88
- ```bash
89
- # 重新登录
90
- huggingface-cli login
91
- ```
92
-
93
- ### 问题 2:权限错误
94
- - 确保您对 `TaxonomyProject/SimulationMetadata` 有写权限
95
- - 确认仓库类型是 `dataset`,不是 `model`
96
-
97
- ### 问题 3:网络中断
98
- - 不用担心!重新运行脚本会自动从中断处继续
99
- - 已上传的文件不会重复上传
100
-
101
- ### 问题 4:查看上传进度
102
- ```bash
103
- # 如果在后台运行
104
- tail -f upload_log.txt
105
-
106
- # 或查看 HF 仓库页面
107
- # https://huggingface.co/datasets/TaxonomyProject/SimulationMetadata
108
- ```
109
-
110
- ## 文件排除规则
111
-
112
- 以下文件会被自动排除(在 `ignore_patterns` 中定义):
113
- - `upload_hf.py` - 上传脚本本身
114
- - `*.pyc` - Python 编译缓存
115
- - `__pycache__/` - Python 缓存目录
116
- - `.DS_Store` - Mac 系统文件
117
- - `*.log` - 日志文件
118
-
119
- ## 手动检查
120
-
121
- 上传完成后,访问:
122
- https://huggingface.co/datasets/TaxonomyProject/SimulationMetadata
123
-
124
- 验证所有文件夹和文件是否正确上传。
125
-
126
- ## 更新数据
127
-
128
- 如果需要更新已上传的数据,只需重新运行脚本:
129
- ```bash
130
- python upload_hf.py
131
- ```
132
-
133
- 它会智能地只上传变更的文件。
134
-