Continuous Deep Learning for Smarter Energy Igor Gotlibovych - - PowerPoint PPT Presentation
Continuous Deep Learning for Smarter Energy Igor Gotlibovych - - PowerPoint PPT Presentation
Continuous Deep Learning for Smarter Energy Igor Gotlibovych Javier Asensio-Cubero Jaye Cribb Constantin Octopus The Energy is Getting Smarter Traditional grid: Smart grid: - predictable generation - distributed renewable generation -
The Energy is Getting Smarter
Traditional grid:
- predictable generation
- static consumption
- fixed tariffs
- timescale of years/months
Smart grid:
- distributed renewable generation
- dynamic consumption behaviour
- smart meters
- agile tariffs
- API integration
- timescale of hours/minutes
2
A Brief History of Octopus Energy & AI
- founded in 2015
- Apr 2017: 100% renewable sources
- Feb 2018: UK’s first Agile tariff
- Jul 2018: +100k IRESA customers
- Nov 2018: acquired ML team from Usio
- Jan 2019: 500k customers
- ~600k customers; ~50k smart meters
- 20+ developers
- 6+ Data Scientists/ML Engineers
Machine Learning at Octopus:
- Time Series Analysis & Forecasting:
○ household consumption ○ response to agile tariffs ○ commercial sites ○ PV generation ○ Customer communications: calls/emails
- NLP
- Control theory/RL
○ Optimizing PV/battery/EV utilization
- Growing ETL/Deep Learning infrastructure
3
Smart tariffs and Behavioural Response
Agile tariff response: early trial Agile tariff response analysis: regression + SHAP
4
Time Series Forecasting with Deep Learning
“What will the half-hourly consumption be for customer #500001 at 2019-02-29 12:00?” features X prediction y 500001 2019 2 29 12 2.3
- Why not iterative auto-regressive model?
○ Deep learning is powerful enough to turn this: f(f(f(f(...f(X)...)))) [n times] into this: g(X, n)
5
6
- Keep continous features continuous
- Better still, use periodic encoding
Feature Engineering - Datetime
Jan-31 12:00 0.084 0.5
7
Feature Engineering - IDs
- You have a categorical feature
- You decide to use one-hot encoding
- Now you have 500k+ features!
500001 ... 1
8
What we really want to know
#500001 What time do they come home? Do they have electric heating? Do they work weekends? ... m features
9
Embeddings: the MovieLens Rating Example
10
Putting it Together
11
What do Embeddings Learn?
Some things we can’t predict: CTO decides to eat out Portfolio Individual
12
Model Life-cycle & Continuous Training
time
13
Continuous deployment, training, and usage.
- Like cron on steroids: Flexible way to schedule tasks, rerun them, adds
visibility…
○ Written in python. ○ Rather a monolithic approach: code base sharing for the tasks.
Heterogeneous architecture
Final approach
- Dockerized workers
○ Decoupling airflow of dependencies and scheduling. ○ Decoupling airflow from credentials management.
- AWS autoscaling
○ Turning on and off GPUs on demand.
- More maintainable codebase.
○ Based on command line scripts. ○ Highly testable and easy to isolate. ○ Airflow dags relegated to a glorified configuration file.
Lessons Learned
- Avoid iterative forecasting - use features instead
- Two ways to learn latent features
○ Embeddings: learn features during backprop ○ Encoders: trained to extract features in forward pass (not covered)
- Encapsulate feature generation inside your model
○ simpler versioning and deployment ○ simplifies replacing hand-engineered features with end-to-end ML models
- Build reusable ML code
○ Grow your toolkit ○ Listen to ML Engineers when they tell you to write tests
- Automate every part of the model lifecycle (Airflow, Kubernetes, ASGs, …)
17
Thanks!
igor [at] octopus.energy https://ig248.gitlab.io/ @igorgotlibovych javier.asensio [at] octopus.energy Should Data Scientists write Unit Tests? Switch to Octopus Energy here: https://share.octopus.energy/mist-rain-538 Switch to Octopus Energy here: https://share.octopus.energy/sand-fawn-149 always! maybe?
18