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

[refactor] Address the Issue#148 and clean _search() function #165

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

nabenabe0928
Copy link
Contributor

For more details, see #148.

Since the readability of the function was quite bad,
I separated the processing.
I mostly copied and pasted the original processing and
checked if we can run some examples.
@nabenabe0928 nabenabe0928 changed the base branch from master to refactor_development April 12, 2021 16:00
self._stopwatch.stop_task(dummy_task_name)

def _run_traditional_ml(self) -> None:
"""We would like to obtain training time for at least 1 Neural network in SMAC"""
Copy link
Contributor

Choose a reason for hiding this comment

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

could you move this comment to line 706?


return budget_config

def _start_smac(self, proc_smac: AutoMLSMBO) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think its fine if we have this function inside _run_smac. Having two functions makes it a bit confusing.

self._metric: Optional[autoPyTorchMetric] = None
self._logger: Optional[PicklableClientLogger] = None
self.run_history: RunHistory = RunHistory()
self.trajectory: Optional[List] = None
self.dataset_name: Optional[str] = None
self.dataset_name: str = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you want to have it as an empty string?

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, I see that it was suggested by Francisco in a previous PR. I suggest you to not make the same changes in different PR. Let merge #106 first and then we can rebase to include this change. It makes it confusing to review the same changes in different places.

Copy link
Contributor

@ravinkohli ravinkohli left a comment

Choose a reason for hiding this comment

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

Hey, Thanks for the PR. While I agree with dividing _search into smaller functions. Do you think too many functions have been created now? I feel if you could merge the functions that are doing one thing for example _do_traditional_predictions can be merged into _run_traditional_ml and same for dummy, and smac it would make it much easier to understand whats going on in the code. And while you are making these functions, it would be great to also add documentation for each one. as well as keeping the comments that were there before each process for example =====> Run dummy, etc. Also, I think its better if we keep the _search_settings a part of the search function.

@franchuterivera franchuterivera changed the base branch from refactor_development to development May 7, 2021 09:01
@nabenabe0928 nabenabe0928 marked this pull request as draft May 20, 2021 14:06
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