Skip to content

New CLI command: search - #2576

Draft
shaahji wants to merge 1 commit into
mainfrom
shaahji/clisearch
Draft

New CLI command: search#2576
shaahji wants to merge 1 commit into
mainfrom
shaahji/clisearch

Conversation

@shaahji

@shaahji shaahji commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

New CLI command: search

  • A specialized implementation of "run" CLI command that can built the config from command line args and run it.
  • Also, updated base.py to support command line args with both underscores and hyphens (aliasing only with full backward compatibility).

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

(Optional) Issue link

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lintrunner found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@shaahji
shaahji force-pushed the shaahji/clisearch branch from 0b1dc72 to 252a190 Compare July 17, 2026 20:12
Comment thread test/cli/test_search.py Fixed
* A specialized implementation of "run" CLI command that can built the
  config from command line args and run it.
* Also, updated base.py to support command line args with both
  underscores and hyphens (aliasing only, with full backward
  compatibility).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new olive CLI subcommand (pass-search) that builds and/or amends workflow configs from command-line arguments to run a pass-level search workflow, and extends the CLI option surface to accept both underscore and hyphen variants for many existing flags.

Changes:

  • Added new pass-search CLI command to generate run configs from args (or load an existing config) and run locally or submit remotely.
  • Changed SearchStrategyConfig.include_pass_params default to False and updated docs accordingly.
  • Updated shared CLI argument definitions in olive/cli/base.py to accept both underscore and hyphen forms for many options.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/cli/test_pass_search.py Adds unit tests for pass-search parsing, config generation, and remote submission behavior.
olive/search/search_strategy.py Changes default include_pass_params to False.
olive/cli/pass_search.py Implements the new pass-search command (arg parsing, config building, local run / remote submit).
olive/cli/launcher.py Registers the new pass-search subcommand in the CLI entrypoint.
olive/cli/base.py Adds hyphen aliases for many existing CLI options (and adjusts typing for logging default).
docs/source/reference/options.md Updates documentation to reflect the new default for include_pass_params.

Comment thread olive/cli/base.py
Comment on lines 860 to 866
dataset_group.add_argument(
"--add_special_tokens",
"--add-special-tokens",
type=bool,
default=False,
help="Whether to add special tokens during preprocessing.",
)
Comment thread olive/cli/pass_search.py
Comment on lines +183 to +192
search_group.add_argument(
"--include-pass-params",
action="store_true",
default=None,
help=(
"Include individual pass parameters in the search space. WARNING: this expands the "
"search space combinatorially -- even a few passes can blow it up exponentially. "
"Check the engine log ('Search space contains N search points ...') before launching."
),
)
- `stop_when_goals_met: [Boolean]` This decides whether to stop the search when the metric goals, if any, are met. This is `false` by default.

- `include_pass_params: [Boolean]` Includes individual pass parameter to build the search space. Defaults to true.
- `include_pass_params: [Boolean]` Includes individual pass parameter to build the search space. Defaults to false.
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.

3 participants