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

Offload literals (#2872) #2950

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

eapolinario
Copy link
Collaborator

Tracking issue

RFC flyteorg/flyte#5103

Why are the changes needed?

Backport #2872 to release-v1.13 branch. Going out in flytekit 1.13.14.

What changes were proposed in this pull request?

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

* wip - Implement offloading of literals

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix use of metadata bucket prefix

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix repeated use of uri

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add temporary representation for offloaded literal

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add one unit test

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add another test

Signed-off-by: Eduardo Apolinario <[email protected]>

* Stylistic changes to the two tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add test for min offloading threshold set to 1MB

Signed-off-by: Eduardo Apolinario <[email protected]>

* Pick a unique engine-dir for tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* s/new_outputs/literal_map_copy/

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove unused constant

Signed-off-by: Eduardo Apolinario <[email protected]>

* Use output_prefix in definition of offloaded literals

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add initial version of pbhash.py

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add tests to verify that overriding the hash is carried over to offloaded literals

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add a few more tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* Always import ParamSpec from `typing_extensions`

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix lint warnings

Signed-off-by: Eduardo Apolinario <[email protected]>

* Set inferred_type using the task type interface

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add comment about offloaded literals files and how they are uploaded to the metadata bucket

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add offloading_enabled

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add more unit tests including a negative test

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix bad merge

Signed-off-by: Eduardo Apolinario <[email protected]>

* Incorporate feedback.

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix image name (unrelated to this PR - just a nice-to-have to decrease flakiness)

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add `is_map_task` to `_dispatch_execute`

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
@eapolinario eapolinario merged commit 01c51b9 into release-v1.13 Nov 22, 2024
102 of 103 checks passed
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.

3 participants