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

bug in version 0.42.0: Could not import module 'feast.infra.online_stores.sqlite' while attempting to load class 'SqliteOnlineStoreConfig' #4929

Open
davzoku opened this issue Jan 17, 2025 · 0 comments

Comments

@davzoku
Copy link

davzoku commented Jan 17, 2025

Expected Behavior

followed https://docs.feast.dev/getting-started/quickstart

  1. pip install feast
  2. feast init tutorial
  3. cd tutorial/feature_repo
  4. python test_workflow.py
  5. feast UI

test_workflow.py completed without error, however i faced error related to 'SqliteOnlineStoreConfig' and pydantic(?).

Note i tried to pip install sqlite_vec as mentioned in #4293 but it didn't work too.

see below.

Current Behavior

feast ui           
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/feast/importer.py", line 26, in import_class
    module = importlib.import_module(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/homebrew/lib/python3.11/site-packages/feast/infra/online_stores/sqlite.py", line 82, in <module>
    class SqliteOnlineStoreConfig(FeastConfigBaseModel, VectorStoreConfig):
  File "/opt/homebrew/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 172, in __new__
    set_model_fields(cls, bases, config_wrapper, types_namespace)
  File "/opt/homebrew/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 400, in set_model_fields
    fields, class_vars = collect_model_fields(cls, bases, config_wrapper, types_namespace, typevars_map=typevars_map)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pydantic/_internal/_fields.py", line 154, in collect_model_fields
    raise NameError(
NameError: Field name "vector_enabled" shadows an attribute in parent "VectorStoreConfig"; you might want to use a different field name with "alias='vector_enabled'".

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/homebrew/bin/feast", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/feast/cli.py", line 206, in ui
    store = create_feature_store(ctx)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/feast/repo_operations.py", line 387, in create_feature_store
    return FeatureStore(repo_path=str(repo), fs_yaml_file=fs_yaml_file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/feast/feature_store.py", line 142, in __init__
    self.config = load_repo_config(self.repo_path, fs_yaml_file)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/feast/repo_config.py", line 600, in load_repo_config
    c = RepoConfig(**raw_config)
        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/feast/repo_config.py", line 230, in __init__
    super().__init__(**data)
  File "/opt/homebrew/lib/python3.11/site-packages/pydantic/main.py", line 159, in __init__
    __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
  File "/opt/homebrew/lib/python3.11/site-packages/feast/repo_config.py", line 412, in _validate_online_store_config
    online_config_class = get_online_config_from_type(online_store_type)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/feast/repo_config.py", line 559, in get_online_config_from_type
    return import_class(module_name, config_class_name, config_class_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/feast/importer.py", line 31, in import_class
    raise FeastModuleImportError(module_name, class_name) from e
feast.errors.FeastModuleImportError: Could not import module 'feast.infra.online_stores.sqlite' while attempting to load class 'SqliteOnlineStoreConfig'

Steps to reproduce

Specifications

  • Version: 0.42.0
  • Platform: Mac
  • Subsystem:

Possible Solution

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