feast.errors.FeatureViewNotFoundException: Feature view driver_stats does not exist

20 Views Asked by At

I'm using feast to create a Feature store for my MLOPs project. However when I execute the command:

# Retrieve training data
    training_df = fs.get_historical_features(
        entity_df=orders,
        features=[
            "driver_stats:conv_rate",
            "driver_stats:acc_rate",
            "driver_stats:avg_daily_trips",
        ],
    ).to_df()

Then get the following error:

feast.errors.FeatureViewNotFoundException: Feature view driver_stats does not exist

I have redefined the Features in the features.py file as follows:

from datetime import timedelta

from feast import FeatureView, Field
from feast.stream_feature_view import stream_feature_view
from feast.types import Float32, Int32
from pyspark.sql import DataFrame

from data_sources import driver_stats_batch_source, driver_stats_stream_source
from entities import driver

driver_stats_view = FeatureView(
    name="driver_stats",
    description="driver features",
    entities=[driver],
    ttl=timedelta(days=36500),
    schema=[
        Field(name="conv_rate", dtype=Float32),
        Field(name="acc_rate", dtype=Float32),
        Field(name="avg_daily_trips", dtype=Int32),
    ],
    online=True,
    source=driver_stats_batch_source,
    tags={},
    owner="[email protected]",
)

I use feast[redis]=0.29.0.

0

There are 0 best solutions below