feat(agents): Support fileset configuration in optimize agent job#822
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
📝 WalkthroughWalkthroughOptimize agent jobs now support optimization YAML and output artifacts through local paths or platform filesets. Configuration staging, validation, temporary injection, subprocess execution, and success-only output uploads use the resolved paths. ChangesOptimize fileset staging and execution
Sequence Diagram(s)sequenceDiagram
participant OptimizeAgentJob
participant resolve_staged_config
participant sdk.files.download
participant resolve_output
participant sdk.files.upload
OptimizeAgentJob->>resolve_staged_config: resolve optimize YAML
resolve_staged_config->>sdk.files.download: download configuration fileset
sdk.files.download-->>resolve_staged_config: staged local files
OptimizeAgentJob->>resolve_output: create output staging directory
resolve_output->>sdk.files.upload: upload output fileset after success
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/nemo-agents/src/nemo_agents_plugin/jobs/optimize_agent.py`:
- Around line 172-173: Update the compilation validation around
spec.optimize_config_fileset to reject absolute optimize_config paths when a
fileset is configured: check Path(spec.optimize_config).is_absolute() and fail
compilation, while preserving the existing _require_absolute behavior for
non-fileset configurations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 93a482f1-9ed5-4054-bbed-924bbf72fcc9
📒 Files selected for processing (2)
plugins/nemo-agents/src/nemo_agents_plugin/jobs/optimize_agent.pyplugins/nemo-agents/tests/unit/test_optimize_agent_job.py
|
Signed-off-by: Sean Teramae <steramae@nvidia.com>
Signed-off-by: Sean Teramae <steramae@nvidia.com>
e50aa40 to
48969ba
Compare
Signed-off-by: Sean Teramae <steramae@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/nemo-agents/src/nemo_agents_plugin/jobs/optimize_agent.py`:
- Around line 336-338: Update the logging around the optimization command in the
relevant job function to avoid emitting the raw endpoint, including both the
“Optimizing against agent endpoint” and “Running” messages. Sanitize or omit
endpoint-derived values before passing them to logger.info, while preserving
useful non-sensitive execution context such as the command and working
directory.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 04c83515-8f4b-49ec-ad9c-1773b0b5be38
📒 Files selected for processing (3)
plugins/nemo-agents/openapi/openapi.yamlplugins/nemo-agents/src/nemo_agents_plugin/jobs/optimize_agent.pyplugins/nemo-agents/tests/unit/test_optimize_agent_job.py
🚧 Files skipped from review as they are similar to previous changes (2)
- plugins/nemo-agents/openapi/openapi.yaml
- plugins/nemo-agents/tests/unit/test_optimize_agent_job.py
…IDIA-NeMo#822) * feat(agents): Support fileset configuration in optimize agent job Signed-off-by: Sean Teramae <steramae@nvidia.com> * review codex, add output fileset Signed-off-by: Sean Teramae <steramae@nvidia.com> * fix PR comments Signed-off-by: Sean Teramae <steramae@nvidia.com> --------- Signed-off-by: Sean Teramae <steramae@nvidia.com>
Signed-off-by: Sean Teramae steramae@nvidia.com
Summary by CodeRabbit
optimize_config_fileset.outputsemantics, including fileset-based output staging.optimize_configand destination references, including safer relative-path handling.optimize_config,optimize_config_fileset, andoutput.