Visitar URL original
Could not import module 'hybrid_online_store' · Issue #5630 · feast-dev/feast · GitHub
Skip to content

Could not import module 'hybrid_online_store' #5630

Description

@fcas

Expected Behavior

Import hybrid_online_store module correctly, according to this documentation: https://github.com/feast-dev/feast/blob/master/docs/reference/online-stores/hybrid.md.

Current Behavior

Could not import module 'hybrid_online_store'

Steps to reproduce

Use the following RepoConfig:

repo_config = RepoConfig(
    **{
        "project": "prod",
        "registry": {
            "registry_type": "sql",
            "path": os.getenv("DATABASE_URL"),
            "cache_ttl_seconds": 0,
            "sqlalchemy_config_kwargs": {
                "max_overflow": 50,
                "pool_size": 5,
                "pool_recycle": 3600,
            },
        },
        "provider": "aws",
        "entity_key_serialization_version": 3,
        "online_store": {
            "type": "hybrid_online_store.HybridOnlineStore",
            "routing_tag": "store",
            "online_stores": [
                {
                    "type": "dynamodb",
                    "conf": {
                        "region": "us-east-1",
                        "max_pool_connections": 50,
                        "connect_timeout": 5,
                        "read_timeout": 10,
                        "total_max_retry_attempts": 2
                    }
                },
                {
                    "type": "redis",
                    "conf": {
                        "connection_string": os.getenv("REDIS_URL")
                    }
                }
            ],
        },
    }
)

Specifications

  • Version: 0.53.0
  • Platform: macOs 14.6.1
  • Subsystem: Python 3.12

Possible Solution

Use the following config:

repo_config = RepoConfig(
    **{
        "project": "prod",
        "registry": {
            "registry_type": "sql",
            "path": os.getenv("DATABASE_URL"),
            "cache_ttl_seconds": 0,
            "sqlalchemy_config_kwargs": {
                "max_overflow": 50,
                "pool_size": 5,
                "pool_recycle": 3600,
            },
        },
        "provider": "aws",
        "entity_key_serialization_version": 3,
        "online_store": {
            "type": "feast.infra.online_stores.hybrid_online_store.hybrid_online_store.HybridOnlineStore",
            "routing_tag": "store",
            "online_stores": [
                {
                    "type": "dynamodb",
                    "conf": {
                        "region": "us-east-1",
                        "max_pool_connections": 50,
                        "connect_timeout": 5,
                        "read_timeout": 10,
                        "total_max_retry_attempts": 2
                    }
                },
                {
                    "type": "redis",
                    "conf": {
                        "connection_string": os.getenv("REDIS_URL")
                    }
                }
            ],
        },
    }
)

Also, it's necessary to change the type attribute in hybrid_online_store.py (https://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/online_stores/hybrid_online_store/hybrid_online_store.py) from:

    type: Literal["HybridOnlineStore", "hybrid_online_store.HybridOnlineStore"] = (
        "hybrid_online_store.HybridOnlineStore"
    )

To:

    type: Literal["HybridOnlineStore", "feast.infra.online_stores.hybrid_online_store.hybrid_online_store.HybridOnlineStore"] = (
        "hybrid_online_store.HybridOnlineStore"
    )

Activity

  1. self-assigned this
    on Nov 23, 2025
  2. YassinNouh21 commented on Jan 4, 2026

    @YassinNouh21
    Collaborator

    Hi! I noticed this issue has been open for a while. I've submitted a fix in PR #5810 that adds the missing hybrid shorthand to ONLINE_STORE_CLASS_FOR_TYPE and the required __init__.py. Would appreciate a review when you have time!

  3. fcas commented on Jan 26, 2026

    @fcas
    Author

    @YassinNouh21 thanks a lot! I'll try to use this new version ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions