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 tag to shared object #12

Closed
wants to merge 2 commits into from

Conversation

hgarrereyn
Copy link

This PR modifies the shared object handle to store a tag with cached objects. By default, shared.acquire will keep a reference until it is garbage collected. By specifying a tag, the user can force cache eviction if the tag passed with acquire doesn't match the tag stored with the cached object.

This PR does not change public APIs but it is a prerequisite for the model streaming api where RunInference may need to force cache eviction of models loaded in memory.

Currently, shared.py is migrating to Beam core however RunInference still depends on the tfx-bsl version. Eventually this PR will also need to be reflected in the Beam version of shared.py.

@hgarrereyn
Copy link
Author

@aaltay
Copy link

aaltay commented Jul 31, 2020

LGTM. Nice idea.

@hgarrereyn
Copy link
Author

this was merged

@hgarrereyn hgarrereyn closed this Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants