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

Saved Datasets breaks CLI registry-dump #3715

Closed
malcolmk181 opened this issue Aug 8, 2023 · 0 comments · Fixed by #3717
Closed

Saved Datasets breaks CLI registry-dump #3715

malcolmk181 opened this issue Aug 8, 2023 · 0 comments · Fixed by #3717

Comments

@malcolmk181
Copy link
Contributor

malcolmk181 commented Aug 8, 2023

Expected Behavior

After creating a saved dataset, the CLI command feast registry-dump should dump the contents of the registry to the terminal.

Current Behavior

After creating a saved dataset, the CLI command feast registry-dump breaks, with the following error:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/feast", line 8, in <module>
    sys.exit(cli())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/feast/cli.py", line 562, in registry_dump_command
    click.echo(registry_dump(repo_config, repo_path=repo))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/feast/usage.py", line 299, in wrapper
    raise exc.with_traceback(traceback)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/feast/usage.py", line 288, in wrapper
    return func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/feast/repo_operations.py", line 353, in registry_dump
    registry_dict = registry.to_dict(project=project)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/feast/infra/registry/base_registry.py", line 648, in to_dict
    self.list_saved_datasets(project=project), key=lambda item: item.name
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/feast/infra/registry/registry.py", line 696, in list_saved_datasets
    return proto_registry_utils.list_saved_datasets(registry_proto, project)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/feast/infra/registry/proto_registry_utils.py", line 217, in list_saved_datasets
    if saved_dataset.project == project:
AttributeError: project

This error is also replicated with a local clone of the master branch.

Steps to reproduce

  1. Create a saved dataset and save it with store.create_saved_dataset()
  2. Run feast registry-dump

This can be replicated with this repository: https://github.com/malcolmk181/feast-dqm-tutorial/tree/61a8d46c1452e48d51504b1b2c252426d557e87e

Clone the repository and convert the demo.py into a notebook using jupyter nbconvert demo.py --to notebook. This notebook generally follows the Validating Historical Features tutorial. If you run the cells up to and not including the cell that creates the saved dataset, feast registry-dump will run successfully, and dump the registry contents to the terminal. If you run the cell that creates the saved dataset and repeat feast registry-dump, the error will occur.

Specifications

  • Version: Feast 0.31.1 and Feast SDK 0.1.dev3032, Python 3.10.11
  • Platform: Replicated in Debian 11.7 and macOS 12.6.8
  • Subsystem:

Possible Solution

The error is thrown by line 217 of the list_saved_dataset() function in sdk/python/feast/infra/registry/proto_registry_utils.py:

if saved_dataset.project == project:

I deserialized the registry.db file and after referencing the proto files found that the project attribute was successfully logged on the saved dataset object within the registry. It appears that within the list_saved_datasets() function that the saved_dataset proto needs to use .spec to access the project attribute. This would be consistent with the get_saved_dataset() function:

if saved_dataset.spec.name == name and saved_dataset.spec.project == project:

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