Skip to content
New issue

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

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

Already on GitHub? # to your account

Registry(local) in feature_store.yaml is not relative to the specified repo_path folder #1478

Closed
tedhtchang opened this issue Apr 19, 2021 · 4 comments
Labels

Comments

@tedhtchang
Copy link
Contributor

Expected Behavior

The registry: data/registry.db in the feature_store.yaml should be relative the specified repo_path?

Current Behavior

The registry: data/registry.db is relative the current working directory.

Using the Quickstart as an example, purposely running the following code outside of the feature_repo directory and with the specified repo_path:

from feast import FeatureStore
store = FeatureStore(repo_path="./feature_repo")
training_df = store.get_historical_features(
    entity_df=entity_df, 
    feature_refs = [
        'driver_hourly_stats:conv_rate',
        'driver_hourly_stats:acc_rate',
        'driver_hourly_stats:avg_daily_trips'
    ],
).to_df()
training_df.head()
...
FileNotFoundError: Registry not found at path "data/registry.db". Have you run "feast apply"?

Steps to reproduce

Specifications

  • Version: 0.10.0
  • Platform: Mac
  • Subsystem: OSX

Possible Solution

Prepend specified repo_path to the relative registry_path.

class Registry:
...
    def __init__(self, repo_path, registry_path: str, cache_ttl: timedelta):
        """
...
        elif uri.scheme == "file" or uri.scheme == "":
            if Path(registry_path).is_absolute() is False:
                registry_path = Path(repo_path).joinpath(registry_path).as_posix()
            self._registry_store = LocalRegistryStore(registry_path)
@woop
Copy link
Member

woop commented Apr 19, 2021

@tedhtchang this is a bug. It should be relative to the repo base. We've also noticed it. Happy to accept a fix, or we can get to it as part of our bug fixes.

@woop woop added the kind/bug label Apr 19, 2021
@woop
Copy link
Member

woop commented Apr 19, 2021

Actually, I will work on this today.

@woop
Copy link
Member

woop commented Apr 19, 2021

#1477 fixes this

@tedhtchang
Copy link
Contributor Author

New PR works. Thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants