Navigation Menu

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

fix hyperband, logger, search_method #31

Merged
merged 3 commits into from Oct 30, 2020
Merged

fix hyperband, logger, search_method #31

merged 3 commits into from Oct 30, 2020

Conversation

loxacom123
Copy link
Contributor

No description provided.

@loxacom123 loxacom123 changed the title fix hyperband fix hyperband, logger, search_method Oct 29, 2020
Copy link
Contributor

@NoamRosenberg NoamRosenberg left a comment

Choose a reason for hiding this comment

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

@loxacom123 could you elaborate? Under what conditions does value is None?

@loxacom123
Copy link
Contributor Author

When search_method==random && (learning_rate * anchor_scales * anchor_ratios) > max_trials ,
populate_space return None ,that means all combinations have been tried.

status = response['status']
values = response['values'] if 'values' in response else None
self.trials[trial_id] = {'hp_values': values}
if response is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

@loxacom123 can you elaborate on why this might happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When search_method set random and (learning_rate * anchor_scales * anchor_ratios) bigger than max_trials ,
populate_space return None ,that means all combinations have been tried.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For instance,

"hp_search_space": [
      {
        "name": "learning_rate",
        "values": [
          5e-4,
          1e-5,
          5e-5
        ]
      },
      {
        "name": "anchor_scales",
        "values": [
          [1.0, 1.189207115002721, 1.4142135623730951],
          [1.0, 1.2599210498948732, 1.5874010519681994],
          [1.0, 1.5, 2.0]
        ]
      },
      {
        "name": "anchor_ratios",
        "values": [
          [0.306, 0.638, 1.0, 1.567, 3.266],
          [0.3, 0.5, 1.0, 2.0, 3.0],
          [0.6666666666666666, 0.8, 1.0, 1.25, 1.5]
        ]
      }
    ]

learning_rate * anchor_scales * anchor_ratios = 27
So when max_trials bigger than 27 , hyperparamter_tuner.oracle._populate_space() will return None.
So the status set as STOPPED

Copy link
Contributor

Choose a reason for hiding this comment

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

WELL PUT!

Copy link
Contributor

Choose a reason for hiding this comment

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

@loxacom123 thank you for this very elaborate explanation!

else:
status = response['status']
values = response['values'] if 'values' in response else None
if values is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

@loxacom123 can you elaborate on why this might happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When search_method set hyperband and _current_bracket_num = 0,

the hyperparameter_tuner.hyperband._populate_space will return {'status': 'STOPPED'} .

So the response['values'] = None

and the trials would be added a blank item.

Then hyperparameter_tuner.core.get_sorted_trial_ids() comes out error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well done @loxacom123!

@NoamRosenberg NoamRosenberg merged commit d57ef7f into dataloop-ai:master Oct 30, 2020
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.

None yet

2 participants