Add Ego4D local AV ablation workflow
This commit is contained in:
@@ -640,10 +640,12 @@ def normalize_sample_name(
|
||||
|
||||
def load_ego4d_manifest_split(
|
||||
manifest: str | Path,
|
||||
split: Literal["train", "test"],
|
||||
split: Literal["train", "test", "all"],
|
||||
) -> list[str]:
|
||||
"""Load one ordered UID split from ``ego4d_egospeak.tsv``."""
|
||||
"""Load ordered UIDs from ``ego4d_egospeak.tsv``; all preserves row order."""
|
||||
|
||||
if split not in {"train", "test", "all"}:
|
||||
raise ValueError(f"Invalid Ego4D split: {split}")
|
||||
path = Path(manifest)
|
||||
if not path.is_file():
|
||||
raise FileNotFoundError(path)
|
||||
@@ -671,7 +673,7 @@ def load_ego4d_manifest_split(
|
||||
f"Duplicate Ego4D UID {uid} at {path}:{row_number}"
|
||||
)
|
||||
seen.add(uid)
|
||||
if row_split == split:
|
||||
if split == "all" or row_split == split:
|
||||
selected.append(uid)
|
||||
|
||||
if not selected:
|
||||
|
||||
Reference in New Issue
Block a user