def features_lookup()

in scripts/cloud_run_model_inference/main.py [0:0]


def features_lookup(ff_feature_store, entity, entity_ids):
    '''
    Function that retrieves feature values from Vertex AI Feature Store
    '''
    entity_type = ff_feature_store.get_entity_type(entity)
    aggregated_features = entity_type.read(entity_ids=entity_ids,feature_ids="*")
    aggregated_features_preprocessed = preprocess(aggregated_features)
    features = aggregated_features_preprocessed.iloc[0].to_dict()
    return features