Hello, I am having a hard time to pass optional in...
# ask-the-community
f
Hello, I am having a hard time to pass optional input param to tasks. Ideally, I want the task either be passed the actual instance of the input param or None. So I have :
Copy code
from sklearn.preprocessing import OneHotEncoder
@task
def transform(
    encoder: Optional[OneHotEncoder] = None, ...
)
The workflow will do:
Copy code
return transform(
   encoder=None, ...
103 Views