Repository navigation
chore: pre-release cleanup - #8
Merged
Merged
Conversation
Snapshot of the working tree before syncing main with upstream PR sbhattlab#5. Mixes two sets of uncommitted edits: - Restore changes lost when forking from PlayClass 26f99ca: SAM3 tracker features (grounding gap fill, frame_loader, ID-match ratio and discontinuity, best-overlap matching, tqdm progress, no timestamped batch dir), 7-way tracker evaluation with per-video mean/std aggregation, classification checkpoint dir, compute_chunk_boundaries --video-path/--video-dir, V-JEPA --resume, and missing docstrings. - Parallel docs/pixi-task cleanup: pixi task names in docs and docstrings, mask crop modes dropped, poster/ablation scripts removed, numpy 2 shims in tracker_eval. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eanup
Conflict resolution rule: where upstream already fixed the same text,
keep upstream's version and correct only facts that are still wrong.
- src/_config.py: upstream's typed K_RANGE/RANDOM_SEED; branch's module
docstring and DEFAULT_CHECKPOINT_DIR (data/results/eval_classification).
- src/tracker_eval: delete create_ablation_table.py and
render_poster_figures.py (stale: pooled aggregation, no A1 variant).
evaluate.py keeps the per-video mean/std aggregation and A1; drop the
defaultdict import upstream added for the old pooled code.
paths.py: keep upstream's SCAN_RUNS_ROOT/RAW_VIDEO_ROOT, drop the
branch's duplicate definitions; docstring no longer places tracker run
parquets under tracker_benchmark/.
manifest.py: scan layout is day_{N}/{stem}/, not timestamped runs.
frame_selection.py: keep upstream's path, restore the three-source
summary after the truncated "this script:".
- src/tracking/scan.py: upstream docstring with BoT-SORT (not ByteTrack);
install hint needs `-e tracker` (ultralytics is tracker-only).
- pipeline/extract_embeddings_vjepa2.py, docs/6_embeddings.md: keep
`bash scripts/setup_vjepa2.1.sh`, drop the model argument it ignores;
embedding env is `default` (no `embeddings` env exists).
- README.md, docs/4_postprocessing.md, docs/5_dataset.md,
src/dataset/README.md, pipeline/clustering_grid.py: upstream.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- pixi.toml: add test_imports_full (tracker env) so modules that CI skips
for lack of torch get import-checked before a release; document it in
the README Tests section.
- pixi.toml/pixi.lock: add tabulate to the default env. pandas
DataFrame.to_markdown (clustering_grid) and TrackEval need it; it was
missing from every env.
- src/tracking/sam3.py, pipeline/run_tracker.py: put the chunked-SAM3
description back on sam3.py; run_tracker.py keeps its launcher summary
plus usage.
- README.md: postprocessing runs in the default env, not tracker.
- config/sam3_best.yaml: reuse_run_dir example points at a per-video run
dir ({video_stem}), not a timestamped batch name.
- pipeline/build_dataset.py: usage uses the build_dataset pixi task.
- Drop unused imports (eval_classification.py, extract_embeddings_videoprism.py,
tests/test_labels.py, os in features.py); features.py imports torch
under TYPE_CHECKING for its annotation.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
lgtm |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the critical and moderate sam3.py issues and the two documentation nits.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
Pre-release cleanup restoring tracking/evaluation functionality, fixing crashes and paths, and updating tooling and documentation.
Changes:
- Restores grounding, frame-loader, overlap matching, progress, and metadata features.
- Adds A1 re-ID evaluation and per-video aggregation.
- Updates dependencies, scripts, configuration, and documentation.
Review findings: src/tracking/sam3.py has one critical and one moderate issue; README.md and docs/6_embeddings.md have nit-level issues.
| File | Description |
|---|---|
tests/test_labels.py |
Removes unused import. |
tests/check_crop_modes.py |
Removes unused imports. |
src/tracking/viz.py |
Adds documentation and missing-video handling. |
src/tracking/utils.py |
Adds utility docstrings. |
src/tracking/scan.py |
Updates BoT-SORT documentation and guidance. |
src/tracking/sam3.py |
Restores tracking options, grounding, progress, and output changes. |
src/tracking/grounding.py |
Adds overlap matching and match-ratio reporting. |
src/tracker_eval/render_poster_figures.py |
Removes obsolete renderer. |
src/tracker_eval/predictions.py |
Adds A1 prediction conversion. |
src/tracker_eval/paths.py |
Updates tracker artifact paths. |
src/tracker_eval/manifest.py |
Updates manifest discovery and paths. |
src/tracker_eval/frame_selection.py |
Clarifies deferred imports. |
src/tracker_eval/evaluate.py |
Adds A1 evaluation and per-video statistics. |
src/tracker_eval/create_ablation_table.py |
Removes obsolete table script. |
src/dataset/utils.py |
Adds module documentation. |
src/dataset/README.md |
Corrects DINOv3 output documentation. |
src/dataset/labels.py |
Adds function documentation. |
src/dataset/features.py |
Makes torch annotation imports lazy. |
src/dataset/embeddings/__init__.py |
Documents compatibility exports. |
src/classification/stats.py |
Adds module documentation. |
src/classification/models.py |
Adds model documentation. |
src/_config.py |
Corrects checkpoint output paths. |
README.md |
Documents environments and full import testing. |
pixi.toml |
Adds dependencies and an import-test task. |
pixi.lock |
Updates locked dependencies. |
pipeline/train_sweep_k.sh |
Corrects usage documentation. |
pipeline/train_ablate_best.sh |
Corrects usage documentation. |
pipeline/run_tracker.py |
Adds launcher usage documentation. |
pipeline/extract_embeddings_vjepa2.py |
Adds resume support. |
pipeline/extract_embeddings_videoprism.py |
Cleans imports and paths. |
pipeline/eval_classification.py |
Removes unused imports. |
pipeline/compute_chunk_boundaries.py |
Adds video-path options. |
pipeline/build_dataset.py |
Updates commands and documentation. |
docs/6_embeddings.md |
Updates environments and crop-mode documentation. |
docs/2_tracking.md |
Documents grounding and frame-loader options. |
config/sam3_best.yaml |
Updates the reuse-run path example. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1359
to
+1361
| batch_dir = Path( | ||
| cfg.get("output_dir", None) or Path(DEFAULT_TRACKING_DIR) / config_path.stem | ||
| ) |
Comment on lines
+1027
to
+1033
| if fill_gap and grounding_frame_offset > 0 and use_tracker: | ||
| for fidx in range( | ||
| global_chunk_start, global_chunk_start + grounding_frame_offset | ||
| ): | ||
| if fidx in grounding_outputs: | ||
| grounding_prefix_outputs[fidx] = _remap_output_ids( | ||
| grounding_outputs[fidx], id_map |
Comment on lines
+83
to
+84
| Runs in its own `videoprism` pixi env (JAX + TensorFlow, solved separately | ||
| from the PyTorch envs). TF is imported only to be blocked from grabbing the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



sam3.pyto crashneeds_maskimport error inextract_embeddings_vjepa2.pyandcheck_crop_modes.pycompute_chunk_boundaries.pydocumented--video-dirbut had no such optionbuild-manifestraisedValueErroron its own default pathsclustering_gridcrashed due to missingtabulatedependencytrain.pycheckpoints output pathstorch--resumeflagdocs/2_tracking.md.