"git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "2f01a4cdfc0fc698d0235dd040d497611da0e263"
Unverified Commit f9580cd1 authored by chicm-ms's avatar chicm-ms Committed by GitHub
Browse files

Fix dispatcher log (#1869)

parent 9cbbf6f8
...@@ -359,6 +359,7 @@ class NNIManager implements Manager { ...@@ -359,6 +359,7 @@ class NNIManager implements Manager {
} }
const nniEnv = { const nniEnv = {
SDK_PROCESS: 'dispatcher',
NNI_MODE: mode, NNI_MODE: mode,
NNI_CHECKPOINT_DIRECTORY: dataDirectory, NNI_CHECKPOINT_DIRECTORY: dataDirectory,
NNI_LOG_DIRECTORY: getLogDir(), NNI_LOG_DIRECTORY: getLogDir(),
......
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license. # Licensed under the MIT license.
from .trial import * from .env_vars import dispatcher_env_vars
from .smartparam import *
from .nas_utils import training_update if dispatcher_env_vars.SDK_PROCESS != 'dispatcher':
from .trial import *
from .smartparam import *
from .nas_utils import training_update
class NoMoreTrialError(Exception): class NoMoreTrialError(Exception):
def __init__(self, ErrorInfo): def __init__(self, ErrorInfo):
......
...@@ -16,6 +16,7 @@ _trial_env_var_names = [ ...@@ -16,6 +16,7 @@ _trial_env_var_names = [
] ]
_dispatcher_env_var_names = [ _dispatcher_env_var_names = [
'SDK_PROCESS',
'NNI_MODE', 'NNI_MODE',
'NNI_CHECKPOINT_DIRECTORY', 'NNI_CHECKPOINT_DIRECTORY',
'NNI_LOG_DIRECTORY', 'NNI_LOG_DIRECTORY',
......
...@@ -11,7 +11,6 @@ import logging ...@@ -11,7 +11,6 @@ import logging
import hyperopt as hp import hyperopt as hp
import numpy as np import numpy as np
from nni.tuner import Tuner from nni.tuner import Tuner
from nni.nas_utils import rewrite_nas_space
from nni.utils import NodeType, OptimizeMode, extract_scalar_reward, split_index from nni.utils import NodeType, OptimizeMode, extract_scalar_reward, split_index
logger = logging.getLogger('hyperopt_AutoML') logger = logging.getLogger('hyperopt_AutoML')
...@@ -226,7 +225,6 @@ class HyperoptTuner(Tuner): ...@@ -226,7 +225,6 @@ class HyperoptTuner(Tuner):
return hp.anneal.suggest return hp.anneal.suggest
raise RuntimeError('Not support tuner algorithm in hyperopt.') raise RuntimeError('Not support tuner algorithm in hyperopt.')
@rewrite_nas_space
def update_search_space(self, search_space): def update_search_space(self, search_space):
""" """
Update search space definition in tuner by search_space in parameters. Update search space definition in tuner by search_space in parameters.
......
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license. # Licensed under the MIT license.
from ..env_vars import trial_env_vars from ..env_vars import trial_env_vars, dispatcher_env_vars
assert dispatcher_env_vars.SDK_PROCESS != 'dispatcher'
if trial_env_vars.NNI_PLATFORM is None: if trial_env_vars.NNI_PLATFORM is None:
from .standalone import * from .standalone import *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment