Skip to content

feat: add trackio.sweep() for local grid/random hyperparameter search - #664

Open
akkiyolo wants to merge 2 commits into
gradio-app:mainfrom
akkiyolo:feature-657-hyperparameter-sweeps
Open

feat: add trackio.sweep() for local grid/random hyperparameter search#664
akkiyolo wants to merge 2 commits into
gradio-app:mainfrom
akkiyolo:feature-657-hyperparameter-sweeps

Conversation

@akkiyolo

Copy link
Copy Markdown

Partially addresses #657.

Adds the backend piece of hyperparameter sweep support: trackio.sweep()
runs a local grid or random search over a defined parameter space by
calling a user-supplied training function once per configuration.

  • trackio.sweep(sweep_config, function, count=None, sweep_id=None) ,API
    shape roughly mirrors wandb's sweep config (method, parameters with
    values or min/max) so existing configs mostly drop in
  • Any trackio.init() called inside function automatically merges the
    sweep-selected hyperparameters into config and groups the run under a
    shared sweep id (unless group is explicitly passed), reusing the
    existing config/group fields ,no schema changes
  • Added examples/hyperparameter-sweep.py and tests/unit/test_sweep.py
    (16 tests covering config generation edge cases and init() integration)

Not included in this PR (see plans/issue-657-hyperparameter-sweeps-plan.md
for a scoped breakdown and follow-up ideas):

  • Parallel-coordinates chart in the dashboard
  • CLI-driven sweeps over an external script
  • Bayesian/other advanced search strategies

Ran pytest tests/unit/test_sweep.py (16 passed) and the full unit suite
locally with no new failures, plus ruff check --fix --select I && ruff format.

Commented on the issue beforehand to flag this scope: #657 (comment)

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.

2 participants