Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add get_run_logger to imports in interactive workflow examples #12284

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/guides/creating-interactive-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To receive input while paused or suspended use the `wait_for_input` parameter in
The simplest way to pause or suspend and wait for input is to pass a built-in type:

```python
from prefect import flow, pause_flow_run
from prefect import flow, pause_flow_run, get_run_logger

@flow
def greet_user():
Expand All @@ -60,7 +60,7 @@ In this example, the flow run will pause until a user clicks the Resume button i
Instead of a built-in type, you can pass in a `pydantic.BaseModel` class. This is useful if you already have a `BaseModel` you want to use:

```python
from prefect import flow, pause_flow_run
from prefect import flow, pause_flow_run, get_run_logger
from pydantic import BaseModel


Expand All @@ -87,6 +87,7 @@ async def greet_user():
Finally, for advanced use cases like overriding how Prefect stores flow run inputs, you can create a `RunInput` class:

```python
from prefect import get_run_logger
from prefect.input import RunInput

class UserInput(RunInput):
Expand All @@ -113,6 +114,7 @@ You can set default values for fields in your model by using the `with_initial_d
Expanding on the example above, you could make the `name` field default to "anonymous":

```python
from prefect import get_run_logger
from prefect.input import RunInput

class UserInput(RunInput):
Expand Down