-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
_drop_field(v1, 'versionCheck') | ||
_move_field(v1, v2, 'logLevel', 'log_level') | ||
_drop_field(v1, 'logCollection') | ||
_drop_field(v1, 'useAnnotation') # FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don’t support multiThread
and useAnnotation
in this version? And do we still support these by nnictl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useAnnotation
is handled in nnictl with some hacks. I think it's not elegant but don't want to solve it in this release.
multiThread
is not supported. It's easy to implement since the value is directly passed to dispatcher, but I don't want to expose this interface in v2 schema.
nni/tools/nnictl/common_utils.py
Outdated
@@ -44,6 +44,7 @@ def get_json_content(file_path): | |||
def print_error(*content): | |||
'''Print error information to screen''' | |||
print(Fore.RED + ERROR_INFO + ' '.join([str(c) for c in content]) + Fore.RESET) | |||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someplace continuous use twice print_error
, like L26 and L39 in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my debug code, removed.
nni/tools/nnictl/launcher.py
Outdated
from nni.experiment.config.v1 import convert_to_v2 | ||
v2 = convert_to_v2(experiment_config).json() | ||
response = rest_post(experiment_url(port), json.dumps(v2), REST_TIME_OUT, show_error=True) | ||
#print(response.text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
del the debug comments?
nni/tools/nnictl/launcher.py
Outdated
@@ -520,8 +203,7 @@ def launch_experiment(args, experiment_config, mode, experiment_id): | |||
exit(1) | |||
if mode != 'view': | |||
# set platform configuration | |||
set_platform_config(experiment_config['trainingServicePlatform'], experiment_config, args.port,\ | |||
experiment_id, rest_process) | |||
raise Exception('TODO') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will we do this in this release? nnictl create/resume
need to set platform configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The branch was outdated. Implementation merged from dev branch.
if (exp.trainingService === undefined) { | ||
return exp.maxExecDuration; | ||
} else { | ||
return 99999; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if v2, we don't use maxExperimentDuration
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maxExecDuration
/maxExperimentDuration
has always been optional. Previously the default value is handled by nnictl, which I think is improper.
@@ -60,6 +60,7 @@ class RemoteMachineTrainingService implements TrainingService { | |||
private sshConnectionPromises: any[]; | |||
|
|||
constructor(@component.Inject timer: ObservableTimer) { | |||
super() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remote haven't updated yet?
_move_field(v1_machine, v2_machine, 'gpuIndices', 'gpu_indices') | ||
_move_field(v1_machine, v2_machine, 'maxTrialNumPerGpu', 'max_trial_number_per_gpu') | ||
_move_field(v1_machine, v2_machine, 'useActiveGpu', 'use_active_gpu') | ||
_move_field(v1_machine, v2_machine, 'preCommand', 'trial_prepare_command') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we just rename this field to pythonPath
in #3367 (comment)
_move_field(v1_trial, ts, 'cpuNum', 'trial_cpu_number') | ||
_move_field(v1_trial, ts, 'memoryMB', 'trial_memory_size') # FIXME: unit | ||
_move_field(v1_trial, ts, 'image', 'docker_image') | ||
_drop_field(v1_trial, 'virtualCluster') # FIXME: better error message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why drop virtualCluster
?
save_algo_meta_data(meta) | ||
else: | ||
print_error(f'Cannot overwrite builtin algorithm') | ||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If print_error()
function contains raise
, then does not need to add raise
again. BTW, there is no exception here, what is the content of raise
?
return result, message | ||
#set trial_config | ||
return set_trial_config(experiment_config, port, config_file_name), err_message | ||
#def set_dlts_config(experiment_config, port, config_file_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If don't support DLTS anymore, we could delete these code, not comment them.
|
||
const foregroundArg: string = parseArg(['--foreground', '-f']); | ||
if (!('true' || 'false').includes(foregroundArg.toLowerCase())) { | ||
console.log(`FATAL: foreground property should only be true or false`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use console.log()
?
Recreated as PR #3466