Skip to content

Commit

Permalink
enabled copy-all for programmatic fast-registration via FlyteRemote (#…
Browse files Browse the repository at this point in the history
…2768)

* enabled copy-all for programmatic fast-registration via FlyteRemote

Signed-off-by: granthamtaylor <granthamtaylor@icloud.com>

* fix fast registration test

Signed-off-by: granthamtaylor <granthamtaylor@icloud.com>

* use fast_package_options instead of copy_all

Signed-off-by: granthamtaylor <granthamtaylor@icloud.com>

* clean up docstring

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>

---------

Signed-off-by: granthamtaylor <granthamtaylor@icloud.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
  • Loading branch information
granthamtaylor and thomasjpfan authored Sep 27, 2024
1 parent 2cf20a4 commit 8bcb9d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flytekit/remote/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ def fast_register_workflow(
version: typing.Optional[str] = None,
default_launch_plan: typing.Optional[bool] = True,
options: typing.Optional[Options] = None,
fast_package_options: typing.Optional[FastPackageOptions] = None,
) -> FlyteWorkflow:
"""
Use this method to register a workflow with zip mode.
Expand All @@ -882,6 +883,7 @@ def fast_register_workflow(
:param serialization_settings: The serialization settings to be used
:param default_launch_plan: This should be true if a default launch plan should be created for the workflow
:param options: Additional execution options that can be configured for the default launchplan
:param fast_package_options: Options to customize copying behavior
:return:
"""
if not isinstance(entity, PythonFunctionWorkflow):
Expand Down Expand Up @@ -912,6 +914,7 @@ def fast_register_workflow(
options=options,
source_path=module_root,
module_name=mod_name,
fast_package_options=fast_package_options,
)

def fast_package(
Expand Down
1 change: 1 addition & 0 deletions tests/flytekit/unit/remote/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ def test_register_wf_script_mode(compress_scripts_mock, upload_file_mock, regist
version="v1",
default_launch_plan=True,
options=None,
fast_package_options=None,
source_path=str(pathlib.Path(flytekit.__file__).parent.parent),
module_name="tests.flytekit.unit.remote.resources",
)

0 comments on commit 8bcb9d0

Please sign in to comment.