mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-16 00:59:46 +00:00
add: downloading data utils
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
#SBATCH -J b1k-download
|
||||
#SBATCH -p hopper-cpu
|
||||
#SBATCH --qos=high
|
||||
#SBATCH -c 64 # CPUs per conversion (tune as needed)
|
||||
#SBATCH -t 20:00:00 # Time per conversion
|
||||
#SBATCH -D /admin/home/francesco_capuano/lerobot
|
||||
#SBATCH -o /admin/home/francesco_capuano/lerobot/examples/behavior_1k/logs/%x-%A.out
|
||||
#SBATCH -e /admin/home/francesco_capuano/lerobot/examples/behavior_1k/logs/%x-%A.err
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
export PYTHONUNBUFFERED=1
|
||||
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK:-1}
|
||||
|
||||
# activate your env if needed
|
||||
source "$HOME/.bashrc" 2>/dev/null || true
|
||||
if ! command -v conda >/dev/null 2>&1; then
|
||||
source "$HOME/miniconda3/etc/profile.d/conda.sh" 2>/dev/null || true
|
||||
source "$HOME/anaconda3/etc/profile.d/conda.sh" 2>/dev/null || true
|
||||
fi
|
||||
conda activate lerobot
|
||||
|
||||
python examples/behavior_1k/download_data.py \
|
||||
--repo-id "behavior-1k/2025-challenge-demos" \
|
||||
--local-dir "/fsx/francesco_capuano/behavior1k-2025-v21" \
|
||||
--max-workers 64
|
||||
@@ -1,8 +1,26 @@
|
||||
import shutil
|
||||
|
||||
from huggingface_hub import snapshot_download
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--repo-id", type=str, required=True)
|
||||
parser.add_argument("--max-workers", type=int, default=8)
|
||||
parser.add_argument("--local-dir", type=str, required=True)
|
||||
parser.add_argument("--force-download", action="store_true")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.force_download:
|
||||
shutil.rmtree(args.local_dir, ignore_errors=True)
|
||||
|
||||
snapshot_download(
|
||||
repo_id="behavior-1k/2025-challenge-demos",
|
||||
repo_id=args.repo_id,
|
||||
repo_type="dataset",
|
||||
local_dir="/fsx/francesco_capuano/behavior1k-2025-v21",
|
||||
force_download=args.force_download,
|
||||
max_workers=args.max_workers,
|
||||
local_dir=args.local_dir,
|
||||
ignore_patterns=["annotations/*"], # NOTE(fracapuano): Dropping textual annotations right now
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user