<#789 run python script supports debugging, code b...
# flyte-github
a
#789 run python script supports debugging, code bundling, output dir Pull request opened by cosmicBboy This pull request introduces support for running plain Python scripts as Flyte tasks without pickling, by bundling the script and using a new
ScriptTaskResolver
. It also adds a new copy style (
python_script
) for code bundles, updates the task and environment APIs to support custom resolvers, and improves the developer experience for remote script execution and debugging. Additional minor changes update dependencies and resource specifications in example files. Python script task support and code bundling: • Added
ScriptTaskResolver
(
src/flyte/_internal/resolvers/script.py
) to enable bundling and execution of plain Python scripts as Flyte tasks, avoiding pickling and enabling proper remote debugging. • Updated
run_python_script
(
src/flyte/_run_python_script.py
) to use the new resolver, bundle scripts with the new
python_script
copy style, and support VS Code debugging. [1] [2] [3] [4] • Introduced
build_code_bundle_from_relative_paths
and added
"python_script"
to the
CopyFiles
literal for selective script bundling. [1] [2] • Modified
_Runner
and remote/hybrid run logic to support the new copy style and script bundling parameters. [1] [2] [3] [4] [5] Task and environment API enhancements: • Added
task_resolver
argument to
TaskEnvironment.task
and
AsyncFunctionTaskTemplate
, and ensured it is used during serialization and container argument construction. [1] [2] [3] [4] [5] Developer experience and examples: • Added a new
hello.py
script example demonstrating running a plain Python script with Flyte. • Updated example resource specifications and dependency versions for better compatibility and GPU support. [1] [2] [3] • Added more arguments to VS Code debug launch configuration for improved debugging. flyteorg/flyte-sdk