KeyError: 'featuregroupType' when using Featurestore from Sagemaker

Hi,

I am using Hopsworks.ai, demo instance with hopsworks=1.4.1.

I have successfully connected to FeatureStore from Sagemaker. Unfortunately I was not able to install hopsworks-cloud-sdk directly from pypi (the latest version here is 1.3.0.1), so I made an installation directly from git, like that:

!pip install git+git://github.com/logicalclocks/hopsworks-cloud-sdk@branchname

I tried branch-1.4 and master as well.

So after I connect to featurestore I am able to request a featurestore, like that:

featurestore.project_featurestore()

But when I try to get a feature:

featurestore.get_feature("home_team_id")

I get an exception:

 ---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/anaconda3/envs/python3/lib/python3.6/site-packages/hops/featurestore.py in get_feature(feature, featurestore, featuregroup, featuregroup_version, online)
    211         return core._do_get_feature(feature, core._get_featurestore_metadata(featurestore,
--> 212                                                                              update_cache=update_cache_default),
    213                                     featurestore=featurestore, featuregroup=featuregroup,

~/anaconda3/envs/python3/lib/python3.6/site-packages/hops/featurestore_impl/core.py in _get_featurestore_metadata(featurestore, update_cache)
     74         response_object = rest_rpc._get_featurestore_metadata(featurestore)
---> 75         metadata_cache = FeaturestoreMetadata(response_object)
     76     return metadata_cache

~/anaconda3/envs/python3/lib/python3.6/site-packages/hops/featurestore_impl/dao/common/featurestore_metadata.py in __init__(self, metadata_json)
     24         featuregroups, training_datasets, features_to_featuregroups, featurestore, settings, storage_connectors, \
---> 25             online_featurestore_connector = self._parse_featurestore_metadata(metadata_json)
     26         self.featuregroups = featuregroups

~/anaconda3/envs/python3/lib/python3.6/site-packages/hops/featurestore_impl/dao/common/featurestore_metadata.py in _parse_featurestore_metadata(self, metadata_json)
     52         for fg in metadata_json[constants.REST_CONFIG.JSON_FEATUREGROUPS]:
---> 53             fg_obj = Featuregroup(fg)
     54             featuregroups[fs_utils._get_table_name(fg[constants.REST_CONFIG.JSON_FEATUREGROUP_NAME],

~/anaconda3/envs/python3/lib/python3.6/site-packages/hops/featurestore_impl/dao/featuregroups/featuregroup.py in __init__(self, featuregroup_json)
     28         self.id = featuregroup_json[constants.REST_CONFIG.JSON_FEATUREGROUP_ID]
---> 29         self.featuregroup_type = featuregroup_json[constants.REST_CONFIG.JSON_FEATUREGROUP_TYPE]
     30         if(self.featuregroup_type == constants.REST_CONFIG.JSON_FEATUREGROUP_ON_DEMAND_TYPE):

KeyError: 'featuregroupType'

Looks like hopsworks and hopsworks-cloud-sdk versions inconsistency, but both are latest.

How can I fix that?

Hi @mdyuldina,

Thanks for reporting this. We forgot to cherry-pick one pull request. It should be fixed now, we made a new bugfix release for hopsworks-cloud-sdk (https://pypi.org/project/hopsworks-cloud-sdk/1.4.0.1/).

Let me know us know if you encounter more issues.

–
Fabio

I have just checked, the issue is resolved.

It’s amazing how fast you solved it! Thank you so much.

1 Like