Hi A couple of questions: - Is it possible (via ...
# ask-metaflow
m
Hi A couple of questions: • Is it possible (via Metaflow) to add tags to all Metaflow artefacts in S3? • Also, is it possible to update these tags when access the data from S3? Looking through the codebase, I think the answer is no, but just wanted to double check. If it is no, has anyone managed to achieve something similar, e.g., through metaflow extensions?
c
Metaflow artifacts are versioned by the id of a run. Tags apply to runs. So you can tag runs, and filter runs by the relevant tag using Metaflow Client API to find artifacts that meet a certain tag.
m
Sorry, I am talking about object tags in S3, not Metaflow tags. https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html
Unless you are saying the runs with a given Metaflow tag automatically tags the S3 artefacts for that run?
c
oh I see, Metaflow is not using S3 tags like this. you could use boto3 to apply the S3 tags you want to certain objects. what is the use case?
m
I'm just starting to think about data retention for artefacts in S3. Was just wondering whether it would be possible to set a tag on the last type the artefact was accessed and then use this somehow in a retention policy
Super vague idea atm, as you can probably guess, but just wanted to check whether setting tags was possible via Metaflow. 🙂
My current focus is on not deleting the code artefacts via the retention policy, though it would be good to handle long-living artefacts too.
c
interesting, I've not seen this done, but it appears you can do it with the boto3 sdk which should have access to the artifacts Metaflow creates from the flowspec tasks.