-
Notifications
You must be signed in to change notification settings - Fork 18
refactor: smoke-friendly gym-eval #1271
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| import argparse | ||
| import asyncio | ||
| import tempfile | ||
| from datetime import datetime | ||
| from pathlib import Path | ||
|
|
||
| from nemo_evaluator_sdk.agent_eval.evaluator import AgentEvaluator | ||
|
|
@@ -122,7 +123,13 @@ def _packaged_dataset(resources_server: str) -> Path: | |
|
|
||
|
|
||
| async def _main(args: argparse.Namespace) -> int: | ||
| output_dir = args.output_dir or Path(tempfile.mkdtemp(prefix="gym-eval-")) | ||
| if args.output_dir is not None: | ||
| # Suffix each run with a human-readable timestamp so re-runs never collide with the runner's | ||
| # fresh-output guard (it refuses a dir already holding Gym rollouts). | ||
| stamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S") | ||
| output_dir = args.output_dir.with_name(f"{args.output_dir.name}-{stamp}") | ||
|
Comment on lines
+127
to
+130
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Add uniqueness beyond one second. The timestamp has one-second precision. Two runs started in the same second receive the same output directory. The second run can fail the fresh-output guard, and concurrent runs can share artifacts. Keep the readable timestamp and add microseconds or a unique suffix. 🤖 Prompt for AI Agents |
||
| else: | ||
| output_dir = Path(tempfile.mkdtemp(prefix="gym-eval-")) | ||
| dataset = args.dataset or _packaged_dataset(args.resources_server) | ||
| tasks = discover_gym_tasks(dataset) | ||
| print(f"discovered {len(tasks)} tasks from {dataset}") | ||
|
|
||
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.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA-NeMo/nemo-platform
Length of output: 33645
🏁 Script executed:
Repository: NVIDIA-NeMo/nemo-platform
Length of output: 19724
Handle output paths without a final name.
When
args.output_dirisPath(".")or a filesystem root,Path.with_name(...)raisesValueErrorbefore evaluation starts. Resolve the path first or reject nameless paths with a clear CLI error.🤖 Prompt for AI Agents