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.39.0: Could not import module 'feast.infra.online_stores.sqlite' while attempting to load class 'SqliteOnlineStoreConfig' #4293

Closed
amirali-shfz opened this issue Jun 19, 2024 · 11 comments

Comments

@amirali-shfz
Copy link

Expected Behavior

Note this error goes away when I downgrade to 0.38.0

  1. pip install 'feast[gcp]'
  2. feast init -t gcp
  3. inside the created repo: python test_workflow.py

This should just work, but I'm getting the error below.

Current Behavior

python test_workflow.py 
Traceback (most recent call last):
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/site-packages/feast/importer.py", line 26, in import_class
    module = importlib.import_module(module_name)
  File "/Users/amirali/miniconda3/envs/wfg/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/site-packages/feast/infra/online_stores/sqlite.py", line 23, in <module>
    import sqlite_vec
ModuleNotFoundError: No module named 'sqlite_vec'

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

Traceback (most recent call last):
  File "/Users/amirali/Desktop/feature_store_demo/sharp_kiwi/feature_repo/test_workflow.py", line 180, in <module>
    run_demo()
  File "/Users/amirali/Desktop/feature_store_demo/sharp_kiwi/feature_repo/test_workflow.py", line 12, in run_demo
    store = FeatureStore(repo_path=".")
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/site-packages/feast/feature_store.py", line 143, in __init__
    self.config = load_repo_config(
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/site-packages/feast/repo_config.py", line 545, in load_repo_config
    c = RepoConfig(**raw_config)
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/site-packages/feast/repo_config.py", line 188, in __init__
    super().__init__(**data)
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/site-packages/pydantic/main.py", line 176, in __init__
    self.__pydantic_validator__.validate_python(data, self_instance=self)
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/site-packages/feast/repo_config.py", line 349, in _validate_online_store_config
    online_config_class = get_online_config_from_type(online_store_type)
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/site-packages/feast/repo_config.py", line 515, in get_online_config_from_type
    return import_class(module_name, config_class_name, config_class_name)
  File "/Users/amirali/Desktop/feature_store_demo/feature_store/lib/python3.9/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

  1. pip install 'feast[gcp]'
  2. feast init -t gcp
  3. inside the created repo: python test_workflow.py

Note this error goes away when I downgrade to 0.38.0

Specifications

  • Version: 0.39.0
  • Platform: Mac
  • Subsystem:

Possible Solution

downgrade to 0.38.0

@franciscojavierarceo
Copy link
Member

I'll make a patch for this but the simple fix is to pip install sqlite_vec. Sorry about the bug here.

@amirali-shfz
Copy link
Author

cool thanks!

@franciscojavierarceo
Copy link
Member

@tokoko I'm having issues trying to get pixi working with 3.9

I'm removing the SQLite separation we had and i'm just going to add it to the default installation but when I try to recompile the pixi packages. It worked previously, so I'm confused about what changed.

pixi run --environment py39 --manifest-path infra/scripts/pixi/pixi.toml "uv pip compile --system --no-strip-extras setup.py --output-file sdk/python/requirements/py3.9-requirements.txt"
  × The current platform does not satisfy the minimal virtual package requirements
  ╰─▶ the environment 'py39' does not support 'osx-64'

@franciscojavierarceo
Copy link
Member

Here's the relevant PR: #4294

@tokoko
Copy link
Collaborator

tokoko commented Jun 19, 2024

You just need to add osx-64 here. But why do you need to move to the default install? Isn't importing it only when enabled a better option?

@mrafayaleem
Copy link

mrafayaleem commented Jun 24, 2024

downgrade to 0.38.0

This will possibly make the feast ui stop working. pip install sqlite_vec might be a better fix.

@amirali-shfz
Copy link
Author

I am using 0.38.0 and when I run feast ui I get

(feature_store2) ➜  feature_store_demo feast ui
/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/feast/ui_server.py:45: DeprecationWarning: 
        on_event is deprecated, use lifespan event handlers instead.

        Read more about it in the
        [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
        
  @app.on_event("shutdown")
/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/fastapi/applications.py:4495: DeprecationWarning: 
        on_event is deprecated, use lifespan event handlers instead.

        Read more about it in the
        [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
        
  return self.router.on_event(event_type)
Traceback (most recent call last):
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/bin/feast", line 8, in <module>
    sys.exit(cli())
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/feast/cli.py", line 172, in ui
    store.serve_ui(
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/feast/feature_store.py", line 2494, in serve_ui
    ui_server.start_server(
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/feast/ui_server.py", line 105, in start_server
    app = get_app(
  File "/Users/amirali/Desktop/repos/local/feature_store_demo/feature_store2/lib/python3.9/site-packages/feast/ui_server.py", line 54, in get_app
    ui_dir_ref = importlib_resources.files(__name__) / "ui/build/"
  File "/Users/amirali/miniconda3/envs/wfg/lib/python3.9/importlib/resources.py", line 147, in files
    return _common.from_package(_get_package(package))
  File "/Users/amirali/miniconda3/envs/wfg/lib/python3.9/importlib/resources.py", line 51, in _get_package
    raise TypeError('{!r} is not a package'.format(package))
TypeError: 'feast.ui_server' is not a package

could this be related?

@tokoko
Copy link
Collaborator

tokoko commented Jun 26, 2024

@amirali-shfz No, that's a different one, already fixed #4241

@tokoko
Copy link
Collaborator

tokoko commented Jun 26, 2024

@franciscojavierarceo Should I take this one?

@tokoko tokoko closed this as completed Jul 2, 2024
@franciscojavierarceo
Copy link
Member

I'm going to release a patch this week 👍

@franciscojavierarceo
Copy link
Member

franciscojavierarceo commented Jul 4, 2024

This has been fixed and published in 0.39.1.

CC @tokoko @jeremyary

That said, there are still failures in publishing the images. https://github.com/feast-dev/feast/actions/runs/9791956416

Screenshot 2024-07-04 at 5 48 09 AM

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

4 participants