Why build Red10?

I wanted to use machine learning to accurately predict buy and sell opportunities for stocks.

While building the original version, I realized how important having a machine learning data store is to this type of intelligent application stack. Today's talk is about using Redis as a database for 1000s of machine learning models. By using Redis as the data store, it allows my team to focus on making better predictions through iterative improvements in an ever-changing market.

Once the API was defined, I realized this approach would work for any dataset...not just playing stocks. (Please see Appendix D for how Red10 works with the IRIS dataset)

Objectives

  1. Enable dataset evolution and feature engineering - create 1000s of machine learning models and find the best performing ones as you refine your data
  2. Manage unique machine learning models - how can I find accurate models and benchmark them?
  3. Apply DevOps for machine learning - treat models like build artifacts
  4. Simple iterative workflow: upload dataset, run job, evaluate
  5. Automatic analysis, model training, prediction and forecasting supported out of the box
  6. Export/Import models across environments
  7. Running pre-trained machine learning models on IoT, healthcare, drones, other resource constrained environments wanting predictive capabilities

What is a Machine Learning Model?

An algorithm is the general approach you will take. The model is what you get when you run the algorithm over your training data and what you use to make predictions on new data. You can generate a new model with the same algorithm with different data, or a different model from the same data with a different algorithm.

Source: https://www.quora.com/What-is-the-difference-between-machine-learning-model-and-ML-algorithm

Please refer to Appendix G for more defintions.

Machine Learning Example

Iterative approach for navigating data to find the best predictions

Redis as a Machine Learning Data Store

Redis is a great scalable, in-memory storage solution for handling CRUD machine learning use cases.

Origin

After using Redis for years to handle: caching, pub/sub and auto-reloading capabilities on restart, it was an obvious first choice as a scalable storage solution for many pre-trained machine learning models. In my humble opinion, pulling gigabytes of pickled objects from a database would take too long and is not an ideal use case for a relational or nosql database (mysql/postgres/oracle/mongo).

Redis Machine Learning Data Store Responsibilities

  1. Store pre-trained models (it takes time and compute power to build them)
  2. Store model accuracies and predictions (this may be broken out into a separate instance in the future)
  3. Provide an API for making new predictions from stored models
  4. Provide a naming system for tracking deployed models across environments (focused on reducing model in-memory collisions)
  5. Provide a model deployment API (import/export) - DevOps for machine learning
  6. Implement automatic model reloading - using rdb snapshots
  7. Stability and scaling

Over 10,000 Machine Learning Models

Here's an analysis of the Redis machine learning data store after it broke through 10,000 pre-trained models in-memory.

Anyone that can use a REST API can use Red10 to do the same thing


In [1]:
from __future__ import print_function
import sys, os, requests, json, datetime

# Load the environment and login the user
from src.common.load_redten_ipython_env import user_token, user_login, csv_file, run_job, core, api_urls, ppj, rt_url, rt_user, rt_pass, rt_email, lg, good, boom, anmt, mark, ppj, uni_key, rest_login_as_user, rest_full_login, wait_for_job_to_finish, wait_on_job, get_job_analysis, get_job_results, get_analysis_manifest, get_job_cache_manifest, build_prediction_results, build_forecast_results, get_job_cache_manifest, search_ml_jobs, show_logs, show_errors, ipyImage, ipyHTML, ipyDisplay, pd, np

# header
lg("")
good("Starting Redis Key Analysis: " + str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")))
lg("")

# store the model mappings by dataset name
models_iris = {}
models_spy = {}
models_xle = {}
models_xlf = {}
models_xli = {}
models_xlu = {}
total_models_in_redis = 0

# walk the redis dbs
for db_idx in range(0, 16):
    
    db_file = "/tmp/db-" + str(db_idx) + "-keys"
    os.system("echo \"select " + str(db_idx) + " \n keys *\" | redis-cli -p 6100 > " + str(db_file))
    database_keys = {}
    if os.path.exists(db_file): # if the file exists
        with open(db_file) as f: # open it
            lines_to_parse = f.readlines() # read all the lines
            for org_line in lines_to_parse:
                cur_line = org_line.rstrip("\n").strip().lstrip() # remove the newline and any other whitespace
                if str(cur_line) != "OK" and str(cur_line) != "":
                    database_keys[cur_line] = True
                # if it's not the redis OK response or an empty string
            # for all lines
        # with the db file open
    else:
        boom("Failed parsing Redis db_file=" + str(db_file))
    # end of parsing db_file
    
    if len(database_keys) > 1:
        for idx,k in enumerate(database_keys):

            # ignore the predictions and accuracies
            if "_PredictionsDF" not in k and "_Accuracy" not in k:
                num_underscores = len(str(k).split("_"))

                # ignore the analysis/manifest keys
                if num_underscores > 2:
                    if "_IRIS" in k:
                        models_iris[k] = True
                        total_models_in_redis += 1
                    elif "_SPY" in k:
                        models_spy[k] = True
                        total_models_in_redis += 1
                    elif "_XLE" in k:
                        models_xle[k] = True
                        total_models_in_redis += 1
                    elif "_XLF" in k:
                        models_xlf[k] = True
                        total_models_in_redis += 1
                    elif "_XLI" in k:   
                        models_xli[k] = True 
                        total_models_in_redis += 1    
                    elif "_XLU" in k:   
                        models_xlu[k] = True 
                        total_models_in_redis += 1
                # end of checking it's not an analysis/manifest key
                
            # end of if it's not a prediction and not an accuarcy key
        # for the large db keyset

        lg("IRIS models=" + str(len(models_iris)), 5)
        lg("SPY models=" + str(len(models_spy)), 5)
        lg("XLE models=" + str(len(models_xle)), 5)
        lg("XLF models=" + str(len(models_xlf)), 5)
        lg("XLI models=" + str(len(models_xli)), 5)
        lg("XLU models=" + str(len(models_xlu)), 5)

        lg("")
        lg("---------------------------------------------")
        anmt("Total Pre-trained Machine Learning Models in Redis:")
        boom(str(total_models_in_redis))
        lg("---------------------------------------------")
        lg("")
        
    # end of if there's database keys in the redis instance
# end for all db files


Logged in: https://redten.io

Starting Redis Key Analysis: 2017-05-23 18:20:04

IRIS models=18
SPY models=2263
XLE models=2077
XLF models=2170
XLI models=2108
XLU models=2170

---------------------------------------------
Total Pre-trained Machine Learning Models in Redis:
10806
---------------------------------------------

Redis Machine Learning Data Store in Action

Here's the machine learning data store saving all +10,000 pre-trained machine learning models to an rdb file which can then be moved to other environments and entirely different systems to make predictions.

Generalized Data Science Workflow

  1. Understanding what is important to the product or business - What can we improve?
  2. Iterating on datasets (collect, build, define, implement, feature engineering, etc.)
  3. Teaching algorithms to make predictions - What algorithm(s) should we use?
  4. Evaluating predictive success - How can we benchmark success between models?
  5. Model tuning - Can we improve the success rate by changing how the model learns?
  6. Model deployment - How do we take this awesome model to production or deploy it to a mobile app/IoT/drone?
  7. Regression testing predictive success with new data points - How good is that model from last year (model deprecation)?

Additional reading

The Machine Learning Ecosystem

Great tools with a complex, ever-changing user manual

Perception

And the Reality

Sorry kerbals. We'll get to space next time I promise!

definitely a data problem...

The toolchains

Easy to use vs granular control

What data can we use?

  1. Pricing
  2. Sales
  3. User events
  4. Accounting
  5. Real Estate
  6. Fraud
  7. Risk
  8. Does it have numbers?

What algorithm should we use?

  1. Who wins the Kaggle competitions? eXtreme gradient boosting (XGB) won a bunch in 2016

  2. Many, many more choices (source: http://aiplaybook.a16z.com/docs/guides/dl)

  3. Start iterating in a notebook http://nbviewer.jupyter.org/github/jmsteinw/Notebooks/blob/master/XG_Boost_NB.ipynb

How does XGB work?

1. Time is a factor when training models

2. Highly parameterized

def __init__(self, max_depth=3, learning_rate=0.1, n_estimators=100,
                 silent=True, objective="reg:linear",
                 nthread=-1, gamma=0, min_child_weight=1, max_delta_step=0,
                 subsample=1, colsample_bytree=1, colsample_bylevel=1,
                 reg_alpha=0, reg_lambda=1, scale_pos_weight=1,
                 base_score=0.5, seed=0, missing=None):

https://github.com/dmlc/xgboost/blob/master/python-package/xgboost/sklearn.py

What's the support story?

1. Updates are a breeze

2. You're gonna need a bigger boat

3. What if we just add some new data for this conference?

SELL SELL SELL!

4. More data does not always lead to better predictions

How does Red10 work?

  1. Two modes: manual and cloud service
  2. Runs anywhere with docker (virtualbox, on-prem, AWS, OpenShift, Swarm, Kubernetes)

Please refer to Appendix A for more details on Red10's architecture.

1. Original, manual version using the GitHub Repo

The github repo: https://github.com/jay-johnson/sci-pype is built for using this workflow:

2. Red10 - multi-tenant, machine learning REST API built with Jupyter integration

Where can this be used?

Using Red10 for price forecasting:

What's next?

Pricing Multi-Model Forecast

Please refer to the appendices for architecture slides and developer-centric tooling for reviewing offline.

Appendix A - What is Red10?

  1. A containerized, distributed machine learning platform for streamlining analysis to build higly predictive models
  2. Multi-tenant REST API wrapping https://github.com/jay-johnson/sci-pype inside of Django REST Framework with JWT authentication.
  3. Users build, train and predict using machine learning models (https://github.com/dmlc/xgboost) housed in Redis (Tensorflow coming soon).
  4. Export and import pre-trained models with archival to S3.
  5. Use the same API to make new predictions using pre-trained models.
  6. Streamline analysis - every column in a dataset will be analyzed and compared.
  7. Ensemble learning - every column gets a distinct, trained model for helping improve predictive accuracy.
  8. Horizontally scalable machine learning cloud - maximize infrastructure by scaling up the number of Celery workers consuming published jobs out of Redis.
  9. S3 integration - images, analysis, predictions, export + import pre-trained models, manifest file.
  10. Security (pre-trained models, analysis, predictions) - the user must present a secret key to access any of the machine learning job's analysis and predictions.
  11. Swagger API - easy to build new web applications derived from the service layer.
  12. Centralized logging (Elasticsearch + Logstash + Kibana) - logs from Django REST Framework + Celery are published to logstash over Redis.
  13. Search historical analysis using Elasticsearch - machine learning jobs are automatically published as json documents to Elasticsearch on successful completion.
  14. Dockerized - runs anywhere with docker (virtualbox, on-prem, AWS, OpenShift, Swarm, K8).

Appendix B - Red10 Machine Learning Workflow

Build, Train, Analyze and Store

Make New Predictions

Moving Model Artifacts - Export / Import

Appendix C - Red10 Manifest Mapping to Models in Redis

Storing Multiple Models in Redis

Analysis Archival in S3

Appendix E - Redis Key Overview (Non-ML Data Store)

Here is an overview of how Red10 uses Redis databases and keys for handling everything outside of the machine learning use cases.


In [2]:
from __future__ import print_function
import sys, os, requests, json, datetime

# Load the environment and login the user
from src.common.load_redten_ipython_env import user_token, user_login, csv_file, run_job, core, api_urls, ppj, rt_url, rt_user, rt_pass, rt_email, lg, good, boom, anmt, mark, ppj, uni_key, rest_login_as_user, rest_full_login, wait_for_job_to_finish, wait_on_job, get_job_analysis, get_job_results, get_analysis_manifest, get_job_cache_manifest, build_prediction_results, build_forecast_results, get_job_cache_manifest, search_ml_jobs, show_logs, show_errors, ipyImage, ipyHTML, ipyDisplay, pd, np

# header
lg("")
good("Starting Redis Key Analysis: " + str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")))
lg("")

# walk the redis dbs
for db_idx in range(0, 16):
    db_file = "/tmp/db-" + str(db_idx) + "-keys"
    os.system("echo \"select " + str(db_idx) + " \n keys *\" | redis-cli > " + str(db_file))
    database_keys = {}
    if os.path.exists(db_file): # if the file exists
        with open(db_file) as f: # open it
            lines_to_parse = f.readlines() # read all the lines
            for org_line in lines_to_parse:
                cur_line = org_line.rstrip("\n").strip().lstrip() # remove the newline and any other whitespace
                if str(cur_line) != "OK" and str(cur_line) != "":
                    database_keys[cur_line] = True
                # if it's not the redis OK response
            # for all lines
        # with the db file open
    else:
        boom("Failed parsing Redis db_file=" + str(db_file))
    # end of parsing db_file
    
    anmt("Redis DB=" + str(db_idx) + " keys=" + str(len(database_keys)))

    # used for manual inspection
    sample_cache_record = {}
    
    if db_idx == 0:
        equity_ticker = "SPY"
        num_equities = 0
        detailed_keys = []
        for idx,k in enumerate(database_keys):
            if "EQTY_" in str(k) or "EQID_" in str(k):
                num_equities += 1
            else:
                lg(" - key=" + str(idx) + " name: " + str(k))
                detailed_keys.append(k)
                
                # Pull this record from the "STOCKS:EQ_DAILY_SPY" 
                # redis location => <cache app name:redis key> 
                if "EQ_DAILY_SPY" == k:
                    sample_cache_record = core.get_cache_from_redis(core.m_rds["STOCKS"], k, False, False)
                # end of pulling a sample
                
        # for the large db keyset
        
        if len(sample_cache_record) > 0:
            lg("")
            lg("Daily Sticks for Ticker(" + str(equity_ticker) + ") StartDate(" + str(sample_cache_record["Record"]["StartDate"]) + ") Sticks(" + str(len(sample_cache_record["Record"]["Sticks"])) + ")", 6)
            lg("Date, High, Low, Open, Close, Volume", 5)
            for idx,record in enumerate(reversed(sample_cache_record["Record"]["Sticks"])):
                lg(record["Date"] + ", " + record["High"] + ", " + record["Low"] + ", " + record["Open"] + ", " + record["Close"] + ", " + record["Volume"])
                # stop after a few
                if idx > 10:
                    break
            # end for all sticks in the cache
            
            lg("")
        # end of inspecting the sample record
        
        lg("DB=" + str(db_idx) + " detailed_keys=" + str(len(detailed_keys)) + " equities=" + str(num_equities))
    else:
        for k in database_keys:
            if "session:" in k:
                lg(" - key: session:<redacted>")
            else:
                lg(" - key: " + str(k))
        # end of for all keys
    # end of for the post processing keyset in this redis db
    
    lg("---------------------------------------------")
    lg("")
    
# end for all db files


Starting Redis Key Analysis: 2017-05-23 18:20:41

Redis DB=0 keys=16856
 - key=279 name: DS_01_day_XLF_STICKS
 - key=421 name: _STATS_DAILY_SUMMARY_XLF
 - key=949 name: _OPTS_XLF_2017-05-19
 - key=1159 name: _ALLBESTSSPREADS_XLU
 - key=1166 name: _ALLBESTSSPREADS_XLF
 - key=1167 name: _ALLBESTSSPREADS_XLE
 - key=1171 name: _ALLBESTSSPREADS_XLI
 - key=1368 name: _OPTS_XLU_2017-06-16
 - key=1758 name: _390_min_XLU
 - key=1843 name: _LST_SPY_PRICING
 - key=3408 name: _390_min_XLI
 - key=3768 name: _OPTS_XLI_LATEST
 - key=4979 name: _OPTS_SPY_2017-06-16
 - key=5013 name: _OPTS_XLF_2017-06-16
 - key=5595 name: _STATS_DAILY_SUMMARY_XLE
 - key=5599 name: _STATS_DAILY_SUMMARY_XLI
 - key=5601 name: _STATS_DAILY_SUMMARY_XLU
 - key=6129 name: _LAST_390_min_XLI
 - key=6131 name: _LAST_390_min_XLF
 - key=6132 name: _LAST_390_min_XLE
 - key=6138 name: _LAST_390_min_XLU
 - key=6589 name: _OPTS_XLE_2017-05-19
 - key=6654 name: _OPTS_XLU_LATEST
 - key=6713 name: _STATS_DAILY_SUMMARY_SPY
 - key=8038 name: _OPTS_XLF_LATEST
 - key=8536 name: ALL_EQUITIES_BY_TICKER
 - key=8539 name: _LST_XLI_PRICING
 - key=8860 name: EQ_DAILY_XLU
 - key=8864 name: EQ_DAILY_XLI
 - key=8874 name: EQ_DAILY_XLE
 - key=8877 name: EQ_DAILY_XLF
 - key=8967 name: DS_01_day_XLE_STICKS
 - key=9194 name: DS_01_day_XLI_STICKS
 - key=9510 name: _OPTS_XLI_2017-06-16
 - key=10467 name: _OPTS_XLI_2017-05-19
 - key=10921 name: _LST_XLE_PRICING
 - key=11725 name: EQ_DAILY_SPY
 - key=11951 name: _OPTS_XLE_2017-06-16
 - key=12526 name: _OPTS_SPY_2017-05-19
 - key=12592 name: _LST_XLU_PRICING
 - key=12829 name: _OPTS_XLU_2017-05-19
 - key=12916 name: ALL_EQUITIES_BY_ID
 - key=13100 name: DS_01_day_SPY_STICKS
 - key=13112 name: _ALLBESTSSPREADS_SPY
 - key=13131 name: DS_01_day_XLU_STICKS
 - key=13965 name: _OPTS_XLE_LATEST
 - key=14607 name: _390_min_XLE
 - key=14610 name: _390_min_XLF
 - key=14754 name: _390_min_SPY
 - key=15028 name: _LAST_390_min_SPY
 - key=15201 name: _LST_XLF_PRICING
 - key=16781 name: _OPTS_SPY_LATEST

Daily Sticks for Ticker(SPY) StartDate(03-05-2009) Sticks(2052)
Date, High, Low, Open, Close, Volume
05-19-2017, 237.75, 235.43, 235.73, 235.82, 107120216
05-18-2017, 237.75, 235.43, 235.73, 236.77, 106236399
05-17-2017, 238.64, 235.75, 238.10, 235.82, 170138013
05-16-2017, 240.67, 239.63, 240.64, 240.08, 51241791
05-15-2017, 240.44, 239.45, 239.47, 240.30, 60025663
05-12-2017, 239.43, 238.67, 239.09, 238.98, 51877428
05-11-2017, 239.46, 238.13, 239.35, 239.87, 23215447
05-10-2017, 240.19, 239.04, 239.96, 239.66, 51363200
05-09-2017, 240.19, 239.04, 239.96, 239.44, 51363200
05-08-2017, 239.92, 239.17, 239.75, 239.66, 48385730
05-05-2017, 239.72, 238.68, 239.19, 239.70, 62001269
05-04-2017, 238.92, 237.78, 238.83, 238.76, 61462732

DB=0 detailed_keys=52 equities=16804
---------------------------------------------

Redis DB=1 keys=1
 - key: session:<redacted>
---------------------------------------------

Redis DB=2 keys=0
---------------------------------------------

Redis DB=3 keys=10
 - key: q:ccd68184a206285b77fab4da306ffbc5
 - key: conj:auth_user_user_permissions:user_id=80
 - key: schemes:auth_user_user_permissions
 - key: q:49c845196a7df1562b071f61363cf581
 - key: schemes:auth_user_groups
 - key: conj:auth_user:username=jay
 - key: schemes:auth_user
 - key: _USER_2
 - key: q:d8a63b9c4ef2116ec214e19be8c3826e
 - key: conj:auth_user_groups:user_id=80
---------------------------------------------

Redis DB=4 keys=4
 - key: _kombu.binding.reply.celery.pidbox
 - key: _kombu.binding.celery
 - key: _kombu.binding.celeryev
 - key: _kombu.binding.celery.pidbox
---------------------------------------------

Redis DB=5 keys=0
---------------------------------------------

Redis DB=6 keys=0
---------------------------------------------

Redis DB=7 keys=0
---------------------------------------------

Redis DB=8 keys=0
---------------------------------------------

Redis DB=9 keys=0
---------------------------------------------

Redis DB=10 keys=0
---------------------------------------------

Redis DB=11 keys=0
---------------------------------------------

Redis DB=12 keys=0
---------------------------------------------

Redis DB=13 keys=0
---------------------------------------------

Redis DB=14 keys=0
---------------------------------------------

Redis DB=15 keys=0
---------------------------------------------

Appendix F - Debugging Tools

Develop with Swagger

Search Jobs in Elasticsearch

Red10 is running an ELK stack for searching by user, dataset identifiers, and jobs.

Once a job completes it is automatically published to Elasticsearch


In [3]:
from __future__ import print_function
import sys, os, requests, json, datetime

# Load the environment and login the user
from src.common.load_redten_ipython_env import user_token, user_login, csv_file, run_job, core, api_urls, ppj, rt_url, rt_user, rt_pass, rt_email, lg, good, boom, anmt, mark, ppj, uni_key, rest_login_as_user, rest_full_login, wait_for_job_to_finish, wait_on_job, get_job_analysis, get_job_results, get_analysis_manifest, get_job_cache_manifest, build_prediction_results, build_forecast_results, get_job_cache_manifest, search_ml_jobs, show_logs, show_errors, ipyImage, ipyHTML, ipyDisplay, pd, np

search_req = {
        "title" : "", # job title with completion
        "dsname" : "SPY", # dataset name with completion
        "desc" : "", # description with completion
        "features" : "", # feature search
        "target_column" : "" # name of target column for this analysis
    }
job_search = {}
job_res = {}
if len(search_req) == 0 :
    boom("Please create a valid search request")
else:
    job_res = search_ml_jobs(search_req)

    if job_res["status"] != "SUCCESS":
        boom("Job=" + str(job_id) + " failed with status=" + str(job_res["status"]) + " err=" + str(job_res["error"]))
    else:
        job_search = job_res["record"]
        anmt("Job Matches=" + str(len(job_search)))
        lg(ppj(job_search), 5)
    # found jobs
# end of searching for job


Searching ML Jobs url=https://redten.io/ml/search/
SUCCESS - Job Search Response Status=200 Reason=OK
Found Job={'target_column': '', 'desc': '', 'dsname': 'SPY', 'features': '', 'title': ''} results
Job Matches=1
{
    "jobs": [
        {
            "algo_name": "xgb-regressor",
            "desc": "Forecast simulation - 2017-05-23 22:00:09",
            "ds_name": "SPY",
            "feature_column_names": [
                "FHigh",
                "FLow",
                "FOpen",
                "FClose",
                "FVolume"
            ],
            "ignore_features": [
                "Ticker",
                "Date",
                "FDate",
                "FPrice",
                "DcsnDate",
                "Decision"
            ],
            "images": [
                {
                    "id": 12006,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12006_75950bb597ae44cf.png",
                    "title": "SPY Close forecast overlay between 2017-02-23 00:00:00 - 2017-05-12 00:00:00"
                },
                {
                    "id": 12007,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12007_981709fca5e94062.png",
                    "title": "SPY-2-555 10-Days - Predictive Accuracy\nPredicted Open 10 Days vs Actual Open 10 Days"
                },
                {
                    "id": 12008,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12008_6e0222bdc5ab4adf.png",
                    "title": "SPY-2-555 5-Days - Predictive Accuracy\nPredicted Low 5 Days vs Actual Low 5 Days"
                },
                {
                    "id": 12009,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12009_c70ec6e3690e466c.png",
                    "title": "SPY-2-555 15-Days - Predictive Accuracy\nPredicted Open 15 Days vs Actual Open 15 Days"
                },
                {
                    "id": 12010,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12010_17b819f13e914bfa.png",
                    "title": "SPY-2-555 25-Days - Predictive Accuracy\nPredicted High 25 Days vs Actual High 25 Days"
                },
                {
                    "id": 12011,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12011_f65ee56325394208.png",
                    "title": "SPY-2-555 30-Days - Predictive Accuracy\nPredicted Open 30 Days vs Actual Open 30 Days"
                },
                {
                    "id": 12012,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12012_1a9331b9b8e24145.png",
                    "title": "SPY-2-555 20-Days - Predictive Accuracy\nPredicted High 20 Days vs Actual High 20 Days"
                },
                {
                    "id": 12013,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12013_3b28fd99ff354edb.png",
                    "title": "SPY-2-555 20-Days - Predictive Accuracy\nPredicted Volume 20 Days vs Actual Volume 20 Days"
                },
                {
                    "id": 12014,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12014_5d8cfd12bc7f49bf.png",
                    "title": "SPY-2-555 25-Days - Predictive Accuracy\nPredicted Volume 25 Days vs Actual Volume 25 Days"
                },
                {
                    "id": 12015,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12015_5ee300ed25504c2b.png",
                    "title": "SPY-2-555 30-Days - Predictive Accuracy\nPredicted Low 30 Days vs Actual Low 30 Days"
                },
                {
                    "id": 12016,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12016_029cb3266c46413d.png",
                    "title": "SPY-2-555 20-Days - Predictive Accuracy\nPredicted Close 20 Days vs Actual Close 20 Days"
                },
                {
                    "id": 12017,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12017_3089d07bad8c4b85.png",
                    "title": "SPY-2-555 5-Days - Predictive Accuracy\nPredicted Volume 5 Days vs Actual Volume 5 Days"
                },
                {
                    "id": 12018,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12018_dd20dc4f941946e4.png",
                    "title": "SPY-2-555 25-Days - Predictive Accuracy\nPredicted Close 25 Days vs Actual Close 25 Days"
                },
                {
                    "id": 12019,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12019_813dbe0a739d4aa4.png",
                    "title": "SPY-2-555 10-Days - Predictive Accuracy\nPredicted Low 10 Days vs Actual Low 10 Days"
                },
                {
                    "id": 12020,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12020_5b859fd5b3ca417e.png",
                    "title": "SPY-2-555 5-Days - Predictive Accuracy\nPredicted Open 5 Days vs Actual Open 5 Days"
                },
                {
                    "id": 12021,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12021_3e6c529854ec47dd.png",
                    "title": "SPY-2-555 15-Days - Predictive Accuracy\nPredicted Low 15 Days vs Actual Low 15 Days"
                },
                {
                    "id": 12022,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12022_f335bee9141a4d39.png",
                    "title": "SPY-2-555 10-Days - Predictive Accuracy\nPredicted High 10 Days vs Actual High 10 Days"
                },
                {
                    "id": 12023,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12023_916304a8e7184119.png",
                    "title": "SPY-2-555 15-Days - Predictive Accuracy\nPredicted High 15 Days vs Actual High 15 Days"
                },
                {
                    "id": 12024,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12024_3a4a00f45ddb4472.png",
                    "title": "SPY-2-555 25-Days - Predictive Accuracy\nPredicted Open 25 Days vs Actual Open 25 Days"
                },
                {
                    "id": 12025,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12025_beec39f18bb84469.png",
                    "title": "SPY-2-555 30-Days - Predictive Accuracy\nPredicted High 30 Days vs Actual High 30 Days"
                },
                {
                    "id": 12026,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12026_bf5288b75d994cde.png",
                    "title": "SPY-2-555 20-Days - Predictive Accuracy\nPredicted Open 20 Days vs Actual Open 20 Days"
                },
                {
                    "id": 12027,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12027_2620b246cfd54a68.png",
                    "title": "SPY-2-555 10-Days - Predictive Accuracy\nPredicted Volume 10 Days vs Actual Volume 10 Days"
                },
                {
                    "id": 12028,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12028_f5d022f810ba4283.png",
                    "title": "SPY-2-555 30-Days - Predictive Accuracy\nPredicted Volume 30 Days vs Actual Volume 30 Days"
                },
                {
                    "id": 12029,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12029_c7e56bc6a77748d6.png",
                    "title": "SPY-2-555 15-Days - Predictive Accuracy\nPredicted Volume 15 Days vs Actual Volume 15 Days"
                },
                {
                    "id": 12030,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12030_bdcb901323804a6b.png",
                    "title": "SPY-2-555 20-Days - Predictive Accuracy\nPredicted Low 20 Days vs Actual Low 20 Days"
                },
                {
                    "id": 12031,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12031_19276b3843ea467e.png",
                    "title": "SPY-2-555 25-Days - Predictive Accuracy\nPredicted Low 25 Days vs Actual Low 25 Days"
                },
                {
                    "id": 12032,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12032_bf48ad03bdf7426e.png",
                    "title": "SPY-2-555 30-Days - Predictive Accuracy\nPredicted Close 30 Days vs Actual Close 30 Days"
                },
                {
                    "id": 12033,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12033_42cb601864994eb2.png",
                    "title": "SPY-2-555 15-Days - Predictive Accuracy\nPredicted Close 15 Days vs Actual Close 15 Days"
                },
                {
                    "id": 12034,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12034_b74469132a794f8e.png",
                    "title": "SPY-2-555 10-Days - Predictive Accuracy\nPredicted Close 10 Days vs Actual Close 10 Days"
                },
                {
                    "id": 12035,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12035_1cb38442136f4719.png",
                    "title": "SPY-2-555 5-Days - Predictive Accuracy\nPredicted High 5 Days vs Actual High 5 Days"
                },
                {
                    "id": 12036,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_555_12036_b5cb1f3c8a554dd2.png",
                    "title": "SPY-2-555 5-Days - Predictive Accuracy\nPredicted Close 5 Days vs Actual Close 5 Days"
                }
            ],
            "job_id": 555,
            "ml_type": "Playbook-UnitsAhead",
            "prediction_type": "forecast",
            "result_id": "",
            "target_column_name": "FClose",
            "target_column_values": [
                "GoodBuys",
                "BadBuys",
                "Not Finished"
            ],
            "title": "SPY Forecast v5 - 6b8e2873aaa84e3a8eadf5f260151c7",
            "train_id": 446,
            "user_id": 2,
            "username": "jay"
        },
        {
            "algo_name": "xgb-regressor",
            "desc": "Forecast simulation - 2017-05-23 22:24:08",
            "ds_name": "SPY",
            "feature_column_names": [
                "FHigh",
                "FLow",
                "FOpen",
                "FClose",
                "FVolume"
            ],
            "ignore_features": [
                "Ticker",
                "Date",
                "FDate",
                "FPrice",
                "DcsnDate",
                "Decision"
            ],
            "images": [
                {
                    "id": 12037,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12037_0523b881d6a64baa.png",
                    "title": "SPY Close forecast overlay between 2017-02-23 00:00:00 - 2017-05-12 00:00:00"
                },
                {
                    "id": 12038,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12038_c8fc6f8d4e294881.png",
                    "title": "SPY-2-556 10-Days - Predictive Accuracy\nPredicted Open 10 Days vs Actual Open 10 Days"
                },
                {
                    "id": 12039,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12039_dba3efb9b56c4bb5.png",
                    "title": "SPY-2-556 5-Days - Predictive Accuracy\nPredicted Low 5 Days vs Actual Low 5 Days"
                },
                {
                    "id": 12040,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12040_a3e6aafa5e6241c4.png",
                    "title": "SPY-2-556 15-Days - Predictive Accuracy\nPredicted Open 15 Days vs Actual Open 15 Days"
                },
                {
                    "id": 12041,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12041_cf802c6530714ae7.png",
                    "title": "SPY-2-556 25-Days - Predictive Accuracy\nPredicted High 25 Days vs Actual High 25 Days"
                },
                {
                    "id": 12042,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12042_152cb94cf47f4557.png",
                    "title": "SPY-2-556 30-Days - Predictive Accuracy\nPredicted Open 30 Days vs Actual Open 30 Days"
                },
                {
                    "id": 12043,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12043_ddeb69b9254b4595.png",
                    "title": "SPY-2-556 20-Days - Predictive Accuracy\nPredicted High 20 Days vs Actual High 20 Days"
                },
                {
                    "id": 12044,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12044_f64ef76a00cb4bb9.png",
                    "title": "SPY-2-556 20-Days - Predictive Accuracy\nPredicted Volume 20 Days vs Actual Volume 20 Days"
                },
                {
                    "id": 12045,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12045_db89689ffd49445c.png",
                    "title": "SPY-2-556 25-Days - Predictive Accuracy\nPredicted Volume 25 Days vs Actual Volume 25 Days"
                },
                {
                    "id": 12046,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12046_8c585f82cd0948c5.png",
                    "title": "SPY-2-556 30-Days - Predictive Accuracy\nPredicted Low 30 Days vs Actual Low 30 Days"
                },
                {
                    "id": 12047,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12047_eba8de31f57e466a.png",
                    "title": "SPY-2-556 20-Days - Predictive Accuracy\nPredicted Close 20 Days vs Actual Close 20 Days"
                },
                {
                    "id": 12048,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12048_7f90d455f7df4e2f.png",
                    "title": "SPY-2-556 5-Days - Predictive Accuracy\nPredicted Volume 5 Days vs Actual Volume 5 Days"
                },
                {
                    "id": 12049,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12049_49d5e69d8c104eb2.png",
                    "title": "SPY-2-556 25-Days - Predictive Accuracy\nPredicted Close 25 Days vs Actual Close 25 Days"
                },
                {
                    "id": 12050,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12050_430a5186b3d945e4.png",
                    "title": "SPY-2-556 10-Days - Predictive Accuracy\nPredicted Low 10 Days vs Actual Low 10 Days"
                },
                {
                    "id": 12051,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12051_184561aa8af3489a.png",
                    "title": "SPY-2-556 5-Days - Predictive Accuracy\nPredicted Open 5 Days vs Actual Open 5 Days"
                },
                {
                    "id": 12052,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12052_26fbe6058c114619.png",
                    "title": "SPY-2-556 15-Days - Predictive Accuracy\nPredicted Low 15 Days vs Actual Low 15 Days"
                },
                {
                    "id": 12053,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12053_de8af6d2ab474eb4.png",
                    "title": "SPY-2-556 10-Days - Predictive Accuracy\nPredicted High 10 Days vs Actual High 10 Days"
                },
                {
                    "id": 12054,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12054_72baf6fe1cff49dd.png",
                    "title": "SPY-2-556 15-Days - Predictive Accuracy\nPredicted High 15 Days vs Actual High 15 Days"
                },
                {
                    "id": 12055,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12055_76b743196398499f.png",
                    "title": "SPY-2-556 25-Days - Predictive Accuracy\nPredicted Open 25 Days vs Actual Open 25 Days"
                },
                {
                    "id": 12056,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12056_53ca82cd037c4ebb.png",
                    "title": "SPY-2-556 30-Days - Predictive Accuracy\nPredicted High 30 Days vs Actual High 30 Days"
                },
                {
                    "id": 12057,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12057_ceced8e2215749e5.png",
                    "title": "SPY-2-556 20-Days - Predictive Accuracy\nPredicted Open 20 Days vs Actual Open 20 Days"
                },
                {
                    "id": 12058,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12058_660025f112e04a51.png",
                    "title": "SPY-2-556 10-Days - Predictive Accuracy\nPredicted Volume 10 Days vs Actual Volume 10 Days"
                },
                {
                    "id": 12059,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12059_974874fc3c0c4c4b.png",
                    "title": "SPY-2-556 30-Days - Predictive Accuracy\nPredicted Volume 30 Days vs Actual Volume 30 Days"
                },
                {
                    "id": 12060,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12060_c3c6ab2f04ae4669.png",
                    "title": "SPY-2-556 15-Days - Predictive Accuracy\nPredicted Volume 15 Days vs Actual Volume 15 Days"
                },
                {
                    "id": 12061,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12061_087ef25764154835.png",
                    "title": "SPY-2-556 20-Days - Predictive Accuracy\nPredicted Low 20 Days vs Actual Low 20 Days"
                },
                {
                    "id": 12062,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12062_50476dc42b95485a.png",
                    "title": "SPY-2-556 25-Days - Predictive Accuracy\nPredicted Low 25 Days vs Actual Low 25 Days"
                },
                {
                    "id": 12063,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12063_3f0f9b7a91e6477d.png",
                    "title": "SPY-2-556 30-Days - Predictive Accuracy\nPredicted Close 30 Days vs Actual Close 30 Days"
                },
                {
                    "id": 12064,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12064_4929471da7b848dc.png",
                    "title": "SPY-2-556 15-Days - Predictive Accuracy\nPredicted Close 15 Days vs Actual Close 15 Days"
                },
                {
                    "id": 12065,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12065_c42e1ef3ecda4a50.png",
                    "title": "SPY-2-556 10-Days - Predictive Accuracy\nPredicted Close 10 Days vs Actual Close 10 Days"
                },
                {
                    "id": 12066,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12066_bd242932692b48f1.png",
                    "title": "SPY-2-556 5-Days - Predictive Accuracy\nPredicted High 5 Days vs Actual High 5 Days"
                },
                {
                    "id": 12067,
                    "image": "https://rt-media.s3.amazonaws.com/media/imagesml/20170523/2_556_12067_a1d9483443844be5.png",
                    "title": "SPY-2-556 5-Days - Predictive Accuracy\nPredicted Close 5 Days vs Actual Close 5 Days"
                }
            ],
            "job_id": 556,
            "ml_type": "Playbook-UnitsAhead",
            "prediction_type": "forecast",
            "result_id": "",
            "target_column_name": "FClose",
            "target_column_values": [
                "GoodBuys",
                "BadBuys",
                "Not Finished"
            ],
            "title": "SPY Forecast v5 - 1394ae9d74c24d5886f9608d3dd6328",
            "train_id": 447,
            "user_id": 2,
            "username": "jay"
        }
    ]
}

Pulling the Latest Error Logs from Elasticsearch


In [4]:
boom("Finding latest error logs:")
show_errors(limit=50)


Finding latest error logs:
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=ec9440aa1c764cf4a33dcdfe6026f88
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=f650f23f0a664927a96a71875ca3068
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=08ceca09a27b4f78b930a005c274dc9
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=9ebef890badc4c1580465d8b91dd63d
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=f3f20e7324e44627b3f92a7799eaa3a
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=2a9c417e87f64166bd8c2a6a6599f84
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=68362d7935b04f8388923c4ed824818
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=68e882a944904f7bb6d936720b97721
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=b5746788a0044d00babb9f07214c8b2
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=21ab697410204f3fa09d834b196fbd8
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=3ae35c7e805c44838c8b3e2d2d2ce95
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=9b8e9a2dbea14c21aed734e139cd283
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=b0ef1d2dcb514c50a64f64be3437b5a
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=6705994cb85a45e0ba176d6c17d0d80
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=01faad42d3aa472fa72e66db8c1c330
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=c4d361075640431e85064ad8bef3876
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=0c5fc6baa3df481f9fdbd48a7da19ab
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=a63349d3704d40bb9099aaa1c59bcae
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=15a8bab5c07c4c2d84a7fe040e143e3
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=321ead788d814c698e99d9eeabc91e7
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=04b1492f378c49b2acf3676afb0b02c
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=1d128b7d59704452a7a9ed37a4e7063
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=856f6f937d804a54bb68784db8583b9
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=009cc460d514460db81e98b970ee1b1
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=a1bdaff8368e460f9a76d2dafcfb84b
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=a668ae7464184d15befb3e18879c55f
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=e2326e5dfde341d19d9544ad095eab4
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=5f447746158f447a802e68c9d5dc6ee
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=7a600f7bc45e40cfb3f369ff7fcf59f
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=f775d4103f384d62bc1c89c84b20b54
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=625b6a5dbb314d5ab640a41599dbac1
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=99b27252cf174cc1a7fc4291d554d36
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=30734ba6aa7e4ba4afd2452d8803d12
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=2e5cf52864914bcfab1ee59206dfcd6
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=37ca18e73883420b9ef6c7aeda4b8ca
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=43c78c5e10854315ab89ee646ceea12
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=e7d6c4494ae44d7c91e8481ff2577cc
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=d3a540fd215847c3a7eb3e8f9e27c78
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=f5daabc7d2174a3482a9e1233424514
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=4817db6ced5b4e9ead9a5ba8d685f54
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=59c5ac1d733849c4b18b095f297d2eb
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=c055451ab361489684cc1d62c8418aa
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=9de37c7a76fa461ba2f21e0c5e92b1b
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=dc4ac1e3783449ee99e684964d9628d
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=277d0ea8fe324c818bc175d3dcc4327
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=e8b4a17841b2499f9016159de9e93f5
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=fc0a3c976ae04f89b0782d5ae2f72b7
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=acba2d491992455d9d0008fce60bb61
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=8e7b2e356a6b48bda2dd73ea055e8dd
2017-05-24 06:38:28 - ERROR - Demo error logs from celery workers - uuid=6bade4fdeb2b442d91001d4d992d88e

Pulling the Latest Logs from Elasticsearch


In [5]:
anmt("Finding latest logs:")
show_logs(limit=50)


Finding latest logs:
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=75e406e1515d451c8af06136c52e478
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=ffb1ac5fe34f4130a8eeea4fe188ef9
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=1f6954c4cd5e46ed9b0b0584199d725
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=c9a5a8f696a04c4bb7716a559718224
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=2b3850f444cd4e0cad5f1f1ae72168c
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=d056dc9c3c604d9a916a86127d7e31a
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=8d111ebd1eee4c68ac031dcd1f4c530
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=5aa041864fb24c34988b259330d1332
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=fd2647c217304a9ab87d1f31adb6ea9
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=c7b051014cb8461f856e336c4b684ec
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=9451dd6b9bfe4748aef42f2a9ebb551
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=db6ac99b562143e8acfda7206644b59
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=a828e9a85a024c2d812b163c874a09f
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=720b3ce6457140dc816ae094fc902fb
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=79b83fd71b584590ac88498ebd99032
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=51f781ab22634605af5618749e2113f
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=7ba3ade713ee4c8faf98d2a63bdf79a
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=18584ef9b0574ee2a5ff78a28333bd3
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=a51fd7d46b7f42bb8b8c80699e8dad9
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=6c3d5d2c36ed41818dc1cec48178ee5
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=a477245220a546a1b697862505ea53b
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=a7653b5c882840ccb29e980beff1621
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=427d8a2d7eb647bf9cf59ad704213e8
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=93c7a418edd447a89318800392add05
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=d9fa8ae747fc446898be13043797d49
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=a1fc8c434970469489908ebdbd31118
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=db23a9cc9c494536bbaa09f4f8f070a
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=d9dde5fa49f44c04a8ba4e5990677fb
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=20c0577a6cfa4c9d92d2fa798ef1188
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=75b215377d924619b1b3b9c01a9f119
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=afb7256c2de349dd9aa38b1b8b01f2d
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=87cee4e35160499ca49560d7c0c85d5
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=6f841da50bfe4662850a09f6299fbc9
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=eb29413c5dc746d2818982063d6c613
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=2fd636b6e23f4d209f05a83ae8d6ef0
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=e6c5f3f333c040499e9a6a8d530716f
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=061a8f54530546c0827b45fbaa06955
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=d76f25a2cb5c41638a1c741fbb48229
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=f6d0a64a41f5427ba02672db494c911
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=5e7c427eaab946a3871db50790aefbf
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=f17bd62c8a9d4acbb80c6e635d8bf71
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=40c679067cc84134822da83b931b081
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=e194a7fa4acf4b95b43bca93d32883b
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=78932d799e014291b69833aa919a394
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=a6eee95461d14b3aa4cb56fa9f7bb42
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=507bf75f459148268c4224e7aee4c0c
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=ff3541b5926b4f42a430a2d6fd6adc6
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=2e82480ae1a14529be7444746057acb
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=46cbfb98c761424ba45f99730c81456
2017-05-24 06:38:28 - INFO - Demo info logs from celery workers - uuid=db0e216d8938432b93fb3a7c7c5dc7b

Appendix G - Terminology and Definitions

  1. What is a Machine Learning Model? An algorithm is the general approach you will take. The model is what you get when you run the algorithm over your training data and what you use to make predictions on new data. You can generate a new model with the same algorithm with different data, or a different model from the same data with a different algorithm. https://www.quora.com/What-is-the-difference-between-machine-learning-model-and-ML-algorithm
  2. XGB / eXtreme Gradient Boosting - http://xgboost.readthedocs.io/en/latest/model.html
  3. Pub/Sub - publisher to subscriber - https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern
  4. RDB - https://redis.io/topics/persistence
  5. Redis - https://redislabs.com/ and https://redis.io/
  6. Docker - https://www.docker.com/
  7. Django Rest Framework - http://www.django-rest-framework.org/
  8. Celery - http://celery.readthedocs.io/en/latest/
  9. Jupyter - http://jupyter.org/
  10. S3 - https://aws.amazon.com/s3/
  11. Elasticsearch - https://www.elastic.co/
  12. Logstash - https://www.elastic.co/products/logstash
  13. Kibana - https://www.elastic.co/products/kibana
  14. nginx - https://nginx.org/en/

Appendix H - Machine learning tools and products

  1. Powerful tools and predictive systems that take time to master, automate and integrate: https://github.com/dmlc, https://www.tensorflow.org, http://caffe.berkeleyvision.org/, https://github.com/Theano/Theano, https://keras.io/
  2. Automated cloud platforms with vendor lock: https://aws.amazon.com/machine-learning/, https://azure.microsoft.com/en-us/services/machine-learning/, https://www.ibm.com/watson/
  3. Interactive notebook technologies - https://jupyter-notebook.readthedocs.io/en/latest/
  4. Tons of visualization tools