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

Is there any option to set base url for the web report? #2771

Closed
prises0221 opened this issue Aug 7, 2020 · 13 comments · Fixed by #3643 or #3625
Closed

Is there any option to set base url for the web report? #2771

prises0221 opened this issue Aug 7, 2020 · 13 comments · Fixed by #3643 or #3625
Assignees

Comments

@prises0221
Copy link

Environment:

  • NNI version:
  • NNI mode (local|remote|pai):
  • Client OS:
  • Server OS (for remote mode only):
  • Python version:
  • PyTorch/TensorFlow version:
  • Is conda/virtualenv/venv used?:
  • Is running in Docker?:

Log message:

  • nnimanager.log:
  • dispatcher.log:
  • nnictl stdout and stderr:

What issue meet, what's expected?:

How to reproduce it?:

Additional information:

Hello, I am an NNI user.
When I used NNI on my system, I had to change the base url of the web report, so I looked for the option, but I couldn't find it.
Do you guys support this? Is there any option to set base url for the web report?
If there is the option, please let me know, If there isn't, please let me know if you have plans to add this option.
Thanks

@Lijiaoa
Copy link
Contributor

Lijiaoa commented Aug 7, 2020

@ultmaster
Copy link
Contributor

What do you mean by base url? hostname or port? Please try nnictl create --port xxx if you want to set a different port.

@scarlett2018 scarlett2018 added user raised question Further information is requested waiting user confirm labels Aug 12, 2020
@scarlett2018
Copy link
Member

@prises0221 - as @ultmaster mentioned if you want to change the port, you can use the nnictl command. if you want to change the entire base url to a different root, you might have to change the code (refer to Lijiaoa's comment).

let us know if this is not what you are asking for.

@prises0221
Copy link
Author

@scarlett2018
Thank you for your answer. Yes, I want to change the entire base url (not port) to apply it to our system.
For example, I want to change the main url "127.0.0.1:8080/oview" to "127.0.0.1:8080/{this-is-my-custom-url}/oview". {this-is-my-custom-url} may be changed every time I create an experiment. So I want to handle this when I execute "nnictl create" in fact. But it seems that there is only option for changing the port. If there is no option like I want, that's OK. I was just wondered if I should add some code lines or I can use the existing option.

@scarlett2018
Copy link
Member

@scarlett2018
Thank you for your answer. Yes, I want to change the entire base url (not port) to apply it to our system.
For example, I want to change the main url "127.0.0.1:8080/oview" to "127.0.0.1:8080/{this-is-my-custom-url}/oview". {this-is-my-custom-url} may be changed every time I create an experiment. So I want to handle this when I execute "nnictl create" in fact. But it seems that there is only option for changing the port. If there is no option like I want, that's OK. I was just wondered if I should add some code lines or I can use the existing option.

@prises0221 - thanks for the quick responds. for the specific need you mentioned above, we don't have the support in current NNI, you can change the code as Lijiaoa mentioned in previous comments.

Just for curiosity, why you need {this-is-my-custom-url}/ as mid prefix? for simplify the management of multiple experiments? if so, we are currently working on the design for multiple experiments management, feel free to comment in the issue for your scenario and requirements, and comments to the current design. #2779

@prises0221
Copy link
Author

@scarlett2018
We want to manage multiple experiments for multiple users on our cloud system. We already have our own web url policy for our system, and that's why I need {this-is-my-custom-url}/ as mid prefix. We want to separate those web pages with unique id to manage it.

@scarlett2018
Copy link
Member

@scarlett2018
We want to manage multiple experiments for multiple users on our cloud system. We already have our own web url policy for our system, and that's why I need {this-is-my-custom-url}/ as mid prefix. We want to separate those web pages with unique id to manage it.

@prises0221 #2779 should meet your requirements somehow, please take a look and provide your feedbacks. If you want this feature immediately (before we finish our efforts for #2779), you might consider use REST API to write some codes for it.

BTW, would you mind share your organization's name to us as a reference? We are trying to hold a user group for feature discussions, surveys, etc.

@prises0221
Copy link
Author

@scarlett2018
Okay, I will take a look. I'm working on Samsung Electronics.

@rushtehrani
Copy link
Contributor

This is something we also need as well. Our use case: We need to host the NNI UI alongside JupyterLab in Kubernetes. Using a different port is not a good option since we're using Istio and we need to map a path to a port and make the UI available to the user. A good example of this is TensorBoard and the --path_prefix option.

This link doesn't seem to exist anymore. Where can we make this change now?

@liuzhe-lz
Copy link
Contributor

This is something we also need as well. Our use case: We need to host the NNI UI alongside JupyterLab in Kubernetes. Using a different port is not a good option since we're using Istio and we need to map a path to a port and make the UI available to the user. A good example of this is TensorBoard and the --path_prefix option.

This link doesn't seem to exist anymore. Where can we make this change now?

It's moved to https://github.com/microsoft/nni/blob/master/ts/webui/src/static/const.ts#L5 now.

@Lijiaoa
Copy link
Contributor

Lijiaoa commented Jan 18, 2021

Hi, @prises0221 @rushtehrani @zhangxingdeppon

Thanks for your feedback. First, nni webui could render the main url "127.0.0.1:8080/oview" to "127.0.0.1:8080/{this-is-my-custom-url}/oview" by adding basename in the index.tsx file.

<Router basename='customURL'>

You metioned that

{this-is-my-custom-url} may be changed every time I create an experiment. So I want to handle this when I execute "nnictl create" in fact.

so do you want to pass {this-is-my-custom-url} by this command nnictl create ... --customURL xxxxx?

This proposal may have problem that if {this-is-my-custom-url} could be passed to webui by restAPI on nni current enviroment. And I don't know if I understand your question correctly. Looking forward to your reply.

@zhangxingdeppon
Copy link

zhangxingdeppon commented Jan 18, 2021

excellent, thanks@kvartet @Lijiaoa , I prefer to set {this-is-my-custom-url} by the command nnictl create --customURL, so that we can pass the parameters --customURL to the command line and dynamically configure nni web url as a microservice , we needs to start multiple nni services, and map the path to a port on Loadbalance according to user needs.

@rushtehrani
Copy link
Contributor

rushtehrani commented Feb 25, 2021

Thanks for the information.

so do you want to pass {this-is-my-custom-url} by this command nnictl create ... --customURL xxxxx?

Yes, basically this will be similar to how TensorBoard works:

tensorboard --path_prefix {my-custom-path}

Exposes TensorBoard at http://127.0.0.1:6006/{my-custom-path}

An equivalent command in NNI would be:

nnictl create --config=... --path_prefix {my-custom-path}

Which will then make NNI available at http://127.0.0.1:8080/{my-custom-path}

This was linked to pull requests May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants