Skip to content

Commit

Permalink
[Serving] Fix reference to nonexistent field
Browse files Browse the repository at this point in the history
Wrong reference was introduced in mlrun#5018 and cherry-picked to 1.6.x in mlrun#5131.

[ML-5728](https://jira.iguazeng.com/browse/ML-5728)

Cherry-pick of mlrun#5137 / c67c84a.
  • Loading branch information
gtopper committed Feb 14, 2024
1 parent f2f2f76 commit e19143b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions mlrun/serving/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def __init__(
url_prefix: str = None,
health_prefix: str = None,
feature_vector_uri: str = "",
impute_policy: dict = {},
impute_policy: dict = None,
**kwargs,
):
"""Model router with feature enrichment (from the feature store)
Expand Down Expand Up @@ -1156,13 +1156,17 @@ def __init__(
)

self.feature_vector_uri = feature_vector_uri
self.impute_policy = impute_policy
self.impute_policy = impute_policy or {}

self._feature_service = None

def post_init(self, mode="sync"):
from ..feature_store import get_feature_vector

super().post_init(mode)
self._feature_service = self.feature_vector.get_online_feature_service(
self._feature_service = get_feature_vector(
self.feature_vector_uri
).get_online_feature_service(
impute_policy=self.impute_policy,
)

Expand Down Expand Up @@ -1191,7 +1195,7 @@ def __init__(
executor_type: Union[ParallelRunnerModes, str] = ParallelRunnerModes.thread,
prediction_col_name: str = None,
feature_vector_uri: str = "",
impute_policy: dict = {},
impute_policy: dict = None,
**kwargs,
):
"""Voting Ensemble with feature enrichment (from the feature store)
Expand Down Expand Up @@ -1298,13 +1302,17 @@ def __init__(
)

self.feature_vector_uri = feature_vector_uri
self.impute_policy = impute_policy
self.impute_policy = impute_policy or {}

self._feature_service = None

def post_init(self, mode="sync"):
from ..feature_store import get_feature_vector

super().post_init(mode)
self._feature_service = self.feature_vector.get_online_feature_service(
self._feature_service = get_feature_vector(
self.feature_vector_uri
).get_online_feature_service(
impute_policy=self.impute_policy,
)

Expand Down

0 comments on commit e19143b

Please sign in to comment.