Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperband band indexes are off by one #1237

Closed
leopd opened this issue Sep 14, 2020 · 7 comments
Closed

Hyperband band indexes are off by one #1237

leopd opened this issue Sep 14, 2020 · 7 comments
Labels
ty:bug type of the issue is a bug

Comments

@leopd
Copy link

leopd commented Sep 14, 2020

wandb --version && python --version && uname

  • Weights and Biases version: 0.9.7
  • Python version: 3.7.9
  • Operating System: Ubuntu 18.04LTS

Description

Using the hyperband early termination criterion for sweeps, you must specify where the "bands" are, which is how many iterations of the objective metric get reported before the algorithm considers whether or not to stop the run. They are an exponential series like 2,4,8,16, etc.

What I Did

If you configure the bands like:

early_terminate:
    type: hyperband
    min_iter: 2
    eta: 2

Here, the bands should be configured for iterations 2, 4, 8, 16, etc. But instead of considering the 2nd, 4th, 8th, 16th metric reported, it considers the 3rd, 5th, 9th, 17th, etc. This is because the code takes the human-specified iteration numbers which are 1-based (e.g. "1" means the first iteration) and uses them as indexes into a python list, which is 0-based. code

@issue-label-bot issue-label-bot bot added the ty:bug type of the issue is a bug label Sep 14, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.73. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@cvphelps
Copy link
Contributor

Hi @leopd thanks for reporting this off by one error, good catch. I'll track this internally.

@alexmirrington
Copy link

Hi @cvphelps, any ideas on the schedule for this bug and whether sprcifying the max_iter field in the sweep config also yields incorrect results?

@cvphelps
Copy link
Contributor

Hi @alexmirrington thanks for your message. We will be including this in our first fixes for sweeps features after we finish the Client improvements this month. We'll be moving the client code from the client-ng repo in the next week or so.

For max_iter: if you've logged a metric 3 times it's a max_iter of 3 — there's a separation of iterations and steps, where steps start at 0 and iterations start at 1. This sounds like something we can clarify in the documentation.

@alexmirrington
Copy link

@cvphelps Cheers for the explanation :) For now, I'll just log a validation step at the start of the run to account for the index offset until the issue is fixed :)

@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity.

@github-actions github-actions bot added the stale label Dec 19, 2020
@sydholl
Copy link

sydholl commented Nov 18, 2021

In the past year we've majorly reworked the CLI and UI for Weights & Biases. We're closing issues older than 6 months. Please comment to reopen.

@sydholl sydholl closed this as completed Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ty:bug type of the issue is a bug
Projects
None yet
Development

No branches or pull requests

4 participants