Skip to main content

Posts

MLOps Zoomcamp 2024 – Module 3

  Module 3: Orchestration Source mlops-zoomcamp/03-orchestration at main · DataTalksClub/mlops-zoomcamp (github.com) Homework The goal of this homework is to train a simple model for predicting the duration of a ride, but use Mage for it. We'll use the same NYC taxi dataset , the Yellow taxi data for 2023. Question 1. Run Mage First, let's run Mage with Docker Compose. Follow the quick start guideline. What's the version of Mage we run? (You can see it in the UI) Answer of Question 1: v0.9.71 Question 2. Creating a project Now let's create a new project. We can call it "homework_03", for example. How many lines are in the created metadata.yaml file? 35 45 55 65 Solution docker exec -it mlops-magic-platform-1 bash root@4c0edc9c9a86:/home/src# cd mlops root@4c0edc9c9a86:/home/src/mlops# mage init homework_03 root@4c0edc9c9a86:/home/src/mlops# cd homework_03 root@4c0edc9c9a86
Recent posts

MLOps Zoomcamp 2024 – Module 2

Module 2 – Experiment-Tracking Source https://github.com/DataTalksClub/mlops-zoomcamp/tree/main/02-experiment-tracking Homework Q1. Install MLflow To get started with MLflow you’ll need to install the MLflow Python package. For this we recommend creating a separate Python environment, for example, you can use conda environments, and then install the package there with pip or conda. Once you installed the package, run the command mlflow –version and check the output. What’s the version that you have? import mlflow mlflow . __version__ '2.13.0' Answer of Q1: 2.13.0 Q2. Download and preprocess the data We’ll use the Green Taxi Trip Records dataset to predict the duration of each trip. Download the data for January, February and March 2023 in parquet format from here. Use the script preprocess_data.py located in the folder homework to preprocess the data. The script will: load the data from the folder <TAXI_DATA_FOLDER> (the folder where you have downloaded the data), fit a

MLOps Zoomcamp 2024 - Module 1 - Introduction

   Source https://github.com/DataTalksClub/mlops-zoomcamp/tree/829c51c11962e427e62b0afc63d6c4f7d6e34ac0/01-intro Homework The goal of this homework is to train a simple model for predicting the duration of a ride - similar to what we did in this module. Q1. Downloading the data We'll use the same NYC taxi dataset, but instead of "Green Taxi Trip Records", we'll use "Yellow Taxi Trip Records". Download the data for January and February 2023. Read the data for January. How many columns are there? 16 17 18 19 import pandas as pd # Load the data for January 2023 url_january = 'https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2023-01.parquet' df_january = pd . read_parquet(url_january) df_january 3066766 rows × 19 columns Answer Q1 : 19 Q2. Computing duration Now let's compute the duration variable. It should contain the duration of a ride in minutes. What's the standard deviation of the trips duration in January? 32.59 42.59 52

Module 2 – Working with Data in Pandas (Dataframe Analysis)

  Module 2 – Working with Data in Pandas (Dataframe Analysis) Source:  1.  [Stock Markets Analytics Zoomcamp] Module2 “Working with Data in Pandas” (youtube.com) 2.  https://docs.google.com/presentation/d/e/2PACX-1vT5XMStGsWf5tQkt-ulyk4MmWoSXTP4PqglHsrzGIlpd_cQ7nAzxNJVmUS7L67vAbYybZhxMNGZy-kY/pub?start=false&loop=false&delayms=3000 Module 2 Homework In this homework, we’re going to combine data from various sources to process it in Pandas and generate additional fields. If not stated otherwise, please use the  Colab  covered at the livestream to re-use the code snippets. Question 1: IPO Filings Web Scraping and Data Processing What’s the total sum ($m) of 2023 filings that happenned of Fridays? Re-use the [Code Snippet 1] example to get the data from web for this endpoint:  https://stockanalysis.com/ipos/filings/ Convert the ‘Filing Date’ to datetime(), ‘Shares Offered’ to float64 (if ‘-‘ is encountered, populate with NaNs). Define a new field ‘Avg_price’ based on the “Price Ra