diff --git a/docs/readthedocs/source/_static/css/chronos_installation_guide.css b/docs/readthedocs/source/_static/css/chronos_installation_guide.css index d34dd6157de..8bfc241270a 100644 --- a/docs/readthedocs/source/_static/css/chronos_installation_guide.css +++ b/docs/readthedocs/source/_static/css/chronos_installation_guide.css @@ -1,51 +1,49 @@ -/* Border styles */ -#table-1 tr, #table-1 td, #table-1 th { +.displayed { + display: block; + text-align: center; + margin-left: auto; + margin-right: auto; +} + +#table-1 { + border-bottom-width: 0px; + margin:auto; +} + +#table-1 tr, td{ + background-color: rgb(240, 241, 245); + height: 30px; border-width: 2px; border-style: solid; border-color: white ; padding: 5px; - } +} - #table-1 { - border-bottom-width: 0px; - } - - /* Padding and font style */ - #table-1 td, #table-1 th { +#table-1 tr td:first-child{ + font-weight: 600; +} + +#table-1 td{ font-size: 16px; font-family: Verdana; color: rgb(15, 24, 33); - } - - /* Alternating background colors */ - #table-1 tr, td{ - background-color: rgb(240, 241, 245); - height: 30px; - } - - .displayed { - display: block; - text-align: center; - margin-left: auto; - margin-right: auto } - - /* setting div id=cmd width */ - #cmd { - width: 450px; - height: 35px; - overflow:unset; - } + text-align: center; + /* height: 56px; + line-height: 56px; */ + width: 160px; +} - td, th { - text-align: center; - } - - #table-1 button { - border-color: transparent; - width: 100%; - height: 100%; - background-color: transparent; - cursor: pointer; - font-size: 16px; - } +#table-1 button { + font-size: 16px; + border-color: transparent; + width: 100%; + height: 100%; + background-color: transparent; + cursor: pointer; +} +#cmd { + width: auto; + height: 35px; + overflow:unset; +} \ No newline at end of file diff --git a/docs/readthedocs/source/_static/js/chronos_installation_guide.js b/docs/readthedocs/source/_static/js/chronos_installation_guide.js index f1e7d94e8b6..a3b9694902d 100644 --- a/docs/readthedocs/source/_static/js/chronos_installation_guide.js +++ b/docs/readthedocs/source/_static/js/chronos_installation_guide.js @@ -1,256 +1,292 @@ -var ais = ["pytorch", "tensorflow", "prophet", "pmdarima"]; -var releases=["stable", "nightly"] +//initialize all needed variables(id of buttons) +var functionalities = ["Forecasting","Anomaly","Simulation"]; +var models = ["Prophet", "ARIMA","Deep_learning_models","Machine_learning_models"]; +var ais = ["pytorch", "tensorflow"]; var oss=["linux", "win"]; -var ways=["pypi", "docker"]; +var automls=["automlyes", "automlno"]; var hardwares=["singlenode", "cluster"]; -var automls=["automlyes", "automlno"] +var packages=["pypi", "docker"]; +var versions=["stable", "nightly"]; + +//defalut selected burttons' ids +var functionality="Forecasting"; +var model="Deep_learning_models"; var ai="pytorch"; var os="linux"; -var release="nightly"; -var way="pypi"; +var automl="automlno"; var hardware="singlenode"; -var automl="automlno" - - - -function set_color(id){ - $("#"+id).parent().css("background-color","rgb(74, 106, 237)"); - $("#"+id).css("color","white"); - $("#"+id).addClass("isset"); -} - -function reset_color(list){ - for (btn in list){ - $("#"+list[btn]).parent().css("background-color","transparent"); - $("#"+list[btn]).css("color","black"); - $("#"+list[btn]).removeClass("isset"); - } -} - -function disable(list){ - for(btn in list){ - $("#"+list[btn]).css("text-decoration","line-through"); - $("#"+list[btn]).attr("disabled","true"); - } - reset_color(list); - for(btn in list){ - $("#"+list[btn]).parent().css("background-color","rgb(133, 133, 133)"); - } -} - -function enable(list){ - for(btn in list){ - $("#"+list[btn]).css("text-decoration","none"); - $("#"+list[btn]).attr("disabled",false); - } -} +var package="pypi"; +var version="nightly"; +//main func, to decide what is showed in cmd function refresh_cmd(){ + //refresh all the buttons + reset_color(functionalities); reset_color(ais); reset_color(oss); - reset_color(releases); - reset_color(ways); - reset_color(hardwares); reset_color(automls); + reset_color(hardwares); + reset_color(packages); + reset_color(versions); + + set_color(functionality); set_color(ai); set_color(os); - set_color(release); - set_color(way); - set_color(hardware); set_color(automl); - + set_color(hardware); + set_color(package); + set_color(version); + var cmd = "NA"; - if(way=="docker"){ + //dynamically set 'model' line + $("#model").empty(); + if(functionality=="Forecasting"){ + $("#model").append("Model\ + \ + \ + "); + } + else if(functionality=="Anomaly"){ + $("#model").append("Model\ + \ + "); + } + else if(functionality=="Simulation"){ + $("#model").append("Model\ + "); + } + reset_color(models); + set_color(model); + + //enable 'Deep learning framework' when Deep learning models is selected + if(model!="Deep_learning_models"){ disable(ais); - disable(releases); + } + else{ + enable(ais); + } + + //disable other buttons in cases + if(package=="docker"){ + disable(functionalities); + disable(models); + disable(ais); + disable(versions); disable(oss); disable(hardwares); disable(automls); cmd="Please refer to docker installation guide."; }else if(os=="win"){ + disable(functionalities); + disable(models); disable(ais); - disable(releases); - disable(ways); + disable(versions); + disable(packages); disable(hardwares); disable(automls); cmd="Please refer to windows_guide."; }else{ - enable(ais); - enable(releases); + enable(functionalities); + enable(models); + enable(versions); enable(oss); - enable(ways); + enable(packages); enable(hardwares); enable(automls); - } - - - if(ai=="pytorch"){ - if(way=="pypi"&&os=="linux"){ - if(hardware=="singlenode"){ + + //change cmd according to different choices + if(model=="Deep_learning_models"){ + if(ai=="pytorch"){ if(automl=="automlno"){ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[pytorch]" - if(release=="stable") - cmd="pip install bigdl-chronos" - }else{ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[pytorch,automl]" - if(release=="stable") - cmd="pip install bigdl-chronos[all]" + if(hardware=="singlenode"){ + if(version=="nightly"){ + cmd="pip install --pre --upgrade bigdl-chronos[pytorch]"; + }else if(version=="stable"){ + cmd="pip install bigdl-chronos"; + } + }else if(hardware=="cluster"){ + if(version=="nightly"){ + cmd="pip install --pre --upgrade bigdl-chronos[pytorch,distributed]"; + }else if(version=="stable"){ + cmd="pip install bigdl-chronos[all]"; + } + } + }else if(automl=="automlyes"){ + if(hardware=="singlenode"){ + if(version=="nightly"){ + cmd="pip install --pre --upgrade bigdl-chronos[pytorch,automl]"; + }else if(version=="stable"){ + cmd="pip install bigdl-chronos[all]"; + } + }else if(hardware=="cluster"){ + if(version=="nightly"){ + cmd="pip install --pre --upgrade bigdl-chronos[pytorch,distributed,automl]"; + }else if(version=="stable"){ + cmd="pip install bigdl-chronos[all]"; + } + } } - } - if(hardware=="cluster"){ - if(automl=="automlno"){ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[pytorch,distributed]" - if(release=="stable") - cmd="pip install bigdl-chronos[all]" - }else{ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[pytorch,distributed,automl]" - if(release=="stable") - cmd="pip install bigdl-chronos[all]" + }else if(ai=="tensorflow"){ + if(package=="pypi"&&os=="linux"){ + cmd="Please refer to tensorflow installation guide." } } - } - } - - if(ai=="tensorflow"){ - if(way=="pypi"&&os=="linux"){ - cmd="Please refer to tensorflow installation guide." - } - } - - if(ai=="prophet"){ - if(way=="pypi"&&os=="linux"){ - if(hardware=="singlenode"){ - if(automl=="automlno"){ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos; pip install prophet==1.1.0" - if(release=="stable") - cmd="pip install bigdl-chronos; pip install prophet==1.1.0" - }else{ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install prophet==1.1.0" - if(release=="stable") - cmd="pip install bigdl-chronos[all]; pip install prophet==1.1.0" + }else if(model=="Prophet"){ + if(automl=="automlno"){ + 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[all]; pip install prophet==1.1.0"; + } } - } - if(hardware=="cluster"){ - if(automl=="automlno"){ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install prophet==1.1.0" - if(release=="stable") - cmd="pip install bigdl-chronos[all]; pip install prophet==1.1.0" - }else{ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install prophet==1.1.0" - if(release=="stable") - cmd="pip install bigdl-chronos[all]; pip install prophet==1.1.0" + }else if(automl=="automlyes"){ + 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[all]; 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[all]; pip install prophet==1.1.0"; + } } } - } - } - - if(ai=="pmdarima"){ - if(way=="pypi"&&os=="linux"){ - if(hardware=="singlenode"){ - if(automl=="automlno"){ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos; pip install pmdarima==1.8.5" - if(release=="stable") - cmd="pip install bigdl-chronos; pip install pmdarima==1.8.5" - }else{ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install pmdarima==1.8.5" - if(release=="stable") - cmd="pip install bigdl-chronos[all]; pip install pmdarima==1.8.5" + }else if(model=="ARIMA"){ + 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"){ + cmd="pip install bigdl-chronos; 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[all]; pip install pmdarima==1.8.5"; + } } - } - if(hardware=="cluster"){ - if(automl=="automlno"){ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install pmdarima==1.8.5" - if(release=="stable") - cmd="pip install bigdl-chronos[all]; pip install pmdarima==1.8.5" - }else{ - if(release=="nightly") - cmd="pip install --pre --upgrade bigdl-chronos[distributed]; pip install pmdarima==1.8.5" - if(release=="stable") - cmd="pip install bigdl-chronos[all]; pip install pmdarima==1.8.5" + }else if(automl=="automlyes"){ + 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[all]; 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[all]; pip install pmdarima==1.8.5"; + } } } + }else if(model=="Machine_learning_models"){ + if(version=="nightly"){ + cmd="pip install --pre --upgrade bigdl-chronos"; + }else if(version=="stable"){ + cmd="pip install bigdl-chronos"; + } } } - $("#cmd").html(cmd); -} - -function set_ai(id){ - ai=id; - refresh_cmd(); -} -function set_os(id){ - os=id; - refresh_cmd(); + $("#cmd").html(cmd); } -function set_rel(id){ - release=id; - refresh_cmd(); +//set the color of selected buttons +function set_color(id){ + $("#"+id).parent().css("background-color","rgb(74, 106, 237)"); + $("#"+id).css("color","white"); + $("#"+id).addClass("isset"); } -function set_way(id){ - way=id; - refresh_cmd(); +//reset the color of unselected buttons +function reset_color(list){ + for (btn in list){ + $("#"+list[btn]).parent().css("background-color","transparent"); + $("#"+list[btn]).css("color","black"); + $("#"+list[btn]).removeClass("isset"); + } } -function set_hardware(id){ - hardware=id; - refresh_cmd(); +//disable buttons +function disable(list){ + for(btn in list){ + $("#"+list[btn]).css("text-decoration","line-through"); + $("#"+list[btn]).attr("disabled","true"); + } + reset_color(list); + for(btn in list){ + $("#"+list[btn]).parent().css("background-color","rgb(133, 133, 133)"); + } } -function set_automl(id){ - automl=id; - refresh_cmd(); +//enable buttons +function enable(list){ + for(btn in list){ + $("#"+list[btn]).css("text-decoration","none"); + $("#"+list[btn]).attr("disabled",false); + } } -$("button").click(function(){ - //alert($(this).attr("id")); +//when clicked a button, update variables +$(document).on('click',"button",function(){ var id = $(this).attr("id"); - if (ais.indexOf(id)>=0){ - set_ai(id); - } - if (oss.indexOf(id)>=0){ - set_os(id); + if (functionalities.indexOf(id)>=0){ + functionality=id; + model="Deep_learning_models"; } - if (releases.indexOf(id)>=0){ - set_rel(id); + else if (models.indexOf(id)>=0){ + model=id; } - - if (ways.indexOf(id)>=0){ - set_way(id); + else if (ais.indexOf(id)>=0){ + ai=id; } - - if (hardwares.indexOf(id)>=0){ - set_hardware(id); + else if (oss.indexOf(id)>=0){ + os=id; } - - if (automls.indexOf(id)>=0){ - set_automl(id); + else if (automls.indexOf(id)>=0){ + automl=id; } -}); - -$("button").hover(function(){ - $(this).parent().css("background-color","rgb(74, 106, 237)"); - $(this).css("color","white"); -},function(){ - if(!$(this).hasClass("isset")){ - $(this).parent().css("background-color","transparent"); - $(this).css("color","black"); + else if (hardwares.indexOf(id)>=0){ + hardware=id; + } + else if (packages.indexOf(id)>=0){ + package=id; } + else if (versions.indexOf(id)>=0){ + version=id; + } + + refresh_cmd(); }) -refresh_cmd(); +//func to add button hover effect +$(document).on({ + mouseenter: function () { + if($(this).prop("disabled")!=true){ + $(this).parent().css("background-color","rgb(74, 106, 237)"); + $(this).css("color","white"); + } + }, + mouseleave: function () { + if(!$(this).hasClass("isset") && $(this).prop("disabled")!=true){ + $(this).parent().css("background-color","transparent"); + $(this).css("color","black"); + } + } +}, "button"); + +refresh_cmd(); \ No newline at end of file diff --git a/docs/readthedocs/source/doc/Chronos/Overview/chronos.md b/docs/readthedocs/source/doc/Chronos/Overview/chronos.md index 355f1bcb241..6bb10724868 100644 --- a/docs/readthedocs/source/doc/Chronos/Overview/chronos.md +++ b/docs/readthedocs/source/doc/Chronos/Overview/chronos.md @@ -20,58 +20,68 @@ You can use _Chronos_ to do:
- - - - - - - - + +
AI Framework -
- - + + + + + + + + + + + + + + + + + + - + + id="automlno">No + id="automlyes">Yes - + - + - - + + title="For users would like to try chronos's latest feature">Nightly (2.1.0b) + + - +
OSFunctionality
Model
DL
framework
+
OS
Auto TuningAuto Tuning
HardwareHardware
ReleasePackage
Build - Version
Install CMDInstall CMD
NA