Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ CLAUDE.md
.worktrees/
Bagel/
MMaDA/
.codex
9 changes: 6 additions & 3 deletions lmms_eval/api/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,11 @@ def _download_from_youtube(path):
force_unzip = dataset_kwargs.get("force_unzip", False)
revision = dataset_kwargs.get("revision", "main")
create_link = dataset_kwargs.get("create_link", False)
# If the user already has a cache dir, we skip download the zip files
if not os.path.exists(cache_dir):
cache_path = None
# If the user already has a cache dir, we skip downloading archives.
# Tasks that set create_link need the snapshot path even when the
# cache dir already exists as a symlink from a previous run.
if not os.path.exists(cache_dir) or (create_link and os.path.islink(cache_dir)):
cache_path = snapshot_download(repo_id=self.DATASET_PATH, revision=revision, repo_type="dataset", force_download=force_download, etag_timeout=60)
zip_files = glob(os.path.join(cache_path, "**/*.zip"), recursive=True)
tar_files = glob(os.path.join(cache_path, "**/*.tar*"), recursive=True)
Expand Down Expand Up @@ -1106,7 +1109,7 @@ def concat_tar_parts(tar_parts, output_tar):
untar_video_data(output_tar)

# Link cache_path to cache_dir if needed.
if create_link:
if create_link and cache_path is not None:
if not os.path.exists(cache_dir) or os.path.islink(cache_dir):
if os.path.islink(cache_dir):
os.remove(cache_dir)
Expand Down
1 change: 1 addition & 0 deletions lmms_eval/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@

AVAILABLE_CHAT_TEMPLATE_MODELS = {
"bagel_lmms_engine": "BagelLmmsEngine",
"fastvideo": "FastVideo",
"internvl_hf": "InternVLHf",
"llava_hf": "LlavaHf",
"nanovlm": "NanoVLM",
Expand Down
Loading
Loading