Skip to content

Add Feast feature store example#52

Draft
tmvfb wants to merge 4 commits intomainfrom
feature/feast-example
Draft

Add Feast feature store example#52
tmvfb wants to merge 4 commits intomainfrom
feature/feast-example

Conversation

@tmvfb
Copy link
Copy Markdown
Member

@tmvfb tmvfb commented Apr 29, 2026

No description provided.

@tmvfb tmvfb changed the title Add Feast feature store examples with MLflow integration Add Feast feature store example Apr 29, 2026
Comment thread feast/feast_example.ipynb
{
"cell_type": "code",
"execution_count": null,
"id": "f2b288da",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pip install here needs the redis extra, otherwise materialization to Redis fails at runtime. Should be:

!pip install -q "feast[redis]" scikit-learn mlflow

Tested on perfect-shastasaurus — without [redis], materialize crashes with a missing dependency error.

Comment thread feast/features.py
# When you request features, you provide entity values (e.g. driver_id=1001).
driver = Entity(
name="driver_id",
description="Unique driver identifier",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This produces a DeprecationWarning:

DeprecationWarning: Entity value_type will be mandatory in the next release. Please specify a value_type for entity 'driver_id'.

Easy fix — add value_type:

from feast.value_type import ValueType

driver = Entity(
    name="driver_id",
    description="Unique driver identifier",
    value_type=ValueType.INT64,
)

Comment thread feast/feast_example.ipynb
"\n",
"# Adjust the tracking URI if your cluster uses a different location\n",
"mlflow.set_tracking_uri(\"http://mlflow-mlflow-tracking-server.mlflow.svc.cluster.local:80\")\n",
"mlflow.set_experiment(\"feast-driver-prediction\")\n",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails with RestException: INTERNAL_ERROR: Response: {'detail': 'Authentication required'} because MLflow on prokube requires authentication via the OIDC proxy.

On prokube notebooks, MLflow access is normally pre-configured via a PodDefault that injects the correct MLFLOW_TRACKING_URI and auth token. Setting the tracking URI manually to the internal service bypasses the auth layer.

This whole block should probably be replaced with just:

import mlflow

mlflow.set_experiment("feast-driver-prediction")

...and rely on the environment variable MLFLOW_TRACKING_URI that the PodDefault already sets. If users don't have the MLflow PodDefault enabled, the notebook should mention that as a prerequisite.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails with RestException: INTERNAL_ERROR: Response: {'detail': 'Authentication required'} because MLflow on prokube requires authentication via the OIDC proxy.

On prokube notebooks, MLflow access is normally pre-configured via a PodDefault that injects the correct MLFLOW_TRACKING_URI and auth token. Setting the tracking URI manually to the internal service bypasses the auth layer.

This whole block should probably be replaced with just:

import mlflow

mlflow.set_experiment("feast-driver-prediction")

...and rely on the environment variable MLFLOW_TRACKING_URI that the PodDefault already sets. If users don't have the MLflow PodDefault enabled, the notebook should mention that as a prerequisite.

pure ai slop, but it did not work and i really got an auth error :(

Copy link
Copy Markdown
Member Author

@tmvfb tmvfb May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol where the hell did it decide to get MLflow from

AI can't test a proper MLflow setup without my intermission of course (I need to give it a token)

Haven't tested (and even looked at this!) myself, will take the effort on Monday and clean this up, sorry for my AI slop haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants