Chapter 4-3. Usage of XGen Web UI
XGen now is shipped with a new interface in Web UI. For quick start the webui, please refer to Quick Start. Basically, just simply run command below in your XGen container:
XGen webserver
# or specify a port
XGen webserver --port 8080
By default, XGen will randomly choose free port from 19001
to 19200
. Please ensure the port is not occupied by other process and accessible from your browser.
If logged with ssh shell, please remember to add -L
option to forward the port to local machine. Because the webui is running in container, it is not accessible from outside of the container. For example, if you want to forward port 8080
to local machine, run command below:
ssh -L 8080:localhost:8080 user@host
# the command format is
# ssh -L <localport>:<remotehost>:<remoteport> user@host
Then open your browser and visit http://localhost:8080
to access the webui.
Home
Home page offers shortcuts to navigate to other pages.
- Start Optimization: You can select an AI model and click the “Start Optimization” button to begin the optimization process.
- Optimization History and Results: View previous optimization history and the results of the optimization.
- Built-in AI Models and Customized AI Models: View the built-in models provided by XGen. You can select a model and click the “Download” button to download the model’s code maintained by XGen. You can also upload your own model and use it for optimization.
- Built-in Datasets and Customized Datasets: View the built-in datasets provided by XGen. You can also upload your own dataset for optimization.
- Convenient Tools: Some convenient tools provided by XGen, such as the benchmark tool. We will include more convenient tools in the feature.
- XGen Docs: Link to the XGen documentation.
Click check
button to go to corresponding page.
Sessions
Go to this page by clicking Optimization History and Results
button in home page or Sessions
button in the navigation bar on top of the site. This page shows the history of the optimization process. You can see the status of each optimization process. If the optimization process is finished, you can see the final result of the process.
There are several status of each optimization.
Pending
: The optimization process is waiting for resource to start.Successful
: The optimization process is finished successfully.Training
: The optimization process is running.Failed
: The optimization process is failed.
You can click the link under each Model / ID
then will be navigated to detail page of this optimization.
Optimization Page
Go to this page by clicking Start Optimization
button in home page or Start
button in the navigation bar on top of the site. This page is used to start a new optimization process.
This page is a large dynamic form. Answer of each question will take effect on questions below. Some of the questions are marked with an 'i' icon, which means there is a tooltip for this question. Hover on the icon to see the tooltip.
Just simply full fill the form as needed. Below is an example
Then click Submit
button to submit the form. If the not using customized dataset or customized model and compatibility testing, a modal will show up to present the estimated time to complete the optimization. Click OK
to start the optimization process. Or click Cancel
to cancel the optimization process and update the form due to suggestions given in the modal.
After starting the optimization process, the optimization process will be running in background. You can close the browser or navigate to other pages. The process will not be interrupted. But please note that please do not exit the XGen container while the optimization process is running. If you exit the container, the process will be terminated.
Optimization Detail Page
After clicking the Submit
button in the optimization page, you will be redirected to the optimization detail page. This page shows the progress of the optimization process.
There are three tabs in the page. By default, the Output Log
tab is selected. This tab shows the output log of the optimization process. You can see the progress of the optimization process here with automatically updated log. Here is a small square button on the right of the tabs. Click it will navigate to a full screen log page.
If interested in exact parameter details, please refer to Parameter
tab. This tab shows the parameters used in the optimization process. You can see the parameters used in each iteration.
What's more, you can click redo
button in the parameter page to prefill the optimization form with the parameters used in the iteration. Then you can start a new optimization process with the same parameters or just simply change it a little bit for another optimization try.
If the optimization process is finished, flag on the top right will turn to green with word success
. Otherwise, it will be red with word failed
. There are many reasons that may cause the optimization process failed. You can check the log to find the reason and fix it. Then click the resume
button to resume the optimization process.
If the optimization is succeeded. you can see the final result in the Output Product
tab.
You can download the output product (best result) by clicking the top right red Download
button. The output product is a *.tar.gzip file. If interested in result of specific iteration of optimization, Please click download button at the end of related column in the output form.
For usage of the output product, please refer to Results
Built-in and Customized Models
Go to this page by clicking Built-in AI Models and Customized AI Models
button in home page or Models
button in the navigation bar on top of the site. For builtin models, which is provided by CoCoPIE, user can not manage it. For customized models, please upload the customized to /root/customized_models
in the container then the uploaded model could be selected in through the select path
button.
Built-in Models
The Models
page by default shows the built-in models provided by XGen. You can select a model and click the Download
button to download the model’s code maintained by XGen.
Please download the models as needed. For downloaded models, XGen will check the update of the model code every time you start a new optimization process. If there is a new version of the model code, The Action
column will show a Upgrade
button. Click it to upgrade the model code.
Customized Models
Please upload the customized to /root/customized_models
in the container then the uploaded model could be selected in through the select path
button.
Datasets Management
Go to this page by clicking Built-in Datasets and Customized Datasets
button in home page or Datasets
button in the navigation bar on top of the site. For customized datasets, please upload the datasets to /data/customized_datasets
then the uploaded dataset could be selected by the select path
button.
Built-in Datasets
This tab lists all datasets provided by CoCoPIE including standard datasets and tiny datasets for rapid verification and test. You can select a dataset and click the Download
button on the top right of the dataset card to download the dataset. Meanwhile, the dataset card will show the download progress.
Upload a dataset
Please upload the datasets to /data/customized_datasets
then the uploaded dataset could be selected by the select path
button.
Convenient Tools
Go to this page by clicking Convenient Tools
button in home page or Tools
button in the navigation bar on top of the site. This page shows some convenient tools provided by XGen, such as the benchmark tool. We will include more convenient tools in the feature.
Model Latency Benchmarking and Result
Sometimes it's essential to measure the existing latency on edged devices to determine how much optimization is needed. Thus, we need to do benchmark on the existing models. Fortunately, XGen provide a convenient tool to do this.
For benchmarking existing models latency, we offer a convenient tool in the WebUI. You can benchmark the latency of a existing ONNX model The benchmarking result will be shown in the WebUI. If the models to be benchmarked is not in ONNX format, please convert it to ONNX format first. For guide of converting models to ONNX format, please refer to Checking Model Applicability.
There are two benchmarking modes. Normal benchmarking, which aims at measuring the latency of the model on the device. And the profiling benchmarking, which aims at do profiling on each layer of the model on edged device. The profiling benchmarking will generate a profiling log for each layer of the model.
Clicking Measure model latency
button will navigate to the benchmarking page.
After submit the benchmarking form, you will be redirected to the benchmark detail page.
This page will show the benchmark detail after benchmark end. On the top is the benchmark result. Below is the detailed benchmark log. User can download the benchmark log by clicking the Download
button on the top right of the page. The result is a csv file containing the detailed benchmark result of each device of each model in different model state ( spare or not ). The result quick view just shows the best result of the benchmark.
User can close the browser or navigate to other pages. The process will not be interrupted. But please note that please do not exit the XGen container while the benchmarking process is running. If exit the container, the process will be terminated. User can go back to this page by clicking the detail
button in the list of Model Latency Benchmarking and Result
tab.
XGen Docs
Go to this site. This is the link to the XGen documentation.