<#3703 [BUG] Parent dynamic task registered in non...
# flyte-github
a
#3703 [BUG] Parent dynamic task registered in non-fast mode, child subtask registered in fast mode. Child subtask executes in non-fast mode. Issue created by redartera Describe the bug The task
foo
is registered in fast mode, while
bar
is registered in non-fast mode. The subtask
foo
is executed with
pyflyte-execute
rather than
pyflyte-fast-execute
when called from within
bar
, causing
ModuleNotFoundError
.
Copy code
# a.py
@task
def foo(x: int) -> int:
  return x

# This task foo was registered in fast registration
 
# b.py

@reference_task(
  project="flytesnacks",
  domain="development",
  name="a.foo",
  version="v0.1.0",
)
def foo(x: int) -> int:
  ...

@dynamic(image="...")
def bar(x: int) -> int:
  for i in range(10):
   foo(x)

# This task bar was registered in non-fast mode
Expected behavior
foo
should be executed with
pyflyte-fast-execute
. Additional context to reproduce flytekit==1.4.2 and using
flyte-binary
Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte