acoustic-carpenter-78188
06/26/2023, 5:09 PM@task
def transform(encoder: Optional[OneHotEncoder] = None, ...)
def transform(encoder: OneHotEncoder = None, ...)
When caller do transform(encoder=None, ...), the task will work successfully with pyflyte run (locally).
However, if I bake the module containing the task estimate() into an image and refer to it in a pyflyte remote run, no mater what I do, I keep getting at the terminal (before pyflyte submit the code to remote flyte server):
flytekit/core/type_engine.py", line 1060, in to_literal
raise TypeError("Ambiguous choice of variant for union type")
...
flytekit/core/promise.py", line 937, in create_and_link_node
raise AssertionError(f"Failed to Bind variable {k} for function {entity.name}.") from e
AssertionError: Failed to Bind variable **_encoder_** for function dai_mle_models.onehotenc.simple_onehotenc. transform.
Expected behavior
The task should run remotely just like when None is supplied to pandas.DataFrame as task input value (which I have verified working).
e.g.
@task
def sometask(test_data: pd.DataFrame = None, ...)
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteacoustic-carpenter-78188
06/26/2023, 5:09 PM