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

Add docstring for hypersearch module #84

Merged
merged 3 commits into from
Jul 8, 2020
Merged

Add docstring for hypersearch module #84

merged 3 commits into from
Jul 8, 2020

Conversation

mohammadbashiri
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@KonstantinWilleke KonstantinWilleke left a comment

Choose a reason for hiding this comment

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

After looking a bit more into the hypersearch module, I've found two things that I think are worth addressing in this PR as well:

there's a typo here:

def _add_etery(Table, fn, config):

And another, potentially bigger issue could be:
I noticed that the user has no control over the seed at all. So if there happen to be more entires in the seed table, the Bayesian search will auto populate all seeds. I think a seed=None default argument might be helpful, so the user can set specific seed, if that's what that particular user has on his mind.

architect (dict): Name of the contributor that added this entry
trained_model_table (dict): name (importable) of the trained_model_table
total_trials (int, optional): Number of experiments (i.e. training) to run. Defaults to 5.
arms_per_trial (int, optional): Number of different configurations used for training (for more details check https://ax.dev/docs/glossary.html#trial). Defaults to 1.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be helpful to have the glossary link already at the top.

Copy link
Collaborator Author

@mohammadbashiri mohammadbashiri Jul 8, 2020

Choose a reason for hiding this comment

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

There is a link to ax at the top (in case user wants to get to know more about it), and this is pretty much the only term that is used from ax. So I am not sure how helpful adding a link at the top to glossary is. What do u imagine the sentence look like?

@@ -8,7 +8,25 @@


class Bayesian():

"""
A hyperparamter optimization tool based on Facebook Ax (https://ax.dev/), integrated with nnfabrik.
Copy link
Collaborator

@KonstantinWilleke KonstantinWilleke Jul 7, 2020

Choose a reason for hiding this comment

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

What would be helpful here I think is to include just a short sentence how it generally works. Something like: automatically adds entries to the model, dataset, and trainer tables, trains the model and stores the result in the provided TrainedModel table. So that it is immediately clear conceptually
what it is doing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. Done.

@@ -88,6 +159,16 @@ def _add_etery(Table, fn, config):
return fn, entry_hash

def train_evaluate(self, auto_params):
"""
For a given set of parameters, add an entry to the corresponding tables, and populated the trained model
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think a sentence like this at the very top, as I mentioned, would be quite helpful!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Addressed above.

@mohammadbashiri
Copy link
Collaborator Author

Good catch about the typo - now fixed. but I completely ignored that function because it is not being used at the moment.
With regards to the seed, that's a good point. Another thing is in case of having many seeds one should actually take the average/best performance across seeds, not necessarily the first one. But I would suggest addressing this in another PR. Would u make an issue about this @KonstantinWilleke ?

@KonstantinWilleke KonstantinWilleke self-requested a review July 8, 2020 07:40
@KonstantinWilleke KonstantinWilleke merged commit e2fcd26 into sinzlab:master Jul 8, 2020
@KonstantinWilleke
Copy link
Collaborator

Thanks @mohammadbashiri! I've created the issue regarding the seed:
#85

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