#Repost – Alibaba Function compute vs @Azure function via @mteheran. Details on 💲⌛and more…

Buy Me A Coffee

Hi !

My friend Miguel shared a very interesting comparative between Alibaba Function Compute and Azure Functions. You can read his original post in Spanish here.

To be, this table is amazing:

FeatureALIBABA FUNCTION COMPUTEAZURE FUNCTION
Programming LanguagesNode.js (JS), Python, Java, PHP, dotnet (C#), customNode.js (JS), Python, Java, dotnet (C#), PowerShell, custom
Operating SystemsLinuxLinux / Windows
Supported HTTPGET, POST, PUT, PATCH, DELETE, HEADGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE
CustomizationMemoryAzure compute unit (ACU), Memory
Free Request1 Million
400,000gb seconds
1 Million
400,000gb seconds
Cost$0.2 x 1 Million requests$0.2 x 1 Million requests
RegionsChina, USA, Germany, India, Japan, Australia, IndonesiaCanada, USA, Germany, India, Japan, Australia, Brazil, Korea, France
Functions typesHttp Function, Event FunctionHttp Trigger, Timer Trigger, Azure Queue Storage trigger, Azure Service Bus Queue trigger, Azure Service Bus Topic trigger, Azure Event Grid trigger, Durable Functions HTTP starter, more …

Happy coding!

Greetings

El Bruno

¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

#Event – Let’s code a drone ✈ to follow faces 😀 with #AzureIoT (x2!) Supporting the #GlobalAI Bootcamp Singapore and Germany!

Buy Me A Coffee

Hi !

Let’s start the 2021 with some drones events supporting 2 Global AI Bootcamp events

Please each event location for specific details on time and streaming options.

Let’s code a drone to follow faces syncing everything with Azure IoT

You can control a drone using 20 lines of code. That’s the easy part. However, adding extra features like face or object detection and program the drone to follow and object or a face requires … another 20 lines of code! During this workshop we will review how to connect to a drone, how to send and receive commands from the drone, how to read the camera video feed and how to apply AI on top of the camera feed to recognize objects or faces. We will use a simple house drone ($100) and Python. And, when we review some enterprise scenarios, we will use Azure IoT to sync the drone information in IoT mode. Let’s build this!

For this session I’ll explain how to create a SDK from zero to control a DJI Tello drone, and the last past will include some examples on how to connect the drone reported information to Azure IoT.

And this is probably the last one my Microsoft MVP room-office (see below), there are some changes in the near future, so let’ rock these 2 sessions !

Happy coding!

Greetings

El Bruno

¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Publicando una Vue.js app en Azure Static Web Apps

Buy Me A Coffee

Azure ofrece (En modo preview en este momento) un servicio orientado a exponer sitios web (SPA) de una manera fácil y rápida. Este servicio es completamente gratuito en este momento y esto te va permitir sacarle jugo este servicio.

En este momento Azure Static Web Apps ofrece también integración continua con Github Actions lo que permite el despliegue continuo de nuestros sitios con una configuración bastante sencilla.

Dentro del portal de Azure vamos a encontrar el servicio de Static Web Apps (Preview) o en español

Ingresamos y creamos una nueva Static Web App.

Vamos a llenar la información general, la suscripción y grupo de recursos que queremos para este servicio

Luego vamos autorizar a Github para acceder a nuestros repos y escoger el que queramos para exponer en este servicio.

Lee el post completo aquí

Happy coding!

Greetings

El Bruno

¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

#Event – Global AI Bootcamp Toronto on Dec 12 🤖🤖🤖 @GlobAICommunity

Buy Me A Coffee

Hi !

This started to be my annual tradition: Global AI Bootcamp is the last event of the year!
And this year, we had a set of amazing session planned with the following topics:

  • Introduction to AI and Cognitive Services for Developers and Information Workers
  • Understanding Autonomous systems, Machine Teaching and Bonsai Platform
  • Knowledge Mining and MLOps

We have speakers from all around Canada and a special guest from the South !

As usual the event is free, no food this year (sorry!), however you can spend a nice Saturday morning learning about AI in your chosen location !

Registration: https://www.meetup.com/metrotorontoug/events/267883977/

Full details here 👇👇👇

Intro and Welcome

Session. 10:00 – 10:10

Kick off of the amazing event

Introduction to AI and Cognitive Services for Developers and Information Workers

Session 1. 10:10 – 11:00

Speaker: Prashant G Bhoyar | Microsoft AI MVP

“Artificial Intelligence and Machine Learning are the new buzzwords in the industry. Microsoft’s vision is to make AI accessible to every enterprise, data scientist, developer, information worker, consumer and device everywhere in the world. AI has a big role to play in the enterprise space. The field of AI is progressing at a rapid pace. Without understanding the concepts behind these advanced technologies, developers and administrators will struggle to evaluate the potential impact of new tools and solutions. In this session, we will break down the concepts behind existing technologies, outline various tools available today, and discuss the direction of AI and ML for Developers. We will cover how developers, Power Users, and Information workers can take advantage of Microsoft’s AI and Cognitive Services offerings to build real-life enterprise solutions.

You will learn:
1) Overview of Microsoft AI Platform
2) What are the cognitive services?
3) What tools are available today?
4) How to use Cognitive Services to implement real-life business solutions?

Understanding Autonomous systems, Machine Teaching and Bonsai Platform

Session 2. 11:10 – 12:00

Speaker: Ivana Tilca | Microsoft AI MVP | 3XM Group Quality Manager

Innovations in AI are creating the next wave of disruption in industrial technology. Autonomous machines are more than an expansion of automated systems: They are an entirely new way to amplify human expertise. In this session you will take a look to how to speed the creation of AI-powered automation to improve production efficiency and reduce downtime – without requiring data scientists with Project Bonsai. We will also take a look at AirSim, a simulator for drones, cars and more, built on Unreal Engine. AirSim a platform for AI research to experiment with deep learning, computer vision and reinforcement learning algorithms for autonomous vehicles.

Knowledge Mining and MLOps

Session 3. 12:10 – 13:00

Speakers: Amol Mane, Meghana Madhusudhan and Niloofar Nayebi

Knowledge mining is an emerging discipline in artificial intelligence (AI) that uses a combination of intelligent services to quickly learn from vast amounts of information. It allows organizations to deeply understand and easily explore information, uncover hidden insights, and find relationships and patterns at scale. This platform allows to use machine learning model to address any specific business need. The life cycle of the models can be managed using MLOps. MLOps, or DevOps for machine learning, enables data science and IT teams to collaborate and increase the pace of model development and deployment via monitoring, validation, and governance of machine learning models. These two solutions combined can create a strong platform to extract, enrich, and expose any hidden data within any organization.
In this session you are going to learn about three main steps in KM platform:

– Ingestion

– Enrichment

– Exploration

And three main pipelines in MLOps:

– Continues Integration

– Continues Delivery

– Deployment

Let’s meet there !

Happy coding!

Greetings

El Bruno

#Podcast – NTN 70 – Experiencias en Azure en proyectos GRANDES, Cloud vs Premise, NetCore Conf y más !

Buy Me A Coffee

Buenas!

Robert Bermejo me escribió un día sugiriendo un invitado para el podcast, y pocas horas después estábamos grabando junto a Juan Carlos y a Adrian Diaz Cervera un episodio de los buenos.

Lo primero es que cuando hablamos de Cloud, y de desarrollos en el Cloud, Robert nos comentó sobre experiencias reales, millones de usuarios, concurrencia, alta disponibilidad, etc. Y además, tuvimos la suerte de ver como se organizan sus equipos, la forma de trabajar y más.

Y claro, teniendo a 2 de los organizadores de un evento genial como es la NetCore Conf (https://netcoreconf.com/), no pudimos dejar de hablar de todo lo que sucede por detrás para que un mega evento como este salga adelante.

Un gran episodio con grandes amigos!

Speakers

  • Adrian Diaz Cervera es Arquitecto de Software y Microsoft MVP (LinkedIn)
  • Robert Bermejo Blasco  es BackEnd Technical Lead in SCRM – Lidl International Hub y Microsoft MVP Azure (LinkedIn)
  • Juan Carlos Quijano Abad es Microsoft Certified Trainer, Arquitecto de Soluciones en Azure, Consultor independiente en implantación de DevOps (LinkedIn)
  • Bruno Capuano es Canada Innovation Lead at Avanade and Microsoft AI MVP (LinkedIn)

Happy coding!

Greetings

El Bruno

#Azure – How to push / export and run a docker python flask web app on Azure

Buy Me A Coffee

Hi !

Here is an important reminder before starting:

Please do not use as a guide to deploy to production environments.

I was reading a lot about Azure Container Registry and other container scenarios. And most of the demos / tutorials are based on .Net Container Web Apps. Which is great, however there are no much information about the same process using Python Container Web Apps. So, I take this as an excuse to learn something new and here I am 😁, Let’s start.

Python Web App using Flask

I started with a simple Python Flask app. For this demo, I will use a post I write about flask and multi threading (see references for the full post).

# Bruno Capuano
# start a webserver with flask in a thread
# start a different thread +1 a shared var

from flask import Flask                                                         
import threading
import time

iCounter = 0
data = 'foo'
app = Flask(__name__)

def mainSum():
    # increment counter every second
    global iCounter
    while True:
        iCounter = iCounter + 1
        t = time.localtime()
        current_time = time.strftime("%H:%M:%S", t)    
        print(str(f"{current_time} - data {iCounter}"))
        time.sleep(1)

def startWebServer():
     app.run(host='0.0.0.0', port=8100)

@app.route("/getdata")
def main():
    global iCounter
    t = time.localtime()
    current_time = time.strftime("%H:%M:%S", t)    
    return str(f"{current_time} - data {iCounter}")

if __name__ == "__main__":
    stateThread = threading.Thread(target=mainSum)
    stateThread.daemon = True
    stateThread.start()

    webThread = threading.Thread(target=startWebServer)
    webThread.start()

This a resource consuming app, so be careful with this code!

Create a Docker container for the app

So next step was a to create a container for the app. This is my docker file. I added the commands to build and run the image at the bottom.

FROM python:3.7-slim

RUN pip install -U pip
RUN pip install --no-cache-dir flask~=1.1.2

COPY app /app

# Expose the port, default 8100
EXPOSE 8100

# Set the working directory
WORKDIR /app

# Run the flask server for the endpoints
CMD python -u app.py

# Commands to build and run the image
# docker build --pull --rm -f "Dockerfile" -t dockertoazure-webapp-service "."
# docker run -d -p 8100:8100 --privileged --name dockertoazure-webapp-service dockertoazure-webapp-service:latest

So, build and run my docker image and everything works fine !

Double check in Portainer, because I’m not a command line person

docker to azure build and run local ok in portainer

So, here my 1st milestone:

A local python web app using flask, in a docker container ready to be used elsewhere.

Push local Image to Azure

Our next step will be to have a Azure container registry, that will be the place that we will use as repository in Azure to host our images. In the references section the official definition is:

An Azure container registry is a private Docker registry in Azure where you can store and manage private Docker container images and related artifacts. In this quickstart, you create a container registry with the Azure portal. Then, use Docker commands to push a container image into the registry, and finally pull and run the image from your registry.

Quickstart: Create an Azure container registry using the Azure portal

I will assume Azure CLI is installed, so next step will be to login to azure and also login to your container.

# LOGIN TO AZURE
az login
az acr login --name <container name>.azurecr.io

Next step will require to have a tagged image for the Azure Container Registry.

# TAG LOCAL IMAGE
docker tag dockertoazure-webapp-service <container name>.azurecr.io/dockertoazure-webapp-service:v1

And, time to push the local image to the cloud !

# PUSH LOCAL IMAGE
docker push <container name>.azurecr.io/dockertoazure-webapp-service:v1

And we have 2 ways to check if the image was successfully pushed. Using the command line

# LIST CURRENT REPOSITORIES
az acr repository list -n <container name>.azurecr.io
docker to azure list azure container registry repositories

We can also use the Azure Portal to check the available repositories

docker to azure azure container repositories list

Running the Docker image in a WebApp

And here comes the tricky part. Once you select a repository, you can see the tags of the image and you can deploy a WebApp directly from there.

docker to azure docker image available options

However, if you haven’t created a WebApp using other steps, you won’t have this option enabled.

Note: My guess is that until you have an Linux usage plan created, the [Run instance] and [Deploy to web app] options will be disabled. In this scenario, you may want to skip next steps and go directly to option 2.

Let’s see both options. From the context menu, from the previous image, create a web app is just a single step

docker to azure create using the context menu

A couple of seconds later we have our App up and running

The 2nd option to create your Web App is creating a new [Web App for Containers]

And here we found a couple of interesting options, like create a web site based on a docker container:

And in the next step, we can choose the image that we uploaded in previous steps

new web app docker image details

And, again, a couple of seconds later, we also have this new App up and running

Conclusion

So, nothing new here. I haven’t found an article or post, that describes this, so I put all the pieces together and dump this lines. Again an important warning

There are much better ways to do this ! Think on a DevOps approach.

I promise to write a follow up on this one, with the step-by-step details on this using GitHub actions. Which is the right way.

Happy coding!

Greetings

El Bruno

Resources

#VS2019 – ML.NET Model Builder training using GPU, CPU and … Azure !

Buy Me A Coffee

Hi !

I my previous posts on Model Builder, I show the differences between using the CPU and GPU to train a model. There is a 3rd option, which involves an Azure ML Experiment, and performs the training on the cloud.

It took me some time, to setup this environment, mostly because I tried to use an existing Azure Compute Instance that I already have, and Model Builder needs a Compute Cluster.

Here is also important to remark, that you need to create a Dedicated GPU based Compute Cluster. There are some expenses / costs associated to these resources, so make your numbers before you start.

And, here we go, now we can move forward with the Model Builder Assistant.

I made some tests using a small image data set, and it was awesome. Training an 24 images dataset took between 8 and 9 minutes. and the results were very good. A good insight here, is the chance to get more details directly in the Azure Machine Learning portal.

We can go deep in each experiment, and take a look at some metrics like F1 Score, Precision, Recall and more.

Each Model Builder Image Classification project, will trigger several Azure ML Experiments.

  • Automated ML
  • HyperDrive
  • Preparation
  • Script

The Script experiment is the one we can open to get access to some detailed logs, and also to the ONNX model.

So, I decided to go big and test this using the set of images from a Kaggle challenge [State Farm Distracted Driver Detection] (see references). This is a 1GB image set, 22424images, with ten categories.

The 1st step is to upload the 22424 images to an Azure resource, this took some time.

And then, start tracking the progress in the Azure Machine Learning portal.

And after some time, the process triggered a timeout.

The details on the 4 experiments suggests that some limit was exceeded. I’m not sure if from the IDE or on the Azure side.

However, the experiment in charge to train the model [Run 12], got some sucess models. Acuraccy, F1 and precision were getting better

Reading some log I can see how the error was triggered on Epoch 8. I need to spend more time here to figure out what’s happened !

Note: I already reported the issue to the GitHub Repo.

As final thought. Using Azure as the training environment in Model Builder is an amazing option. A big DataSet maybe a problem, or maybe my quota is the problem. Anyways, in smaller DataSets it worked great. I’ll keep an eye in this issue and update the blog with some news.

Happy coding!

Greetings

El Bruno

References

#Event – ML.Net in Spanish and back to XR with @ivanatilca to share some #Hololens2 and #AzureKinect dev experiences @globxrcommunity

Buy Me A Coffee

Hi !

Just a self reminder post of a couple of events in my calendar.

Introduction to Machine Learning.Net

31 July 2020

Machine Learning.Net 1.5.1 is already here, so that’s the perfect excuse to chat with my colleagues from the MUG Argentina about this. This session is designed for developers who wants to start in the Machine Learning world. Machine Learning.Net is an amazing framework for this!

Important: the session will be in Spanish.

More information https://mug-it.org.ar/event.aspx?event=530

XR Session – Lessons Learned creating a multiplatform AI project for Azure Kinect and Hololens 2

6 August 2020

It all started with a 10000 kms conversation between 2 friends about how easy is to port Mixed Reality projects between platforms. So, we choose Azure Kinect and Hololens 2 as the platforms to test this out. To make this more challenging, we also decided to place custom holograms in those different platforms based on some cool Image Recognition scenarios (custom Artificial Intelligence rocks!) During this session we will review how to use MRTK, Azure Kinect SDK, Computer Vision, and other cool technologies to make this happen. And, of course, be aware that this session is full of code, hardware and demos, do not expect a lot of slides. Let’s code / build this.
Speakers: Ivana Tilca & Bruno Capuano, Both Microsoft MVP

More information https://www.meetup.com/GlobalXRTalks/events/271140960/

Happy coding!

Greetings

El Bruno

#Event – Let’s hack a drone, hack the camera and use AI! virtual with Microsoft Reactor @MSFTReactor

Buy Me A Coffee

Hi !

Today I’ll share a new version of my drone and Artificial Intelligence session, hosted by Microsoft Reactor Toronto.

The registration link and details are available here

Happy coding!

Greetings

El Bruno

#Event – Resources used during the #GlobalAI Tour, Buenos Aires, May 30. Let’s code a drone to follow faces! Using AI, Python, containers and more.

Buy Me A Coffee
Globa AI Community on Virtual Tour Logo

Hi !

The event is complete, and now is time to share the resources I used during the session

Slides

Code

https://github.com/elbruno/events/tree/master/2020%2005%2030%20Global%20AI%20Tour%20BsAs%20Drone%20AI

Resources

Happy coding!

Greetings

El Bruno