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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ python/vmaf/matlab/**/*.exp
python/vmaf/matlab/**/*.lib
python/vmaf/matlab/**/*.o

# Local corpus data — large YUV/MP4 fixtures, never committed.
# Was only in .git/info/exclude; now visible to all contributors.
.corpus/

# Working/scratch directories
.workingdir/
.workingdir2/
Expand Down
3 changes: 2 additions & 1 deletion ai/scripts/calibrate_nr_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import json
import logging
import math
import os
import subprocess
import sys
import tempfile
Expand Down Expand Up @@ -67,7 +68,7 @@

_DEFAULT_MODEL_JSON = _REPO_ROOT / "model" / "tiny" / "nr_metric_v1.json"
_DEFAULT_MODEL_ONNX = _REPO_ROOT / "model" / "tiny" / "nr_metric_v1.onnx"
_DEFAULT_CORPUS = _REPO_ROOT / ".corpus" / "netflix"
_DEFAULT_CORPUS = Path(os.environ.get("VMAF_CORPUS_DIR", str(_REPO_ROOT / ".corpus" / "netflix")))
_DEFAULT_CRFS: tuple[int, ...] = (18, 23, 28, 33, 38)
_DEFAULT_CODEC = "libx264"
_DEFAULT_PRESET = "medium"
Expand Down
11 changes: 11 additions & 0 deletions changelog.d/fixed/corpus-path-hardcoding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Fixed

- `ai/scripts/calibrate_nr_threshold.py`: `_DEFAULT_CORPUS` now reads the
`VMAF_CORPUS_DIR` environment variable (falling back to `.corpus/netflix`),
matching the pattern already used by `validate_ensemble_seeds.py`. Added
missing `import os`.
- `tools/vmaf-tune/tests/test_bbb_e2e_v5_bug_cluster.py`: BBB corpus path
inside the dev-mcp container now reads `VMAF_CORPUS_DIR` (falling back to
`/workspace/.corpus/bbb_e2e`) instead of a hardcoded prefix.
- `.gitignore`: added `.corpus/` entry so the exclusion is visible to all
contributors, not only locally via `.git/info/exclude`.
3 changes: 2 additions & 1 deletion tools/vmaf-tune/tests/test_bbb_e2e_v5_bug_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ def test_ladder_against_bbb_container_yields_plausible_vmaf() -> None:
)
if probe.returncode != 0:
pytest.skip(f"dev-mcp container {container!r} not reachable")
src = "/workspace/.corpus/bbb_e2e/bbb_sunflower_1080p_30fps_normal.mp4"
_corpus_root = os.environ.get("VMAF_CORPUS_DIR", "/workspace/.corpus/bbb_e2e")
src = f"{_corpus_root}/bbb_sunflower_1080p_30fps_normal.mp4"
corpus_check = subprocess.run(
["docker", "exec", container, "test", "-f", src],
capture_output=True,
Expand Down
Loading