• Özhan Özen's avatar
    Adds early stopping support for Ray integration (#3276) · 5cb47282
    Özhan Özen authored
    # Description
    
    This PR introduces support for early stopping in Ray integration through
    the `Stopper` class. It enables trials to end sooner when they are
    unlikely to yield useful results, reducing wasted compute time and
    speeding up experimentation.
    
    Previously, when running hyperparameter tuning with Ray integration, all
    trials would continue until the training configuration’s maximum
    iterations were reached, even if a trial was clearly underperforming.
    This wasn’t always efficient, since poor-performing trials could often
    be identified early on. With this PR, an optional early stopping
    mechanism is introduced, allowing Ray to terminate unpromising trials
    sooner and improve the overall efficiency of hyperparameter tuning.
    
    The PR also includes a `CartpoleEarlyStopper` example in
    `vision_cartpole_cfg.py`. This serves as a reference implementation that
    halts a trial if the `out_of_bounds` metric doesn’t reduce after a set
    number of iterations. It’s meant as a usage example: users are
    encouraged to create their own custom stoppers tailored to their
    specific use cases.
    
    Fixes #3270.
    
    ## Type of change
    
    - New feature (non-breaking change which adds functionality)
    
    ## Checklist
    
    - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
    `./isaaclab.sh --format`
    - [ ] I have made corresponding changes to the documentation
    - [x] My changes generate no new warnings
    - [ ] I have added tests that prove my fix is effective or that my
    feature works
    - [ ] I have updated the changelog and the corresponding version in the
    extension's `config/extension.toml` file
    - [x] I have added my name to the `CONTRIBUTORS.md` or my name already
    exists there
    
    ---------
    Co-authored-by: 's avatargarylvov <67614381+garylvov@users.noreply.github.com>
    Co-authored-by: 's avatargarylvov <gary.lvov@gmail.com>
    Co-authored-by: 's avatarsbtc-sipbb <sbtc@sipbb.ch>
    Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
    5cb47282
train.py 11.1 KB