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

RepoConfig cannot load its own write #4879

Open
heavenmarshal opened this issue Dec 24, 2024 · 1 comment
Open

RepoConfig cannot load its own write #4879

heavenmarshal opened this issue Dec 24, 2024 · 1 comment

Comments

@heavenmarshal
Copy link

heavenmarshal commented Dec 24, 2024

Expected Behavior

The following code should run successfully

from pathlib import Path
from feast import RepoConfig
from feast.repo_config import load_repo_config

config = RepoConfig(**{
    "project": "test",
    "registry": "./registry.db",
    "provider": "local",
    "online_store": {
        "type": "dynamodb",
        "region": "us-east-1",
    },
    "entity_key_serialization_version": 2,
})
config.write_to_path(Path("."))

load_repo_config(Path("."), Path("./feature_store.yaml"))

Current Behavior

It raises exception:

File ~/Library/Python/3.9/lib/python/site-packages/feast/repo_config.py:600, in load_repo_config(repo_path, fs_yaml_file)
    598 raw_config = yaml.safe_load(os.path.expandvars(f.read()))
    599 try:
--> 600     c = RepoConfig(**raw_config)
    601     c.repo_path = repo_path
    602     return c

File ~/Library/Python/3.9/lib/python/site-packages/feast/repo_config.py:234, in RepoConfig.__init__(self, **data)
    232 self._registry = None
    233 if "registry" not in data:
--> 234     raise FeastRegistryNotSetError()
    235 self.registry_config = data["registry"]
    237 self._offline_store = None

Steps to reproduce

see the code snippet

Specifications

  • Version: 0.42.0
  • Platform: MacOS/linux
  • Subsystem:

Possible Solution

add by_alias=True at this line

@heavenmarshal
Copy link
Author

the feature_store.yaml written by config.write_to_path:

project: test
provider: local
registry_config: ./registry.db
online_config:
  type: dynamodb
  region: us-east-1
offline_config: file
batch_engine_config: local
entity_key_serialization_version: 2

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

1 participant