Chronos: Update installation panel for inference option (#6742)

* first commit

* add inference button

* fix typo

* fix typo again

* fix syntax error

* try fix

* rollback

* try fix again

* add comment

* fix installation error

* rename

* try fix

* rollback

* fix error

* fix error again

* try fix
This commit is contained in:
liangs6212 2022-11-25 15:26:35 +08:00 committed by GitHub
parent 621168ce2e
commit cd04f7dbdc
2 changed files with 352 additions and 124 deletions

View file

@ -4,6 +4,7 @@ var models = ["Prophet", "ARIMA","Deep_learning_models","Machine_learning_models
var ais = ["pytorch", "tensorflow"];
var oss=["linux", "win"];
var automls=["automlyes", "automlno"];
var inferences=["inferenceyes", "inferenceno"];
var hardwares=["singlenode", "cluster"];
var packages=["pypi", "docker"];
var versions=["stable", "nightly"];
@ -14,6 +15,7 @@ var model="Deep_learning_models";
var ai="pytorch";
var os="linux";
var automl="automlno";
var inference="inferenceno";
var hardware="singlenode";
var package="pypi";
var version="nightly";
@ -25,6 +27,7 @@ function refresh_cmd(){
reset_color(ais);
reset_color(oss);
reset_color(automls);
reset_color(inferences);
reset_color(hardwares);
reset_color(packages);
reset_color(versions);
@ -33,6 +36,7 @@ function refresh_cmd(){
set_color(ai);
set_color(os);
set_color(automl);
set_color(inference);
set_color(hardware);
set_color(package);
set_color(version);
@ -67,6 +71,14 @@ function refresh_cmd(){
enable(ais);
}
if(version!="nightly"){
disable(inferences);
}
else{
enable(inferences);
}
//disable other buttons in cases
if(package=="docker"){
disable(functionalities);
@ -74,6 +86,7 @@ function refresh_cmd(){
disable(ais);
disable(versions);
disable(oss);
disable(inferences);
disable(hardwares);
disable(automls);
cmd="Please refer to <a href=' https://github.com/intel-analytics/BigDL/tree/main/docker/chronos-nightly'>docker installation guide.</a>";
@ -82,6 +95,7 @@ function refresh_cmd(){
enable(models);
enable(versions);
enable(oss);
enable(inferences);
enable(packages);
enable(hardwares);
enable(automls);
@ -89,6 +103,7 @@ function refresh_cmd(){
//change cmd according to different choices
if(model=="Deep_learning_models"){
if(ai=="pytorch"){
if(inference=="inferenceno"){
if(automl=="automlno"){
if(hardware=="singlenode"){
if(version=="nightly"){
@ -138,7 +153,59 @@ function refresh_cmd(){
}
}
}
}else if(inference=="inferenceyes"){
if(automl=="automlno"){
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[pytorch,inference]";
}else if(version=="stable"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
cmd="pip install bigdl-chronos[pytorch]";
}
}
}else if(hardware=="cluster"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[pytorch,distributed,inference]";
}else if(version=="stable"){
cmd="pip install bigdl-chronos[pytorch,distributed]";
}
}
}
}else if(automl=="automlyes"){
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[pytorch,automl,inference]";
}else if(version=="stable"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
cmd="pip install bigdl-chronos[pytorch,automl]";
}
}
}else if(hardware=="cluster"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[pytorch,distributed,automl,inference]";
}else if(version=="stable"){
cmd="pip install bigdl-chronos[pytorch,distributed,automl,inference]";
}
}
}
}
}
}else if(ai=="tensorflow"){
if(inference=="inferenceno"){
if(automl=="automlno"){
if(hardware=="singlenode"){
if(version=="nightly"){
@ -188,8 +255,60 @@ function refresh_cmd(){
}
}
}
}else if(inference=="inferenceyes"){
if(automl=="automlno"){
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[tensorflow,inference]";
}else if(version=="stable"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
cmd="Please refer to <a href=' https://bigdl.readthedocs.io/en/v2.1.0/doc/Chronos/Overview/chronos.html#tensorflow-backend'>tensorflow installation guide.</a>";
}
}
}else if(hardware=="cluster"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[tensorflow,distributed,inference]";
}else if(version=="stable"){
cmd="Please refer to <a href=' https://bigdl.readthedocs.io/en/v2.1.0/doc/Chronos/Overview/chronos.html#tensorflow-backend'>tensorflow installation guide.</a>";
}
}
}
}else if(automl=="automlyes"){
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[tensorflow,automl,inference]";
}else if(version=="stable"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
cmd="Please refer to <a href=' https://bigdl.readthedocs.io/en/v2.1.0/doc/Chronos/Overview/chronos.html#tensorflow-backend'>tensorflow installation guide.</a>";
}
}
}else if(hardware=="cluster"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[tensorflow,distributed,automl,inference]";
}else if(version=="stable"){
cmd="Please refer to <a href=' https://bigdl.readthedocs.io/en/v2.1.0/doc/Chronos/Overview/chronos.html#tensorflow-backend'>tensorflow installation guide.</a>";
}
}
}
}
}
}
}else if(model=="Prophet"){
if(inference=="inferenceno"){
if(automl=="automlno"){
if(os=="win"){
if(hardware=="singlenode"){
@ -242,7 +361,62 @@ function refresh_cmd(){
}
}
}
}else if(inference=="inferenceyes"){
if(automl=="automlno"){
if(os=="win"){
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos; pip install prophet==1.1.0";
}else if(version=="stable"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
}else if(hardware=="cluster"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
}
else{
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos; pip install prophet==1.1.0";
}else if(version=="stable"){
cmd="pip install bigdl-chronos; pip install prophet==1.1.0";
}
}else if(hardware=="cluster"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install prophet==1.1.0";
}else if(version=="stable"){
cmd="pip install bigdl-chronos[distributed]; pip install prophet==1.1.0";
}
}
}
}else if(automl=="automlyes"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install prophet==1.1.0";
}else if(version=="stable"){
cmd="pip install bigdl-chronos[distributed]; pip install prophet==1.1.0";
}
}else if(hardware=="cluster"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install prophet==1.1.0";
}else if(version=="stable"){
cmd="pip install bigdl-chronos[distributed]; pip install prophet==1.1.0";
}
}
}
}
}
}
}else if(model=="ARIMA"){
if(inference=="inferenceno"){
if(automl=="automlno"){
if(hardware=="singlenode"){
if(version=="nightly"){
@ -287,6 +461,52 @@ function refresh_cmd(){
}
}
}
}else if(inference=="inferenceyes"){
if(automl=="automlno"){
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos; pip install pmdarima==1.8.5";
}else if(version=="stable"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
cmd="pip install bigdl-chronos; pip install pmdarima==1.8.5";
}
}
}else if(hardware=="cluster"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install pmdarima==1.8.5";
}else if(version=="stable"){
cmd="pip install bigdl-chronos[distributed]; pip install pmdarima==1.8.5";
}
}
}
}else if(automl=="automlyes"){
if(os=="win"){
cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
}
else{
if(hardware=="singlenode"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install pmdarima==1.8.5";
}else if(version=="stable"){
cmd="pip install bigdl-chronos[distributed]; pip install pmdarima==1.8.5";
}
}else if(hardware=="cluster"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install pmdarima==1.8.5";
}else if(version=="stable"){
cmd="pip install bigdl-chronos[distributed]; pip install pmdarima==1.8.5";
}
}
}
}
}
}else if(model=="Machine_learning_models"){
if(version=="nightly"){
cmd="pip install --pre --upgrade bigdl-chronos";
@ -354,6 +574,9 @@ $(document).on('click',"button",function(){
else if (ais.indexOf(id)>=0){
ai=id;
}
else if (inferences.indexOf(id)>=0){
inference=id;
}
else if (oss.indexOf(id)>=0){
os=id;
}

View file

@ -73,6 +73,11 @@ Select your preferences in the panel below to find the proper install command. T
id="automlyes">Yes</button></td>
</tr>
<tr>
<td colspan="1">Inference Optimization</td>
<td colspan="2" title="No need for low-latency inference models"><button id="inferenceno">No</button></td>
<td colspan="2" title="Get low-latency inference models with onnx\openvino\inc"><button id="inferenceyes">Yes</button></td>
</tr>
<tr>
<td colspan="1">Hardware</td>