shy-family-76866
06/15/2023, 12:44 PM@task
decorators and wondering if there is a way to combine it with another decorator I am already using.
Here is a simple toy example. Does anyone have any ideas why this doesn't work when uncommenting the flyte decorator? I get an error that it doesn't recognize the new argument (see below).
Any help is appreciated!
╭──────────────────────────── Traceback (most recent call last) ─────────────────────────────╮
│ /workspaces/workflow-orchestration-poc/test2.py:54 in <module> │
│ │
│ ❱ 54 print(fun1(b=3)) # 3 - 1 + 2 + 7 = 11 │
│ │
│ /usr/local/lib/python3.9/site-packages/flytekit/core/base_task.py:304 in __call__ │
│ │
│ ❱ 304 │ │ return flyte_entity_call_handler(self, *args, **kwargs) # type: ignore │
│ │
│ /usr/local/lib/python3.9/site-packages/flytekit/core/promise.py:1086 in │
│ flyte_entity_call_handler │
│ │
│ ❱ 1086 │ │ │ raise ValueError( │
╰────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Received unexpected keyword argument 'b' in function 'fun1'
shy-family-76866
06/15/2023, 3:46 PMfreezing-boots-56761
inspect.signature(fun1)
under the hood. that returns a
for some reason.freezing-boots-56761
functools.wraps
freezing-boots-56761
inspect.signature
thankful-minister-83577
thankful-minister-83577
shy-family-76866
06/15/2023, 7:22 PM