2 weeks ago, in my part 3 post of my ML.NET adventure, i wrote about AutoML through Command Line Interface CLI and how i generated and i wish to expand more on them
What AutoML does and its coverage
As of time of writing, there are 3 that has incorporated into AutoML,
I also understand from Microsoft Docs that there will be future machine learning tasks that can be incorporated.
The various commands possible
> mlnet auto-train --task binary-classification --dataset "customer-feedback.tsv" --label-column-name Sentiment
> mlnet auto-train --task regression --dataset "cars.csv" --label-column-name Price
> mlnet auto-train --task multiclass-classification --dataset "Training.csv" --label-column-name "Risk" --max-exploration-time 600
Output from ML.NET
After running the respective commands for ML.NET, you will noticed 1 folder that will consists of
Logs – The logs file consists of a full logs with information on all the iterations that have happened while evaluating the algorithms.
ConsoleApp – This application, in C#, allows you to run and make predictions like an end-user applicaiton
it consists of MLModel.zip which is a serialized model that is ready to use for running predictions
it also consists of the code that was used to generate the model which we can use for retraining purposes.
Quality of the generated model
Understanding more on the quality of the model that was generated.
You will notice –
with Binary Classification – comes
with Multiclass Classification – comes
with Regression – comes
You will be able to see how to understand the metrics via this link – https://docs.microsoft.com/en-us/dotnet/machine-learning/resources/metrics
Last week, i did the first post on ML.NET covering the basics and its various steps required to get a model up and use it – I will cover how to go about preparing, coding and using them in the later posts.
Two of the key steps involved are
1. Loading the data
2. Transforming the data
3. Training and Generating the model
4. Using the trained model
In this tutorial, we will focus on getting the environment in your computer correct so that we can prepare and start doing ML.NET. Kindly note that this tutorial is written for Windows Environment. As of time of writing, i am on Windows 10 with Visual Studio 2017 Enterprise.
I attempted to start by calling the command (You can start by going to Command Prompt and type straight away)
but i was thrown with the error –
'mlnet' is not recognized as an internal or external command, operable program or batch file.
I recognized that i do not have mlnet installed. I then run
dotnet tool install -g mlnet
and what? –
No executable found matching command "dotnet-tool"
Based on some search, concluded it is due to the fact that dotnet tool is only available in .NET CORE 2.1.3 onwards and I am running – 2.1.2
Went on to https://dotnet.microsoft.com/download/dotnet-core/2.2 and downloaded dotnet core 2.2 (as of time of writing .net 3 is in preview and hence I did not use yet). Do note that the release was not compatible with VS 2017 and if you are using VS 17, there is another version for you to download.
After installing, restart your computer and let it install again by running the command.
dotnet tool install -g mlnet
Note that you have to wait. Nothing will happen for some time and it will just magically works after that!
Despite my deployment has been a success and active, when i navigate to the online link, it presents me with a blank page with a “Site Under Construction” error in the title.
It was due to the deployment process may have some malfunctioned and app_offline.htm is still there.
The solution is simple, go into App Service > Console and type in the command
My configuration was BitBucket and linked to Azure App Service via the Deployment Center and it auto pulls from my Master branch.
One fine day, the deployment failed and threw me this error.
I am not sure what caused the locked but here’s the solution but upon inspection of the logs, i received this.
Fatal: Unable to create ‘D:/home/site/repository/.git/index.lock’: File exists.Another git process seems to be running in this repository, e.g. an editor opened by ‘git commit’. Please make sure all processes are terminated then try again. If it still fails, a git processmay have crashed in this repository earlier: remove the file manually to continue. D:\Program Files\Git\cmd\git.exe checkout master –force
Go into your App Service > Console > Navigate to the folder and use rm command to remove it.
Thereafter, go back to your deployment center and click on Sync and it will work magically.
A quick note on Web.config file in the ASP.NET project. It is worth noting that the file is a XML File (read this for more info – https://msdn.microsoft.com/en-us/library/ff400235.aspx )
One issue that hindered my process earlier was that the content in the value has special character it in, particularly, one of my SQL server’s password has a special character in it.
I would have to go and replace them accordingly. For instance, my password is <Password1& (note that < and ” is inclusive), i would have to change it to
You can refer to the list here – https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references