-
Notifications
You must be signed in to change notification settings - Fork 339
Caching of offloaded objects #762
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
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
06e960f
Remove flyteidl from install_requires
eapolinario c9047a8
Expose hash in Literal
eapolinario 4d21957
Set hash in TypeEngine
eapolinario f9273db
Modify cache key calculation to take hash into account
eapolinario 53dff4d
Opt-in PandasDataFrameTransformer
eapolinario 5ae247c
Add unit tests
eapolinario 9305746
Iterate using a flyteidl branch
eapolinario faff038
Merge remote-tracking branch 'origin' into offloaded-objects-caching
eapolinario ecd8b93
Regenerate requirements files
eapolinario 44b72f6
Regenerate requirements files
eapolinario f46dc74
Merge remote-tracking branch 'origin' into offloaded-objects-caching
eapolinario 22c90d3
Move _hash_overridable to StructureDatasetTransformerEngine
eapolinario fe7e8f7
Merge remote-tracking branch 'origin' into offloaded-objects-caching
eapolinario 6ac4b44
Move HashMethod to flytekit.core.hash
eapolinario 1702961
Merge remote-tracking branch 'origin' into offloaded-objects-caching
eapolinario 4552e78
Fix `unit_test` make target
eapolinario c9fc044
Merge remote-tracking branch 'origin' into offloaded-objects-caching
eapolinario 24f67a0
Split `unit_test` make target in two lines
eapolinario 60ecf3a
Add assert to structured dataset compatibility test
eapolinario 3aeedeb
Remove TODO
eapolinario c2dbb54
Regenerate plugins requirements files pointing to the right version o…
eapolinario 0e58199
Set hash as a property of the literal
eapolinario 5054861
Install plugins requirements in CI.
eapolinario 9f2d06f
Add hash.setter
eapolinario e039836
Install flyteidl directly
eapolinario 2da76f3
Revert "Regenerate plugins requirements files pointing to the right v…
eapolinario adaa448
wip - Add support for univariate lists
eapolinario 4b5f608
Add support for lists of annotated objects
eapolinario ecffa04
Revamp generation of cache key (to cover case of literals collections…
eapolinario d4b0b49
Leave TODO for warning
eapolinario 4d54c59
Revert "Add support for lists of annotated objects"
eapolinario 82bbc1f
Revert "wip - Add support for univariate lists"
eapolinario a21631b
Remove docstring
eapolinario a432b1e
Merge remote-tracking branch 'origin' into offloaded-objects-caching
eapolinario 3519149
Add flyteidl>=0.23.0
eapolinario 09e736d
Remove mentions to branch flyteidl@add-hash-to-literal
eapolinario 9ec103c
Bump flyteidl in plugins requirements
eapolinario fa4e3b2
Regenerate plugins requirements again
eapolinario 373b3bb
Restore papermill/requirements.txt
eapolinario 403830d
Point flytekitplugins-spark to the offloaded-objects-caching branch i…
eapolinario 9754a0f
Set flyteidl>=0.23.0 in papermill dev-requirements
eapolinario File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,23 @@ | ||
| from typing import Callable, Generic, TypeVar | ||
|
|
||
| T = TypeVar("T") | ||
|
|
||
|
|
||
| class HashOnReferenceMixin(object): | ||
| def __hash__(self): | ||
| return hash(id(self)) | ||
|
|
||
|
|
||
| class HashMethod(Generic[T]): | ||
| """ | ||
| Flyte-specific object used to wrap the hash function for a specific type | ||
| """ | ||
|
|
||
| def __init__(self, function: Callable[[T], str]): | ||
| self._function = function | ||
|
|
||
| def calculate(self, obj: T) -> str: | ||
| """ | ||
| Calculate hash for `obj`. | ||
| """ | ||
| return self._function(obj) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.