Defina feature views con Feast
Declare entidades y características en un registro.
Defina feature views con Feast es una lección gratuita de MLOps Academy en CoddyKit. Esta es la lección 2 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de MLOps Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de MLOps Academy incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
The Building Blocks
In Feast you describe features with code: an Entity, a data source, and a Feature View. Get these three right and the rest follows. 🏗️
What an Entity Is
An Entity is the thing your features describe, like a driver or a customer. It is the key you will look features up by later.
driver = Entity(name="driver", join_keys=["driver_id"])Point at Your Data
A data source tells Feast where the raw feature values live, such as a Parquet file or a warehouse table.
src = FileSource(path="driver_stats.parquet", timestamp_field="event_timestamp")The Feature View
A FeatureView groups related features for one entity and links them to a source. It is the heart of a Feast definition.
Declaring Fields
Inside a Feature View, each Field names a feature and its data type, so Feast knows the schema it will serve.
Field(name="conv_rate", dtype=Float32)Putting It Together
One Feature View ties the entity, schema, and source into a single object Feast can manage. 🔗
fv = FeatureView(name="driver_stats", entities=[driver], schema=[Field(name="conv_rate", dtype=Float32)], source=src)The TTL Window
A Feature View's ttl sets how long a value stays valid. Past that window, Feast treats the feature as missing rather than stale.
ttl=timedelta(days=1)The Timestamp Column
Every source needs an event timestamp column. It records when each value was true, which makes time-correct lookups possible.
The Feature Repo
Your definitions live in a feature repo folder with a feature_store.yaml config. Feast scans Python files there to find your objects.
Apply the Definitions
Running feast apply registers your entities and feature views into the registry. Nothing is live until you apply.
feast applyThe Registry
The registry is Feast's catalog of every entity and feature view. Teammates query it to discover what features already exist. 📒
Quick Check
Which object does a Feature View group features around?
Recap
You defined Feast objects: an Entity, a source, and a Feature View with fields and a ttl, then ran feast apply to register them. Next, you'll serve them online.
Preguntas frecuentes
¿La lección «Defina feature views con Feast» es gratis?
Sí — el texto completo de «Defina feature views con Feast» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de MLOps Academy, actualiza a CoddyKit PRO. El curso de MLOps Academy incluye 4 lecciones en total.
¿Qué aprenderé en «Defina feature views con Feast»?
Declare entidades y características en un registro. Practicas MLOps Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar MLOps Academy?
No se requiere experiencia previa. MLOps Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 2 de 4.
¿Cuánto tiempo toma la lección «Defina feature views con Feast»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de MLOps Academy?
Sí. Cada lección de MLOps Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- Por qué existen los feature stores
- Defina feature views con Feast
- Materialice características en un almacén online
- Obtenga características correctas para cada momento