Tag: API
-
Managing state in ReactJS
Managing state in ReactJS is crucial for building dynamic and interactive user interfaces. Here’s a breakdown of the common approaches, from simple to more complex: 1. useState Hook (Functional Components): JavaScript 2. Class Component this.state (Class Components): JavaScript 3. useReducer Hook (Complex State): JavaScript 4. Context API (Global State): JavaScript 5. Redux/Zustand/Recoil (Complex Global State): Read more
-
Apache Spark
Let’s illustrate Apache Spark with a classic “word count” example using PySpark (the Python API for Spark). This example demonstrates the fundamental concepts of distributed data processing with Spark. Scenario: You have a large text file (or multiple files) and you want to count the occurrences of each unique word in the file(s). Steps: from Read more
-
Workflow of MLOps
The workflow of MLOps is an iterative and cyclical process that encompasses the entire lifecycle of a machine learning model, from initial ideation to ongoing monitoring and maintenance in production. While specific implementations can vary, here’s a common and comprehensive workflow: Phase 1: Business Understanding & Problem Definition Phase 2: Data Engineering & Preparation Phase Read more
-
Deploying a PyTorch model on Vertex AI
Deploying a PyTorch model on Vertex AI involves several steps. Here’s a breakdown: 1. Prerequisites: 2. Steps Here’s a conceptual outline with code snippets using the Vertex AI Python SDK: 2.1 Upload Model Artifacts First, upload your trained model (house_price_model.pth) and preprocessor to your GCS bucket. 2.2 Create a Serving Container Since you’re using PyTorch, Read more
-
Call Vertex AI endpoint
To call your Vertex AI endpoint using HTTP, you’ll need to construct a POST request with the correct authorization and data format. Here’s a breakdown and an example using curl: 1. Prerequisites 2. Authorization Vertex AI API requests require an authorization header with a valid access token. If you have the Google Cloud SDK installed, Read more