-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: use lru_dedup_dict for rank call #569
base: master
Are you sure you want to change the base?
Conversation
rlclientlib/vw_model/vw_model.cc
Outdated
@@ -67,6 +67,14 @@ int vw_model::update(const model_data& data, bool& model_ready, api_status* stat | |||
return error_code::success; | |||
} | |||
|
|||
int vw_model::add_lru_dedup_cache(uint64_t hash, std::string action_str, api_status* status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably move the "parse action and populate the cache" functionality into vw_model
and just have a pointer of it in each vw instance
that way whenever you use vw for a rank call we could just do
auto vw = _vw_pool.get_or_create()
vw.set_action_cache(&action_cache)
vw.rank(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the way it is done here the specific action is only passed into one of the vw instances in the object pool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed lru_cache from safe_vw and constructor etc. Added as an arg to load_action and rank in safe_vw
No description provided.