deep_autoviml is a powerful new deep learning library with a very simple design goal: Make it as easy as possible for novices and experts alike to experiment with and build tensorflow.keras preprocessing pipelines and models in as few lines of code as possible.
deep_autoviml will enable data scientists, ML engineers and data engineers to fast prototype tensorflow models and data pipelines for MLOps workflows using the latest TF 2.4+ and keras preprocessing layers. You can now upload your saved model to any Cloud provider and make predictions out of the box since all the data preprocessing layers are attached to the model itself!
In this webinar, we will discuss the problems that deep_AutoViML can solve, its architecture design and demo how to build powerful TF.Keras models on structured data, NLP and Image data domains.
https://www.aicamp.ai/event/eventdetails/W2021080918
4. 4
Transfer Learning More powerful pre-trained ML modules and models
for language, speech, vision, etc.
AutoML More sophisticated algorithms and systems for
automating ML model and pipeline development
Reinforcement Learning Algorithms and systems that learn to adaptively act in
their environments to optimize an objective
New Applications New uses of AI that we haven’t imagined yet...
Current Trends in AI Today
5. 5
Current State of AI Today (Transfer Learning)
Source: https://towardsdatascience.com/gpt-3-the-new-mighty-language-model-from-openai-a74ff35346fc
Turing Natural
Language Generation
(T-NLG) is a 17 billion
parameter language
model by Microsoft that
outperforms the state
of the art on many
downstream NLP tasks.
Source: Link
OpenAI recently released a
new language model GPT-3
with close to 175B trainable
parameters,
Source:
https://www.theverge.com/2021/6/
29/22555777/github-openai-ai-tool-
autocomplete-code
6. 6
Current State of AI Today (AutoML)
Source:
https://medium.com/ai%C2%B3-theory-practice-business/end-to-end-a
utoml-for-tabular-data-at-kaggle-days-c2e4b714dcac
Source:
https://www.wired.com/story/googles-ai-experts-t
ry-automate-themselves/
7. 7
Current State of AI Today (Reinforcement Learning)
Source: https://discovery.ucl.ac.uk/id/eprint/10045895/1/agz_unformatted_nature.pdf
AlphaGo is the first computer program
to defeat a world champion at the
ancient Chinese game of Go. Zero is
even more powerful and is arguably the
strongest Go player in history.
Previous versions of AlphaGo initially
trained on thousands of human amateur
and professional games to learn how to
play Go. AlphaGo Zero skips this step
and learns to play simply by playing
games against itself, starting from
completely random play. In doing so, it
quickly surpassed human level of play
and defeated the Lee Sudo
champion-defeating version of AlphaGo
by 100 games to 0.
AlphaGo Zero
8. Build tf.keras
models and
pipelines in a
single line of
code!
https://github.com/AutoViML/deep_autoviml
8
Other AutoViML libraries
Main Page: https://github.com/AutoViML
Auto_ViML: https://github.com/AutoViML/Auto_ViML
AutoViz: https://github.com/AutoViML/AutoViz
Auto-TS: https://github.com/AutoViML/Auto_TS
Featurewiz: https://github.com/AutoViML/featurewiz
9. how deep_autoviml works
Build data pipeline
Train and Tune your
model
Preprocess features
Single Line of
Code
BYOM
Two options to
choose from: A fast and easy model
Bring your custom model
9
Find best model
architecture
Provide your
file(s)
Host your model*
* anywhere
10. why use deep_autoviml?
10
The main design goal of deep_autoviml:
Reduce time to production from experimentation!
Source: https://www.ericsson.com/en/blog/2020/10/democratizing-ai
11. how deep_autoviml can help you
1. Experiment with multiple deep learning architectures
2. Build models using a single syntax:
a. Structured Data,
b. Image
c. NLP
3. Handle very large data sets (removes pandas limitations)
4. Provide performant models while taking far less time to train
11
12. 12
how deep_autoviml builds models
TF 1.x feature_columns
TF 2.4.x keras preprocessing layers
Model
Hidden
Layers
Dense, Activation, Dropout,
Flatten, Conv1D, Conv2D,
Reshape, etc.
Model
layers
Both hidden layers and
preprocessing layers are
within the model itself
Preprocessing
layers
CategoryEncoding,
Hashing, Discretization,
StringLookup, Integer, etc.
Feature Columns
layers
Input
layers
tf.data.Dataset,
keras.layers.Input, etc.
Input
layers
The model is separate from feature engineering and
feature transformations
These are input
layers to feed data
at rest from CSV
or other files
How deep_autoviml builds models
Previous way to build models
Since the model encapsulates preprocessing layers, you don’t to apply feature
engineering and feature transformations before predictions. The model will do it
automatically.
14. Deep_AutoViML can handle multiple models
14
Slide 14
Tabular Data: use “fast”
for a fast model
Tabular Data: use “fast1”
for deep and wide model
Tabular Data: use “fast2”
for deep and cross model
NLP: use “nlp” for simple
model
NLP: use “text” for more
advanced model
Image: use “image” for
image classifiers
keras_model_type is the main way to control the type of model
15. A Typical Keras example uses Numpy arrays
15
Here is a code snippet with model building steps put together: model definition, compilation, fitting and evaluation.
But it has the same problems that numpy and pandas have: memory limitations and no distributed strategy
17. Once trained, the model can be used directly
for predictions on raw data...
17
MODEL_NAME=propertyprice
VERSION_NAME=dnn
if [[ $(gcloud ai-platform models list --format='value(name)' |
grep $MODEL_NAME) ]]; then
echo "$MODEL_NAME already exists"
else
echo "Creating $MODEL_NAME"
gcloud ai-platform models create --regions=$REGION
$MODEL_NAME
fi
... create the model in Vertex AI Platform
Create a model object in Cloud AI Platform
18. Deploy the saved model in Cloud platforms
18
gcloud ai-platform versions create
--model=$MODEL_NAME $VERSION_NAME
--framework=tensorflow
--python-version=3.5
--runtime-version=2.1
--origin=$EXPORT_PATH
--staging-bucket=gs://$BUCKET
specify the model
name and version
EXPORT_PATH denotes
location of
SavedModel directory
Deploy SavedModel using gcloud ai-platform
19. Make predictions using Cloud provider
19
input.json = {"sq_footage": 3140,
"type": 'house'}
gcloud ai-platform predict
--model propertyprice
--version dnn
--json-instances input.json
specify the name
and version of the
deployed model
json file for
prediction
Make predictions using gcloud ai-platform
20. Automation to help speed up ML processes
Build Classification / Regression models
on Tabular, Image and NLP data
Automated Data Type Inference
Automated missing value handling (as
well as np.inf handling)
Limited feature engineering (categorical
crosses)
Automated feature preprocessing layers
for every kind of data type(Continuous,
Categorical, Free Text, Lat/Lon, Images)
Automated model architecture selection
and hyper parameter tuning
Granular control over timing and
complexity of model training
Can handle dataset of any size - including
multiple CSV files
Automated CPU/GPU/TPU selection
(where available)
Automated train/validation/heldout sets
and model evaluation on heldout
20
21. More coming...
Features under development:
Automated GPU Distributed training
One-step model hosting on various cloud platforms
Various types of models: Seq2Seq, Time Series,
CSV file of Cloud Hosted Image / Text Files
What-If Tool Analysis
21
22. Tabular Data
22
Titanic on Kaggle: https://www.kaggle.com/rsesha/titanic-keras-0-7926-score-81roc
“auto” model
“auto” model
Uses NLP on string text: https://tfhub.dev/google/tf2-preview/gnews-swivel-20dim/1
No NLP on string text
Auto Model looks for best parameters for the architecture.
Just set the 'nlp_char_limit' to 10 which means “name” will be NLP
23. NLP Classifier
23
Tutorial on Kaggle: https://www.kaggle.com/rsesha/nlp-starter-deep-autoviml-demo
“auto” model
“nlp” model
Uses Swivel model from TFHub: https://tfhub.dev/google/tf2-preview/gnews-swivel-20dim/1
Uses NNLM model from TFHub: https://tfhub.dev/google/nnlm-en-dim50/2
Auto Model looks for best parameters for the architecture.
NLP Model merely runs the Encoder and builds a model.
24. Image Classifier
24
Tutorial on Kaggle: https://www.kaggle.com/rsesha/covid-19-image-classification-deep-autoviml
“image” model Uses EfficientNet model from TFHub: https://tfhub.dev/tensorflow/efficientnet/lite0/classification/2
25. 25
Finally, a plug: If you are interested in learning more...
https://www.coursera.org/specializations/machine-learning-trading
Co-author Ram Seshadri