-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Suport prefix url for nnimanager #3643
Suport prefix url for nnimanager #3643
Conversation
@@ -19,7 +20,7 @@ import { createRestHandler } from './restHandler'; | |||
*/ | |||
@component.Singleton | |||
export class NNIRestServer extends RestServer { | |||
private readonly API_ROOT_URL: string = '/api/v1/nni'; | |||
private readonly API_ROOT_URL: string = `/api/v1/nni/${getUrlPrefix()}`; |
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.
I think prefix URL should better override /api/v1/nni
.
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 same opinion with @liuzhe-lz , in
nni/nni/tools/nnictl/url_utils.py
Line 10 in 5a71ce9
API_ROOT_URL = '/api/v1/nni' |
so that we don't need to modify too many internal interfaces.
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.
Changed.
nni/tools/nnictl/launcher.py
Outdated
@@ -81,6 +81,10 @@ def start_rest_server(port, platform, mode, experiment_id, foreground=False, log | |||
cmds += ['--log_level', log_level] | |||
if foreground: | |||
cmds += ['--foreground', 'true'] | |||
if url_prefix: | |||
path_validation(url_prefix) |
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.
maybe validate in create_experiment
is better?
and if we resume
or view
an experiment, should we support reconfigure url_prefix
?
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.
- Changed.
- I'm ok for that, since there is no way to change "url_prefix". Any concerns @liuzhe-lz ?
Suport prefix url for nnimanager