:wave: hello from Chicago! I have a question that...
# prefect-community
j
👋 hello from Chicago! I have a question that I haven't been able to answer from the docs or looking through the
prefect
source code.
help(LocalResult)
shows the following:
LocalResult(dir: str = None, validate_dir: bool = True, **kwargs: Any) -> None
Result that is written to and retrieved from the local file system.
Is it fair to say that "local" in this case means "local to where the task is physically run" and not "local to wherever
flow.run()
is called from"?
I've observed that when I use
LocalResult
together with a remote executor like
DaskExecutor
pointed at a
dask-kubernetes
cluster, the results are written to the filesystem of the Dask workers.
I understand why it might be bad to pull results over the wire from a remote Dask cluster, through the scheduler, back into the client in something like a notebook. But I still was surprised that it didn't work that way so thought I'd ask.
if you tell me "oh no that 100% should work", I'd be happy to provide a reproducible example
k
Hey @james.lamb,
Is it fair to say that "local" in this case means "local to where the task is physically run" and not "local to wherever 
flow.run()
 is called from"?
Yes, the result would be local to the execution environment - I think this is one of those cases where the Hybrid Model giveth and taketh. Happy to clarify further.
j
Thanks! Would you be open to a pull request that clarifies that in the docs?
k
Yes! Anything that helps clarify for other users in the future is 👍 by me.
b
For reference, the use-case were trying to achieve is checking the results of a scheduled flow. So while normally you could inspect the state returned by
flow.run(...)
, with the scheduled flow we were hoping to use LocalResult to collect that data on the filesystem of the notebook. Any other ways to do that? Preferably without a remote store like S3Result.
k
Hmm, nothing is coming to mind as this runs directly into the Hybrid Execution Model. I think we can either store our results in a third location that both the notebook and flow have access to (shaking angry fist ) OR we expose the result information directly to the logger (maybe just the head) to relay back to the client.
b
Ok, thanks for the help!
j