I set up a virtual environment in my ubunutu machi...
# prefect-server
t
I set up a virtual environment in my ubunutu machine for prefect. my question is why are results saved in the home/ubuntu/.prefect/results and not on the environment
z
Hi @Tomás Emilio Silva Ebensperger this is the default directory for Prefect
LocalResult
. I'm not 100% sure how it interacts with virtual environments, but the result directory is configurable. You can read a bit more about Results here https://docs.prefect.io/core/concepts/results.html#pipeline-persisted-results I think something like the following pattern would be helpful for your use case
Copy code
from prefect import Flow, task
from prefect.engine.results import LocalResult

@task(result=LocalResult(dir='path/in/my/virutal/environment/'))
def my_task():
    return 3
upvote 2
t
Thanks!