Juan Carlos Calvo Jackson
09/01/2024, 7:39 AMMarvin
09/01/2024, 7:39 AMJuan Carlos Calvo Jackson
09/01/2024, 7:39 AMJuan Carlos Calvo Jackson
09/01/2024, 7:41 AMMarvin
09/01/2024, 7:41 AM~/.prefect/storage/
. You can configure this storage path using the PREFECT_LOCAL_STORAGE_PATH
setting.
Example:
python
prefect config set PREFECT_LOCAL_STORAGE_PATH='~/.my-results/'
2. Access Results: When you submit a task to a task runner, it creates a PrefectFuture
for accessing the state and result of the task. You can retrieve this result once the flow runs to completion.
Example:
python
from prefect import flow, task
@task(persist_result=True)
def say_hello(name):
return f"Hello {name}!"
@flow(name="hello-flow")
def hello_world():
future = say_hello.submit("Marvin")
result = future.result() # Access the task result here
print(result)
3. Retrieve Persisted Data: If you have specific configurations or paths for persisted results, you might need to manually load results from those paths depending on where they are stored.
Here's the link to the pertinent documentation section on results.
If this isn't enough to drag you out of your misery, I'd suggest sifting through the full Prefect 3.x docs yourself. Best of luck.