-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Expected Behavior
When specifying "sql" as the registry type via the python SDK, feast uses the appropriate config class.
Current Behavior
When specifying "sql" as the registry type via the python SDK, calling the FeatureStore object results in this error:
feast.errors.FeastClassImportError: Could not import class 'SqlRegistryConfig' from module 'feast.infra.registry.sql'
get_registry_config_from_type builds the class name here: https://github.com/feast-dev/feast/blob/master/sdk/python/feast/repo_config.py#L499 causing the config to look for the SqlRegistryConfig class, which doesn't exist. This is due to the code adding Config to the end of the current registry class, which works when specifying "file" (which uses the RegistryConfig class, which exists), but not for "sql".
Steps to reproduce
Set my_repo_config = RepoConfig(registry=RepoConfig(registry_type="sql")) and then call FeatureStore(config=my_repo_config), which will then result in the error described above.
Specifications
- Version: 0.30.0
- Platform: Ubuntu
- Subsystem:
Possible Solution
Option 1:
Change the REGISTRY_CLASS_FOR_TYPE dict so that "sql" maps to "feast.infra.registry.registry.Registry" instead of "feast.infra.registry.sql.SqlRegistry" - This may also have to be done for "snowflake.registry"
Option 2:
Create the SqlRegistryConfig class in feast.infra.registry.sql. I'm also not seeing a SnowflakeRegistryConfig class in the feast.infra.registry.snowflake module, so that may need to be created as well.
Option 3:
Alter the get_registry_config_from_type function so it builds out the class names differently based on they registry type
https://github.com/feast-dev/feast/blob/master/sdk/python/feast/repo_config.py#L499