tensorflow / tensorflow/recommenders
loaded scann index can not use k param
Open
@maciejkula is already working on this.
Since May 21, 2021.
question
- Dominant language
- Python
- Stars
- 2k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/tensorflow/recommenders/blob/main/docs/examples/basic_retrieval.ipynb
# Export the query model.
with tempfile.TemporaryDirectory() as tmp:
path = os.path.join(tmp, "model")
# Save the index.
index.save(path)
# Load it back; can also be done in TensorFlow Serving.
loaded = tf.keras.models.load_model(path)
# Pass a user id in, get top predicted movie titles back.
scores, titles = loaded(["42"])
print(f"Recommendations: {titles[0][:3]}")
loaded object have not k param,so i can not return k(default 10) than 10 movies?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.