An open API service indexing awesome lists of open source software.

https://github.com/business-science/gpu_accelerated_forecasting_modeltime_gluonts

GPU-Accelerated Deep Learning for Time Series using Modeltime GluonTS (Learning Lab 53). Event sponsors: Saturn Cloud, NVIDIA, & Business Science.
https://github.com/business-science/gpu_accelerated_forecasting_modeltime_gluonts

business-science deep-learning forecast forecasting gluon gluonts machine-learning modeltime modeltime-gluonts mxnet time-series

Last synced: 3 months ago
JSON representation

GPU-Accelerated Deep Learning for Time Series using Modeltime GluonTS (Learning Lab 53). Event sponsors: Saturn Cloud, NVIDIA, & Business Science.

Awesome Lists containing this project

README

        

README.utf8

h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }

code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}

code{white-space: pre;}

if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}

.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
pre code {
padding: 0;
}

.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs > li.active {
display: block;
}

.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}

.tabset-dropdown > .nav-tabs > li {
display: none;
}


GPU-Accelerated Deep Learning for Time Series | Learning Lab 53




Saturn Cloud GPU Multi-Forecast





Event Sponsors



This is a short demonstration of GPU-Accelerated Deep Learning for Time Series that was part of the presentation, “The Future of Time Series | Rise of the High-Performance Forecasting System”. Video and all supporting contents are provided as part of Learning Labs PRO, Lab 53.



  • 7 forecasts (Multi-Forecast) were created using a single GluonTS Model

  • This is a demonstration of the scalability that can be accomplished as we could implement the same process to forecast 1000’s of time series.



Code


The code is provided in the /code directory:





Modeltime GluonTS


This presentation showcases modeltime.gluonts (an R package used for deep learning forecasting with GluonTS as a forecasting backend).





Modeltime Ecosystem





GPU Workspace Setup: Saturn Cloud | NVIDIA GPU


Saturn Cloud enables us to run data science code across multiple machines or with GPUs, then deploy to dashboards, APIs, and scheduled jobs. We used the GPU capability in this lab.




GPU Workspace




Instructions:



  • Go to the SaturnCloud Platform to create a GPU Workspace and Modeltime GluonTS Environment

  • Click “Create Custom Project”

  • Select the “T4 GPU” type from the Hardware

  • Select the Saturn-R-Modeltime-GPU Image (514354729342.dkr.ecr.us-east-2.amazonaws.com/saturn-r-modeltime-gpu:2021.03.16.19.36)

    • Pre-built with Modeltime, R Kernel, and supporting R and Python packages

    • The environment uses MXNET CUDA Backend enabling GluonTS to leverage GPUs and greatly speed-up training

    • The result is training times 2X to 5X faster than on a 12-Core Laptop



  • Open the “Advanced Settings” and make the following changes:

    • Copy and paste this command into the “Startup Script” area. These lines let Jupyter Know to use R (and include a fix to a minor package issue)




Rscript -e "IRkernel::installspec(user = TRUE)"

sudo Rscript -e "remove.packages('farver')"
sudo Rscript -e "install.packages('farver', repos = 'https://cran.r-project.org')"


  • Change the “Working Directory” to: /home/jovyan/

  • Click “Create” - This creates a project. Start the Jupyter Server with the green triangle button (the first time you do this it’ll take a few minutes).

  • Once the Jupyter Server is online and the Jupyter Lab button is active, click it to open Jupyter Lab.

  • Upload the modeltime_test.ipynb Jupyter Notebook and run the code.





Thanks to our Event Sponsors


This event was sponsored by Saturn Cloud, NVIDIA, and Business Science.




Event Sponsors




// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});

$(document).ready(function () {
window.buildTabsets("TOC");
});

$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open');
});
});

(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();