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

"AttributeError: project" when call registry.list_saved_datasets #3881

Closed
zeroprop opened this issue Jan 11, 2024 · 3 comments
Closed

"AttributeError: project" when call registry.list_saved_datasets #3881

zeroprop opened this issue Jan 11, 2024 · 3 comments

Comments

@zeroprop
Copy link

zeroprop commented Jan 11, 2024

I'm trying print all datasets in my project.
print(store.registry.list_saved_datasets('PROJECT_NAME'))

Expected Behavior

List of all datasets in project

Current Behavior

Traceback (most recent call last):
  File "C:\Users\user\PycharmProjects\feast-service\test.py", line 64, in <module>
    enriched_df = prepare_dataset(store, df)
  File "C:\Users\user\PycharmProjects\feast-service\test.py", line 43, in prepare_dataset
    print(store.registry.list_saved_datasets('PROJECT_NAME'))
  File "C:\Users\user\PycharmProjects\feast-service\venv\lib\site-packages\feast\infra\registry\registry.py", line 696, in list_saved_datasets
    return proto_registry_utils.list_saved_datasets(registry_proto, project)
  File "C:\Users\user\PycharmProjects\feast-service\venv\lib\site-packages\feast\infra\registry\proto_registry_utils.py", line 217, in list_saved_datasets
    if saved_dataset.project == project:
AttributeError: project

Steps to reproduce

  1. Create Feature Store
  2. Call registry.list_saved_datasets method

Specifications

  • Version:
    feast==0.31.1
  • Platform:
    Windows

Possible Solution

I think in list_saved_datasets() we should use saved_dataset.spec.project instead of saved_dataset.project. As in get_saved_dataset() method

def get_saved_dataset(
    registry_proto: RegistryProto, name: str, project: str
) -> SavedDataset:
    for saved_dataset in registry_proto.saved_datasets:
        if saved_dataset.spec.name == name and saved_dataset.spec.project == project:
            return SavedDataset.from_proto(saved_dataset)
    raise SavedDatasetNotFound(name, project=project)
@jeremyary
Copy link
Collaborator

heya @sudohainguyen I see you peeked around a bit here, any thoughts? Thanks!

@tokoko
Copy link
Collaborator

tokoko commented Mar 19, 2024

This is already fixed in the latest version after #3717

@jeremyary
Copy link
Collaborator

ack on fix w/3717. Thanks!

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

No branches or pull requests

3 participants