Skip to content

get_historical_features triggers warning: _list_feature_views will make breaking changes. Please use _list_batch_feature_views instead #4640

Closed

Description

@dandawg

Expected Behavior

No warning message on running get_historical_features function

Current Behavior

The get_historical_features` function triggers the following warning:

WARNING:root:_list_feature_views will make breaking changes. Please use _list_batch_feature_views instead. _list_feature_views will behave like _list_all_feature_views in the future.

Steps to reproduce

This can be reproduced following steps from the quickstart guide:

# setup a feature store
feast init feature_store
cd feature_store/feature_repo

feast apply

Then run in a Python shell run:

In [1]: from datetime import datetime
   ...: import pandas as pd
   ...: 
   ...: from feast import FeatureStore
   ...: 
   ...: # Note: see https://docs.feast.dev/getting-started/concepts/feature-retrieval for 
   ...: # more details on how to retrieve for all entities in the offline store instead
   ...: entity_df = pd.DataFrame.from_dict(
   ...:     {
   ...:         # entity's join key -> entity values
   ...:         "driver_id": [1001, 1002, 1003],
   ...:         # "event_timestamp" (reserved key) -> timestamps
   ...:         "event_timestamp": [
   ...:             datetime(2021, 4, 12, 10, 59, 42),
   ...:             datetime(2021, 4, 12, 8, 12, 10),
   ...:             datetime(2021, 4, 12, 16, 40, 26),
   ...:         ],
   ...:         # (optional) label name -> label values. Feast does not process these
   ...:         "label_driver_reported_satisfaction": [1, 5, 3],
   ...:         # values we're using for an on-demand transformation
   ...:         "val_to_add": [1, 2, 3],
   ...:         "val_to_add_2": [10, 20, 30],
   ...:     }
   ...: )
   ...: 
   ...: store = FeatureStore(repo_path=".")
   ...: 
   ...: training_df = store.get_historical_features(
   ...:     entity_df=entity_df,
   ...:     features=[
   ...:         "driver_hourly_stats:conv_rate",
   ...:         "driver_hourly_stats:acc_rate",
   ...:         "driver_hourly_stats:avg_daily_trips",
   ...:         "transformed_conv_rate:conv_rate_plus_val1",
   ...:         "transformed_conv_rate:conv_rate_plus_val2",
   ...:     ],
   ...: ).to_df()

# warning triggered
WARNING:root:_list_feature_views will make breaking changes. Please use _list_batch_feature_views instead. _list_feature_views will behave like _list_all_feature_views in the future.

Specifications

  • Version: 0.40.1
  • Platform: Mac M2, Sequoia 15.0.1
  • Subsystem: Python 3.11

Possible Solution

First, let's try following the suggestion in the warning: use _list_batch_feature_views instead.

Activity

  1. dandawg commented on Oct 17, 2024

    @dandawg
    ContributorAuthor

    This same warning also hits when doing a curl query on the online server. If the fix works here, it should probably be applied there as well.

  2. IliaOzhmegov commented on Oct 17, 2024

    @IliaOzhmegov

    I have the same warning!

    requires-python = ">=3.11"
    dependencies = [
        "feast[aws,snowflake]==0.40.0",
    ...
    
  3. added
    good first issue
    starter-ticket
    on Oct 19, 2024
  4. dmartinol commented on Oct 21, 2024

    @dmartinol
    Contributor

    FYI, this message was removed in the meantime and probably you won't get it anymore when the next release is built.
    See the related commit

    @dandawg

  5. franciscojavierarceo commented on Oct 22, 2024

    @franciscojavierarceo
    Member

    Was resolved by #4435

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuekind/bugpriority/p2starter-ticket

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions