test: fix iterate2 integration test for refactored CLI#322
Merged
Conversation
The integration test invoked 'iterate' with flags removed in the iterate2 refactor (--root-dir, --wlm, --metric, --gpu-count, --cpu-count, --mem-gb), causing 'unrecognized arguments' and a failing Integration Tests workflow on every push. Those settings are now driven by the HPO YAML (the metric lives in its 'metrics:' section). - Drop the stale flags from the test command. - Mark examples/bumpy_function.py executable: iterate2 runs the trial script directly via subprocess ([script]), so it needs the +x bit; without it the run died with PermissionError. Verified: pytest tests/unit/test_iterate2.py passes (10 trials, exit 0). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Romeo Kienzler <romeo.kienzler1@ibm.com>
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.
Problem
The Integration Tests workflow has been failing on every push to
main:The iterate2 refactor (commit
a1ad3ca) removed those CLI flags — the metric is now declared in the HPO YAML'smetrics:section, and the other settings moved into the YAML / plugin system. The test intests/unit/test_iterate2.pywas never updated.Fix
iteratecommand. The current CLI accepts only--script,--hpo-yaml,--optuna-study-name,--optuna-db-path,--optuna-n-trials,--parallelism,--log-level.examples/bumpy_function.pyexecutable (100644 → 100755). iterate2 runs the trial script directly viasubprocess.Popen([script]), so it needs the+xbit — without it the run died withPermissionErroreven after the args were fixed.Verification
Ran end-to-end locally: all 10 Optuna trials execute and the launcher exits 0. (Trial values near 0.0 are expected — the bumpy function's global optimum is a narrow peak at
(23,42,66), so random points score ~0.)🤖 Generated with Claude Code