概念 · 基于 AIF-C01
Ingesting data into SageMaker Feature Store
PutRecord, SDK, Spark and Data Wrangler ingestion, and what reaches the online and offline stores.
本课尚未翻译,暂以英文显示。
你在AI Practitioner中已学过
- Feature Store keeps ML features in an online store and an offline store.
- The online store serves low-latency lookups. The offline store keeps history in S3.
- Features are shared between training and serving.
PutRecord
- Use for
- Streaming, single records
- Note
- Synchronous call
SDK ingest
- Use for
- A dataframe in a notebook
- Note
- Many parallel PutRecord calls
Spark connector
- Use for
- Large batch from EMR or Glue
- Note
- Scales with Spark
Data Wrangler
- Use for
- Visual flow to features
- Note
- Export from the flow
| Path | Use for | Note |
|---|---|---|
| PutRecord | Streaming, single records | Synchronous call |
| SDK ingest | A dataframe in a notebook | Many parallel PutRecord calls |
| Spark connector | Large batch from EMR or Glue | Scales with Spark |
| Data Wrangler | Visual flow to features | Export from the flow |
1 / 2
PutRecord
- Use for
- Streaming, single records
- Note
- Synchronous call
SDK ingest
- Use for
- A dataframe in a notebook
- Note
- Many parallel PutRecord calls
Spark connector
- Use for
- Large batch from EMR or Glue
- Note
- Scales with Spark
| Path | Use for | Note |
|---|---|---|
| PutRecord | Streaming, single records | Synchronous call |
| SDK ingest | A dataframe in a notebook | Many parallel PutRecord calls |
| Spark connector | Large batch from EMR or Glue | Scales with Spark |
2 / 2
Data Wrangler
- Use for
- Visual flow to features
- Note
- Export from the flow
| Path | Use for | Note |
|---|---|---|
| Data Wrangler | Visual flow to features | Export from the flow |
是什么
Every record needs a record identifier and an event time. The identifier names the entity, such as a customer. The event time says when the values were true, as an ISO-8601 UTC string or seconds since the epoch. A record can be up to 350 KB. The online store keeps only the record with the latest event time per identifier, so a late record with an older time does not overwrite it. The offline store keeps every record.
是什么
The PutRecord API writes one record. It updates the online store at once and the offline store in batches a little later. It is also the call for streaming ingestion: a Lambda function or a Flink job reads a Kinesis or Kafka stream and calls PutRecord. For batch, the SageMaker Python SDK ingest method sends a dataframe with many PutRecord calls in parallel. The Feature Store Spark connector ingests Spark dataframes at scale from EMR or Glue. Data Wrangler can export a flow to Feature Store.
是什么
The offline store is a folder in S3, written as Parquet or as Apache Iceberg tables, with a table in the Glue Data Catalog. Athena queries it, and training jobs read from it. A feature group can have the online store, the offline store or both. Choose both when training needs history and serving needs low latency.
要记住
- Required: a record identifier and an event time. Record up to 350 KB.
- PutRecord: one record, online store at once, offline store in batches.
- Streaming ingestion: Lambda or Flink reads the stream and calls PutRecord.
- Batch: SDK ingest for dataframes, Spark connector for large volumes, Data Wrangler export.
要记住
- Online store keeps the latest event time. Offline store keeps every record.
- Offline store is S3 (Parquet or Iceberg) with a Glue catalog table.
考试中
- “Stream clickstream features into the online store” points to PutRecord from a Lambda or Flink consumer.
- “Ingest a very large Spark dataframe of features” points to the Feature Store Spark connector.
- “Query the full feature history with SQL” points to the offline store and Athena.
本任务内容 · 1.1
- S3 as the ML data lake
- Choosing storage: S3, EFS, EBS, FSx and transfer tools
- Extracting data from databases and search
- Data formats: Parquet, ORC, Avro, CSV, JSON, RecordIO
Kinesis Data Streams
Firehose
Managed Flink
MSK
- Troubleshooting ingestion and storage capacity
Catalog and Lake Formation
- Merging data from multiple sources
- Choosing and configuring a vector store
OpenSearch
- Aurora and RDS PostgreSQL with pgvector
- Ingesting text, image, audio and video
- Ingesting data into SageMaker Feature Store