Hi! Is there a way to start a flow or a task witho...
# prefect-getting-started
t
Hi! Is there a way to start a flow or a task without using a decorator? E.g. calling a function of the prefect Python package. I am asking because some of the Python functions I would like to run in a flow or task are already decorated (e.g. because of hydra-core) and using Prefect's decorators on the same functions throws a RuntimeError.
r
You can call a task in your task by using <task>.fn(). We ran into a similar issue but this works.
a
You should be able to layer some the task decorator on top of some kinds of decorators. Have you checked the order of decorators? IME generally the prefect task decorator needs to be the last one applied / on top of the rest. Prefect task decorators can't go on top of classmethods, that's one error case I know about and there's an open GitHub issue about it