Web Services User Group Edinburgh

Welcome to AWS User Group Edinburgh #22

Webinar - Nimbo.sh and Machine Learning, No Expertise Required

Presented by Miguel Jaques Nimbo.sh and John Walker, CirrusHQ

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh User Group Edinburgh

Proceedings

18.30 Open 18.35 - 19:20 Nimbo.sh Presentation 19:20 - 20:15 Machine Learning, No expertise Required 20.15 - 20.30 Q&A 20.35 Close

Live chat available

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh John Walker

● Professional Services Team Lead @ CirrusHQ

● APN Ambassador ● Twitter : @zz9 ● 5x AWS Certified ● I also write about AWS at ● Technology Enthusiast https://blog.johnwalker.tech/

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh 3 Amazon Web Services User Group Edinburgh Miguel Jaques

● PhD in Data Science @ University of Edinburgh

● Co-founder @ Nimbo ● Twitter : @migJaques ● Tech Lead @ Springbok.ai

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh 4 Amazon Web Services User Group Edinburgh Nimbo

Dead-simple Machine learning on AWS

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

What is Nimbo?

● Nimbo is a simple command-line tool that allows you to run code on AWS as if you were running it locally.

● It abstracts away the complexity of AWS, allowing you to build, iterate, and deliver machine learning models faster than ever.

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

What does that even mean?

Let's say you usually train a neural network on your computer like this:

With Nimbo you can run this script on a GPU-enabled remote machine on AWS with:

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Why did we build it?

● I did some part-time work for an company taking on ML projects for larger clients.

● I needed to have a neural network fine-tuned within a week in order to show results to the client.

● Manager suggested I use the company’s AWS infrastructure, but just getting up to speed on it would take a week (I ended up using a different service).

● I thought: “There should be a way to automate all of the annoying parts of AWS in order to focus on training the models instead of dealing with permissions, instance keys, security groups, environments, storage, etc.”

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

What’s the problem with AWS?

● AWS is a very flexible and powerful tool, but it takes many hours to understand and utilize it effectively.

● Just the EC2 API has hundreds of endpoints, with each endpoint having dozens of parameters.

● You then have to add the S3 SDK, the IAM SDK, the pricing SDK, etc.

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

What’s the problem with AWS?

● In Nimbo, all we have is this:

Every command is intuitive and useful, with at most 2 arguments

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

What’s the problem with AWS?

● Other AWS solutions like SageMaker are cool if you want to use the web UI, but otherwise the CLI user experience isn’t very nice.

● We wanted a tool that took care of all the complexity of AWS, mimicking the experience of developing code and experiments on your own computer.

● Nimbo drastically simplifies your AWS workflow by taking care of instance, environment, data, and user management - no changes to your codebase needed.

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

How does it work?

● There is a nimbo-config.yml file that looks something like this:

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

How does it work?

The command nimbo run "python -u train-mnist.py --epochs=10 --lr=3e-4" will:

● launch your instance (on-demand or spot instance) ● setup your environment (according to conda_env) ● sync your code to the instance ● pull your datasets from S3 into the instance ● run the job ● when the job is done: ○ save the results and logs back to S3 ○ delete the instance (or not) ● You can then do nimbo pull results or nimbo pull logs to get the job's results or nimbo-logs onto your computer.

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

How does it work?

Nimbo also provides many useful commands to simplify IAM, key, security group, cost and data management. E.g.:

● nimbo spending days/months ● nimbo ls-prices ● nimbo push datasets/results/logs ● nimbo pull datasets/results/logs ● nimbo ls-active ● nimbo ssh ● nimbo rm-instance ● nimbo launch-and-setup ● nimbo admin-setup

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Enough talking, let’s do a demo!

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh Benefits (for the engineers and managers)

● Nimbo is the fastest way to prototype on AWS, allowing you to iterate faster.

● Nimbo has minimal setup, meaning you can be up and running in minutes.

● Nimbo simplifies onboarding, meaning a new engineer will be ready to start running jobs on your AWS infrastructure in minutes, without even having to know AWS!

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Machine Learning on AWS No Expertise Required

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Overview - Machine Learning Experience v No Experience Amazon provide a wide range of AI and Machine Learning solutions.

These are typically split into 3 areas, AI Services, ML Services and Frameworks and Infrastructure. AI Services are AWS Services that can be used by builders with typically no Machine Learning experience. ML Services are AWS Services for performing Machine Learning on AWS.

Frameworks and Infrastructure covers other supported Machine Learning use cases, such as directly using EC2 Instances and Container services for Machine Learning.

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Overview - Machine Learning Experience v No Experience For the remainder of this presentation we will be focusing on the services that typically require no Machine Learning experience.

These services are designed to be used by end users with no ML experience but still tap into the power and expertise of AWS.

For example, the AWS Personalize service is based on the recommendation system used for Amazon.com where Amazon has gained real world experience in what works and what doesn’t.

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Overview - Machine Learning Experience v No Experience The previous images were taken from the Data Science on AWS book

https://www.amazon.co.uk/dp/B092 1MXC9S/

AWS and Deeplearning.ai AI have also released a new Data Science Specialisation

https://www.coursera.org/specializa tions/practical-data-science

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Health - Amazon HealthLake

Amazon Healthlake is a specialised Data Lake product currently in preview for storing and analyzing patient data in a privacy focused way

Features: ● Transform and understand patient data from sources such as prescriptions, procedure documents ● Identify Trends in data, and make predictions ● Transform data into industry standard data formats (such as FHIR - https://digital.nhs.uk/services/fhir-uk-core)

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Health - Amazon Transcribe Medical

Amazon Transcribe Medical is a specialism of the Transcribe Service that is use to convert Medical Speech, such as patient phone calls into transcripts

Features: ● Transcribe medical related speech ● Serverless process, no data is stored as part of the process, you control the input and output ● Transcription expertise in primary care and specialisations such as neurology

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Health - Amazon Comprehend Medical

Amazon Comprehend Medical is a specialism of the Comprehend Service that is use to understand medical information in input documents, such as doctors notes

Features: ● Understand and identify medical data and link to medical definitions ● Identify Patient Health Information and adhere to HIPAA and GDPR standards ● Identify relationships between information in the source documents

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Industrial - AWS Panorama + Appliance

AWS Panorama is a combination of local appliance and SDK that can be used to do Computer Vision (CV) tasks locally, such as detecting quality control issues and site safety. The Panorama Appliance is a hardware device that can connect to existing cameras and be used for Features: ● Panorama Appliance (Coming Soon) for Computer Vision locally Computer Vision ● Panorama SDK for third parties to create cameras that run CV locally ● Predictions are done locally with high accuracy and low latency, with limited or no internet access needed

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Industrial - Amazon Monitron

Amazon Monitron is an end to end solution for gathering and analysing sensor data in industrial environments to identify abnormal equipment conditions. Focused on Vibration and Temperature Features: variations ● Implement Predictive Maintenance on industrial equipment ● Reduce unplanned downtime ● Receive reports on Monitron Mobile app to identify and rectify abnormal behaviour and prevent failures

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Industrial - Amazon Lookout for Equipment

Amazon Lookout for Equipment is an ML Solution for analysing data from existing sensors in an Industrial Setting and using Historical Data and Maintenance records to predict potential issues and perform preventative maintenance Features: ● Analyse data obtained from Sensors and grade the data quality ● Leverage data from up to 300 sensors and automatically determine best algorithm for analysis ● Continuous evaluation of real time data at timescales from 1 minute to 1 hour

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Industrial - Amazon Lookout for Vision

Amazon Lookout for Vision is an ML solution for spotting defects and abnormalities in quality inspection. It can be used to automatically identify quality issues such as missing components, quality issues in product and irregularities in production lines Features: ● Create training data from as low as 30 images ● Identify Defects in production lines, such as pizzas with missing toppings, PCBs with missing components and more ● Continuous Improvement of model based on feedback from end user to improve detection

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Anomaly Detection - Amazon Lookout for Metrics

Amazon Lookout for Metrics is an ML Solution for detecting and diagnosing anomalies in business and operational data. For example, on a Features: commercial site, if your ● Monitor metrics from all over your application such as first page views, basket completion, downloads, installs and more sales completion rate ● Amazon Lookout for Metrics creates an ML Model based on your data, and allows feedback on drops, you can use Amazon anomalies detected to improve the model accuracy over time Lookout for Metrics to ● Connect to popular data sources, such as S3, RDS, Cloudwatch, Salesforce, Zendesk, Google discover why and predict Analytics and more any future changes ● Connect with other services such as SNS or Lambda to automatically remediate or alert on issues

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Code and DevOps - Amazon DevOps Guru

Amazon DevOps Guru allows you to monitor application metrics, logs and events, and detect anomalous behaviour that could cause issues such as resource exhaustion, outages, and Features: under-provisioning ● Monitor sources such as CloudWatch, AWS Config, CloudTrail and x-ray ● Analyse Metrics for normal behaviour patterns ● Identify related events ● Provide Recommendations for fixes ● Trigger integrations with OpsCentre, SNS and third-party incident management systems

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Code and DevOps - Amazon CodeGuru

Amazon CodeGuru allows you to analyse your code and gives recommendation on code improvements, your most expensive code (that consumes the most Features: resources), detects ● Identify and troubleshoot performance issues anomalies and identifies ● Detect anomalies and common issues before your users encounter them performance issues ● Identify inefficient code for remediation stemming from your code ● Catch potential security issues before code goes live ● Improve use of AWS APIs (polling, pagination etc) ● Supports Java and Python code from GitHub, GitHub Enterprise, Bitbucket and CodeCommit

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Vision -

Amazon Rekognition is a Computer Vision solution that allows you to process images and video at scale Features: for analysis. You can detect ● Identify and label objects, scenes and activities objects, people, text, ● Add custom labelling for your particular use case scenes and activities, as ● Perform Content Moderation well as detecting ● Detect Text in images and videos, even on skewed or distorted text inappropriate content ● Facial detection and analysis, such as detecting if someone is happy or wearing sunglasses ● Facial searching and identification ● PPE Detection ● Video segment detection

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Vision - Amazon Rekognition Example

To Demonstrate Rekognition, I’ve uploaded the photo I had at the start of this presentation and ran the detectFaces Function. The response on the right is a sample of the types of responses that come back.

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Speech - Amazon Polly

Amazon Polly is a Text to Speech service that allows for natural sounding speech to be generated from any text, either as a one off or as part of a pipeline using Lambda or Features: other services ● Convert text to speech using natural sounding voices ● Store speech in standard formats such as MP3 and OGG and distribute from CloudFront or locally ● Real-Time streaming of text to speech using the Polly API ● Customise and control speech using lexicons and SSML tags to control pronunciation, volume, pitch, speed etc ● Further Reading from DuoLingo: https://aws.amazon.com/blogs/machine-learning/powering-language-learning-on-duolingo-with-amazon-polly/

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Speech - Amazon Transcribe

Amazon Transcribe is the general service related to the Transcribe Medical from earlier. It allows you to convert speech to text, and provide customised vocabulary and domain Features: specific words ● Convert speech to text from audio and video sources ● Redact Personally Identifiable Information (PII) from transcripts ● Filter profane or unsuitable language from your transcripts

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Text - Amazon Comprehend

Amazon Comprehend is the general service related to the Comprehend Medical mentioned earlier. You can use Natural Language Processing to discover the meaning and relationships between text from support Features: tickets, reviews etc ● Uncover meaning and relationships in your text. For example what feature makes your customers happy or unhappy ● Bring your own terms and data and customise the machine learning model without ML expertise ● Organise your documents by topic

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Text - Amazon Translate

Amazon Translate is AWS’s language translation service that can be integrated with your applications and provide custom language translation

Features: ● Translate dynamic or real-time content ● Link in with other services such as Amazon Comprehend for analysis ● Translate various content formats, including Word Documents, Powerpoint or Excel ● Translate your own domain specific data such as brand names with Active Custom Translation

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Text - Amazon Textract

Amazon Textract is a service for extracting meaning and structure from content.

You can use Textract to read content from text, different layouts, tables, Features: forms and more, while ● Extract data from content such as forms and tables, and see the relationships between being compliant with them regulations such as GDPR ● Form and table extractions return key-value pairs with the linked information and PCI ● No need to define the structure of the data, Textract will use Machine Learning to figure out

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Text - Amazon Textract Example

To Demonstrate Amazon Textract I’ve uploaded a PDF (which is from the Coursera data science course, it's the output of a statistical bias check).

This is a PDF with a number of tables that Textract has detected and output with the relationships intact

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Search - Amazon Kendra

Amazon Kendra is a natural language solution for searching for information in documents and presenting the relevant information from the document to users. Rather than just link to a Features: document it will pull out ● Find relevant answers to your queries using normal questions the information you need ● Centralise knowledge by bringing in content from Sharepoint, S3, Salesforce and RDS based on the query ● Kendra is pre-trained with industry specific knowledge, but you can also manually adjust what is considered important using prioritisation of data sources, authors, document freshness or tagging

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Chatbots -

Amazon Lex is a chatbot solution that can be deployed on mobile, web, and other chat services such as Facebook Messenger, Slack and Twillo

Features: ● Provide example phrases and response and allow users to interact with your chatbot in natural language ● Automate tasks by integrating with Lambda, CloudWatch and other services ● Export to an Alexa Skill ● Automatically scale with usage

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Personalisation - Amazon Personalize

Amazon Personalize is a service from AWS to provide recommendations and personalisation to users during their experience with your application Features: ● Based on Amazon’s experience with Amazon.com ● Build recommendation systems based on user content consumption ● Highlight new content based on previous usage ● Real-Time and Batch Recommendations ● Similar Items and contextual recommendations ● Recommendations even with new users and new items

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Forecasting - Amazon Forecast

Amazon Forecast is a forecasting solution for analysing historical and relevant related data to predict future demand. It can use metrics such as sales, traffic, inventory and combine it with product data, holiday Features: sales/promotions and ● Predict future data points using the same technology used on Amazon.com forecast demand and ● Forecast multiple types of time-series data, not just sales resource planning ● Automatically detect which type of algorithm is the best fit for your data without ML knowledge ● Visualise forecasts using graphs and tables

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Fraud - Amazon Fraud Detector

Amazon Fraud Detector is a service that can automatically analyse data to predict if new accounts or purchases are being made fraudulently

Features: ● Based on Amazon’s own insights from Fraud Detection ● Detect fraud based on new customers and force additional verification steps such as email and phone verification for customers who display high risk characteristics ● Spot potential fraud even without a customer having signed up or having a purchase history ● Flag online payments for review before processing ● Spot abuse of loyalty programs or Try Before You Buy programs

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Contact Centers - Contact Lens for Amazon Connect

Amazon Contact Lens for Amazon Connect is a service for Amazon’s Connect omnichannel contact center. It provides automated ways to analyse customer interactions with agents and provide Features: opportunities for a better ● Analytics and sentiment analysis for call transcripts and conversations customer experience and ● Use Natural Language Processing to search transcripts for relevant phrases such as Cancel my subscription automation of tasks ● Real-Time alerting when a customer is upset or wants to escalate a call ● Real-Time transcripts for passing calls between agents ● Redact Personally Identifiable Information from transcripts

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Contact Centers - Voice ID for Amazon Connect

Amazon Voice ID for Amazon Connect is a service for identifying a customer based on their speech pattern and Features: previous calls the customer ● Allows for customers to be identified and trigger different decisions on the call has made. Currently in workflow, such as allowing for less identification questions preview ● Provide a authentication score threshold, so customers can be declared as authorised if Voice ID has a confidence interval of above say 90% that the customer is the same ● For customers who are not identified, provide additional screening questions to identify them ● Use Identification to customise the experience for the customer, for example if your workflow identifies them, then presenting options based on their subscription first may be more useful to the customer

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Questions

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

NOTES ✔ Presentation will be made available on the AWS User Group website ✔ Complete 1-minute feedback to help us develop future AWS User Group webinars > APN Immersion Day CSAT (qualtrics.com)

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh Amazon Web Services User Group Edinburgh

Thank you for joining us

Machine Learning on AWS – Presented by CirrusHQ and Nimbo.sh