cuddly-family-48123
02/21/2023, 5:22 PMcrooked-jordan-29960
02/21/2023, 5:42 PMstart -->
foreach facility -->
foreach unit -->
foreach asset -->
tune model or run calculation pipeline for (asset, unit, facility) -->
aggregate asset results within each unit -->
aggregate unit results within each facility -->
aggregate facility results -->
endcuddly-family-48123
02/21/2023, 6:20 PMself of the top level flow. Does metaflow know to maybe keep the other datasets on disk or something until I try to read them with self.facility[22].unit[33].asset[638]?
The other direction I was thinking was breaking down into smaller calculation pipelines where an individual run for an asset may have a tag appended that has the type of calculation and an entity id, like asset-risk-638 or asset-risk-875 and then when a downstream unit-aggregate-33 runs it knows that it needs to read results from child flows, asset-risk-638 or asset-risk-875 using the client sdk to access last run of these flows in the proper namespace. But it seems like this would add a bit of additional complexity.crooked-jordan-29960
02/21/2023, 7:01 PM<http://self.my|self.my>_data variables. Anyways, when using the foreach structure, Metaflow requires that you define some logic on how to merge the <http://self.my|self.my>_data variables from upstream steps. These are often referred to as join steps in the documentation and are required after foreaches. There is a merge_artifacts utility that can help you pick and choose exactly which slices or sets of 4GB data would need to read into memory or disk for the downstream task. Memory requirements will definitely blow up in the aggregation steps if you try to merge hundreds of 4GB datasets like this in one step, which is totally doable with Metaflow, just more of a cost/speed consideration at that point.cuddly-family-48123
02/22/2023, 3:34 PMcrooked-jordan-29960
02/22/2023, 3:59 PM