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

add reserved_key_start_bit option to config hkv #408

Merged
merged 1 commit into from
May 22, 2024
Merged

Conversation

jq
Copy link
Collaborator

@jq jq commented May 20, 2024

Description

Brief Description of the PR:

Fixes # (issue)

Type of change

  • Bug fix
  • New Tutorial
  • Updated or additional documentation
  • Additional Testing
  • New Feature

Checklist:

  • I've properly formatted my code according to the guidelines
    • By running yapf
    • By running clang-format
  • This PR addresses an already submitted issue for TensorFlow Recommenders-Addons
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

How Has This Been Tested?

If you're adding a bugfix or new feature please describe the tests that you ran to verify your changes:
*

@jq jq requested a review from rhdong as a code owner May 20, 2024 20:24
@jq jq requested a review from MoFHeka May 20, 2024 20:26
@jq jq force-pushed the hkv branch 2 times, most recently from e452633 to 4190c14 Compare May 21, 2024 15:22
@jq
Copy link
Collaborator Author

jq commented May 21, 2024

@LinGeLin for review

@jq jq force-pushed the hkv branch 5 times, most recently from c32b529 to a9e1edc Compare May 21, 2024 23:15
Copy link
Collaborator

@MoFHeka MoFHeka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding document and a unitive default value of reserved_key_start_bit may be better.

@@ -308,6 +308,7 @@ REGISTER_OP(PREFIX_OP_NAME(HkvHashTableOfTensors))
.Attr("max_hbm_for_vectors: int = 0")
.Attr("step_per_epoch: int = 0")
.Attr("strategy: int = 0")
.Attr("reserved_key_start_bit: int = 0")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value of reserved_key_start_bit is better to be same as python code which is 1.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NVIDIA-Merlin/HierarchicalKV#191 set the default to 0

@@ -79,6 +79,7 @@ def __init__(
evict_strategy=HkvEvictStrategy.LRU,
step_per_epoch=0,
gen_scores_fn=None,
reserved_key_start_bit=0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple explanation of config reserved_key_start_bit in document docs/api_docs/tfra/dynamic_embedding/HkvHashTableConfig.md, that would be better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@jq jq requested a review from MoFHeka May 22, 2024 14:20
Copy link
Collaborator

@MoFHeka MoFHeka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhdong
Copy link
Member

rhdong commented May 22, 2024

Great job!

@rhdong rhdong merged commit bbce3c7 into tensorflow:master May 22, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants