Defina visualizações de atributos com Feast
Declare entidades e atributos em um registro.
Defina visualizações de atributos com Feast é uma aula grátis de MLOps Academy no CoddyKit. Esta é a aula 2 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de MLOps Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de MLOps Academy inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em 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.
Perguntas Frequentes
A aula “Defina visualizações de atributos com Feast” é grátis?
Sim — o texto completo de “Defina visualizações de atributos com Feast” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de MLOps Academy, atualize para CoddyKit PRO. O curso de MLOps Academy inclui 4 aulas no total.
O que vou aprender em “Defina visualizações de atributos com Feast”?
Declare entidades e atributos em um registro. Você pratica MLOps Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar MLOps Academy?
Nenhuma experiência prévia é necessária. MLOps Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 2 de 4.
Quanto tempo leva a aula “Defina visualizações de atributos com Feast”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de MLOps Academy?
Sim. Cada aula de MLOps Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- Por que existem lojas de atributos
- Defina visualizações de atributos com Feast
- Materialize atributos em uma loja on-line
- Busque atributos corretos para cada momento