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

Use elegant way to get all features for a project and fix potential concurrency issues #368

Closed
wants to merge 11 commits into from
5 changes: 4 additions & 1 deletion feathr_project/feathr/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ def __init__(self, config_path:str = "./feathr_config.yaml", local_workspace_dir
'feature_registry', 'purview', 'delimiter')
self.azure_purview_name = self.envutils.get_environment_variable_with_default(
'feature_registry', 'purview', 'purview_name')
self.type_system_initialization = self.envutils.get_environment_variable_with_default(
'feature_registry', 'purview', 'type_system_initialization')
# initialize the registry no matter whether we set purview name or not, given some of the methods are used there.
self.registry = _FeatureRegistry(self.project_name, self.azure_purview_name, self.registry_delimiter, project_registry_tag, config_path = config_path, credential=self.credential)
self.registry = _FeatureRegistry(self.project_name, self.azure_purview_name, self.registry_delimiter, project_registry_tag, config_path = config_path, credential=self.credential, type_system_initialization=self.type_system_initialization)

def _check_required_environment_variables_exist(self):
"""Checks if the required environment variables(form feathr_config.yaml) is set.
Expand Down Expand Up @@ -752,6 +754,7 @@ def get_features_from_registry(self, project_name: str) -> Dict[str, FeatureBase
feature_dict = {}
# add those features into a dict for easier lookup
for anchor in registry_anchor_list:
feature_dict[anchor.name] = anchor
for feature in anchor.features:
feature_dict[feature.name] = feature
for feature in registry_derived_feature_list:
Expand Down
Loading