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

Unable to export graph as ensemble when using multi-hot categorical column #361

Closed
mkumari-ed opened this issue Jun 2, 2022 · 16 comments
Closed
Assignees
Labels
bug Something isn't working P0
Milestone

Comments

@mkumari-ed
Copy link

mkumari-ed commented Jun 2, 2022

I am using inference container 22.05. When materializing feast in cell 6 deploying multi-stage recsys notebook, I am getting exception while materializing user_features. Item features worked just fine. Please download the sample data and notebooks used for this from the link here

Using tensorflow-inference 22.05 container. Attaching the error here
Screen Shot 2022-06-02 at 6 47 45 AM

@mkumari-ed mkumari-ed changed the title Materializing Operation for user item features using feast throwing exceptions Materialization Operation for user item features using feast throwing exceptions Jun 2, 2022
@mkumari-ed mkumari-ed changed the title Materialization Operation for user item features using feast throwing exceptions Materialization operation for user item features using feast throwing exceptions Jun 2, 2022
@karlhigley
Copy link
Contributor

What Feast version are you using?

@mkumari-ed
Copy link
Author

Hi Karl, I am using Feast==0.19.4. I tried removing the multi-hot categorical feature column(for example: search_term, one of the examples being ['tokkio','merlin','riva documentation','nvbot implementation']) and I was able to materialize it without that. @rnyak has informed that your team hasn't been able to test the multi-hot categorical feature columns in the dataset with Feast and that is the reason why it's happening. I would like to not remove this feature column from my dataset as it improves the model performance to some extent. Could you or someone from the team please work on testing it out?

@rnyak
Copy link
Contributor

rnyak commented Jun 15, 2022

Closing this since materialization issue was solved. And another bug was reported here NVIDIA-Merlin/systems#115

@rnyak rnyak closed this as completed Jun 15, 2022
@mkumari-ed
Copy link
Author

@karlhigley and @rnyak
I tested it out with my correct data today. I am attaching all screenshots for visibility. With the list of strings feature(for ex. ['sipl_camera', 'build qnx', 'yuv', 'dl g']), I am unable to materialize the user features using feast. The error that I get is ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(). Also, attaching the user features sample and output of train_tt.to_ddf().compute() here along with the snapshot of how the raw data looks like
materialize user features error
raw data sample
train tt sample
user features sample

@mkumari-ed
Copy link
Author

So going back to our conversation in the past, I used INT32_LIST dtype for this list type column instead of INT32 and I was able to materialize as well as use queryfeast operator in the successive steps. However it leads to another error now on the step where we create retrieval object using PredictTensorflow object.
Screen Shot 2022-07-21 at 1 08 36 PM
Screen Shot 2022-07-21 at 1 08 55 PM

@sohn21c sohn21c reopened this Jul 26, 2022
@karlhigley
Copy link
Contributor

What does model._saved_model_inputs_spec look like for your retrieval model?

@mkumari-ed
Copy link
Author

@karlhigley here is the output for the retrieval model
{'search': (TensorSpec(shape=(727237, 1), dtype=tf.int32, name='search_1'), TensorSpec(shape=(16384, 1), dtype=tf.int32, name='search_2')), 'userid': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='userid'), 'contentid': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='contentid'), 'eventtype': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='eventtype'), 'eventStrength': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='eventStrength'), 'ts': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='ts'), 'spaceid': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='spaceid'), 'spacekey': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='spacekey'), 'spacename': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='spacename'), 'parenttitle': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='parenttitle'), 'parentid': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='parentid'), 'mgrntaccount': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='mgrntaccount'), 'businessarea': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='businessarea'), 'jobposition': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='jobposition'), 'hrrolename': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='hrrolename'), 'location': TensorSpec(shape=(16384, 1), dtype=tf.int32, name='location')}

@karlhigley
Copy link
Contributor

I think the issue is happening while trying to get the shape of the search field, which looks like it might be in values/offsets format to handle variable length lists per example in the batch?

@karlhigley
Copy link
Contributor

@mkumari-ed Any chance you could share the model definition code and/or TF saved model file you're using to help me replicate the issue? (Slack would be fine if that works better.)

@mkumari-ed
Copy link
Author

@karlhigley Hi Karl, I just reached out to you on slack with file links and follow up questions. Please let me know.

@mkumari-ed
Copy link
Author

Currently getting error at the step where we export graph as ensemble on search column.
Screen Shot 2022-08-01 at 3 38 48 PM
Screen Shot 2022-08-01 at 3 39 11 PM

@mkumari-ed
Copy link
Author

mkumari-ed commented Aug 3, 2022

@karlhigley Hi Karl, renaming the column from search to search_1 didn't help in resolving the error that I get currently while exporting the graph as ensemble. It now complains of the missing search_1 column in operatorSubsetColumns.
Screen Shot 2022-08-03 at 9 21 58 AM

Here is the screenshot

@sararb sararb added bug Something isn't working P0 labels Aug 4, 2022
@viswa-nvidia
Copy link

@karlhigley , the last comment shows that the issue is not resolved. But status is done. I have moved it to WIP. Please review

@karlhigley
Copy link
Contributor

This is no longer the same (original) issue, which is why it was marked as done.

@rnyak rnyak changed the title Materialization operation for user item features using feast throwing exceptions Getting error from Predict Tensorflow when using list columns Aug 4, 2022
@mkumari-ed mkumari-ed changed the title Getting error from Predict Tensorflow when using list columns Unable to export graph as ensemble when using multi-hot categorical column Aug 8, 2022
@viswa-nvidia viswa-nvidia added this to the Merlin 22.08 milestone Aug 11, 2022
@viswa-nvidia
Copy link

@mkumari-ed , the original issue is done. But we cannot close this because other issues have been added to the thread. Please create separate tickets and let us know and we. will close this ticket. Thank you.

@viswa-nvidia viswa-nvidia removed this from the Merlin 22.08 milestone Sep 29, 2022
@viswa-nvidia viswa-nvidia added this to the Merlin 22.10 milestone Sep 29, 2022
@karlhigley karlhigley modified the milestones: Merlin 22.10, Merlin 22.11 Oct 7, 2022
@EvenOldridge
Copy link
Member

Closing. @mkumari-ed please create additional issues if you're still experiencing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0
Projects
None yet
Development

No branches or pull requests

7 participants