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

[Bug]: client.features() can't return null with BigQuery-Redis setup #1384

Open
Anntey opened this issue Mar 14, 2024 · 0 comments
Open

[Bug]: client.features() can't return null with BigQuery-Redis setup #1384

Anntey opened this issue Mar 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Anntey
Copy link

Anntey commented Mar 14, 2024

Expected Behavior

SELECT * FROM `PROJECT.DATASET.featureform_materialization_FEAT__VARIANT` where entity = 'entity_with_null_feat_value'
[{
  "entity": "entity_with_null_feat_value",
  "value": null,
  "ts": "1970-01-01 00:00:00.000000 UTC",
  "row_number": "2797"
}]
fpf = client.features(features = [('feat_with_nulls', 'VARIANT')], entities = {'entity_name': 'entity_with_null_feat_value'})
fpf
[None]

Actual Behavior

Note that "just define transformations that only return non-nulls" isn't a solution as then you get "key not found error" when you are fetching entity with multiple features incl. features where the result isn't defined for every single entity. This is because the key for that particular feature never ends up in online store. Also, it isn't realistic to avoid defining features with null for some rows. It might be possible to format nulls as zeroes in the transformation but that isn't optimal and requires boilerplate and sometimes it isn't obvious with which value you should replace a missing value.

SELECT * FROM `PROJECT.DATASET.featureform_materialization_FEAT__VARIANT` where entity = 'entity_with_null_feat_value'
[{
  "entity": "entity_with_null_feat_value",
  "value": null,
  "ts": "1970-01-01 00:00:00.000000 UTC",
  "row_number": "2797"
}]
fpf = client.features(features = [('feat_with_nulls', 'VARIANT')], entities = {'entity_name': 'entity_with_null_feat_value'})
fpf

---------------------------------------------------------------------------
_InactiveRpcError                         Traceback (most recent call last)
...
File .../site-packages/featureform/serving.py:154, in ServingClient.features(self, features, entities, model, params)
    ...
--> 154 return self.impl.features(features, entities, model, params)
   ...
File .../site-packages/featureform/serving.py:238, in HostedClientImpl.features(self, features, entities, model, params)
    ...
--> 238 resp = self._stub.FeatureServe(req)
    ...
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNKNOWN
	details = "error getting feature value: entity not found: could not cast value: {<nil> {<nil> nil [] 0 36 [0 0 0 0 0 0 0]}} to float32: strconv.ParseFloat: parsing "nil": invalid syntax"
	debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"error getting feature value: entity not found: could not cast value: {<nil> {<nil> nil [] 0 36 [0 0 0 0 0 0 0]}} to float32: strconv.ParseFloat: parsing \"nil\": invalid syntax", grpc_status:2, created_time:"2024-03-14T13:46:14.492082+02:00"}"

Steps To Reproduce

Deploy with Helm to GKE. Register source. Define transformation with null values in output. Fetch such an entity.

What mode are you running Featureform in?

Local

What version of Python are you running?

3.8

Featureform Python Package Version

1.12.2

Featureform Helm Chart Version

0.12.2

Kubernetes Version

No response

Relevant log output

No response

@Anntey Anntey added the bug Something isn't working label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant