fresh-wall-61998
01/17/2024, 10:20 PMfresh-laptop-72652
01/17/2024, 10:44 PMfrom metaflow import Run, namespace
# set to global namespace so you aren't limited to your user namespace
namespace(None)
some_df = Run("FlowName/123").data.some_df
another option is to pass in the run id to the s3 client
from metaflow import S3
with S3(run=Run("FlowName/123") as s3:
data = [obj.blob for obj in s3.get_many(urls)]
...
lastly, I believe you could also derive the s3 paths yourself using something like this
https://outerbounds-community.slack.com/archives/C02116BBNTU/p1622485446115600?thread_ts=1622448797.113500&cid=C02116BBNTUfresh-wall-61998
01/17/2024, 11:21 PMfresh-wall-61998
01/20/2024, 1:54 AMartifact._object['location'] does contain a s3 location but I only found metadata in that s3 bucket and not the actual artifacts. Any clues on other attributes that might contain the actual artifacts? (I believe there is a backing s3 datastore that does actually contain the artifacts)fresh-laptop-72652
01/20/2024, 6:21 AMdata/ dir within the associated flow, e.g. <s3://your-s3-bucket/metaflow/FlowName/data/><hashed value>/<hashed values>
I'm not entirely sure how that content-addressed storage should be queried, would be a better question for the metaflow team –– that said, it's probably not a good design pattern to piggy back on top of. If you need to access raw files in S3 directly, you probably should be storing them yourself and using a format you can design around (e.g. serializing a dataframe to parquet). You can still use metaflow's S3 client to do those writes for you, and then just store the pointer to the file in S3 alongside the flow for metadata tracking. That same pointer can be used directly elsewhere as you see fit