Unable to use 'gcp' example: 'Engine' object has no attribute 'validate'

I have tried this both on the hosted demo instance, as well as a locally deployed instance, but whenever I try the ‘gcp’ feature store example, I run into this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-f062f5771128> in <module>
      4 data = [['tom', 'johnson', 'UK'], ['penelope', 'charles', 'UK'], ['harry', 'windsor', "USA"]]
      5 df = pd.DataFrame(data, columns=columns)
----> 6 name_country_fg.insert(df)

/srv/hops/anaconda/envs/theenv/lib/python3.7/site-packages/hsfs/feature_group.py in insert(self, features, overwrite, operation, storage, write_options)
    706             operation,
    707             storage.lower() if storage is not None else None,
--> 708             write_options,
    709         )
    710 

/srv/hops/anaconda/envs/theenv/lib/python3.7/site-packages/hsfs/core/feature_group_engine.py in insert(self, feature_group, feature_dataframe, overwrite, operation, storage, write_options)
     77         validation_id = None
     78         if feature_group.validation_type != "NONE":
---> 79             validation = feature_group.validate(feature_dataframe)
     80             validation_id = validation.validation_id
     81 

/srv/hops/anaconda/envs/theenv/lib/python3.7/site-packages/hsfs/feature_group.py in validate(self, dataframe)
    943 
    944         """
--> 945         return self._data_validation_engine.validate(self, dataframe)
    946 
    947     def get_validations(self, validation_time=None, commit_time=None):

/srv/hops/anaconda/envs/theenv/lib/python3.7/site-packages/hsfs/core/data_validation_engine.py in validate(self, feature_group, feature_dataframe)
     50         expectations = self._expectations_api.get(feature_group=feature_group)
     51 
---> 52         expectation_results_java = engine.get_instance().validate(
     53             feature_dataframe, expectations
     54         )

AttributeError: 'Engine' object has no attribute 'validate'

To reproduce starting from the demo account, I created a new ‘feature store’ demo project (demo_fs_terence0) and started up a new JupyterLab instance. Then I selected ‘gcp’ folder, then ‘colab.ipnyb’. This works fine until about step 16 with the ‘name_country_fg.insert(df)’ command, which gives the above error.

I also started a new notebook on a new instance, and ran into a very similar issue attempting to create a feature store from scratch.

Hi @thaddock,

Thanks for flagging this. A fix for this issue was implemented, but not cherry-picked to the release branch. We did it now and release version 2.2.17 of the HSFS library (hsfs · PyPI).

You can apply the fix to your project by going in the Python section of your project > Manage Environment. You can remove the installed version of HSFS from your project and install the new version (hsfs - 2.2.17).

After that you can restart the Jupyter notebook server and should be able to run the patched version of HSFS.


Fabio