https://prefect.io logo
#prefect-getting-started
Title
# prefect-getting-started
m

Mario Vormstein

01/09/2023, 4:00 PM
I have a question quite similar to the one asked here: https://prefect-community.slack.com/archives/C048ZHT5U3U/p1670522837872239 If I define a prefect flow inside a Jupyter Notebook
Copy code
from prefect import flow, get_run_logger, task, get_run_logger
@flow(name='flow_from_jupyter')
def do_something():
    logger = get_run_logger()
    <http://logger.info|logger.info>('Executing from Jupyer') 
    <http://logger.info|logger.info>('More logs')
and I re-evaluate the cell, I get an UserWarning
Copy code
/opt/conda/lib/python3.10/site-packages/prefect/flows.py:206: UserWarning: A flow named 'flow_from_jupyter' and defined at '/tmp/ipykernel_166/4031630764.py:2' conflicts with another flow. Consider specifying a unique `name` parameter in the flow definition:

 `@flow(name='my_unique_name', ...)`
  warnings.warn(
Everything still works but the Warning is annoying to users. Is there a real problem and could this warning be suppressed somehow?