-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove flyteidl from install_requires Signed-off-by: Eduardo Apolinario <[email protected]> * Expose hash in Literal Signed-off-by: Eduardo Apolinario <[email protected]> * Set hash in TypeEngine Signed-off-by: Eduardo Apolinario <[email protected]> * Modify cache key calculation to take hash into account Signed-off-by: Eduardo Apolinario <[email protected]> * Opt-in PandasDataFrameTransformer Signed-off-by: Eduardo Apolinario <[email protected]> * Add unit tests Signed-off-by: Eduardo Apolinario <[email protected]> * Iterate using a flyteidl branch Signed-off-by: Eduardo Apolinario <[email protected]> * Regenerate requirements files Signed-off-by: Eduardo Apolinario <[email protected]> * Regenerate requirements files Signed-off-by: Eduardo Apolinario <[email protected]> * Move _hash_overridable to StructureDatasetTransformerEngine Signed-off-by: Eduardo Apolinario <[email protected]> * Move HashMethod to flytekit.core.hash Signed-off-by: Eduardo Apolinario <[email protected]> * Fix `unit_test` make target Signed-off-by: Eduardo Apolinario <[email protected]> * Split `unit_test` make target in two lines Signed-off-by: Eduardo Apolinario <[email protected]> * Add assert to structured dataset compatibility test Signed-off-by: Eduardo Apolinario <[email protected]> * Remove TODO Signed-off-by: Eduardo Apolinario <[email protected]> * Regenerate plugins requirements files pointing to the right version of flyteidl. Signed-off-by: Eduardo Apolinario <[email protected]> * Set hash as a property of the literal Signed-off-by: Eduardo Apolinario <[email protected]> * Install plugins requirements in CI. Signed-off-by: Eduardo Apolinario <[email protected]> * Add hash.setter Signed-off-by: Eduardo Apolinario <[email protected]> * Install flyteidl directly Signed-off-by: Eduardo Apolinario <[email protected]> * Revert "Regenerate plugins requirements files pointing to the right version of flyteidl." This reverts commit c2dbb54. Signed-off-by: Eduardo Apolinario <[email protected]> * wip - Add support for univariate lists Signed-off-by: Eduardo Apolinario <[email protected]> * Add support for lists of annotated objects Signed-off-by: Eduardo Apolinario <[email protected]> * Revamp generation of cache key (to cover case of literals collections and maps) Signed-off-by: Eduardo Apolinario <[email protected]> * Leave TODO for warning Signed-off-by: Eduardo Apolinario <[email protected]> * Revert "Add support for lists of annotated objects" This reverts commit 4b5f608. Signed-off-by: Eduardo Apolinario <[email protected]> * Revert "wip - Add support for univariate lists" This reverts commit adaa448. Signed-off-by: Eduardo Apolinario <[email protected]> * Remove docstring Signed-off-by: Eduardo Apolinario <[email protected]> * Add flyteidl>=0.23.0 Signed-off-by: Eduardo Apolinario <[email protected]> * Remove mentions to branch flyteidl@add-hash-to-literal Signed-off-by: Eduardo Apolinario <[email protected]> * Bump flyteidl in plugins requirements Signed-off-by: Eduardo Apolinario <[email protected]> * Regenerate plugins requirements again Signed-off-by: Eduardo Apolinario <[email protected]> * Restore papermill/requirements.txt Signed-off-by: Eduardo Apolinario <[email protected]> * Point flytekitplugins-spark to the offloaded-objects-caching branch in papermill tests Signed-off-by: Eduardo Apolinario <[email protected]> * Set flyteidl>=0.23.0 in papermill dev-requirements Co-authored-by: Eduardo Apolinario <[email protected]>
- Loading branch information
1 parent
10ab48e
commit 0da523c
Showing
36 changed files
with
1,020 additions
and
336 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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.