A small question: When we have a flow that need to...
# ask-metaflow
f
A small question: When we have a flow that need to load data from S3, and when we run that flow locally, I assume that Metaflow will download those data to local disk. If so, would the data be cleaned up / deleted after the flow completes, or would we need to delete those data files manually ourselves? Where would these data files be stored?
1
v
good question! If you use the context manager
with
with
metaflow.S3
, it'll clean up by itself:
Copy code
with S3() as s3:
    s3.get_many(...)
this will delete all temporary files after
with
exits
👍 1
if you don't use
with
, you can call
s3.close()
manually to delete any temp files
by default the temp files are stored in the current working directory, but you can change it via the `tmproot` argument in the constructor
in addition, if you run tasks in the cloud and set
use_tmpfs=True
in
@batch
or
@kubernetes
, it'll use the fast in-memory tmpfs for temporary storage as explained here
f
I see!!! Thanks again Ville!!!
🙌 1