Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not identify the source type being added." Error when listing feature views #1

Closed
jeina7 opened this issue Aug 23, 2021 · 3 comments

Comments

@jeina7
Copy link

jeina7 commented Aug 23, 2021

Expected Behavior

feast feature-views list works properly.

Current Behavior

It shows ValueError: Could not identify the source type being added.

Traceback (most recent call last):
  File "/usr/local/bin/feast", line 33, in <module>
    sys.exit(load_entry_point('feast==0.12.0', 'console_scripts', 'feast')())
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/feast-0.12.0-py3.6.egg/feast/cli.py", line 231, in feature_view_list
    for feature_view in store.list_feature_views():
  File "/usr/local/lib/python3.6/dist-packages/feast-0.12.0-py3.6.egg/feast/usage.py", line 151, in exception_logging_wrapper
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/feast-0.12.0-py3.6.egg/feast/feature_store.py", line 169, in list_feature_views
    return self._registry.list_feature_views(self.project)
  File "/usr/local/lib/python3.6/dist-packages/feast-0.12.0-py3.6.egg/feast/registry.py", line 370, in list_feature_views
    feature_views.append(FeatureView.from_proto(feature_view_proto))
  File "/usr/local/lib/python3.6/dist-packages/feast-0.12.0-py3.6.egg/feast/feature_view.py", line 253, in from_proto
    batch_source = DataSource.from_proto(feature_view_proto.spec.batch_source)
  File "/usr/local/lib/python3.6/dist-packages/feast-0.12.0-py3.6.egg/feast/data_source.py", line 376, in from_proto
    raise ValueError("Could not identify the source type being added.")
ValueError: Could not identify the source type being added.

Steps to reproduce

I am using hdfs host, and made the sample table on default database. (default.feast_test exists in hdfs.)
feast apply works well with these files, but it throws error when listing the feature views as above.

  • feature_store.yaml
project: feature_repo
registry: data/registry.db
provider: local
offline_store:
    type: feast_hive.HiveOfflineStore
    host: ***.com # hdfs host
    database: default
    port: 10000
    auth_mechanism: GSSAPI
    kerberos_service_name: 'hive'
online_store:
    path: data/online_store.db
  • hive_example.py
# This is an example feature definition file

from google.protobuf.duration_pb2 import Duration

from feast import Entity, Feature, FeatureView, ValueType
from feast_hive import HiveSource

# Read data from Hive table
# Need make sure the table_ref exists and have data before continue.
driver_hourly_stats = HiveSource(
    table_ref='default.feast_test', 
    event_timestamp_column="datetime", 
    created_timestamp_column="created"
)

# Define an entity for the driver.
driver = Entity(name="driver_id", value_type=ValueType.INT64, description="driver id",)

# Define FeatureView
driver_hourly_stats_view = FeatureView(
    name="feast_test",
    entities=["driver_id"],
    ttl=Duration(seconds=86400 * 1),
    features=[
        Feature(name="conv_rate", dtype=ValueType.FLOAT),
        Feature(name="acc_rate", dtype=ValueType.FLOAT),
        Feature(name="avg_daily_trips", dtype=ValueType.INT64),
    ],
    online=True,
    input=driver_hourly_stats,
    tags={},
)

It makes the same issue when I try to generate train data following with official docs. The store cannot get_historical_features because it Could not identify the source type being added.

I assume the reason is that it uses /usr/local/lib/python3.6/dist-packages/feast-0.12.0-py3.6.egg/feast/data_source.py file instead of feast_hive/data_source.py when executing feast feature-views list, and obviously the original feast package doesn't have HiveSource.

I saw your issue, and assume that HiveSource would be the official supported offline-store in upcoming release, but wonder if this issue is intended in this moment or not. Could it be fixed before the official release?

@bennfocus
Copy link
Owner

Hello @jeina7 , thanks for trying this project and reporting issue.

This project is still being actively developed, I am going to make a first workable release in couple of days.

I will poke you then, so pls try it later.

@jeina7
Copy link
Author

jeina7 commented Aug 25, 2021

Appreciate for your works. I would keep around!
Thank you.

@bennfocus
Copy link
Owner

@jeina7 I just published first stable version, could you pls try it again?

Felix-neko pushed a commit to Felix-neko/feast-hive that referenced this issue Mar 10, 2022
…ffline store

Merge in AFM/neofeast from impala_support to main

* commit '2be40a900f8982b52f551618e63b62f06f406d57':
  Adding impala support in hive adapter for offline store
  Adding impala support in hive adapter for offline store
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

No branches or pull requests

2 participants