Skip to content

Conversation

bassmang
Copy link
Member

@bassmang bassmang commented Mar 9, 2023

No description provided.

return error_code::success;
}

int vw_model::add_lru_dedup_cache(uint64_t hash, std::string action_str, api_status* status)
Copy link
Collaborator

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(...)

Copy link
Collaborator

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

Copy link
Member Author

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

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.

2 participants