Sunday, December 26, 2021
Hugging Face Gradio Python UI for ML
I dive into Gradio UI with Python, which is now part of Hugging Face. This is a very cool and simple to use library, it helps to build UI for ML models quickly. This is useful to share ML models with the community and run quick demos to showcase your ML model capabilities. I explain app code structure and how you can map ML model inputs and outputs with Gradio.
Labels:
Hugging Face,
Python,
UI
Saturday, December 18, 2021
TensorFlow.js Node on Docker and Kubernetes
I explain how to dockerize TensorFlow.js Node app and also run it on Kubernetes. This work was done as part of our open-source MLOps solution Skipper.
Labels:
JavaScript,
Machine Learning,
TensorFlow
Sunday, December 12, 2021
TensorFlow.js Microservice
Do you know you could run TensorFlow.js on backend with Node.js? I explain how to build microservice with TensorFlow.js based on sample MobileNet model for image classification. I'm using Skipper Lib JS lib to communicate to RabbitMQ and receive/deliver events. You will learn about the code structure, which can be used as a blueprint for your own JS microservice implementations.
Labels:
JavaScript,
Microservices,
TensorFlow
Sunday, December 5, 2021
Building Bigger Applications with FastAPI
I share a few tips and tricks on how to build a clean and readable REST API for larger apps with FastAPI framework. You will learn how to split endpoints into separate Python scripts and assign tags with prefixes for all endpoints from the given router at once.
Sunday, November 28, 2021
Merging GitHub Repo Template Changes
I explain how to merge changes from GitHub template repo. This allows developing infrastructure platform and products running on that platform independently. You can create new GitHub repo based on the template and later sync any changes from the template into that repo.
Labels:
GitHub
Sunday, November 21, 2021
OpenAI GPT-3 API Overview
GPT-3 API review. I walk through a few examples and show how it works in OpenAI's playground. You will see how GPT-3 generates SQL statement from natural text, how it creates an outline for the essay, and generates recipe directions from food ingredients. There is an option to use GPT-3 API in your applications through REST interface.
Sunday, November 14, 2021
Scale FastAPI on Kubernetes Pod
This video shows how to scale FastAPI REST endpoint running on Kubernetes Pod.
Labels:
FastAPI,
Kubernetes,
Python
Sunday, November 7, 2021
Python Numpy Array in ML Services
It can be not obvious how to pass Numpy array across separate services when running ML infra in separate containers. When data preparation service runs in a different container than training service. In this tutorial, I show how to convert Numpy to list and JSON to be able to send it through RabbitMQ message broker and consume it on the receiver side.
Labels:
Machine Learning,
Microservices,
Python,
Skipper
Monday, November 1, 2021
BIY Workflow with FastAPI, Python and Skipper
Build It Yourself. In this video, I explain how you can build workflow running with FastAPI REST generic endpoints. The best thing about it, Skipper architecture is modular and workflow runs in a separate Docker container. This means you can replace it with your own implementation if needed. I explain how workflow call is integrated into FastAPI logic and how the call is made to get the queue name from the workflow. Using this queue name and RabbitMQ message broker, event-based communication runs between containers.
Labels:
Docker,
FastAPI,
Machine Learning,
Python,
Skipper
Monday, October 25, 2021
MLOps: Extend Skipper ML Services
The goal of this video is to explain Skipper from MLOps user perspective, different blocks of Skipper and how they fit together. I show how a sample set of ML services works and how you could replace it or add your own service. Skipper engine is implemented with Python, but you could add service container implemented in any language. All runs on Kubernetes.
Labels:
FastAPI,
Kubernetes,
Machine Learning,
Python,
Skipper
Monday, October 18, 2021
Running Kubernetes on Oracle Cloud OCI
Oracle Cloud OCI provides a good environment to run your Kubernetes workloads. In this video, I show how to access Kubernetes cluster in OCI, explain artifacts related to the cluster. I show how Skipper API runs on Kubernetes deployed on OCI. Cluster runtime is accessed through cloud shell.
Labels:
Kubernetes,
Microservices,
Oracle Cloud,
Skipper
Monday, October 11, 2021
MLOps: Scaling TensorFlow Model on Kubernetes
ML model serving/prediction API can be scaled on Kubernetes by adding or removing Pod instances. I show you a live demo and explain how scaling can be done for TensorFlow model running on Kubernetes.
Labels:
Kubernetes,
MLOps,
Python
Sunday, October 3, 2021
MLOps: Sharing Model Across Services
Typically you would want to scale ML model training and ML inference/prediction services separately. This means services should not share the file storage, at least this is true for the Kubernetes cluster environment. I explain how you could transfer files across services using RabbitMQ.
Labels:
Microservices,
MLOps,
Python
Sunday, September 26, 2021
MLOps with TensorFlow and Kubernetes Powered by RabbitMQ and FastAPI
I show how to run TensorFlow model training and data processing containers in a single Pod in Kubernetes. Model training container runs as a main container and data processing as a sidecar. Running both containers in a single Pod, allow to share files in common storage. I'm using persistence volume to store TensorFlow model and stats data from the data processing container. This video shows a walk through the complete use case of data processing, model training and ML microservices communication.
Monday, September 20, 2021
RabbitMQ on Kubernetes in Skipper
RabbitMQ works great for event-based microservices implementation. Katana ML Skipper is our open source product, it helps to run workflows and connect multiple services, we are specifically specialized for ML workflows. In this video, I explain how we integrated RabbitMQ and how we run it on Kubernetes cluster. I believe this can be helpful if you are researching how to run RabbitMQ on Kubernetes cluster for your own use cases.
Labels:
Kubernetes,
Microservices,
RabbitMQ
Monday, September 13, 2021
FastAPI on Kubernetes with NGINX Ingress
A simple tutorial about a complex thing - how to expose FastAPI app to the world on Kubernets with NGINX Ingress Controller. I explain the structure of Kubernetes Pod for FastAPI along with Kubernetes service. I show how FastAPI properties should be set to be accessible through Ingress path definition. You will learn how to check the log for NGINX Ingress Controller and FastAPI Pod.
Labels:
FastAPI,
Kubernetes,
Python
Monday, August 30, 2021
TensorFlow.js Setup for React JS App (Manning liveProject)
I explain the structure of my liveProject. It is a series of five projects, I use the first one as an example (it is free). React is highly prized by developers for its ease of building simple and intuitive frontends. liveProject teaches how to use Machine Learning directly within React code and run it in the browser. After working on this liveProject, you will learn how to run PoseNet model, use data collected by PoseNet to train your own custom ML model with TensorFlow.js. React application will help to track physical workout movements, classify them and count statistics.
Labels:
JavaScript,
Machine Learning,
TensorFlow
Monday, August 23, 2021
Routing Traffic Between FastAPI Pods in Kubernetes
This is a quick tutorial to show how to route traffic between Kubernetes Pods. Both Pods are running FastAPI endpoints. I show how to create Deployment and Service elements for Kubernetes Pod, and how to refer to that service from another Pod to execute HTTP call.
Labels:
FastAPI,
Kubernetes,
Microservices,
Python
Thursday, August 19, 2021
Human Pose Estimation with TensorFlow.js and React
Want to learn #MachineLearning and #React by doing? My @ManningBooks liveProject 'Human Pose Estimation with TensorFlow.js and React' is published. Free access to Manning books is included. Try it here.
Monday, August 9, 2021
FastAPI Running on Kubernetes Pod
Step-by-step tutorial where I explain and show how to run FastAPI app on Kubernetes Pod. I keep it simple. I explain when it makes sense to use multiple containers in a single Pod and when you should put containers into different Pods.
Labels:
FastAPI,
Kubernetes,
Microservices,
Python
Monday, August 2, 2021
Dockerfile and Docker Compose Tutorial for MLOps
This is the tutorial, where I talk about MLOps, explain the difference between Dockerfile and Docker Compose YML definition file. I briefly explain what you should be aware of if planning to move your solution to Kubernetes in the future. I explain in simple words, what is Dockerfile and when Docker Compose is useful. The sample service is based on TensorFlow functionality, where we call model predict function to process serving request.
Labels:
Docker,
Machine Learning,
Microservices,
Python
Monday, July 26, 2021
Hugging Face Course and Pretrained Model Fine-Tuning
Hugging Face team recently released an online course about transformers, pretrained model fine-tuning, and sharing models on the Hugging Face hub. I went through the first part of the course related to model fine-tuning. I explain what changes I did for my previous sample related to Hugging Face model fine-tuning, based on knowledge learned from this course.
Labels:
Hugging Face,
Machine Learning,
Python,
TensorFlow
Monday, July 19, 2021
Serving ML Model with Docker, RabbitMQ, FastAPI and Nginx
In this tutorial I explain how to serve ML model using such tools as Docker, RabbitMQ, FastAPI and Nginx. The solution is based on our open-source product Katana ML Skipper (or just Skipper). It allows running ML workflow using a group of microservices. It is not limited to ML, you can run any workload using Skipper and plugin your own services. You can reach out to me if you got any questions.
Labels:
FastAPI,
Machine Learning,
Python
Wednesday, July 14, 2021
TensorFlow Decision Forests Example
With TensorFlow Decision Forests we can handle structured data without much preprocessing. There is no need to normalize numeric values, one-hot encode categorical values, or set magic values to replace missing data. I give it a try and run this new feature of TensorFlow in this video. The demo is based on the Titanic dataset taken from Kaggle.
Labels:
Machine Learning,
Python,
TensorFlow
Monday, June 28, 2021
FastAPI Background Tasks for Non-Blocking Endpoints
With FastAPI it is super easy to implement a non-blocking endpoint. This is useful when the endpoint calls logic, which should be executed asynchronously and you don't need to wait for the result, but want to return a response immediately. For example - a service that does logging. We don't want to wait until the log will be written but return the response instantly.
Labels:
FastAPI,
Microservices,
Python
Monday, June 21, 2021
Publishing Your Python Library on PyPI
I explain how to publish Python library on PyPI with Poetry. I believe this video will be useful to all Python developers, who are looking at how to create Python library and publish it. I share my experience and explain why I spent the entire day debugging the issue with library dependencies.
Labels:
Python
Monday, June 7, 2021
ML Pipeline End-to-End Solution
Are you interested to learn how to build and run a complete ML pipeline - Web API, data processing, model training, and prediction services? In this video, I explain how the end-to-end solution works using our open-source product Skipper.
Labels:
Machine Learning,
Python,
TensorFlow
Monday, May 31, 2021
FastAPI Endpoint Type with Pydantic
Pydantic library helps to define structured and clear types for FastAPI endpoints. In this video I explain how to define Pydantic type with nested list structure, I show how it works with a live demo. You will get to know how to convert input data into JSON structure. Enjoy!
Labels:
FastAPI,
Microservices,
Python
Monday, May 24, 2021
Event-Driven Microservice with RabbitMQ and FastAPI
Event-driven microservices architecture brings scalability and better application structure. In this video, I show a demo based on Web API implementation with FastAPI, Celery. The event is sent to a group of microservices through RabbitMQ broker. Services communicate with each other through RabbitMQ. Model training service calls data service to fetch and prepare data for training.
Labels:
FastAPI,
Microservices,
Python,
RabbitMQ
Monday, May 17, 2021
Web API with FastAPI, RabbitMQ and Celery
With Web API you can create access to microservice functionality. In this video, I explain how to create scalable Web API with FastAPI, Celery and RabbitMQ. Celery is responsible to execute async Web API requests and RabbitMQ enables the communication between Web API and microservices.
Labels:
Celery,
Microservices,
Python,
RabbitMQ,
REST
Monday, May 10, 2021
Celery Distributed Task Queue Display with Flower UI
I explain how you can visualize Celery distributed task queue with Flower UI. This is useful when monitoring asynchronous tasks.
Labels:
Celery,
Microservices,
Python,
RabbitMQ
Wednesday, May 5, 2021
Celery Distributed Task Queue with FastAPI for Machine Learning
This sample app demonstrates how to implement Celery distributed task queues on top of RabbitMQ broker for Machine Learning model training and data processing. We are using TensorFlow in this example to train the model. API request comes through FastAPI and it is being processed asynchronously by Celery. There is a separate API endpoint to check task status. Multiple requests can be initiated and processed at the same time in parallel. Celery tasks can be monitored using Flower monitoring tool.
Labels:
Celery,
FastAPI,
Microservices,
Python,
RabbitMQ
Monday, April 26, 2021
RabbitMQ RPC with FastAPI
I explain sample app with FastAPI endpoint. RabbitMQ is used as a postman to deliver and return message between endpoint API and backend. Backend code could run on different microservice. Multiple backends can be started for scalability.
Labels:
FastAPI,
Machine Learning,
Microservices,
Python,
RabbitMQ
Monday, April 19, 2021
Oracle Developer Tools Review
I walk through Oracle Developer Tools and giving my honest opinion about the past, present, and future of Oracle products for developers.
Labels:
Oracle
Monday, April 12, 2021
What I Hate About Machine Learning
I describe what I hate most about Machine Learning. Hopefully, this video will not scare you, but on the opposite, it will inspire you to start with Machine Learning.
Labels:
Machine Learning
Sunday, April 4, 2021
What I Love About Machine Learning
I describe what I love most about Machine Learning. Hopefully, this will inspire you to jump into the exciting field of ML.
Labels:
Machine Learning
Sunday, March 28, 2021
My Machine Learning Experience
I talk about my own Machine Learning experience and why I decided to convert to ML from enterprise software development with Oracle tools.
Labels:
Machine Learning
Sunday, March 14, 2021
FastAPI and Oracle DB Client in Docker
I describe how to dockerize Oracle DB Client with FastAPI and Uvicorn. The end result - you will be able to connect to Oracle Cloud DB and expose REST services through FastAPI in Python.
Labels:
Database,
Docker,
FastAPI,
Oracle Cloud,
Python
Sunday, March 7, 2021
TensorFlow.js Blueprint App Step by Step
I describe how to prepare data that comes from API into TensorFlow.js Dataset structure, how to shuffle, normalize, one-hot-encode, and batch the data. Next, I go on model training and explain why fitDataset is recommended way to train a neural network in TensorFlow.js. At last, I show how to do inference and print the results. This app is built with React, but the same code can be reused with any JS toolkit/framework.
Labels:
JavaScript,
Machine Learning,
React,
TensorFlow
Saturday, February 27, 2021
Rabbit MQ with Docker for Microservices
Rabbit MQ message broker helps to implement event-driven architecture for microservices. Instead of tight coupling multiple services, we can send and subscribe to events. In this video, I explain how to dockerize Rabbit MQ and provide a simple, but complete example of communication through Rabbit MQ.
Labels:
Docker,
Microservices,
Python,
RabbitMQ
Saturday, February 20, 2021
React and TensorFlow.js
I explain how to create React app with Yarn and how to integrate TensorFlow.js into that app. A simple model is trained with TensorFlow.js to give you a good starting point. I also show how to run the predict function and read the output.
Labels:
JavaScript,
Machine Learning,
React,
TensorFlow
Saturday, February 13, 2021
ML Microservice Client with Python and gRPC
In this video, I continue to talk about microservices for ML. I explain how to implement a direct call from the training service to fetch data and run training with model evaluation.
Labels:
Machine Learning,
Microservices,
Python
Saturday, February 6, 2021
ML Microservice with Python and gRPC
I explain how to implement microservice in Python for Machine Learning code. In this example, data processing is done with Pandas, Numpy, and Scikit-Learn libraries. Communication is implemented through gRPC, I explain how to send Numpy array through gRPC.
Labels:
Microservices,
Python
Sunday, January 31, 2021
FastAPI with Oracle Cloud DB, building APIs with Python
Learn by example about how to connect to Oracle Cloud DB from FastAPI without any third-party libraries. Connection to DB is optimized with connection pooling.
Labels:
FastAPI,
Oracle Cloud,
Python
Saturday, January 16, 2021
Connect to Oracle Cloud DB from Python
A quick explanation of how to connect to Oracle Autonomous Cloud Database (Always Free instance) from Python script.
Subscribe to:
Posts (Atom)