Skip to content

Commit 997bee8

Browse files
authored
Data license (#48)
* added data license * scripts to release weights
1 parent ce4386d commit 997bee8

File tree

4 files changed

+81
-8
lines changed

4 files changed

+81
-8
lines changed

LICENSE_DATA

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The nuscenes_vavam.tar.gz file is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
2+
3+
The data files in this repository contain information derived from the nuScenes dataset (https://www.nuscenes.org), which is licensed under CC BY-NC-SA 4.0.
4+
5+
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ We are releasing the code in this repository under the [MIT License](LICENSE).
351351

352352
We are releasing the pre-trained models / weights under the **research-only** [VideoActionModel License](LICENSE_MODEL). The weights were trained with datasets that are subjected to their own licenses and restrictions. Please see below.
353353

354+
This project releases data derived from the [nuScenes dataset](https://www.nuscenes.org) and are licensed under [CC BY-NC-SA 4.0](LICENSE_DATA). Using those data come with the following terms of use:
355+
356+
- Those data can be used for non-commercial purposes only
357+
- Any derivatives must be distributed under the same license
358+
- Attribution must be provided to both this project and nuScenes
359+
354360
## Citation
355361

356362
If you use this code, please cite our technical report:
@@ -404,10 +410,10 @@ A0141014181).
404410

405411
## Credits
406412

407-
**Project Lead (Research direction, technical roadmap and project coordination)** <br>
413+
**Project Lead (Research direction, technical roadmap, project coordination)** <br>
408414
Florent BARTOCCIONI
409415

410-
**Core contributors (Contributed to all aspects of the codebase, ran experiments and evaluations)** <br>
416+
**Core contributors (All aspects of the codebase, experiments, evaluations)** <br>
411417
Florent BARTOCCIONI, Elias RAMZI
412418

413419
**Contributors**<br>
@@ -418,14 +424,14 @@ Shashanka VENKATARAMANAN -- Depth anything pseudo-GT generation <br>
418424
Tuan-Hung VU -- GPT adaptation from nanoGPT <br>
419425
Yihong XU -- nuPlan preprocessing and initial dataloader development <br>
420426

421-
**Paper (manuscript preparation, designing paper visualization and figures)** <br>
427+
**Technical report (Manuscript preparation, design, visualization, figures)** <br>
422428
Florent BARTOCCIONI, Elias RAMZI, Victor BESNIER, Shashanka VENKATARAMANAN, Eloi ZABLOCKI, Yihong XU, Tuan-Hung VU
423429

424-
**Public Computing Grant Acquisition (project proposal writing for Adastra, EuroHPC and Jean-Zay grand challenges)** <br>
430+
**Grant Acquisitions (Grant proposals for Adastra, EuroHPC, and Jean Zay Grand Challenges)** <br>
425431
Florent BARTOCCIONI, Alexandre BOULCH, Eduardo VALLE, Spyros GIDARIS, Eloi ZABLOCKI, Matthieu CORD, Serkan ODABAS, David HURYCH
426432

427-
**Advisory (research and organization guidance)** <br>
433+
**Advisory (Research and organization guidance)** <br>
428434
Eloi ZABLOCKI, Alexandre BOULCH, Mickael CHEN
429435

430-
**Senior Advisory (research and organization guidance)** <br>
436+
**Senior Advisory (Research and organization guidance)** <br>
431437
Eduardo VALLE, Andrei BURSUC, Renaud MARLET, Matthieu CORD

scripts/handle_checkpoints.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import os
2222
import subprocess
2323
from glob import glob
24+
from concurrent.futures import ThreadPoolExecutor, as_completed
2425

2526
from tqdm import tqdm
2627

@@ -68,6 +69,7 @@ def extract_tar_file(tar_dir: str, outdir: str) -> None:
6869
parser.add_argument("--outdir", type=expand_path, required=True)
6970
parser.add_argument("--maxsize", type=str, default="2G")
7071
parser.add_argument("--extension", type=str, default="pt")
72+
parser.add_argument("--num_threads", type=int, default=1)
7173
args = parser.parse_args()
7274

7375
os.makedirs(args.outdir, exist_ok=True)
@@ -80,8 +82,20 @@ def extract_tar_file(tar_dir: str, outdir: str) -> None:
8082
assert os.path.isfile(args.checkpoint_dir), "Invalid checkpoint path"
8183
checkpoint_paths = [args.checkpoint_dir]
8284

83-
for checkpoint_path in tqdm(checkpoint_paths, desc="Creating tar files"):
84-
create_tar_file(checkpoint_path, args.outdir, args.maxsize)
85+
if args.num_threads <= 1:
86+
for checkpoint_path in tqdm(checkpoint_paths, desc="Creating tar files"):
87+
create_tar_file(checkpoint_path, args.outdir, args.maxsize)
88+
else:
89+
with ThreadPoolExecutor(max_workers=args.num_threads) as plot_executor:
90+
all_futures = []
91+
for checkpoint_path in checkpoint_paths:
92+
future = plot_executor.submit(
93+
create_tar_file, checkpoint_path, args.outdir, args.maxsize
94+
)
95+
all_futures.append(future)
96+
97+
for future in tqdm(as_completed(all_futures), total=len(all_futures), desc="Creating tar files"):
98+
future.result()
8599

86100
elif args.mode == "extract":
87101
extract_tar_file(args.checkpoint_dir, args.outdir)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
: '
4+
srun -A cya@h100 -C h100 --pty \
5+
--nodes=1 --ntasks-per-node=1 --cpus-per-task=16 --gres=gpu:0 --hint=nomultithread \
6+
--qos=qos_gpu_h100-dev --time=00:45:00 \
7+
bash scripts/prepare_checkpoint_release.sh
8+
'
9+
10+
module purge
11+
module load arch/h100
12+
module load pytorch-gpu/py3/2.4.0
13+
export PYTHONUSERBASE=$WORK/python_envs/video_action_model
14+
15+
# Data folder containing pickles and jsons
16+
DATA_FOLDER="${ycy_ALL_CCFRSCRATCH}/release_weights_v1/datafiles"
17+
# Source folder containing all checkpoints
18+
SRC_FOLDER="${ycy_ALL_CCFRSCRATCH}/release_weights_v1"
19+
file_count=$(find "$SRC_FOLDER" -type f -name "*.pt" | wc -l)
20+
echo "Found $file_count files in $SRC_FOLDER"
21+
22+
# Destination folder for all copied videos
23+
DEST_FOLDER="${ycy_ALL_CCFRSCRATCH}/release_weights_tar"
24+
# Create destination folder if it doesn't exist
25+
mkdir -p "$DEST_FOLDER"
26+
27+
python scripts/handle_checkpoints.py \
28+
--mode create \
29+
--checkpoint_dir $SRC_FOLDER \
30+
--outdir $DEST_FOLDER \
31+
--num_threads 16 \
32+
--maxsize 2G
33+
34+
# Upload the weights with the GitHub CLI
35+
# https://cli.github.com/manual/gh_release_uploads
36+
find $DEST_FOLDER -type f -name "*.tar.gz*" | while read -r filepath; do
37+
# Copy the file to the destination with the new name
38+
echo "[ ] Uploading: $filepath"
39+
gh release upload v1.0.0 $filepath --clobber
40+
echo "[x] Uploaded: $filepath"
41+
done
42+
43+
find $DATA_FOLDER -type f -name "*.tar.gz" | while read -r filepath; do
44+
# Copy the file to the destination with the new name
45+
echo "[ ] Uploading: $filepath"
46+
gh release upload v1.0.0 $filepath --clobber
47+
echo "[x] Uploaded: $filepath"
48+
done

0 commit comments

Comments
 (0)