Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Refactor dispatcher cmdline #1862

Merged
merged 15 commits into from
Dec 23, 2019
Merged

Conversation

chicm-ms
Copy link
Contributor

@chicm-ms chicm-ms commented Dec 18, 2019

Passthrough experiment settings to dispatcher, remove the unnecessary configuration parsing in nni manager.

Also fix following issue:
recognize customized tuner as builtin tuner if class name is same as one of builtin tuners.

def _run_advisor(args):
if args.advisor_class_name in AdvisorModuleName:
def _run_advisor(exp_params):
if exp_params.get('advisor').get('builtinAdvisorName') in AdvisorModuleName:
Copy link
Contributor

Choose a reason for hiding this comment

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

If exp_params.get('advisor') can be None, I think get won't help. Should write exp_params['advisor'] anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here the key 'advisor' must exist, it is OK to use either exp_params['advisor'] or exp_params.get('advisor'), just want to be consistent with other places where key may not exists.

@scarlett2018 scarlett2018 mentioned this pull request Dec 20, 2019
44 tasks
@@ -14,7 +14,9 @@
'send_metric',
]

init_standalone_logger()
if trial_env_vars.NNI_PLATFORM is None:
init_standalone_logger()
Copy link
Contributor

Choose a reason for hiding this comment

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

this file is for standalone mode, trial_env_vars.NNI_PLATFORM must be None, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, the problem is on environment variables, NNI_PLATFORM is an env var for trial not for dispatcher, I will fix it in another PR.

@leckie-chn leckie-chn merged commit 9d01d08 into master Dec 23, 2019
@leckie-chn leckie-chn mentioned this pull request Dec 25, 2019
19 tasks
@chicm-ms chicm-ms deleted the dev-refactor-dispatcher-cmdline branch February 12, 2020 05:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants