আমাজন সেজমেকার ফিচার স্টোর provides an end-to-end solution to automate feature engineering for machine learning (ML). For many ML use cases, raw data like log files, sensor readings, or transaction records need to be transformed into meaningful features that are optimized for model training.
Feature quality is critical to ensure a highly accurate ML model. Transforming raw data into features using aggregation, encoding, normalization, and other operations is often needed and can require significant effort. Engineers must manually write custom data preprocessing and aggregation logic in Python or Spark for each use case.
This undifferentiated heavy lifting is cumbersome, repetitive, and error-prone. The SageMaker Feature Store Feature Processor reduces this burden by automatically transforming raw data into aggregated features suitable for batch training ML models. It lets engineers provide simple data transformation functions, then handles running them at scale on Spark and managing the underlying infrastructure. This enables data scientists and data engineers to focus on the feature engineering logic rather than implementation details.
In this post, we demonstrate how a car sales company can use the Feature Processor to transform raw sales transaction data into features in three steps:
- Local runs of data transformations.
- Remote runs at scale using Spark.
- Operationalization via pipelines.
We show how SageMaker Feature Store ingests the raw data, runs feature transformations remotely using Spark, and loads the resulting aggregated features into a বৈশিষ্ট্য গ্রুপ. These engineered features are can then be used to train ML models.
For this use case, we see how SageMaker Feature Store helps convert the raw car sales data into structured features. These features are subsequently used to gain insights like:
- Average and maximum price of red convertibles from 2010
- Models with best mileage vs. price
- Sales trends of new vs. used cars over the years
- Differences in average MSRP across locations
We also see how SageMaker Feature Store pipelines keep the features updated as new data comes in, enabling the company to continually gain insights over time.
সমাধান ওভারভিউ
We work with the dataset car_data.csv
, which contains specifications such as model, year, status, mileage, price, and MSRP for used and new cars sold by the company. The following screenshot shows an example of the dataset.
The solution notebook feature_processor.ipynb
contains the following main steps, which we explain in this post:
- Create two feature groups: one called
car-data
for raw car sales records and another calledcar-data-aggregated
for aggregated car sales records. - ব্যবহার
@feature_processor
decorator to load data into the car-data feature group from আমাজন সিম্পল স্টোরেজ সার্ভিস (Amazon S3)। - চালান
@feature_processor code
remotely as a Spark application to aggregate the data. - Operationalize the feature processor via সেজমেকার পাইপলাইন and schedule runs.
- Explore the feature processing pipelines and বংশ in অ্যামাজন সেজমেকার স্টুডিও.
- Use aggregated features to train an ML model.
পূর্বশর্ত
To follow this tutorial, you need the following:
For this post, we refer to the following নোটবই, which demonstrates how to get started with Feature Processor using the SageMaker Python SDK.
Create feature groups
To create the feature groups, complete the following steps:
- Create a feature group definition for
car-data
নিম্নরূপ:
The features correspond to each column in the car_data.csv
ডেটাসেট (Model
, Year
, Status
, Mileage
, Price
, এবং MSRP
).
- Add the record identifier
id
and event timeingest_time
to the feature group:
- Create a feature group definition for
car-data-aggregated
নিম্নরূপ:
For the aggregated feature group, the features are model year status, average mileage, max mileage, average price, max price, average MSRP, max MSRP, and ingest time. We add the record identifier model_year_status
and event time ingest_time
to this feature group.
- এখন, তৈরি করুন
car-data
বৈশিষ্ট্য গ্রুপ:
- তৈরি করুন
car-data-aggregated
বৈশিষ্ট্য গ্রুপ:
You can navigate to the SageMaker Feature Store option under উপাত্ত সেজমেকার স্টুডিওতে হোম menu to see the feature groups.
Use the @feature_processor decorator to load data
In this section, we locally transform the raw input data (car_data.csv
) from Amazon S3 into the car-data
feature group using the Feature Store Feature Processor. This initial local run allows us to develop and iterate before running remotely, and could be done on a sample of the data if desired for faster iteration.
সঙ্গে সঙ্গে @feature_processor
decorator, your transformation function runs in a Spark runtime environment where the input arguments provided to your function and its return value are Spark DataFrames.
- ইনস্টল করুন Feature Processor SDK থেকে সেজমেকার পাইথন এসডিকে and its extras using the following command:
The number of input parameters in your transformation function must match the number of inputs configured in the @feature_processor
decorator. In this case, the @feature_processor
decorator has car-data.csv
as input and the car-data
feature group as output, indicating this is a batch operation with the target_store
as OfflineStore
:
- সংজ্ঞায়িত করুন
transform()
function to transform the data. This function performs the following actions:- Convert column names to lowercase.
- Add the event time to the
ingest_time
কলাম। - Remove punctuation and replace missing values with NA.
- কল করুন
transform()
function to store the data in thecar-data
বৈশিষ্ট্য গ্রুপ:
The output shows that the data is ingested successfully into the car-data feature group.
এর আউটপুট transform_df.show()
ফাংশন নিম্নরূপ:
We have successfully transformed the input data and ingested it in the car-data
বৈশিষ্ট্য গ্রুপ।
Run the @feature_processor code remotely
In this section, we demonstrate running the feature processing code remotely as a Spark application using the @remote
decorator described earlier. We run the feature processing remotely using Spark to scale to large datasets. Spark provides distributed processing on clusters to handle data that is too big for a single machine. The @remote
decorator runs the local Python code as a single or multi-node SageMaker training job.
- ব্যবহার
@remote
decorator along with the@feature_processor
decorator as follows:
সার্জারির spark_config
parameter indicates this is run as a Spark application
. The SparkConfig instance configures the Spark configuration and dependencies.
- সংজ্ঞায়িত করুন
aggregate()
function to aggregate the data using PySpark SQL and user-defined functions (UDFs). This function performs the following actions:- বন্ধ করা
model
,year
, এবংstatus
তৈরী করতেmodel_year_status
. - Take the average of
price
তৈরী করতেavg_price
. - Take the max value of
price
তৈরী করতেmax_price
. - Take the average of
mileage
তৈরী করতেavg_mileage
. - Take the max value of
mileage
তৈরী করতেmax_mileage
. - Take the average of
msrp
তৈরী করতেavg_msrp
. - Take the max value of
msrp
তৈরী করতেmax_msrp
. - গ্রুপ দ্বারা
model_year_status
.
- বন্ধ করা
- চালান
aggregate()
function, which creates a SageMaker training job to run the Spark application:
As a result, SageMaker creates a training job to the Spark application defined earlier. It will create a Spark runtime environment using the sagemaker-spark-processing image
.
We use SageMaker Training jobs here to run our Spark feature processing application. With SageMaker Training, you can reduce startup times to 1 minute or less by using warm pooling, which is unavailable in SageMaker Processing. This makes SageMaker Training better optimized for short batch jobs like feature processing where startup time is important.
- To view the details, on the SageMaker console, choose প্রশিক্ষণ কাজ অধীনে প্রশিক্ষণ in the navigation pane, then choose the job with the name
aggregate-<timestamp>
.
এর আউটপুট মোট() function generates telemetry code. Inside the output, you will see the aggregated data as follows:
When the training job is complete, you should see following output:
Operationalize the feature processor via SageMaker pipelines
In this section, we demonstrate how to operationalize the feature processor by promoting it to a SageMaker pipeline and scheduling runs.
- First, upload the transformation_code.py file containing the feature processing logic to Amazon S3:
- Next, create a Feature Processor pipeline car_data_pipeline ব্যবহার করে .to_pipeline() ফাংশন:
- To run the pipeline, use the following code:
- Similarly, you can create a pipeline for aggregated features called
car_data_aggregated_pipeline
and start a run. - সময়সূচী
car_data_aggregated_pipeline
to run every 24 hours:
In the output section, you will see the ARN of pipeline and the pipeline execution role, and the schedule details:
- To get all the Feature Processor pipelines in this account, use the
list_pipelines()
function on the Feature Processor:
আউটপুট নিম্নরূপ হবে:
We have successfully created SageMaker Feature Processor pipelines.
Explore feature processing pipelines and ML lineage
In SageMaker Studio, complete the following steps:
- On the SageMaker Studio console, on the হোম মেনু, নির্বাচন করুন পাইপলাইন.
You should see two pipelines created: car-data-ingestion-pipeline
এবং car-data-aggregated-ingestion-pipeline
.
- পছন্দ
car-data-ingestion-pipeline
.
It shows the run details on the ফাঁসি ট্যাব।
- To view the feature group populated by the pipeline, choose ফিচার স্টোর অধীনে উপাত্ত এবং নির্বাচন করুন
car-data
.
You will see the two feature groups we created in the previous steps.
- পছন্দ
car-data
বৈশিষ্ট্য গ্রুপ।
You will see the features details on the বৈশিষ্ট্য ট্যাব।
View pipeline runs
To view the pipeline runs, complete the following steps:
- উপরে Pipeline Executions tab, select
car-data-ingestion-pipeline
.
This will show all the runs.
- Choose one of the links to see the details of the run.
- To view lineage, choose Lineage.
The full lineage for car-data
shows the input data source car_data.csv
and upstream entities. The lineage for car-data-aggregated
shows the input car-data
বৈশিষ্ট্য গ্রুপ।
- বেছে নিন Load features এবং তারপর নির্বাচন করুন Query upstream lineage on
car-data
এবংcar-data-ingestion-pipeline
to see all the upstream entities.
The full lineage for car-data
feature group should look like the following screenshot.
Similarly, the lineage for the car-aggregated-data
feature group should look like the following screenshot.
SageMaker Studio provides a single environment to track scheduled pipelines, view runs, explore lineage, and view the feature processing code.
The aggregated features such as average price, max price, average mileage, and more in the car-data-aggregated
feature group provide insight into the nature of the data. You can also use these features as a dataset to train a model to predict car prices, or for other operations. However, training the model is out of scope for this post, which focuses on demonstrating the SageMaker Feature Store capabilities for feature engineering.
পরিষ্কার কর
চলমান চার্জ এড়াতে এই পোস্টের অংশ হিসাবে তৈরি সংস্থানগুলি পরিষ্কার করতে ভুলবেন না।
- Disable the scheduled pipeline via the
fp.schedule()
method with the state parameter asDisabled
:
- Delete both feature groups:
The data residing in the S3 bucket and offline feature store can incur costs, so you should delete them to avoid any charges.
- Delete the S3 objects.
- রেকর্ড মুছে ফেলুন from the feature store.
উপসংহার
In this post, we demonstrated how a car sales company used SageMaker Feature Store Feature Processor to gain valuable insights from their raw sales data by:
- Ingesting and transforming batch data at scale using Spark
- Operationalizing feature engineering workflows via SageMaker pipelines
- Providing lineage tracking and a single environment to monitor pipelines and explore features
- Preparing aggregated features optimized for training ML models
By following these steps, the company was able to transform previously unusable data into structured features that could then be used to train a model to predict car prices. SageMaker Feature Store enabled them to focus on feature engineering rather than the underlying infrastructure.
We hope this post helps you unlock valuable ML insights from your own data using SageMaker Feature Store Feature Processor!
For more information on this, refer to বৈশিষ্ট্য প্রক্রিয়াকরণ and the SageMaker example on Amazon SageMaker Feature Store: Feature Processor Introduction.
লেখক সম্পর্কে
ধবল শাহ AWS-এর একজন সিনিয়র সলিউশন আর্কিটেক্ট, মেশিন লার্নিংয়ে বিশেষজ্ঞ। ডিজিটাল নেটিভ ব্যবসার উপর দৃঢ় ফোকাস দিয়ে, তিনি গ্রাহকদেরকে AWS লাভ করতে এবং তাদের ব্যবসায়িক বৃদ্ধি চালাতে ক্ষমতা দেন। একজন ML উত্সাহী হিসাবে, ধবল ইতিবাচক পরিবর্তন নিয়ে আসে এমন প্রভাবশালী সমাধান তৈরি করার জন্য তার আবেগ দ্বারা চালিত হয়৷ অবসর সময়ে, তিনি ভ্রমণের প্রতি তার ভালবাসায় লিপ্ত হন এবং তার পরিবারের সাথে মানসম্পন্ন মুহূর্তগুলি লালন করেন।
Ninad Joshi is a Senior Solutions Architect at AWS, helping global AWS customers design secure, scalable, and cost effective solutions in cloud to solve their complex real-world business challenges. His work in Machine Learning (ML) covers a wide range of AI/ML use cases, with a primary focus on End-to-End ML, Natural Language Processing, and Computer Vision. Prior to joining AWS, Ninad worked as a software developer for 12+ years. Outside of his professional endeavors, Ninad enjoys playing chess and exploring different gambits.
- এসইও চালিত বিষয়বস্তু এবং পিআর বিতরণ। আজই পরিবর্ধিত পান।
- PlatoData.Network উল্লম্ব জেনারেটিভ Ai. নিজেকে ক্ষমতায়িত করুন। এখানে প্রবেশ করুন.
- প্লেটোএআইস্ট্রিম। Web3 ইন্টেলিজেন্স। জ্ঞান প্রসারিত. এখানে প্রবেশ করুন.
- প্লেটোইএসজি। কার্বন, ক্লিনটেক, শক্তি, পরিবেশ সৌর, বর্জ্য ব্যবস্থাপনা. এখানে প্রবেশ করুন.
- প্লেটো হেলথ। বায়োটেক এবং ক্লিনিক্যাল ট্রায়াল ইন্টেলিজেন্স। এখানে প্রবেশ করুন.
- উত্স: https://aws.amazon.com/blogs/machine-learning/unlock-ml-insights-using-the-amazon-sagemaker-feature-store-feature-processor/
- : আছে
- : হয়
- :না
- :কোথায়
- $ ইউপি
- 1
- 10
- 100
- 11
- 116
- 12
- 13
- 14
- 15%
- 16
- 20
- 24
- 26%
- 40
- 7
- 8
- 9
- a
- সক্ষম
- হিসাব
- সঠিক
- দিয়ে
- স্টক
- যোগ
- থোক
- মোট পরিমাণ
- এআই / এমএল
- সব
- অনুমতি
- বরাবর
- এছাড়াও
- মর্দানী স্ত্রীলোক
- আমাজন সেজমেকার
- অ্যামাজন ওয়েব সার্ভিসেস
- an
- এবং
- অন্য
- কোন
- আবেদন
- রয়েছি
- আর্গুমেন্ট
- AS
- At
- স্বয়ংক্রিয় পদ্ধতি প্রয়োগ করা
- স্বয়ংক্রিয়ভাবে
- সহজলভ্য
- গড়
- এড়াতে
- ডেস্কটপ AWS
- মৌলিক
- BE
- আগে
- সর্বোত্তম
- উত্তম
- বিশাল
- উভয়
- আনা
- বোঝা
- ব্যবসায়
- ব্যবসা
- by
- নামক
- CAN
- ক্ষমতা
- গাড়ী
- কার
- কেস
- মামলা
- চ্যালেঞ্জ
- পরিবর্তন
- চার্জ
- দাবা
- বেছে নিন
- মেঘ
- কোড
- স্তম্ভ
- কলাম
- আসে
- কোম্পানি
- সম্পূর্ণ
- জটিল
- কম্পিউটার
- কম্পিউটার ভিশন
- কনফিগারেশন
- কনফিগার
- কনসোল
- ধারণ
- অবিরাম
- রূপান্তর
- মূল্য
- খরচ
- পারা
- কভার
- সৃষ্টি
- নির্মিত
- সৃষ্টি
- তৈরি করা হচ্ছে
- সংকটপূর্ণ
- কষ্টকর
- প্রথা
- গ্রাহকদের
- উপাত্ত
- ডেটাসেট
- সংজ্ঞায়িত
- সংজ্ঞা
- প্রদর্শন
- প্রদর্শিত
- প্রমান
- প্রদর্শক
- নির্ভরতা
- বর্ণিত
- বিবরণ
- নকশা
- আকাঙ্ক্ষিত
- বিস্তারিত
- বিকাশ
- বিকাশকারী
- বিভিন্ন
- ডিজিটাল
- অক্ষম
- প্রদর্শক
- বণ্টিত
- সম্পন্ন
- ড্রাইভ
- চালিত
- প্রতি
- পূর্বে
- কার্যকর
- প্রচেষ্টা
- ক্ষমতা
- সক্ষম করা
- সম্ভব
- সক্রিয়
- সর্বশেষ সীমা
- প্রচেষ্টা
- প্রকৌশল
- প্রকৌশলী
- নিশ্চিত করা
- কৌতূহলী ব্যক্তি
- সত্ত্বা
- পরিবেশ
- ঘটনা
- প্রতি
- উদাহরণ
- এক্সিকিউট
- ফাঁসি
- প্রস্থান করা হচ্ছে
- ব্যাখ্যা করা
- অন্বেষণ করুণ
- এক্সপ্লোরিং
- পরিবার
- দ্রুত
- বৈশিষ্ট্য
- বৈশিষ্ট্য
- ফাইল
- নথি পত্র
- কেন্দ্রবিন্দু
- গুরুত্ত্ব
- অনুসরণ করা
- অনুসরণ
- অনুসরণ
- জন্য
- টুকরার ন্যায়
- থেকে
- সম্পূর্ণ
- ক্রিয়া
- ক্রিয়াকলাপ
- লাভ করা
- উত্পন্ন
- পাওয়া
- বিশ্বব্যাপী
- গ্রুপ
- গ্রুপের
- উন্নতি
- হাতল
- হ্যান্ডলগুলি
- আছে
- he
- হেডার
- ভারী
- ভারী উত্তোলন
- সাহায্য
- সাহায্য
- এখানে
- হাইলাইট
- অত্যন্ত
- তার
- হোম
- আশা
- ঘন্টার
- কিভাবে
- কিভাবে
- যাহোক
- এইচটিএমএল
- HTTPS দ্বারা
- ID
- আইডেন্টিফায়ার
- if
- ভাবমূর্তি
- প্রভাবী
- বাস্তবায়ন
- আমদানি
- গুরুত্বপূর্ণ
- in
- সুদ্ধ
- ইঙ্গিত
- তথ্য
- তথ্য
- পরিকাঠামো
- প্রারম্ভিক
- ইনপুট
- ইনপুট
- ভিতরে
- সূক্ষ্মদৃষ্টি
- অর্ন্তদৃষ্টি
- ইনস্টল
- উদাহরণ
- মধ্যে
- IT
- পুনরাবৃত্তির
- এর
- কাজ
- জবস
- যোগদান
- JPG
- রাখা
- ভাষা
- বড়
- শিক্ষা
- কম
- যাক
- লেভারেজ
- উদ্ধরণ
- মত
- বংশ
- লিঙ্ক
- তালিকা
- বোঝা
- লোড
- স্থানীয়
- স্থানীয়ভাবে
- লগ ইন করুন
- যুক্তিবিদ্যা
- দেখুন
- মত চেহারা
- ভালবাসা
- মেশিন
- মেশিন লার্নিং
- প্রধান
- তৈরি করে
- পরিচালক
- ম্যানুয়ালি
- অনেক
- ম্যাচ
- সর্বোচ্চ
- সর্বাধিক
- এমডিএক্স
- অর্থপূর্ণ
- মেনু
- পদ্ধতি
- মিনিট
- অনুপস্থিত
- ML
- মডেল
- মডেল
- মারার
- মনিটর
- অধিক
- অবশ্যই
- নাম
- নাম
- স্থানীয়
- প্রাকৃতিক
- স্বাভাবিক ভাষা প্রক্রিয়াকরণ
- প্রকৃতি
- নেভিগেট করুন
- ন্যাভিগেশন
- প্রয়োজন
- প্রয়োজন
- নতুন
- নোড
- নোটবই
- সংখ্যা
- of
- অফলাইন
- প্রায়ই
- on
- ONE
- নিরন্তর
- কেবল
- অপারেশন
- অপারেশনস
- অপ্টিমাইজ
- পছন্দ
- or
- অন্যান্য
- আমাদের
- বাইরে
- আউটপুট
- বাহিরে
- শেষ
- নিজের
- শার্সি
- স্থিতিমাপ
- পরামিতি
- অংশ
- আবেগ
- সম্পাদন করা
- সঞ্চালিত
- পাইপলাইন
- Plato
- প্লেটো ডেটা ইন্টেলিজেন্স
- প্লেটোডাটা
- কেলি
- জনবহুল
- ধনাত্মক
- পোস্ট
- pr
- ভবিষ্যদ্বাণী করা
- আগে
- পূর্বে
- মূল্য
- দাম
- প্রাথমিক
- পূর্বে
- প্রক্রিয়াজাতকরণ
- প্রসেসর
- পেশাদারী
- প্রচার
- প্রদান
- প্রদত্ত
- উপলব্ধ
- পাইথন
- গুণ
- পরিসর
- বরং
- কাঁচা
- বাস্তব জগতে
- নথি
- রেকর্ড
- লাল
- হ্রাস করা
- হ্রাস
- পড়ুন
- অপসারণ
- পুনরাবৃত্তিমূলক
- প্রতিস্থাপন করা
- প্রয়োজন
- Resources
- ফল
- ফলে এবং
- প্রত্যাবর্তন
- ভূমিকা
- চালান
- দৌড়
- রান
- s
- ঋষি নির্মাতা
- বিক্রয়
- বিক্রয়
- মাপযোগ্য
- স্কেল
- তফসিল
- তালিকাভুক্ত
- পূর্বপরিকল্পনা
- বিজ্ঞানীরা
- সুযোগ
- SDK
- এসডিএন
- সেকেন্ড
- অধ্যায়
- নিরাপদ
- দেখ
- জ্যেষ্ঠ
- সেবা
- সংক্ষিপ্ত
- উচিত
- প্রদর্শনী
- শো
- গুরুত্বপূর্ণ
- সহজ
- একক
- একক পরিবেশ
- So
- সফটওয়্যার
- বিক্রীত
- সমাধান
- সলিউশন
- সমাধান
- উৎস
- স্ফুলিঙ্গ
- বিশেষজ্ঞ
- স্পেসিফিকেশনের
- নিদিষ্ট
- খেলা
- শুরু
- শুরু
- প্রারম্ভকালে
- রাষ্ট্র
- অবস্থা
- প্রারম্ভিক ব্যবহারের নির্দেশাবলী
- স্টোরেজ
- দোকান
- ডেটা সংরক্ষণ করুন
- স্ট্রিং
- শক্তিশালী
- কাঠামোবদ্ধ
- চিত্রশালা
- জমা
- পরবর্তীকালে
- সফল
- সফলভাবে
- এমন
- উপযুক্ত
- টেবিল
- চেয়ে
- যে
- সার্জারির
- রাষ্ট্র
- তাদের
- তাহাদিগকে
- তারপর
- এইগুলো
- এই
- তিন
- সময়
- বার
- থেকে
- অত্যধিক
- শীর্ষ
- পথ
- অনুসরণকরণ
- রেলগাড়ি
- প্রশিক্ষণ
- লেনদেন
- রুপান্তর
- রুপান্তর
- রূপান্তরের
- রুপান্তরিত
- রূপান্তর
- ভ্রমণ
- প্রবণতা
- অভিভাবকসংবঁধীয়
- দুই
- আদর্শ
- ধরনের
- ui
- অধীনে
- নিম্নাবস্থিত
- আনলক
- আপডেট
- us
- ব্যবহার
- ব্যবহার ক্ষেত্রে
- ব্যবহৃত
- ব্যবহার
- দামি
- মূল্য
- মানগুলি
- বিভিন্ন
- যানবাহন
- মাধ্যমে
- চেক
- দৃষ্টি
- vs
- উষ্ণ
- ছিল
- we
- ওয়েব
- ওয়েব সার্ভিস
- যে
- ব্যাপক
- প্রশস্ত পরিসর
- ইচ্ছা
- সঙ্গে
- হয়া যাই ?
- কাজ করছে
- কর্মপ্রবাহ
- লেখা
- বছর
- বছর
- আপনি
- আপনার
- zephyrnet