{"id":134945,"date":"2024-12-20T10:55:30","date_gmt":"2024-12-20T10:55:30","guid":{"rendered":"https:\/\/showbizztoday.com\/index.php\/2024\/12\/20\/introducing-configurable-metaflow-by-netflix-technology-blog-dec-2024\/"},"modified":"2024-12-20T10:55:30","modified_gmt":"2024-12-20T10:55:30","slug":"introducing-configurable-metaflow-by-netflix-technology-blog-dec-2024","status":"publish","type":"post","link":"https:\/\/showbizztoday.com\/index.php\/2024\/12\/20\/introducing-configurable-metaflow-by-netflix-technology-blog-dec-2024\/","title":{"rendered":"Introducing Configurable Metaflow | by Netflix Technology Blog | Dec, 2024"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n<div>\n<div>\n<div class=\"speechify-ignore ab cp\">\n<div class=\"speechify-ignore bh l\">\n<div class=\"hv hw hx hy hz ab\">\n<div>\n<div class=\"ab ia\">\n<div>\n<div class=\"bm\" aria-hidden=\"false\"><a href=\"https:\/\/netflixtechblog.medium.com\/?source=post_page---byline--d2fb8e9ba1c6--------------------------------\" rel=\"noopener follow\" target=\"_blank\"><\/p>\n<div class=\"l ib ic by id ie\">\n<div class=\"l fj\"><img decoding=\"async\" alt=\"Netflix Technology Blog\" class=\"l fd by dd de cx\" src=\"https:\/\/miro.medium.com\/v2\/resize:fill:88:88\/1*BJWRqfSMf9Da9vsXG9EBRQ.jpeg\" width=\"44\" height=\"44\" loading=\"lazy\" data-testid=\"authorPhoto\"\/><\/div>\n<\/div>\n<p><\/a><\/div>\n<\/div>\n<div class=\"ih ab fj\">\n<div>\n<div class=\"bm\" aria-hidden=\"false\"><a href=\"https:\/\/netflixtechblog.com\/?source=post_page---byline--d2fb8e9ba1c6--------------------------------\" rel=\"noopener  ugc nofollow\" target=\"_blank\"><\/p>\n<div class=\"l ii ij by id ik\">\n<div class=\"l fj\"><img decoding=\"async\" alt=\"Netflix TechBlog\" class=\"l fd by br il cx\" src=\"https:\/\/miro.medium.com\/v2\/resize:fill:48:48\/1*ty4NvNrGg4ReETxqU2N3Og.png\" width=\"24\" height=\"24\" loading=\"lazy\" data-testid=\"publicationPhoto\"\/><\/div>\n<\/div>\n<p><\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p id=\"156c\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\"><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/david-j-berg\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">David J. Berg<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/david-casler-05a5278\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">David Casler<\/em><\/a>^, <a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/romain-cledat-4a211a5\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Romain Cledat<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/qian-huang-emma\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Qian Huang<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/rui-lin-483a83111\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Rui Lin<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/nissanpow\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Nissan Pow<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/nurcansonmez\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Nurcan Sonmez<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/shashanksrikanth\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Shashank Srikanth<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/chaoying-wang\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Chaoying Wang<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/reginalw\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Regina Wang<\/em><\/a>*<em class=\"nv\">, <\/em><a class=\"af nu\" href=\"https:\/\/www.linkedin.com\/in\/zitingyu\/\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Darin Yu<\/em><\/a>*<br \/>*: Model Development Team, Machine Learning Platform<br \/>^: Content Demand Modeling Team<\/p>\n<p id=\"8a5d\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">A month in the past at QConSF, we showcased how <a class=\"af nu\" href=\"https:\/\/qconsf.com\/presentation\/nov2024\/supporting-diverse-ml-systems-netflix\" rel=\"noopener ugc nofollow\" target=\"_blank\">Netflix makes use of Metaflow to energy a various set of ML and AI use instances<\/a>, managing 1000&#8217;s of distinctive Metaflow flows. This adopted a earlier <a class=\"af nu\" rel=\"noopener ugc nofollow\" target=\"_blank\" href=\"https:\/\/netflixtechblog.com\/supporting-diverse-ml-systems-at-netflix-2d2e6b6d205d\">weblog<\/a> on the identical matter. Many of those tasks are beneath fixed improvement by devoted groups with their very own enterprise targets and improvement greatest practices, such because the system that <a class=\"af nu\" rel=\"noopener ugc nofollow\" target=\"_blank\" href=\"https:\/\/netflixtechblog.com\/supporting-content-decision-makers-with-machine-learning-995b7b76006f\">helps our content material resolution makers<\/a>, or the system that ranks which language subtitles are most dear for a particular piece of content material.<\/p>\n<p id=\"8a83\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">As a central ML and AI platform workforce, our function is to empower our accomplice groups with instruments that maximize their productiveness and effectiveness, whereas adapting to their particular wants (not the opposite method round). This has been a guiding design precept with <a class=\"af nu\" rel=\"noopener ugc nofollow\" target=\"_blank\" href=\"https:\/\/netflixtechblog.com\/open-sourcing-metaflow-a-human-centric-framework-for-data-science-fa72e04a5d9\">Metaflow since its inception<\/a>.<\/p>\n<figure class=\"nz oa ob oc od oe nw nx paragraph-image\">\n<div role=\"button\" tabindex=\"0\" class=\"of og fj oh bh oi\">\n<div class=\"nw nx ny\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*XrOVl25ZLx8_4nHLRxNgDg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*XrOVl25ZLx8_4nHLRxNgDg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*XrOVl25ZLx8_4nHLRxNgDg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*XrOVl25ZLx8_4nHLRxNgDg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*XrOVl25ZLx8_4nHLRxNgDg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*XrOVl25ZLx8_4nHLRxNgDg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*XrOVl25ZLx8_4nHLRxNgDg.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*XrOVl25ZLx8_4nHLRxNgDg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*XrOVl25ZLx8_4nHLRxNgDg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*XrOVl25ZLx8_4nHLRxNgDg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*XrOVl25ZLx8_4nHLRxNgDg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*XrOVl25ZLx8_4nHLRxNgDg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*XrOVl25ZLx8_4nHLRxNgDg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*XrOVl25ZLx8_4nHLRxNgDg.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"\/><img alt=\"\" class=\"bh md oj c\" width=\"700\" height=\"413\" loading=\"eager\" role=\"presentation\"\/><\/picture><\/div>\n<\/div><figcaption class=\"ok ff ol nw nx om on bf b bg z du\">Metaflow infrastructure stack<\/figcaption><\/figure>\n<p id=\"46ac\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Standing on the shoulders of our intensive cloud infrastructure, Metaflow facilitates quick access to knowledge, compute, and <a class=\"af nu\" rel=\"noopener ugc nofollow\" target=\"_blank\" href=\"https:\/\/netflixtechblog.com\/maestro-netflixs-workflow-orchestrator-ee13a06f9c78\">production-grade workflow orchestration<\/a>, in addition to built-in greatest practices for widespread issues akin to <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/scaling\/tagging\" rel=\"noopener ugc nofollow\" target=\"_blank\">collaboration<\/a>, <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/basics#artifacts\" rel=\"noopener ugc nofollow\" target=\"_blank\">versioning<\/a>, <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/scaling\/dependencies\" rel=\"noopener ugc nofollow\" target=\"_blank\">dependency administration<\/a>, and <a class=\"af nu\" href=\"https:\/\/outerbounds.com\/blog\/metaflow-dynamic-cards\" rel=\"noopener ugc nofollow\" target=\"_blank\">observability<\/a>, which groups use to setup ML\/AI experiments and programs that work for them. As a consequence, Metaflow customers at Netflix have been capable of run hundreds of thousands of experiments over the previous few years with out losing time on low-level issues.<\/p>\n<p id=\"8abd\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">While Metaflow goals to be un-opinionated about among the higher ranges of the stack, some groups inside Netflix have developed their very own opinionated tooling. As a part of Metaflow\u2019s adaptation to their particular wants, we continuously attempt to perceive what has been developed and, extra importantly, what gaps these options are filling.<\/p>\n<p id=\"bd7e\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">In some instances, we decide that the hole being addressed may be very workforce particular, or too opinionated at too excessive a stage within the stack, and we due to this fact determine to not develop it inside Metaflow. In different instances, nevertheless, we understand that we will develop an underlying assemble that aids in filling that hole. Note that even in that case, we don&#8217;t all the time purpose to fully fill the hole and as a substitute deal with extracting a extra common decrease stage idea that may be leveraged by that exact person but in addition by others. One such recurring sample we observed at Netflix is the necessity to deploy units of carefully associated flows, typically as half of a bigger pipeline involving desk creations, ETLs, and deployment jobs. Frequently, practitioners wish to <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/production\/coordinating-larger-metaflow-projects\" rel=\"noopener ugc nofollow\" target=\"_blank\">experiment with variants<\/a> of those flows, testing new knowledge, new parameterizations, or new algorithms, whereas maintaining the general construction of the movement or flows intact.<\/p>\n<p id=\"64c6\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">A pure answer is to make flows configurable utilizing configuration recordsdata, so variants will be outlined with out altering the code. Thus far, there hasn\u2019t been a built-in answer for configuring flows, so groups have constructed their bespoke options leveraging Metaflow\u2019s <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/basics#advanced-parameters\" rel=\"noopener ugc nofollow\" target=\"_blank\">JSON-typed Parameters<\/a>, <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/scaling\/data#data-in-local-files\" rel=\"noopener ugc nofollow\" target=\"_blank\">IncludeFile<\/a>, and <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/production\/scheduling-metaflow-flows\/scheduling-with-aws-step-functions#deploy-time-parameters\" rel=\"noopener ugc nofollow\" target=\"_blank\">deploy-time Parameters<\/a> or deploying their very own home-grown answer (typically with nice ache). However, none of those options make it straightforward to configure all features of the movement\u2019s conduct, decorators specifically.<\/p>\n<figure class=\"nz oa ob oc od oe nw nx paragraph-image\">\n<div role=\"button\" tabindex=\"0\" class=\"of og fj oh bh oi\">\n<div class=\"nw nx pr\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*3f9q7PZgxYX8rRygIOWXyA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*3f9q7PZgxYX8rRygIOWXyA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*3f9q7PZgxYX8rRygIOWXyA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*3f9q7PZgxYX8rRygIOWXyA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*3f9q7PZgxYX8rRygIOWXyA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*3f9q7PZgxYX8rRygIOWXyA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*3f9q7PZgxYX8rRygIOWXyA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*3f9q7PZgxYX8rRygIOWXyA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*3f9q7PZgxYX8rRygIOWXyA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*3f9q7PZgxYX8rRygIOWXyA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*3f9q7PZgxYX8rRygIOWXyA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*3f9q7PZgxYX8rRygIOWXyA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*3f9q7PZgxYX8rRygIOWXyA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*3f9q7PZgxYX8rRygIOWXyA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"\/><img alt=\"\" class=\"bh md oj c\" width=\"700\" height=\"434\" loading=\"lazy\" role=\"presentation\"\/><\/picture><\/div>\n<\/div><figcaption class=\"ok ff ol nw nx om on bf b bg z du\">Requests for a characteristic like Metaflow Config<\/figcaption><\/figure>\n<p id=\"0e00\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Outside Netflix, now we have seen related steadily requested questions on the <a class=\"af nu\" href=\"http:\/\/chat.metaflow.org\" rel=\"noopener ugc nofollow\" target=\"_blank\">Metaflow neighborhood Slack<\/a> as proven within the person quotes above:<\/p>\n<p id=\"36e8\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">Today, to reply the FAQ, we introduce a brand new \u2014 small however mighty \u2014 characteristic in Metaflow: <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/configuring-flows\/introduction\" rel=\"noopener ugc nofollow\" target=\"_blank\">a Config object<\/a>. Configs complement the prevailing Metaflow constructs of artifacts and Parameters, by permitting you to configure all features of the movement, decorators specifically, previous to any run beginning. At the top of the day, artifacts, Parameters and Configs are all saved as artifacts by Metaflow however they differ in when they&#8217;re persevered as proven within the diagram under:<\/p>\n<figure class=\"nz oa ob oc od oe nw nx paragraph-image\">\n<div role=\"button\" tabindex=\"0\" class=\"of og fj oh bh oi\">\n<div class=\"nw nx qa\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*L-klklqt1n9LKXG0jh-fTw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*L-klklqt1n9LKXG0jh-fTw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*L-klklqt1n9LKXG0jh-fTw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*L-klklqt1n9LKXG0jh-fTw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*L-klklqt1n9LKXG0jh-fTw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*L-klklqt1n9LKXG0jh-fTw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*L-klklqt1n9LKXG0jh-fTw.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*L-klklqt1n9LKXG0jh-fTw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*L-klklqt1n9LKXG0jh-fTw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*L-klklqt1n9LKXG0jh-fTw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*L-klklqt1n9LKXG0jh-fTw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*L-klklqt1n9LKXG0jh-fTw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*L-klklqt1n9LKXG0jh-fTw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*L-klklqt1n9LKXG0jh-fTw.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"\/><img alt=\"\" class=\"bh md oj c\" width=\"700\" height=\"302\" loading=\"lazy\" role=\"presentation\"\/><\/picture><\/div>\n<\/div><figcaption class=\"ok ff ol nw nx om on bf b bg z du\">Different knowledge artifacts in Metaflow<\/figcaption><\/figure>\n<p id=\"448b\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Said one other method:<\/p>\n<ul class=\"\">\n<li id=\"b920\" class=\"mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt ps pt pu bk\">An<strong class=\"my gv\"> artifact<\/strong> is resolved and persevered to the datastore on the finish of every process.<\/li>\n<li id=\"73c1\" class=\"mw mx gu my b mz pv nb nc nd pw nf ng nh px nj nk nl py nn no np pz nr ns nt ps pt pu bk\">A<strong class=\"my gv\"> parameter<\/strong> is resolved and persevered at first of a run; it might due to this fact be modified as much as that time. One widespread use case is to make use of <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/production\/event-triggering\" rel=\"noopener ugc nofollow\" target=\"_blank\">triggers<\/a> to move values to a run proper earlier than executing. Parameters can solely be used inside your step code.<\/li>\n<li id=\"61b0\" class=\"mw mx gu my b mz pv nb nc nd pw nf ng nh px nj nk nl py nn no np pz nr ns nt ps pt pu bk\">A<strong class=\"my gv\"> config<\/strong> is resolved and persevered when the movement is deployed. When utilizing a scheduler akin to <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/production\/scheduling-metaflow-flows\/scheduling-with-argo-workflows\" rel=\"noopener ugc nofollow\" target=\"_blank\">Argo Workflows<\/a>, deployment occurs when create\u2019ing the movement. In the case of an area run, \u201cdeployment\u201d occurs simply previous to the execution of the run \u2014 consider \u201cdeployment\u201d as gathering all that&#8217;s wanted to run the movement. Unlike parameters, configs can be utilized extra extensively in your movement code, notably, they can be utilized in step or movement stage decorators in addition to to set defaults for parameters. Configs can after all even be used inside your movement.<\/li>\n<\/ul>\n<p id=\"226d\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">As an instance, you possibly can specify a Config that reads a pleasantly human-readable configuration file, formatted as <a class=\"af nu\" href=\"https:\/\/toml.io\/en\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">TOML<\/a>. The Config specifies a triggering \u2018@schedule\u2019 and \u2018@resource\u2019 necessities, in addition to application-specific parameters for this particular deployment:<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"5155\" class=\"qf op gu qc b bg qg qh l qi qj\">[schedule]<br\/>cron = \"0 * * * *\"<p>[model]<br\/>optimizer = \"adam\"<br\/>learning_rate = 0.5<\/p><p>[resources]<br\/>cpu = 1<\/p><\/span><\/pre>\n<p id=\"be39\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Using the newly launched Metaflow 2.13, you possibly can configure a movement with a Config like above, as demonstrated by this movement:<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"ce75\" class=\"qf op gu qc b bg qg qh l qi qj\">import pprint<br\/>from metaflow import FlowSpec, step, Config, sources, config_expr, schedule<p>@schedule(cron=config_expr(\"config.schedule.cron\"))<br\/>class ConfigurableStream(FlowSpec):<br\/>config = Config(\"config\", default=\"myconfig.toml\", parser=\"tomllib.hundreds\")<\/p><p>@sources(cpu=config.sources.cpu)<br\/>@step<br\/>def begin(self):<br\/>print(\"Config loaded:\")<br\/>pprint.pp(self.config)<br\/>self.subsequent(self.finish)<\/p><p>@step<br\/>def finish(self):<br\/>move<\/p><p>if __name__ == \"__main__\":<br\/>ConfigurableStream()<\/p><\/span><\/pre>\n<p id=\"251b\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">There is quite a bit occurring within the code above, just a few highlights:<\/p>\n<ul class=\"\">\n<li id=\"cc56\" class=\"mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt ps pt pu bk\">you possibly can check with configs <em class=\"nv\">earlier than<\/em> they&#8217;ve been outlined utilizing \u2018config_expr\u2019.<\/li>\n<li id=\"2cf7\" class=\"mw mx gu my b mz pv nb nc nd pw nf ng nh px nj nk nl py nn no np pz nr ns nt ps pt pu bk\">you possibly can outline arbitrary <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/configuring-flows\/parsing-configs\" rel=\"noopener ugc nofollow\" target=\"_blank\">parsers<\/a> \u2014 utilizing a string means the parser doesn\u2019t even should be current remotely!<\/li>\n<\/ul>\n<p id=\"1590\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">From the developer\u2019s standpoint, Configs behave like dictionary-like artifacts. For comfort, they assist the dot-syntax (when attainable) for accessing keys, making it straightforward to entry values in a nested configuration. You may unpack the entire Config (or a subtree of it) with Python\u2019s normal dictionary unpacking syntax, \u2018**config\u2019. The normal dictionary subscript notation can be accessible.<\/p>\n<p id=\"5e1e\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Since Configs flip into dictionary artifacts, they get versioned and persevered routinely as artifacts. You can <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/client\" rel=\"noopener ugc nofollow\" target=\"_blank\">entry Configs of any previous runs simply by means of the Client API<\/a>. As a consequence, your knowledge, fashions, code, Parameters, Configs, and <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/scaling\/dependencies\" rel=\"noopener ugc nofollow\" target=\"_blank\">execution environments<\/a> are all saved as a constant bundle \u2014 neatly organized in <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/scaling\/tagging\" rel=\"noopener ugc nofollow\" target=\"_blank\">Metaflow namespaces<\/a> \u2014 paving the best way for simply reproducible, constant, low-boilerplate, and now simply configurable experiments and strong manufacturing deployments.<\/p>\n<p id=\"ee02\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">While you may get far by accompanying your movement with a easy config file (saved in your favourite format, due to <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/configuring-flows\/parsing-configs\" rel=\"noopener ugc nofollow\" target=\"_blank\">user-definable parsers<\/a>), Configs unlock numerous superior use instances. Consider these examples from the up to date documentation:<\/p>\n<p id=\"ac3f\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">A significant advantage of Config over earlier extra hacky options for configuring flows is that they work seamlessly with different options of Metaflow: you possibly can run steps remotely and deploy flows to manufacturing, even when counting on customized parsers, with out having to fret about packaging Configs or parsers manually or maintaining Configs constant throughout duties. Configs additionally work with the <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/managing-flows\/runner\" rel=\"noopener ugc nofollow\" target=\"_blank\">Runner<\/a> and <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/managing-flows\/deployer\" rel=\"noopener ugc nofollow\" target=\"_blank\">Deployer<\/a>.<\/p>\n<p id=\"84f1\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">When used together with a configuration supervisor like <a class=\"af nu\" href=\"https:\/\/hydra.cc\" rel=\"noopener ugc nofollow\" target=\"_blank\">Hydra<\/a>, Configs allow a sample that&#8217;s extremely related for ML and AI use instances: orchestrating experiments over a number of configurations or sweeping over parameter areas. While Metaflow has all the time supported <a class=\"af nu\" href=\"https:\/\/docs.outerbounds.com\/grid-search-with-metaflow\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">sweeping over parameter grids<\/a> simply utilizing foreaches, it hasn\u2019t been simply attainable to change the movement itself, e.g. to alter <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/api\/step-decorators\/resources\" rel=\"noopener ugc nofollow\" target=\"_blank\">@sources<\/a> or <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/api\/step-decorators\/conda\" rel=\"noopener ugc nofollow\" target=\"_blank\">@pypi\/@conda<\/a> dependencies for each experiment.<\/p>\n<p id=\"f7ef\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">In a typical case, you set off a Metaflow movement that consumes a configuration file, altering <em class=\"nv\">how<\/em> a run behaves. With Hydra, you possibly can <a class=\"af nu\" href=\"https:\/\/en.wikipedia.org\/wiki\/Inversion_of_control\" rel=\"noopener ugc nofollow\" target=\"_blank\">invert the management<\/a>: it&#8217;s Hydra that decides <em class=\"nv\">what<\/em> will get run based mostly on a configuration file. Thanks to Metaflow\u2019s new <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/managing-flows\/runner\" rel=\"noopener ugc nofollow\" target=\"_blank\">Runner<\/a> and <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/managing-flows\/deployer\" rel=\"noopener ugc nofollow\" target=\"_blank\">Deployer<\/a> APIs, you possibly can create a Hydra app that operates Metaflow programmatically \u2014 as an example, to deploy and execute a whole bunch of variants of a movement in a large-scale experiment.<\/p>\n<p id=\"1fda\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\"><a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/configuring-flows\/config-driven-experimentation\" rel=\"noopener ugc nofollow\" target=\"_blank\">Take a have a look at two fascinating examples of this sample<\/a> within the documentation. As a teaser, this video exhibits Hydra orchestrating deployment of tens of Metaflow flows, every of which benchmarks PyTorch utilizing a various variety of CPU cores and tensor sizes, updating a visualization of the leads to real-time because the experiment progresses:<\/p>\n<figure class=\"nz oa ob oc od oe\"><figcaption class=\"ok ff ol nw nx om on bf b bg z du\">Example utilizing Hydra with Metaflow<\/figcaption><\/figure>\n<p id=\"4282\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">To give a motivating instance of what configurations appear to be at Netflix in apply, let\u2019s contemplate <em class=\"nv\">Metaboost<\/em>, an inside Netflix CLI device that helps ML practitioners handle, develop and execute their cross-platform tasks, considerably just like the open-source Hydra mentioned above however with particular integrations to the Netflix ecosystem. Metaboost is an instance of an opinionated framework developed by a workforce already utilizing Metaflow. In reality, part of the inspiration for introducing Configs in Metaflow got here from this very use case.<\/p>\n<p id=\"9322\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Metaboost serves as a single interface to 3 completely different inside platforms at Netflix that handle ETL\/Workflows (<a class=\"af nu\" rel=\"noopener ugc nofollow\" target=\"_blank\" href=\"https:\/\/netflixtechblog.com\/maestro-netflixs-workflow-orchestrator-ee13a06f9c78\"><em class=\"nv\">Maestro<\/em><\/a>), Machine Learning Pipelines (<a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\" rel=\"noopener ugc nofollow\" target=\"_blank\"><em class=\"nv\">Metaflow<\/em><\/a>) and Data Warehouse Tables (<em class=\"nv\">Kragle<\/em>). In this context, having a single configuration system to handle a ML challenge holistically provides customers elevated challenge coherence and decreased challenge threat.<\/p>\n<h2 id=\"fbf6\" class=\"qn op gu bf oq qo qp dy ou qq qr ea oy nh qs qt qu nl qv qw qx np qy qz ra rb bk\">Configuration in Metaboost<\/h2>\n<p id=\"a6d0\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">Ease of configuration and templatizing are core values of Metaboost. Templatizing in Metaboost is achieved by means of the idea of <em class=\"nv\">bindings<\/em>, whereby we will <em class=\"nv\">bind<\/em> a Metaflow pipeline to an arbitrary label, after which create a corresponding bespoke configuration for that label. The binding-connected configuration is then merged into a world set of configurations containing such info as GIT repository, department, and so forth. Binding a Metaflow, may even sign to Metaboost that it ought to instantiate the Metaflow movement as soon as per binding into our orchestration cluster.<\/p>\n<p id=\"747b\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Imagine a ML practitioner on the Netflix Content ML workforce, sourcing options from a whole bunch of columns in our knowledge warehouse, and creating a large number of fashions in opposition to a <em class=\"nv\">rising<\/em> suite of metrics. When a model new content material metric comes alongside, with Metaboost, the primary model of the metric\u2019s predictive mannequin can simply be created by merely swapping the goal column in opposition to which the mannequin is skilled.<\/p>\n<p id=\"dd0d\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Subsequent variations of the mannequin will consequence from experimenting with hyper parameters, tweaking characteristic engineering, or conducting characteristic diets. Metaboost\u2019s bindings, and their integration with Metaflow Configs, will be leveraged to scale the variety of experiments as quick as a scientist can create experiment based mostly configurations.<\/p>\n<h2 id=\"edb4\" class=\"qn op gu bf oq qo qp dy ou qq qr ea oy nh qs qt qu nl qv qw qx np qy qz ra rb bk\">Scaling experiments with Metaboost bindings \u2014 backed by Metaflow Config<\/h2>\n<p id=\"9ad4\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">Consider a Metaboost ML challenge named `demo` that creates and hundreds knowledge to customized tables (ETL managed by Maestro), after which trains a easy mannequin on this knowledge (ML Pipeline managed by Metaflow). The challenge construction of this repository may appear to be the next:<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"abe4\" class=\"qf op gu qc b bg qg qh l qi qj\">\u251c\u2500\u2500 metaflows<br\/>\u2502   \u251c\u2500\u2500 customized                               -&gt; customized python code, utilized by<br\/>|   |   |                                       Metaflow<br\/>\u2502   \u2502   \u251c\u2500\u2500 knowledge.py<br\/>\u2502   \u2502   \u2514\u2500\u2500 mannequin.py<br\/>\u2502   \u2514\u2500\u2500 coaching.py                          -&gt; defines our Metaflow pipeline<br\/>\u251c\u2500\u2500 schemas<br\/>\u2502   \u251c\u2500\u2500 demo_features_f.tbl.yaml             -&gt; desk DDL, shops our ETL<br\/>|   |                                           output, Metaflow enter<br\/>\u2502   \u2514\u2500\u2500 demo_predictions_f.tbl.yaml          -&gt; desk DDL,<br\/>|                                               shops our Metaflow output<br\/>\u251c\u2500\u2500 settings<br\/>\u2502   \u251c\u2500\u2500 settings.configuration.EXP_01.yaml   -&gt; defines the additive<br\/>|   |                                           config for Experiment 1<br\/>\u2502   \u251c\u2500\u2500 settings.configuration.EXP_02.yaml   -&gt; defines the additive<br\/>|   |                                           config for Experiment 2<br\/>\u2502   \u251c\u2500\u2500 settings.configuration.yaml          -&gt; defines our world<br\/>|   |                                           configuration<br\/>\u2502   \u2514\u2500\u2500 settings.setting.yaml            -&gt; defines parameters based mostly on<br\/>|                                               git department (e.g. READ_DB)<br\/>\u251c\u2500\u2500 exams<br\/>\u251c\u2500\u2500 workflows<br\/>\u2502   \u251c\u2500\u2500 sql<br\/>\u2502   \u251c\u2500\u2500 demo.demo_features_f.sch.yaml        -&gt; Maestro workflow, defines ETL<br\/>\u2502   \u2514\u2500\u2500 demo.most important.sch.yaml                   -&gt; Maestro workflow, orchestrates<br\/>|                                               ETLs and Metaflow<br\/>\u2514\u2500\u2500 metaboost.yaml                           -&gt; defines our challenge for<br\/>Metaboost<\/span><\/pre>\n<p id=\"f679\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">The configuration recordsdata within the settings listing above include the next YAML recordsdata:<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"1929\" class=\"qf op gu qc b bg qg qh l qi qj\"># settings.configuration.yaml (world configuration)<br\/>mannequin:<br\/>fit_intercept: True<br\/>conda:<br\/>numpy: '1.22.4'<br\/>\"scikit-learn\": '1.4.0'<\/span><\/pre>\n<pre class=\"rc qb qc qd bp qe bb bk\"><span id=\"9ce6\" class=\"qf op gu qc b bg qg qh l qi qj\"># settings.configuration.EXP_01.yaml<br\/>target_column: metricA<br\/>options:<br\/>- runtime<br\/>- content_type<br\/>- top_billed_talent<\/span><\/pre>\n<pre class=\"rc qb qc qd bp qe bb bk\"><span id=\"2b0b\" class=\"qf op gu qc b bg qg qh l qi qj\"># settings.configuration.EXP_02.yaml<br\/>target_column: metricA<br\/>options:<br\/>- runtime<br\/>- director<br\/>- box_office<\/span><\/pre>\n<p id=\"069e\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Metaboost will merge every experiment configuration (<em class=\"nv\">*.EXP*.yaml<\/em>) into the worldwide configuration (settings.configuration.yaml) <em class=\"nv\">individually<\/em> at Metaboost command initialization. Let\u2019s check out how Metaboost combines these configurations with a Metaboost command:<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"4715\" class=\"qf op gu qc b bg qg qh l qi qj\">(venv-demo) ~\/tasks\/metaboost-demo [branch=demoX] <br\/>$ metaboost metaflow settings present --yaml-path=configuration<p>binding=EXP_01:<br\/>mannequin:                     -&gt; outlined in setting.configuration.yaml (world)<br\/>fit_intercept: true<br\/>conda:                     -&gt; outlined in setting.configuration.yaml (world)<br\/>numpy: 1.22.4<br\/>\"scikit-learn\": 1.4.0<br\/>target_column: metricA     -&gt; outlined in setting.configuration.EXP_01.yaml<br\/>options:                  -&gt; outlined in setting.configuration.EXP_01.yaml<br\/>- runtime<br\/>- content_type<br\/>- top_billed_talent<\/p><p>binding=EXP_02:<br\/>mannequin:                     -&gt; outlined in setting.configuration.yaml (world)<br\/>fit_intercept: true<br\/>conda:                     -&gt; outlined in setting.configuration.yaml (world)<br\/>numpy: 1.22.4<br\/>\"scikit-learn\": 1.4.0<br\/>target_column: metricA     -&gt; outlined in setting.configuration.EXP_02.yaml<br\/>options:                  -&gt; outlined in setting.configuration.EXP_02.yaml<br\/>- runtime<br\/>- director<br\/>- box_office<\/p><\/span><\/pre>\n<p id=\"a78e\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Metaboost understands it ought to deploy\/run two unbiased situations of coaching.py \u2014 one for the EXP_01 binding and one for the EXP_02 binding. You may see that Metaboost is conscious that the tables and ETL workflows are <em class=\"nv\">not certain<\/em>, and will solely be deployed as soon as. These particulars of which artifacts to bind and which to depart unbound are encoded within the challenge\u2019s top-level metaboost.yaml file.<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"9346\" class=\"qf op gu qc b bg qg qh l qi qj\">(venv-demo) ~\/tasks\/metaboost-demo [branch=demoX] <br\/>$ metaboost challenge listing<p>Tables (metaboost desk listing):<br\/>schemas\/demo_predictions_f.tbl.yaml (binding=default):<br\/>table_path=prodhive\/demo_db\/demo_predictions_f<br\/>schemas\/demo_features_f.tbl.yaml (binding=default):<br\/>table_path=prodhive\/demo_db\/demo_features_f<\/p><p>Workflows (metaboost workflow listing):<br\/>workflows\/demo.demo_features_f.sch.yaml (binding=default):<br\/>cluster=sandbox, workflow.id=demo.branch_demox.demo_features_f<br\/>workflows\/demo.most important.sch.yaml (binding=default):<br\/>cluster=sandbox, workflow.id=demo.branch_demox.most important<\/p><p>Metaflows (metaboost metaflow listing):<br\/>metaflows\/coaching.py (binding=EXP_01): -&gt; EXP_01 occasion of coaching.py<br\/>cluster=sandbox, workflow.id=demo.branch_demox.EXP_01.coaching   <br\/>metaflows\/coaching.py (binding=EXP_02): -&gt; EXP_02 occasion of coaching.py<br\/>cluster=sandbox, workflow.id=demo.branch_demox.EXP_02.coaching<\/p><\/span><\/pre>\n<p id=\"c673\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Below is an easy Metaflow pipeline that fetches knowledge, executes characteristic engineering, and trains a LinearRegression mannequin. The work to combine Metaboost Settings right into a person\u2019s Metaflow pipeline (applied utilizing Metaflow Configs) is as straightforward as including a single mix-in to the FlowSpec definition:<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"6889\" class=\"qf op gu qc b bg qg qh l qi qj\">from metaflow import FlowSpec, Parameter, conda_base, step<br\/>from customized.knowledge import feature_engineer, get_data<br\/>from metaflow.metaboost import MetaboostSettings<p>@conda_base(<br\/>libraries=MetaboostSettings.get_deploy_time_settings(\"configuration.conda\")<br\/>)<br\/>class DemoTraining(FlowSpec, MetaboostSettings):<br\/>prediction_date = Parameter(\"prediction_date\", kind=int, default=-1)<\/p><p>@step<br\/>def begin(self):<br\/># get show_settings() at no cost with the mixin<br\/># and get handy debugging information<br\/>self.show_settings(exclude_patterns=[\"artifact*\", \"system*\"])<\/p><p>self.subsequent(self.get_features)<\/p><p>@step<br\/>def get_features(self):<br\/># characteristic engineers on our extracted knowledge<br\/>self.fe_df = feature_engineer(<br\/># hundreds knowledge from our ETL pipeline<br\/>knowledge=get_data(prediction_date=self.prediction_date),<br\/>options=self.settings.configuration.options +<br\/>[self.settings.configuration.target_column]<br\/>)<\/p><p>self.subsequent(self.practice)<\/p><p>@step<br\/>def practice(self):<br\/>from sklearn.linear_model import LinearRegression<\/p><p># trains our mannequin<br\/>self.mannequin = LinearRegression(<br\/>fit_intercept=self.settings.configuration.mannequin.fit_intercept<br\/>).match(<br\/>X=self.fe_df[self.settings.configuration.features],<br\/>y=self.fe_df[self.settings.configuration.target_column]<br\/>)<br\/>print(f\"Fit slope: {self.mannequin.coef_[0]}\")<br\/>print(f\"Fit intercept: {self.mannequin.intercept_}\")<\/p><p>self.subsequent(self.finish)<\/p><p>@step<br\/>def finish(self):<br\/>move<\/p><p>if __name__ == \"__main__\":<br\/>DemoTraining()<\/p><\/span><\/pre>\n<p id=\"1fa8\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">The Metaflow Config is added to the FlowSpec by mixing within the MetaboostSettings class. Referencing a configuration worth is as straightforward as utilizing the dot syntax to drill into whichever parameter you\u2019d like.<\/p>\n<p id=\"5872\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Finally let\u2019s check out the output from our pattern Metaflow above. We execute experiment EXP_01 with<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"77b1\" class=\"qf op gu qc b bg qg qh l qi qj\">metaboost metaflow run --binding=EXP_01<\/span><\/pre>\n<p id=\"ea6c\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">which upon execution will merge the configurations right into a single <em class=\"nv\">settings<\/em> file (proven beforehand) and serialize it as a yaml file to the <em class=\"nv\">.metaboost\/settings\/compiled\/<\/em> listing.<\/p>\n<p id=\"0e34\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">You can see the precise command and args that have been sub-processed within the <em class=\"nv\">Metaboost Execution<\/em> part under. Please notice the <strong class=\"my gv\">\u2013config<\/strong> argument pointing to the serialized yaml file, after which subsequently accessible through <strong class=\"my gv\">self.settings<\/strong>. Also notice the handy printing of configuration values to stdout throughout the begin step utilizing a blended in operate named <strong class=\"my gv\">show_settings()<\/strong>.<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"6902\" class=\"qf op gu qc b bg qg qh l qi qj\">(venv-demo) ~\/tasks\/metaboost-demo [branch=demoX] <br\/>$ metaboost metaflow run --binding=EXP_01<p>Metaboost Execution: <br\/>- python3.10 \/root\/repos\/cdm-metaboost-irl\/metaflows\/coaching.py<br\/>--no-pylint --package-suffixes=.py --environment=conda<br\/>--config settings<br\/>.metaboost\/settings\/compiled\/settings.branch_demox.EXP_01.coaching.mP4eIStG.yaml<br\/>run --prediction_date20241006<\/p><p>Metaflow 2.12.39+nflxfastdata(2.13.5);nflx(2.13.5);metaboost(0.0.27)<br\/>executing DemoTraining for person:dcasler<br\/>Validating your movement...<br\/>The graph appears to be like good!<br\/>Bootstrapping Conda setting... (this might take a couple of minutes)<br\/>All packages already cached in s3.<br\/>All environments already cached in s3.<\/p><p>Workflow beginning (run-id 50), see it within the UI at<br\/>https:\/\/metaflowui.prod.netflix.net\/DemoTraining\/50<\/p><p>[50\/start\/251640833] Task is beginning.<br\/>[50\/start\/251640833] Configuration Values:<br\/>[50\/start\/251640833]   settings.configuration.conda.numpy            = 1.22.4<br\/>[50\/start\/251640833]   settings.configuration.options.0             = runtime<br\/>[50\/start\/251640833]   settings.configuration.options.1             = content_type<br\/>[50\/start\/251640833]   settings.configuration.options.2             = top_billed_talent<br\/>[50\/start\/251640833]   settings.configuration.mannequin.fit_intercept    = True<br\/>[50\/start\/251640833]   settings.configuration.target_column          = metricA<br\/>[50\/start\/251640833]   settings.setting.READ_DATABASE            = data_warehouse_prod<br\/>[50\/start\/251640833]   settings.setting.TARGET_DATABASE          = demo_dev<br\/>[50\/start\/251640833] Task completed efficiently.<\/p><p>[50\/get_features\/251640840] Task is beginning.<br\/>[50\/get_features\/251640840] Task completed efficiently.<\/p><p>[50\/train\/251640854] Task is beginning.<br\/>[50\/train\/251640854] Fit slope: 0.4702672504331096<br\/>[50\/train\/251640854] Fit intercept: -6.247919678070083<br\/>[50\/train\/251640854] Task completed efficiently.<\/p><p>[50\/end\/251640868] Task is beginning.<br\/>[50\/end\/251640868] Task completed efficiently.<\/p><p>Done! See the run within the UI at<br\/>https:\/\/metaflowui.prod.netflix.net\/DemoTraining\/50<\/p><\/span><\/pre>\n<h2 id=\"d6d2\" class=\"qn op gu bf oq qo qp dy ou qq qr ea oy nh qs qt qu nl qv qw qx np qy qz ra rb bk\">Takeaways<\/h2>\n<p id=\"feb6\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">Metaboost is an integration device that goals to ease the challenge improvement, administration and execution burden of ML tasks at Netflix. It employs a configuration system that mixes git based mostly parameters, world configurations and arbitrarily <em class=\"nv\">certain<\/em> configuration recordsdata to be used throughout execution in opposition to inside Netflix platforms.<\/p>\n<p id=\"7ec5\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Integrating this configuration system with the brand new Config in Metaflow is extremely easy (by design), solely requiring customers so as to add a mix-in class to their FlowSpec \u2014 <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/configuring-flows\/custom-parsers#including-default-configs-in-flows\" rel=\"noopener ugc nofollow\" target=\"_blank\">just like this instance in Metaflow documentation<\/a> \u2014 after which reference the configuration values in steps or decorators. The instance above templatizes a coaching Metaflow for the sake of experimentation, however customers might simply as simply use bindings\/configs to templatize their flows throughout goal metrics, enterprise initiatives or every other arbitrary strains of labor.<\/p>\n<p id=\"2f85\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">It couldn\u2019t be simpler to get began with Configs! Just<\/p>\n<pre class=\"nz oa ob oc od qb qc qd bp qe bb bk\"><span id=\"872c\" class=\"qf op gu qc b bg qg qh l qi qj\">pip set up -U metaflow<\/span><\/pre>\n<p id=\"e0ec\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">to get the newest model and <a class=\"af nu\" href=\"https:\/\/docs.metaflow.org\/metaflow\/configuring-flows\/introduction\" rel=\"noopener ugc nofollow\" target=\"_blank\">head to the up to date documentation<\/a> for examples. If you&#8217;re impatient, you&#8217;ll find and execute <a class=\"af nu\" href=\"https:\/\/github.com\/outerbounds\/config-examples\" rel=\"noopener ugc nofollow\" target=\"_blank\">all config-related examples on this repository<\/a> as properly.<\/p>\n<p id=\"53e2\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">If you will have any questions or suggestions about Config (or different Metaflow options), you possibly can attain out to us on the <a class=\"af nu\" href=\"http:\/\/chat.metaflow.org\" rel=\"noopener ugc nofollow\" target=\"_blank\">Metaflow neighborhood Slack<\/a>.<\/p>\n<p id=\"97f9\" class=\"pw-post-body-paragraph mw mx gu my b mz pm nb nc nd pn nf ng nh po nj nk nl pp nn no np pq nr ns nt gn bk\">We want to thank <a class=\"af nu\" href=\"https:\/\/outerbounds.co\" rel=\"noopener ugc nofollow\" target=\"_blank\">Outerbounds<\/a> for his or her collaboration on this characteristic; for rigorously testing it and creating a repository of examples to showcase among the prospects provided by this characteristic.<\/p>\n<\/div>\n<p>[ad_2]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] David J. Berg*, David Casler^, Romain Cledat*, Qian Huang*, Rui Lin*, Nissan Pow*, Nurcan Sonmez*, Shashank Srikanth*, Chaoying Wang*, Regina Wang*, Darin Yu**: Model Development Team, Machine Learning Platform^: Content Demand Modeling Team A month in the past at QConSF, we showcased how Netflix makes use of Metaflow to energy a various set of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":134947,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[955,7200,7094,4579,7201,115,4337],"class_list":{"0":"post-134945","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-netflix","8":"tag-blog","9":"tag-configurable","10":"tag-dec","11":"tag-introducing","12":"tag-metaflow","13":"tag-netflix","14":"tag-technology"},"_links":{"self":[{"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/posts\/134945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/comments?post=134945"}],"version-history":[{"count":0,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/posts\/134945\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/media\/134947"}],"wp:attachment":[{"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/media?parent=134945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/categories?post=134945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/tags?post=134945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}