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

feat: SQLAlchemy Registry Support #2734

Merged
merged 17 commits into from
Jun 3, 2022
11 changes: 8 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
os: [ ubuntu-latest, macOS-latest]
os: [ ubuntu-latest ]
felixwang9817 marked this conversation as resolved.
Show resolved Hide resolved
exclude:
- os: macOS-latest
python-version: "3.8"
Expand All @@ -32,9 +32,14 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.17.7
- name: Install mysql on macOS
if: ${{ matrix.os == "macOS-latest" }}
run: |
brew install mysql
PATH=$PATH:/usr/local/mysql/bin
- name: Upgrade pip version
run: |
pip install --upgrade "pip>=21.3.1,<22.1"
pip install --upgrade "pip>=22.1,<23"
- name: Get pip cache dir
id: pip-cache
run: |
Expand Down Expand Up @@ -83,7 +88,7 @@ jobs:
python-version: "3.7"
- name: Upgrade pip version
run: |
pip install --upgrade "pip>=21.3.1,<22.1"
pip install --upgrade "pip>=22.1,<23"
- name: Setup Go
id: setup-go
uses: actions/setup-go@v2
Expand Down
8 changes: 6 additions & 2 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
)
from feast.infra.infra_object import Infra
from feast.infra.provider import Provider, RetrievalJob, get_provider
from feast.infra.registry_stores.sql import SqlRegistry
from feast.on_demand_feature_view import OnDemandFeatureView
from feast.online_response import OnlineResponse
from feast.protos.feast.core.InfraObject_pb2 import Infra as InfraProto
Expand Down Expand Up @@ -138,8 +139,11 @@ def __init__(
raise ValueError("Please specify one of repo_path or config.")

registry_config = self.config.get_registry_config()
self._registry = Registry(registry_config, repo_path=self.repo_path)
self._registry._initialize_registry()
if registry_config.registry_type == "sql":
self._registry = SqlRegistry(registry_config, None)
else:
self._registry = Registry(registry_config, repo_path=self.repo_path)
self._registry._initialize_registry()
self._provider = get_provider(self.config, self.repo_path)
self._go_server = None

Expand Down
Loading