Skip to content

Commit

Permalink
Merge pull request #209 from zhijian-liu/dev/videomme
Browse files Browse the repository at this point in the history
Fix `videomme` evaluation
  • Loading branch information
Luodian authored Aug 31, 2024
2 parents 64a04d6 + 3726b4f commit 7adbd69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lmms_eval/api/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@ def _download_from_youtube(path):

if "video" in dataset_kwargs and dataset_kwargs["video"]:
hf_home = os.getenv("HF_HOME", "~/.cache/huggingface/")
hf_home = os.path.expanduser(hf_home)
cache_dir = dataset_kwargs["cache_dir"]
cache_dir = os.path.join(hf_home, cache_dir)
accelerator = Accelerator()
Expand Down
2 changes: 1 addition & 1 deletion lmms_eval/tasks/videomme/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def extract_subtitles(video_path, subtitle_path):
def videomme_doc_to_visual(doc):
cache_dir = os.path.join(base_cache_dir, cache_name)
video_path = doc["videoID"] + ".mp4"
video_path = os.path.join(cache_dir, video_path)
video_path = os.path.join(cache_dir, "data", video_path)
if os.path.exists(video_path):
video_path = video_path
elif os.path.exists(video_path.replace("mp4", "MP4")):
Expand Down

0 comments on commit 7adbd69

Please sign in to comment.