Skip to content

Commit

Permalink
feat: Graduate write_to_online_store out of experimental status
Browse files Browse the repository at this point in the history
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Mar 21, 2022
1 parent 04dea73 commit 6faabfb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 0 additions & 5 deletions sdk/python/feast/feature_store.py
Expand Up @@ -1159,11 +1159,6 @@ def write_to_online_store(
"""
ingests data directly into the Online store
"""
if not flags_helper.enable_direct_ingestion_to_online_store(self.config):
raise ExperimentalFeatureNotEnabled(
flags.FLAG_DIRECT_INGEST_TO_ONLINE_STORE
)

# TODO: restrict this to work with online StreamFeatureViews and validate the FeatureView type
feature_view = self._registry.get_feature_view(
feature_view_name, self.project, allow_cache=allow_registry_cache
Expand Down
2 changes: 0 additions & 2 deletions sdk/python/feast/flags.py
@@ -1,12 +1,10 @@
FLAG_ALPHA_FEATURES_NAME = "alpha_features"
FLAG_ON_DEMAND_TRANSFORM_NAME = "on_demand_transforms"
FLAG_AWS_LAMBDA_FEATURE_SERVER_NAME = "aws_lambda_feature_server"
FLAG_DIRECT_INGEST_TO_ONLINE_STORE = "direct_ingest_to_online_store"
ENV_FLAG_IS_TEST = "IS_TEST"

FLAG_NAMES = {
FLAG_ALPHA_FEATURES_NAME,
FLAG_ON_DEMAND_TRANSFORM_NAME,
FLAG_AWS_LAMBDA_FEATURE_SERVER_NAME,
FLAG_DIRECT_INGEST_TO_ONLINE_STORE,
}
4 changes: 0 additions & 4 deletions sdk/python/feast/flags_helper.py
Expand Up @@ -37,7 +37,3 @@ def enable_on_demand_feature_views(repo_config: RepoConfig) -> bool:

def enable_aws_lambda_feature_server(repo_config: RepoConfig) -> bool:
return feature_flag_enabled(repo_config, flags.FLAG_AWS_LAMBDA_FEATURE_SERVER_NAME)


def enable_direct_ingestion_to_online_store(repo_config: RepoConfig) -> bool:
return feature_flag_enabled(repo_config, flags.FLAG_DIRECT_INGEST_TO_ONLINE_STORE)
9 changes: 8 additions & 1 deletion sdk/python/feast/repo_config.py
@@ -1,3 +1,4 @@
import logging
import os
from pathlib import Path
from typing import Any
Expand All @@ -23,6 +24,8 @@
from feast.importer import import_class
from feast.usage import log_exceptions

_logger = logging.getLogger(__name__)

# These dict exists so that:
# - existing values for the online store type in featurestore.yaml files continue to work in a backwards compatible way
# - first party and third party implementations can use the same class loading code path.
Expand Down Expand Up @@ -278,7 +281,11 @@ def _validate_flags(cls, v):

for flag_name, val in v.items():
if flag_name not in flags.FLAG_NAMES:
raise ValueError(f"Flag name, {flag_name}, not valid.")
_logger.warn(
"Unrecognized flag: %s. This feature may be invalid, or may refer "
"to a previously experimental feature which has graduated to production.",
flag_name,
)
if type(val) is not bool:
raise ValueError(f"Flag value, {val}, not valid.")

Expand Down

0 comments on commit 6faabfb

Please sign in to comment.