diff --git a/Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md b/Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md index 41d69e8..912f970 100644 --- a/Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md +++ b/Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md @@ -1,3 +1,4 @@ + # Sentiment Analysis using Deep Learning: Modeling - Keras with CNTK Backend The script that executes the below steps is [SentimentExtraction.py](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Code/SentimentExtraction.py) @@ -19,6 +20,10 @@ The IMDB movie dataset consists of moving reviews with positive and negative sen ## 3. CNTK Backend +If you do not have cntk installed, you can install it using +``` +pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.2-cp35-cp35m-win_amd64.whl +``` If you do not have Keras installed, you can install it using ``` pip install keras diff --git a/Docs/SentimentAnalysisOperationalization.md b/Docs/SentimentAnalysisOperationalization.md index 667c2a1..0a856a3 100644 --- a/Docs/SentimentAnalysisOperationalization.md +++ b/Docs/SentimentAnalysisOperationalization.md @@ -1,3 +1,4 @@ + # Sentiment Analysis using Deep Learning: Operationalization ## 1. Objectives @@ -25,9 +26,19 @@ If you encounter “locale.Error: unsupported locale setting” error, perform t ``` export LC_ALL=C ``` - +Change to root +``` +sudo -i +``` +Update pip to the latest: +``` +pip install –-upgrade pip +``` +Update azure to the latest: +``` +pip install --upgrade azure +``` Install azure-cli and azure-cli-ml using pip: - ``` pip install azure-cli pip install azure-cli-ml @@ -35,11 +46,29 @@ pip install azure-cli-ml In addition, change python default version and run the following commands. Local mode deployments run in docker containers on your local computer, whether that is your personal machine or a VM running on Azure. You can use local mode for development and testing. +Create a bash_aliases file +``` +gedit ~/.bash_aliases +``` +Open your ~/.bash_aliases file and add the following and save it to home directory ``` alias python=python3 +``` +Source the ~/.bash_aliases file +``` source ~/.bash_aliases -az ml env setup +``` +Setup azure ml environment +``` +az ml env setup -n – g -l +az ml env set -g -n +``` +Source the file to set up your environment variables +``` source ~/.amlenvrc +``` +To always set these variables when you log in, copy the export commands into your .bashrc file +``` cat < ~/.amlenvrc >> ~/.bashrc ``` Upload the below files to the vm (you could use scp to perform the upload): diff --git a/scenario-sentiment-analysis-deep-learning.md b/scenario-sentiment-analysis-deep-learning.md index 496cca5..645c091 100644 --- a/scenario-sentiment-analysis-deep-learning.md +++ b/scenario-sentiment-analysis-deep-learning.md @@ -26,7 +26,6 @@ Follow this link to the public GitHub repository: [https://github.com/Azure/MachineLearningSamples-SentimentAnalysis](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis) - ## Introduction Sentiment analysis is a well-known task in the realm of natural language processing. Given a set of texts, the aim is to determine the sentiment of that text. The objective of this solution is to use CNTK as the backend for Keras (a model level library, providing high-level building blocks for developing deep learning models) and implement sentiment analysis from movie reviews. @@ -68,8 +67,8 @@ The order of Hands-on Labs to carry out the solution is as follows: | Order| File Name | Related Files | |--|-----------|------| | 1 | [`DataPreparation.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisDataPreparation.md) | 'Data/sampleReviews.txt' | -| 2 | [`ModelingAndEvaluation.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisModelingDocker.md) | 'Code/SentimentExtraction.py' | -| 3 | [`ModelingAndEvaluationDocker.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md) | 'Code/SentimentExtractionDocker.py' | +| 2 | [`ModelingAndEvaluationDocker.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisModelingDocker.md) | 'Code/SentimentExtractionDocker.py' | +| 3 | [`ModelingAndEvaluationCNTK.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md) | 'Code/SentimentExtraction.py' | | 4 | [`Operationalization.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisOperationalization.md) | 'Code/Operaionalization' | ## Conclusion