Bertangela Loret de Mola
07/31/2022, 9:54 PMKhuyen Tran
08/01/2022, 12:50 AMKhuyen Tran
08/01/2022, 12:50 AMfn
in your codeBertangela Loret de Mola
08/01/2022, 12:51 PMBertangela Loret de Mola
08/01/2022, 12:52 PMBertangela Loret de Mola
08/01/2022, 12:53 PMMason Menges
08/01/2022, 3:05 PMBertangela Loret de Mola
08/01/2022, 3:10 PMMason Menges
08/01/2022, 3:22 PMimport prefect
from prefect import task, flow
@task
def hello_task():
logger = prefect.logging.get_run_logger()
<http://logger.info|logger.info>("Hello World!")
@flow
def hello_flow():
hello_task()
hello_flow()
basically you can define a flow as you would any other python function with just a simple task decorator and then just call the function to run it.
I'd also suggest updating to the latest version of prefect as we're no longer in Beta there have been a lot of changes to the functionality 😄Bertangela Loret de Mola
08/01/2022, 3:32 PMBertangela Loret de Mola
08/01/2022, 3:33 PMBertangela Loret de Mola
08/01/2022, 3:33 PMMason Menges
08/01/2022, 3:41 PMpip install prefect
should install the latest version, are you running in a virtual environment? if you are you might try starting in a clean environment and install prefect there and try again, I'm not getting any errors when running the code snippet but let me know if you still do when running it in a new environment or after removing and reinstalling prefect.Bertangela Loret de Mola
08/01/2022, 5:02 PMChris L.
08/06/2022, 3:16 AM.prefect
directory (most likely to be in $HOME). Orion started up without issue after