-
Notifications
You must be signed in to change notification settings - Fork 543
Add Puzzletron v2 GPU quality baseline #2166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
j-rausch
wants to merge
24
commits into
feature/puzzletron_v2
from
jrausch/puzzletron-gpu-quality-baseline-v4
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0969441
Add Puzzletron v2 GPU quality baseline
j-rausch 7fbe3ee
Preserve authored Puzzletron stage identity
j-rausch 4ed2e74
Fix Puzzletron worker semantic validation
j-rausch dfb1083
Fix Puzzletron GPU baseline regressions
j-rausch 3429426
Fix Puzzletron GPU artifact assertion
j-rausch c51e989
Fix Puzzletron CI style checks
j-rausch 7f082eb
Fix Puzzletron MIP solution assertion
j-rausch 12de313
Fix Puzzletron checkpoint reload probe
j-rausch b219607
Exercise full Puzzletron GPU campaign lifecycle
j-rausch 26e0fa4
Fix composite stage manifest validation
j-rausch 79145c6
Forward overrides to post-MIP aggregation
j-rausch 5c9c435
Preserve heterogeneous KD checkpoint metadata
j-rausch baceb70
Format Puzzletron GPU test imports
j-rausch 2c43fbc
Harden Puzzletron GPU baseline recovery
j-rausch a667d9d
Avoid Puzzletron post-MIP import cycle
j-rausch c486159
Format Puzzletron GPU lifecycle test
j-rausch 8baa662
Fix Puzzletron quality checks
j-rausch 8c2ac0b
Fix Puzzletron changed-file typing
j-rausch f12abd1
Validate Puzzletron security policy inputs
j-rausch 3e5dc6c
Use module-scope future stage imports
j-rausch 630d69e
Harden Puzzletron recovery and policy handling
j-rausch 10f02ec
Add non-interactive Puzzletron setup
j-rausch 57c87e1
Fix Puzzletron post-MIP test import
j-rausch ba510fc
Fix non-interactive setup defaults
j-rausch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Verification helpers for the pinned Puzzletron CI environment.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import json | ||
| import subprocess | ||
| from importlib import metadata | ||
| from typing import Any | ||
| from urllib.parse import unquote, urlparse | ||
|
|
||
| __all__ = ["verify_installed_vcs_source"] | ||
|
|
||
|
|
||
| def _normalized_repository(url: object) -> str: | ||
| return str(url or "").removesuffix(".git").rstrip("/") | ||
|
|
||
|
|
||
| def _installed_vcs_source(package: str) -> tuple[str | None, str | None]: | ||
| payload = json.loads(metadata.distribution(package).read_text("direct_url.json") or "{}") | ||
| vcs_info = payload.get("vcs_info") or {} | ||
| if vcs_info.get("commit_id"): | ||
| return payload.get("url"), vcs_info["commit_id"] | ||
| if (payload.get("dir_info") or {}).get("editable") and str(payload.get("url", "")).startswith( | ||
| "file:" | ||
| ): | ||
| root = unquote(urlparse(payload["url"]).path) | ||
| repository = subprocess.check_output( | ||
| ["git", "-C", root, "remote", "get-url", "origin"], text=True | ||
| ).strip() | ||
| commit = subprocess.check_output( | ||
| ["git", "-C", root, "rev-parse", "HEAD"], text=True | ||
| ).strip() | ||
| dirty = subprocess.check_output( | ||
| ["git", "-C", root, "status", "--porcelain", "--untracked-files=all"], | ||
| text=True, | ||
| ).strip() | ||
| if dirty: | ||
| raise RuntimeError(f"Pinned Puzzletron dependency {package!r} is dirty: {dirty}") | ||
| return repository, commit | ||
| return payload.get("url"), vcs_info.get("commit_id") | ||
|
|
||
|
|
||
| def verify_installed_vcs_source(package: str, expected: dict[str, Any]) -> None: | ||
| """Require an installed VCS dependency to match its repository and commit.""" | ||
|
|
||
| repository, commit = _installed_vcs_source(package) | ||
| expected_source = (_normalized_repository(expected["repository"]), expected["commit"]) | ||
| actual_source = (_normalized_repository(repository), commit) | ||
| if actual_source != expected_source: | ||
| raise RuntimeError( | ||
| f"Pinned Puzzletron dependency {package!r} source mismatch: " | ||
| f"actual={actual_source!r}, expected={expected_source!r}" | ||
| ) |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Describe resolved defaults accurately.
puzzletron_setup/v2/defaults.pyresolves values from built-in, model-derived, preset, model-profile, and defaults-file layers. A required value can therefore lack a built-in default but still have a resolved default. Replace “no built-in default” with “no resolved default” or list the supported default layers.Suggested wording
📝 Committable suggestion
🤖 Prompt for AI Agents