Skip to content

[TAO-2149][Feature] SSL evaluate actions for NV-DINOv2 and MAE (embedding suite) - #79

Open
vpraveen-nv wants to merge 4 commits into
mainfrom
feature/core-eval-d
Open

[TAO-2149][Feature] SSL evaluate actions for NV-DINOv2 and MAE (embedding suite)#79
vpraveen-nv wants to merge 4 commits into
mainfrom
feature/core-eval-d

Conversation

@vpraveen-nv

@vpraveen-nv vpraveen-nv commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Front-ends onto the shared embedding-eval suite: nvdinov2 gains a new evaluate action (auto-registered subtask); MAE's evaluate gets additive dispatch — embedding suite when enabled, else the existing classification test. EvalSuiteConfig is mixed into each network's EvaluateConfig; README command table regenerated.

Why are the changes needed?

Part 4/5 of the shared core/evaluation embedding-eval suite (epic TAO-2181): exposes the shared KNN/embedding evaluation to the NV-DINOv2 and MAE model families.

Related issues

JIRA: TAO-2149 (parent epic TAO-2181). N/A for GitHub issues.

Does this PR introduce any user-facing change?

Yes — new nvdinov2 evaluate action; mae evaluate gains embedding-suite dispatch when enabled (existing behavior unchanged when disabled).

How was this patch tested?

Verified in-container: nvdinov2 evaluate runs end-to-end. Config-compose unit tests for nvdinov2 + mae land in #80.

Was this patch authored or co-authored using generative AI tooling?

Yes — portions were co-authored with an AI coding assistant.

Release note

Added an `evaluate` action for NV-DINOv2 and embedding-suite dispatch for MAE evaluate.

Checklist

  • My commits are signed off per the DCO (git commit -s) — see CONTRIBUTING.md
  • I have read the contributing guidelines
  • The code follows the project's style, and lint and format checks pass locally
  • I added or updated tests covering this change
  • All tests pass locally
  • I added or updated documentation (README, docstrings, docs pages, examples)
  • I updated the version, changelog, or migration notes if this change requires it
  • If this touches components that are optional to install, the imports are guarded
    so the package still works without them (reviewers: please verify this)
  • No secrets, credentials, proprietary data, or customer data are included in this PR
  • I understand this contribution is licensed under the repository's license, and that
    my commit author name and email become permanently public once merged

Notes for reviewers

Review the core-eval stack in order: #78#79#80#81 (this is part 4/5).


Migrated from GitLab MR nvidia-tao-toolkit/tao-pytorch!617, rebased onto GitHub main.

@vpraveen-nv
vpraveen-nv requested a review from a team as a code owner August 5, 2026 23:04
@tao-pr-bot

tao-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

For security reasons, CI does not run automatically on NVIDIA's runners — it must be triggered per commit.

  • Comment /build to run CI on your latest commit, and make sure blossom-ci is green before merging.
  • Re-run /build after each new push — CI is pinned to the head commit, so a stale run won't count.

Tip

Should this fix also ship in a release? Add a release/X.Y.Z label (matching the target release branch) and tao-cherry-pick-bot will backport it after merge.

Important

Before merging: every file needs a license header and every commit must be DCO signed-off — see the 📖 Contribution guide for details.

vpraveen-nv and others added 4 commits August 10, 2026 12:26
…t shim

Dependency inversion: radio/distillation/knn_classification.py becomes a thin
re-export shim onto nvidia_tao_pytorch.core.evaluation.knn. The KNN vote math
(distributed_topk, knn_top1_accuracy, _get_vote_cls) is now owned by the shared
suite and merely relocated here, so existing imports keep working and the
distillation KNN-top1 numbers are unchanged (validate.py + the distiller resolve
to the same core objects).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Varun Praveen <vpraveen@nvidia.com>
Nested single quotes inside f-string replacement fields are only valid
from Python 3.12 (PEP 701). CI lints on Python 3.11, so pylint/flake8
report a syntax error for any change set that touches or imports this
module. Flip the outer quotes to double quotes; no behavior change.

Signed-off-by: Varun Praveen <vpraveen@nvidia.com>
…ding suite)

Front-ends onto the shared core/evaluation suite. The evaluate action loads a
checkpoint, wraps the backbone in the (summary, features) adapter, runs the enabled
evaluators (build_enabled_evaluators), and writes results.json.

- config/ssl_evaluation is mixed into each network's EvaluateConfig:
  nvdinov2 gets NVDINOv2EvaluateExpConfig(EvaluateConfig, EvalSuiteConfig);
  mae gets MAEEvaluateExpConfig(EvaluateConfig, EvalSuiteConfig).
- nvdinov2/scripts/evaluate.py: new hydra @hydra_runner/@monitor_status action
  (auto-registered subtask); disables the fp16 memory-efficient attention path so
  fp32 eval matches the linear weights. experiment_specs/evaluate_spec.yaml added.
- mae/scripts/evaluate.py: additive dispatch — runs the embedding suite when any
  evaluate.{knn,segmentation,retrieval}.enabled, else the existing classification
  test (unchanged). Uses the MAE ViT adapter.
- README command table regenerated (nvdinov2 now lists `evaluate`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Varun Praveen <vpraveen@nvidia.com>
The nested double quotes inside the f-string replacement field are only
valid from Python 3.12 (PEP 701). CI lints on Python 3.11, so pylint
reports a syntax error (E0001) for any change set that imports
nvidia_tao_pytorch.ssl.mae.model.pl_model. Switch the inner quotes to
single quotes.

Signed-off-by: Varun Praveen <vpraveen@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant