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

Update pyflyte defaults to use --copy behavior #2755

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

wild-endeavor
Copy link
Contributor

@wild-endeavor wild-endeavor commented Sep 18, 2024

Why are the changes needed?

This is the last of a series of PRs to clean up the fast register switches in the various pyflyte commands. The main change was #2690

This PR changes the default behavior for fast registration (invoked by run, register, and package to use the new logic instead. Previously if the --copy command was not specified, the old logic was still used. Only the serialize command after this PR will use the old logic.

What changes were proposed in this pull request?

  • Change messaging, exception raising, and defaults to trigger the new logic.

How was this patch tested?

Locally tested and local executions run.

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

#2690
#2716
#2731

Docs link

@wild-endeavor wild-endeavor changed the title show defaults and fix error handling Update pyflyte defaults to use --copy behavior Sep 18, 2024
Signed-off-by: Yee Hing Tong <[email protected]>
" Note this needs additional configuration, refer to the docs.",
)
@click.option(
"--copy",
required=False,
type=click.Choice(["all", "auto", "none"], case_sensitive=False),
default=None, # this will be changed to "none" after removing fast option
default="none",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as --fast is in the codebase, someone can still run --fast --copy auto, which is conflicting/confusing. I like keeping the default for copy as None and raising the current error.

When we actually remove --fast as an option, then I feel safe enough to set default="none".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we won't remove it though for a while, at least a year or two... so just keep it around?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we detect (and fail) in this case? Also, add a message that explains how to fix the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also did you mean this for package specifically or the commands in general? if so we can just discard this PR... but that leaves the old logic and doesn't exercise the new logic unless it's opted into.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can detect and fail yeah... but i'd like to exercise the new code

Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor wild-endeavor merged commit 534673c into master Sep 25, 2024
29 of 30 checks passed
otarabai pushed a commit to otarabai/flytekit that referenced this pull request Oct 15, 2024
kumare3 pushed a commit that referenced this pull request Nov 8, 2024
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