	{"id":63668,"date":"2021-10-22T11:15:55","date_gmt":"2021-10-22T10:15:55","guid":{"rendered":"https:\/\/www.artefact.com\/?post_type=news&#038;p=63668"},"modified":"2024-09-20T17:45:46","modified_gmt":"2024-09-20T16:45:46","slug":"serving-ml-models-at-scale-using-mlflow-on-kubernetes-part-1","status":"publish","type":"blog","link":"https:\/\/www.artefact.com\/zh\/blog\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-part-1\/","title":{"rendered":"\u5728 Kubernetes \u4e0a\u4f7f\u7528 Mlflow \u5927\u89c4\u6a21\u670d\u52a1 ML \u6a21\u578b - \u7b2c 1 \u90e8\u5206"},"content":{"rendered":"<p><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling article-author\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-background-color:#ffffff;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_2 1_2 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:50%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:50%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-1 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u4f5c\u8005<\/h2><\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27150%27%20height%3D%270%27%20viewBox%3D%270%200%20150%200%27%3E%3Crect%20width%3D%27150%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/kais-laribi.jpeg\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left article-author-image\" style=\"width: 150px; border-radius: 54% 46% 77% 23% \/ 74% 40% 60% 26%; overflow: hidden;\" width=\"150\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-2 fusion-sep-none fusion-title-text fusion-title-size-three article-author-name-title\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">\u51ef\u65af-\u62c9\u91cc\u6bd4<\/h3><\/div><div class=\"fusion-text fusion-text-1 article-author-description\"><p>Data \u9ad8\u7ea7\u79d1\u5b66\u5bb6\uff08Artefact<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-2 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:40px;--awb-margin-bottom:40px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-center fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-flex-column fusion-flex-align-self-center fusion-column-inner-bg-wrapper\" style=\"--awb-padding-top:20px;--awb-padding-right:20px;--awb-padding-bottom:20px;--awb-padding-left:20px;--awb-overflow:hidden;--awb-inner-bg-size:cover;--awb-border-color:rgba(10,17,40,0.1);--awb-border-top:1px;--awb-border-right:1px;--awb-border-bottom:1px;--awb-border-left:1px;--awb-border-style:solid;--awb-border-radius:4px 4px 4px 4px;--awb-inner-bg-border-radius:4px 4px 4px 4px;--awb-inner-bg-overflow:hidden;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><span class=\"fusion-column-inner-bg hover-type-none\"><a class=\"fusion-column-anchor\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-bf27258775e7\" rel=\"noopener noreferrer\" target=\"_blank\"><span class=\"fusion-column-inner-bg-image\"><\/span><\/a><\/span><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-center fusion-content-layout-row fusion-flex-align-items-center\"><div class=\"fusion-text fusion-text-2\"><p><u>\u9605\u8bfb\u6211\u4eec\u7684\u6587\u7ae0<\/u><\/p>\n<\/div><div class=\"fusion-image-element\" style=\"--awb-margin-right:20px;--awb-margin-left:20px;--awb-max-width:150px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img decoding=\"async\" width=\"4000\" height=\"992\" title=\"\u4e2d\u578b Blog\" src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png\" alt class=\"lazyload img-responsive wp-image-60582\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%274000%27%20height%3D%27992%27%20viewBox%3D%270%200%204000%20992%27%3E%3Crect%20width%3D%274000%27%20height%3D%27992%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-srcset=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-200x50.png 200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-400x99.png 400w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-600x149.png 600w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-800x198.png 800w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-1200x298.png 1200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png 4000w\" data-sizes=\"auto\" data-orig-sizes=\"(max-width: 640px) 100vw, 4000px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-3\"><p>.<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-3 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-2 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-4 description\"><p>MLflow \u662f\u673a\u5668\u5b66\u4e60\u5b9e\u9a8c\u8ddf\u8e2a\u3001\u6a21\u578b\u7248\u672c\u7ba1\u7406\u548c\u670d\u52a1\u7684\u5e38\u7528\u5de5\u5177\u3002\u5728 \u201c\u5927\u89c4\u6a21\u670d\u52a1 ML \u6a21\u578b \u201d\u7cfb\u5217\u7684\u7b2c\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728 Kubernetes \u4e0a\u90e8\u7f72\u8ddf\u8e2a\u5b9e\u4f8b\uff0c\u5e76\u7528\u5b83\u6765\u8bb0\u5f55\u5b9e\u9a8c\u548c\u5b58\u50a8\u6a21\u578b\u3002.<\/p>\n<\/div><\/div><\/div><\/div><\/div><article class=\"fusion-fullwidth fullwidth-box fusion-builder-row-4 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-3 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-3 fusion-sep-none fusion-title-text fusion-title-size-one\" style=\"--awb-margin-bottom-small:8px;\"><h1 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:70;line-height:1;\">\u7b2c 1 \u90e8\u5206 - \u5982\u4f55\u5728 Kubernetes \u4e0a\u90e8\u7f72 Mlflow \u8ddf\u8e2a\u5b9e\u4f8b\uff1f<\/h1><\/div><div class=\"fusion-title title fusion-title-4 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u5bfc\u8a00<\/h2><\/div><div class=\"fusion-text fusion-text-5\"><p>Mlflow \u662f data \u79d1\u5b66\/ML \u793e\u533a\u5e7f\u6cdb\u4f7f\u7528\u7684\u5de5\u5177\uff0c\u7528\u4e8e\u5728\u4e0d\u540c\u9636\u6bb5\u8ddf\u8e2a\u5b9e\u9a8c\u548c\u7ba1\u7406\u673a\u5668\u5b66\u4e60\u6a21\u578b\u3002\u5229\u7528\u5b83\uff0c\u6211\u4eec\u53ef\u4ee5\u5b58\u50a8\u6307\u6807\u3001\u6a21\u578b\u548c\u5de5\u4ef6\uff0c\u4ece\u800c\u8f7b\u677e\u6bd4\u8f83\u6a21\u578b\u7684\u6027\u80fd\u5e76\u5904\u7406\u5176\u751f\u547d\u5468\u671f\u3002\u6b64\u5916\uff0cMlflow \u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6a21\u5757\uff0c\u53ef\u5c06\u6a21\u578b\u4f5c\u4e3a API \u7aef\u70b9\u63d0\u4f9b\uff0c\u4ece\u800c\u65b9\u4fbf\u5c06\u5176\u96c6\u6210\u5230\u4efb\u4f55\u4ea7\u54c1\u6216\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002.<\/p>\n<\/div><div class=\"fusion-text fusion-text-6\"><p>\u4e5f\u5c31\u662f\u8bf4\uff0c\u5728\u5728\u7ebf\u4ea7\u54c1\u4e2d\u4f7f\u7528\u673a\u5668\u5b66\u4e60\u5f88\u9177\uff0c\u4f46\u6839\u636e\u6a21\u578b\u7684\u5927\u5c0f\u3001\u6027\u8d28\uff08ML\u3001\u6df1\u5ea6\u5b66\u4e60......\uff09\u548c\u8d1f\u8f7d\uff08\u7528\u6237\u8bf7\u6c42\uff09\uff0c\u5bf9\u6240\u9700\u8d44\u6e90\u8fdb\u884c\u7ef4\u5ea6\u8c03\u6574\u5e76\u4fdd\u8bc1\u5408\u7406\u7684\u54cd\u5e94\u65f6\u95f4\u53ef\u80fd\u5177\u6709\u6311\u6218\u6027\u3002\u56e0\u6b64\uff0c\u4f7f\u7528 Kubernetes \u96c6\u7fa4\u7b49\u53ef\u6269\u5c55\u57fa\u7840\u8bbe\u65bd\u662f\u5728\u63a8\u7406\u9636\u6bb5\u4fdd\u6301\u670d\u52a1\u53ef\u7528\u6027\u548c\u6027\u80fd\u7684\u5173\u952e\u3002.<\/p>\n<p>\u4e3a\u6b64\uff0c\u6211\u4eec\u5c06\u53d1\u8868\u4e09\u7bc7\u7cfb\u5217\u6587\u7ae0\uff0c\u56de\u7b54\u4ee5\u4e0b\u95ee\u9898\uff1a<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-1 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\u5982\u4f55\u5728 Kubernetes \u4e0a\u90e8\u7f72\u548c\u4f7f\u7528 Mlflow \u8ddf\u8e2a\u5b9e\u4f8b\uff1f<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\u5982\u4f55\u4f7f\u7528 Mlflow \u5c06\u673a\u5668\u5b66\u4e60\u6a21\u578b\u4f5c\u4e3a API \u63d0\u4f9b\uff1f<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\u5982\u4f55\u5904\u7406\u5927\u91cf\u8bf7\u6c42\uff0c\u5e76\u4f7f\u6211\u4eec\u7684\u63a8\u7406\u4efb\u52a1\u53ef\u4ee5\u6269\u5c55\u5230\u5de5\u4e1a\u5316\u4ea7\u54c1\uff1f<\/div><\/li><\/ul><div class=\"fusion-text fusion-text-7\"><p>\u56e0\u6b64\uff0c\u8ba9\u6211\u4eec\u4ece\u7b2c\u4e00\u7bc7\u6587\u7ae0\u5f00\u59cb\uff0c\u4ecb\u7ecd Kubernetes \u53ca\u5176\u7ec4\u4ef6\uff0c\u5e76\u901a\u8fc7\u65e5\u5fd7\u6a21\u578b\u90e8\u7f72\u8ddf\u8e2a\u5b9e\u4f8b\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-5 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">Kubernetes \u6982\u8ff0<\/h2><\/div><div class=\"fusion-text fusion-text-8\"><p>Kubernetes \u662f\u8c37\u6b4c\u5728 2014 \u5e74\u53d1\u5e03\u7684\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\u3002\u5b83\u662f\u4e00\u4e2a\u5bb9\u5668\u63a7\u5236\u548c\u7f16\u6392\u7cfb\u7edf\uff0c\u53ef\u5b9e\u73b0\u5e94\u7528\u7a0b\u5e8f\u7684\u81ea\u52a8\u90e8\u7f72\u3001\u6269\u5c55\u548c\u8c03\u5ea6\u3002\u5176\u67b6\u6784\u5982\u4e0b\uff1a<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27705%27%20height%3D%270%27%20viewBox%3D%270%200%20705%200%27%3E%3Crect%20width%3D%27705%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 705px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"705\" height=\"auto\" \/><div class=\"fusion-text fusion-text-9\"><p><strong>\u4e3b\u4eba<\/strong>:\u5b83\u5904\u7406\u8f93\u5165\u914d\u7f6e\uff0c\u8c03\u5ea6\u4e0d\u540c\u8282\u70b9\u4e0a\u7684\u5bb9\u5668\u5316\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u76d1\u63a7\u5b83\u4eec\u7684\u72b6\u6001\u3002\u4e3b\u8282\u70b9\u7531\u4ee5\u4e0b\u90e8\u5206\u7ec4\u6210<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-2 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>\u5e94\u7528\u7a0b\u5e8f\u63a5\u53e3\u670d\u52a1\u5668\uff1a\u00a0<\/strong>\u5141\u8bb8\u4e0e\u7fa4\u96c6\u4ea4\u4e92\uff0c\u5e76\u9a8c\u8bc1\u5f00\u53d1\u4eba\u5458\u53d1\u9001\u7684\u66f4\u65b0\u7fa4\u96c6\u6216\u5e94\u7528\u7a0b\u5e8f\u72b6\u6001\u7684\u547d\u4ee4\u3002.<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>\u8c03\u5ea6\u5458<\/strong>\u51b3\u5b9a<strong class=\"jh kt\">\u00a0<\/strong>\u5e94\u5728\u54ea\u4e9b\u8282\u70b9\u4e0a\u8fd0\u884c\u65b0\u5bf9\u8c61\uff0c\u4ee5\u786e\u4fdd\u7a33\u5b9a\u6027\u548c\u8d1f\u8f7d\u5e73\u8861\u3002.<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>\u7b49\u7b49\uff1a<\/strong>\u00a0\u5b58\u50a8\u4e0d\u540c\u8d44\u6e90\u914d\u7f6e\u548c\u72b6\u6001\u7684\u952e\u503c database<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>\u4e3b\u8ba1\u957f\u7ecf\u7406\uff1a<\/strong>\u76d1\u63a7\u96c6\u7fa4\u72b6\u6001\u548c\u4e0d\u540c\u8d44\u6e90\uff0c\u786e\u4fdd\u5f53\u524d\u72b6\u6001\u4e0e\u6240\u9700\u72b6\u6001\u4e00\u81f4\u3002.<\/div><\/li><\/ul><div class=\"fusion-text fusion-text-10\"><p><strong>\u8282\u70b9\uff1a<\/strong> \u5b83\u4eec\u662f\u5df2\u90e8\u7f72\u5bb9\u5668\u6240\u5728\u7684\u6267\u884c\u8282\u70b9\u3002\u5b83\u4eec\u7684\u4e3b\u8981\u7ec4\u6210\u90e8\u5206\u662f<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-3 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>\u82b1\u82de\u00a0<\/strong>\u662f Kubernetes \u4e2d\u6700\u57fa\u672c\u7684\u6267\u884c\u5355\u5143\u3002Pod \u5c06\u5e94\u7528\u7a0b\u5e8f\u5c01\u88c5\u4e3a\u5355\u4e2a\u5bb9\u5668\u6216\u591a\u4e2a\u5bb9\u5668\uff0c\u8fd9\u4e9b\u5bb9\u5668\u901a\u8fc7\u5171\u4eab\u5b58\u50a8\u5377\u548c\u7f51\u7edc\u534f\u540c\u5de5\u4f5c\u3002.<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p><strong>Kubelet\uff1a<\/strong>\u662f<strong class=\"jh kt\">\u00a0<\/strong>\u4e00\u4e2a<strong class=\"jh kt\">\u00a0<\/strong>\u4ee3\u7406\uff0c\u7528\u4e8e\u68c0\u67e5\u5bb9\u5668\u72b6\u6001\u5e76\u4e0e Kubernetes \u4e3b\u7ad9\u901a\u4fe1\u3002.<\/p>\n<\/div><\/li><\/ul><div class=\"fusion-text fusion-text-11\"><p>\u5f53\u5e94\u7528\u7a0b\u5e8f\u6709\u591a\u4e2a\u670d\u52a1\u76f8\u4e92\u901a\u4fe1\u65f6\uff0c\u5b83\u662f\u9996\u9009\uff0c\u56e0\u4e3a\u5b83\u80fd\u786e\u4fdd\u6bcf\u4e2a\u670d\u52a1\u90fd\u6709\u81ea\u5df1\u7684\u5bb9\u5668\u5316\u73af\u5883\uff0c\u5e76\u6709\u4e00\u5957\u4e0e\u5176\u4ed6\u670d\u52a1\u4ea4\u4e92\u7684\u89c4\u5219\u3002\u6b64\u5916\uff0c\u5b83\u8fd8\u63d0\u4f9b\u4e86\u4e00\u79cd\u6709\u8da3\u7684\u529f\u80fd\uff0c\u5373\u53ef\u4ee5\u6269\u5c55\u5e94\u7528\u7a0b\u5e8f\uff0c\u800c\u4e0d\u5fc5\u62c5\u5fc3\u7ba1\u7406\u6216\u540c\u6b65\u65b0\u670d\u52a1\u4ee5\u53ca\u5e73\u8861\u4e0d\u540c\u673a\u5668\u4e4b\u95f4\u7684\u8d44\u6e90\u3002.<\/p>\n<p>\u4ece\u9ad8\u5c42\u6b21\u7684\u89d2\u5ea6\u6765\u770b\uff0c\u4f5c\u4e3a data \u79d1\u5b66\u5bb6\u6216 ML \u5de5\u7a0b\u5e08\uff0c\u6211\u4eec\u5c06\u901a\u8fc7 Kubernetes \u7684\u670d\u52a1\u5668 API\uff0c\u4f7f\u7528 CLI \u547d\u4ee4\u6216 YAML \u914d\u7f6e\u6587\u4ef6\u4e0e Kubernetes \u8fdb\u884c\u4ea4\u4e92\uff0c\u4ee5\u90e8\u7f72\u548c\u516c\u5f00\u5e94\u7528\u7a0b\u5e8f\u6216\u83b7\u53d6\u8d44\u6e90\u72b6\u6001\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-6 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u5b9e\u8df5\u524d\u8981\u6c42<\/h2><\/div><div class=\"fusion-text fusion-text-12\"><p>\u5728\u672c\u6b21\u5b9e\u8df5\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 GCP \u4f5c\u4e3a cloud \u63d0\u4f9b\u5546\u3002\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981.NET Framework\uff1a<\/p>\n<\/div><div class=\"fusion-title title fusion-title-7 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">1.\u521b\u5efa\u57fa\u7840\u8bbe\u65bd\u8981\u7d20<\/h3><\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-4 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>mlflow_gke\uff1a<\/strong> \u5b58\u50a8\u6587\u4ef6\u7684\u6876\uff0cdatasets...<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p><strong>mlflow-k8s<\/strong>\u90e8\u7f72\u8ddf\u8e2a\u6a21\u5757\u548c\u673a\u5668\u5b66\u4e60\u6a21\u578b\uff1a\u90e8\u7f72\u4e00\u4e2a\u4e09\u8282\u70b9\uff08e2-highcpu-4\uff09GKE \u96c6\u7fa4\u3002.<\/p>\n<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p><strong>\u8d1f\u8f7d\u6d4b\u8bd5\uff1a\u00a0<\/strong>\u4e00\u4e2a\u4e09\u8282\u70b9\uff08e2-\u6807\u51c6-2\uff09GKE \u96c6\u7fa4\u6765\u6267\u884c\u8d1f\u8f7d\u6d4b\u8bd5\u3002\u5b83\u5c06\u5728\u672c\u7cfb\u5217\u7684\u7b2c\u4e09\u7bc7\u6587\u7ae0\u4e2d\u4f7f\u7528\u3002.<\/p>\n<\/div><\/li><\/ul><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27659%27%20height%3D%270%27%20viewBox%3D%270%200%20659%200%27%3E%3Crect%20width%3D%27659%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/kais-article2.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 659px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"659\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-8 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">2.\u914d\u7f6e\u672c\u5730\u5de5\u4f5c\u7ad9<\/h3><\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-5 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p>\u5b89\u88c5\u4e0e GCP \u548c mlflow cli \u4ea4\u4e92\u6240\u9700\u7684 python<\/p>\n<pre class=\"hp hq hr hs ht le gv be\"><span id=\"b8dc\" class=\"ej lf ii dm lg b lh li lj s lk\" data-selectable-paragraph=\"\">pip install mlflow gcsfs google-cloud google-cloud-storage kubernetes<\/span><\/pre>\n<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\u6709\u00a0<a class=\"bv ig\" href=\"https:\/\/cloud.google.com\/sdk\/gcloud\/reference\/auth\/login\" target=\"_blank\" rel=\"noopener ugc nofollow\">gcloud<\/a>\u00a0\u548c\u00a0<a class=\"bv ig\" href=\"https:\/\/cloud.google.com\/kubernetes-engine\/docs\/how-to\/cluster-access-for-kubectl\" target=\"_blank\" rel=\"noopener ugc nofollow\">kubectl<\/a>\u00a0\u914d\u7f6e\u4e86\u8bbf\u95ee GCP \u9879\u76ee\u548c\u7fa4\u96c6\u7684\u51ed\u8bc1<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\u5df2\u5b89\u88c5\u5e76\u521d\u59cb\u5316 Helm CLI\u3002\u8bf7\u00a0<a class=\"bv ig\" href=\"https:\/\/helm.sh\/docs\/using_helm\/#installing-helm\" target=\"_blank\" rel=\"noopener ugc nofollow\">\u5728\u6b64\u627e\u5230\u8bf4\u660e<\/a>\u00a0\u4ee5\u9632\u60a8\u8fd8\u6ca1\u6709\u5ba2\u6237\u7aef\u3002.<\/div><\/li><\/ul><div class=\"fusion-title title fusion-title-9 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">3.\u514b\u9686\u5b9e\u8df5\u9879\u76ee\u4ed3\u5e93\u4ee5\u83b7\u53d6\u4ee3\u7801<\/h3><\/div><div class=\"fusion-text fusion-text-13\"><p>\u514b\u9686 <a class=\"bv ig\" href=\"https:\/\/github.com\/artefactory-global\/mlflow-serving-example\" target=\"_blank\" rel=\"noopener ugc nofollow\">https:\/\/github.com\/artefactory-global\/mlflow-serving-example<\/a><\/p>\n<\/div><div class=\"fusion-title title fusion-title-10 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">Mlflow \u8ddf\u8e2a\u5b9e\u4f8b\u90e8\u7f72<\/h2><\/div><div class=\"fusion-title title fusion-title-11 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">1.\u8bbe\u7f6e\u7fa4\u96c6\u73af\u5883<\/h3><\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-6 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>\u521b\u5efa\u670d\u52a1\u8d26\u6237\uff0c\u4ee5\u4fbf\u4e0e GCS \u4ea4\u4e92<br \/>\n<\/strong>\u53ef\u4ee5\u901a\u8fc7 google cloud \u63a7\u5236\u53f0\u7684\u00a0<a class=\"bv ig\" href=\"https:\/\/console.cloud.google.com\/iam-admin\/serviceaccounts\" target=\"_blank\" rel=\"noopener ugc nofollow\">\u6211\u7684\u90e8\u95e8<\/a>. .\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u5177\u6709\u5b58\u50a8\u5bf9\u8c61\u7ba1\u7406\u6743\u9650\u7684\u670d\u52a1\u8d26\u6237\uff0c\u751f\u6210\u4e00\u4e2a\u8eab\u4efd\u9a8c\u8bc1\u5bc6\u94a5\uff0c\u5e76\u5c06\u5176\u4e0b\u8f7d\u4e3a keyfile.json \u6587\u4ef6\u3002<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>\u5c06\u9a8c\u8bc1\u6587\u4ef6\u6302\u8f7d\u4e3a\u5bc6\u6587<\/strong><strong class=\"jh kt\"><br \/>\n<\/strong>\u79d8\u5bc6\u5141\u8bb8\u6211\u4eec\u4ee5\u5b89\u5168\u7684\u65b9\u5f0f\u5904\u7406\u51ed\u8bc1\uff0c\u4f7f\u5176\u53ea\u5bf9\u76f8\u5173\u8d44\u6e90\u53ef\u89c1\u3002.<strong class=\"jh kt\">\u00a0<\/strong>\u4e3a\u6b64\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u79d8\u5bc6\u5377\uff0c\u5e76\u53ea\u5411\u9700\u8981\u7684\u5bb9\u5668\u516c\u5f00\u8eab\u4efd\u9a8c\u8bc1\u6587\u4ef6\u3002.<br \/>\n<span id=\"c3dd\" class=\"ej lf ii dm lg b lh li lj s lk\" data-selectable-paragraph=\"\">kubectl create secret generic gcsfs-creds -from-file=.\/keyfile.json<\/span><\/div><\/li><\/ul><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27634%27%20height%3D%270%27%20viewBox%3D%270%200%20634%200%27%3E%3Crect%20width%3D%27634%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/kais-article3.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 634px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"634\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-12 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">2.\u8ddf\u8e2a\u670d\u52a1\u5668\u90e8\u7f72\u60c5\u51b5<\/h3><\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-7 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>Postgres \u5b58\u50a8<\/strong><strong class=\"jh kt\"><br \/>\n<\/strong>Postgre \u662f mlflow \u7684\u540e\u7aef\u5b58\u50a8\u5355\u5143\uff0c\u7528\u4e8e\u4fdd\u5b58\u6a21\u578b metadata \u548c\u6307\u6807\u3002.<br \/>\n\u8981\u90e8\u7f72\u5b83\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 Helm\uff1aKubernetes \u7684\u8d44\u6e90\u7ba1\u7406\u5668\uff0c\u5176\u4e2d\u8bb8\u591a\u5e94\u7528\u7a0b\u5e8f\u90fd\u4ee5\u56fe\u8868\u6216\u6a21\u677f\u7684\u683c\u5f0f\u63d0\u4f9b\uff0c\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u7684\u547d\u4ee4\u8fdb\u884c\u914d\u7f6e\u3002.<\/p>\n<pre class=\"hp hq hr hs ht le gv be\"><span id=\"ac60\" class=\"ej lf ii dm lg b lh li lj s lk\" data-selectable-paragraph=\"\">#docs: https:\/\/artifacthub.io\/packages\/helm\/bitnami\/postgresql<\/span><span id=\"4dec\" class=\"ej lf ii dm lg b lh ln lo lp lq lr lj s lk\" data-selectable-paragraph=\"\">helm repo add bitnami https:\/\/charts.bitnami.com\/bitnami<\/span><span id=\"2bfe\" class=\"ej lf ii dm lg b lh ln lo lp lq lr lj s lk\" data-selectable-paragraph=\"\">helm install mlf-db bitnami\/postgresql --set postgresqlDatabase=mlflow_db --set postgresqlPassword=mlflow --set service.type=NodePort<\/span><\/pre>\n<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><strong>\u8ddf\u8e2a\u5b9e\u4f8b<\/strong><strong class=\"jh kt\"><br \/>\n<\/strong>\u6211\u4eec\u8fd8\u5c06\u4f7f\u7528 Helm \u56fe\u8868\u6765\u90e8\u7f72\u8ddf\u8e2a\u670d\u52a1\u5668\uff0c\u4f46\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u7528\u6211\u4eec\u60f3\u8981\u7684\u7248\u672c\u6784\u5efa\u4e00\u4e2a docker \u955c\u50cf\uff0c\u4ee5\u4fbf Helm \u80fd\u591f\u4e0b\u8f7d\u548c\u90e8\u7f72\u5b83\u3002\u8bf7\u6ce8\u610f\uff0cPostgres \u7684\u955c\u50cf\u5df2\u7ecf\u5728\u516c\u5171\u5b58\u50a8\u5e93\u4e2d\uff0c\u4f46\u5728\u8fd9\u91cc\u6211\u4eec\u5c06\u521b\u5efa\u81ea\u5df1\u7684\u955c\u50cf\u3002.<\/p>\n<pre class=\"hp hq hr hs ht le gv be\"><span id=\"f69d\" class=\"ej lf ii dm lg b lh li lj s lk\" data-selectable-paragraph=\"\">cd mlflow-serving-example<\/span><span id=\"b25e\" class=\"ej lf ii dm lg b lh ln lo lp lq lr lj s lk\" data-selectable-paragraph=\"\">docker build --tag $\/mlflow-tracking-server:v1 --file dockerfile_mlflow_tracking .<\/span><span id=\"38c4\" class=\"ej lf ii dm lg b lh ln lo lp lq lr lj s lk\" data-selectable-paragraph=\"\">docker push $\/mlflow-tracking-server:v1<\/span><\/pre>\n<\/div><\/li><\/ul><div class=\"fusion-text fusion-text-14\"><p>\u5c06\u955c\u50cf\u63a8\u9001\u5230\u955c\u50cf\u6ce8\u518c\u8868\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u901a\u8fc7 helm \u5c06\u5176\u90e8\u7f72\u5230\u7fa4\u96c6\u4e0a\u3002.<\/p>\n<pre class=\"hp hq hr hs ht le gv be\"><span id=\"c8ac\" class=\"ej lf ii dm lg b lh li lj s lk\" data-selectable-paragraph=\"\">helm repo \u6dfb\u52a0 mlflow-tracking <a class=\"bv ig\" href=\"https:\/\/artefactory-global.github.io\/mlflow-tracking-server\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">https:\/\/artefactory-global.github.io\/mlflow-tracking-server\/<\/a><\/span><span id=\"f34c\" class=\"ej lf ii dm lg b lh ln lo lp lq lr lj s lk\" data-selectable-paragraph=\"\">helm install mlf-ts mlflow-tracking\/mlflow-tracking-server\n--set env.mlflowArtifactPath=$\n--set env.mlflowDBAddr=mlf-db-postgresql\n--\u8bbe\u7f6e env.mlflowUser=postgres\n--\u8bbe\u7f6e env.mlflowPass=mlflow\n--\u8bbe\u7f6e env.mlflowDBName=mlflow_db\n--set env.mlflowDBPort=5432\n--\u8bbe\u7f6e service.type=LoadBalancer\n--\u8bbe\u7f6e image.repository=$\/mlflow-tracking-server\n--set image.tag=v1<\/span><\/pre>\n<p>\u73b0\u5728\uff0cMlflow \u5e94\u5df2\u542f\u52a8\u5e76\u8fd0\u884c\uff0c\u7528\u6237\u754c\u9762\u5e94\u53ef\u901a\u8fc7\u8d1f\u8f7d\u5e73\u8861\u5668 IP \u8bbf\u95ee\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u00a0<strong><em class=\"jz\">k<\/em><em>ubectl get services<\/em><em class=\"jz\">.<\/em><\/strong><em class=\"jz\">A<\/em>\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee\u65e5\u5fd7\u6765\u8c03\u8bd5\u90e8\u7f72<em class=\"jz\">\u00a0\u7ecf\u7531\u00a0<\/em><em><strong>kubectl describe pods<\/strong>.<\/em><br \/>\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u4eec\u76ee\u524d\u7684\u67b6\u6784\u5982\u4e0b\uff1a<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27621%27%20height%3D%270%27%20viewBox%3D%270%200%20621%200%27%3E%3Crect%20width%3D%27621%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-4.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 621px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"621\" height=\"auto\" \/><div class=\"fusion-text fusion-text-15\"><p>\u8bf7\u6ce8\u610f\uff0c\u4e92\u8054\u7f51\u4e0a\u7684\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u8bbf\u95ee\u8d1f\u8f7d\u5e73\u8861\u5668\uff0c\u56e0\u6b64\u5fc5\u987b\u8003\u8651\u901a\u8fc7\u6dfb\u52a0\u9a8c\u8bc1\u5c42\u6765\u4fdd\u62a4\u6211\u4eec\u7684\u8ddf\u8e2a\u5b9e\u4f8b\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u00a0<a class=\"bv ig\" href=\"https:\/\/cloud.google.com\/iap\/docs\/enabling-kubernetes-howto\" target=\"_blank\" rel=\"noopener ugc nofollow\">\u8eab\u4efd\u8bc6\u522b\u4ee3\u7406<\/a>\u00a0\u4f46\u672c\u6587\u4e0d\u6d89\u53ca\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-13 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">3.\u521b\u5efa\u57fa\u672c\u6a21\u578b<\/h3><\/div><div class=\"fusion-text fusion-text-16\"><p>\u73b0\u5728\uff0c\u6211\u4eec\u7684\u57fa\u7840\u67b6\u6784\u548c Mlflow \u5b9e\u4f8b\u5df2\u7ecf\u51c6\u5907\u5c31\u7eea\uff0c\u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u8fd0\u884c\u4e00\u4e2a\u7b80\u5355\u7684 ML \u6a21\u578b\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u5728\u6a21\u578b\u6ce8\u518c\u8868\u4e2d\uff0c\u4ee5\u4f9b\u4ee5\u540e\u4f7f\u7528\u3002.<br \/>\n\u6211\u4eec\u5c06\u4f7f\u7528\u8461\u8404\u9152\u8d28\u91cf dataset\uff0c\u5b83\u7531\u7ea6 4900 \u4e2a\u6837\u672c\u548c 11 \u4e2a\u53cd\u6620\u8461\u8404\u9152\u7279\u5f81\u7684\u7279\u5f81\u7ec4\u6210\u3002\u6807\u7b7e\u8303\u56f4\u4ece 3 \u5230 9\uff0c\u53ef\u89c6\u4e3a\u8bc4\u7ea7\u3002.<br \/>\n\u8fd9\u662f\u4e00\u4e2a\u7ecf\u5178\u793a\u4f8b\uff0c\u6211\u4eec\u5728\u5176\u4e2d\u8bad\u7ec3\u4e86\u4e00\u4e2a Xgboost \u56de\u5f52\u6a21\u578b\uff0c\u5e76\u5c06\u5176\u4e0e\u53c2\u6570\u548c\u6307\u6807\u4e00\u8d77\u5b58\u50a8\u3002\u5b8c\u6574\u4ee3\u7801\u5982\u4e0b\u00a0<a class=\"bv ig\" href=\"https:\/\/github.com\/artefactory-global\/mlflow-serving-example\/blob\/main\/notebooks\/1.%20model_registry_example.ipynb\" target=\"_blank\" rel=\"noopener ugc nofollow\">\u7b14\u8bb0\u672c<\/a>.<br \/>\n\u60a8\u53ef\u80fd\u5df2\u7ecf\u6ce8\u610f\u5230\uff0cMlflow \u7684\u96c6\u6210\u975e\u5e38\u7b80\u5355\uff0c\u53ef\u4ee5\u7528\u4e0b\u9762\u7684\u4ee3\u7801\u7247\u6bb5\u6765\u6982\u62ec\uff0c\u5373\u8c03\u7528\u00a0<em><strong>mlflow.start_run()\u3001mlflow.log_param()\u3001mlflow.log_metric() \u548c mlflow.xgboost.log_model()<\/strong><\/em>\u5206\u522b\u7528\u4e8e\u521b\u5efa\u65b0\u5b9e\u9a8c\u3001\u5b58\u50a8\u8bad\u7ec3\u53c2\u6570\u3001\u8bc4\u4f30\u6307\u6807\u548c\u8bad\u7ec3\u6a21\u578b\u672c\u8eab\u3002.<\/p>\n<\/div>\u4f7f\u7528 mlflow.start_run() \u4f5c\u4e3a\u8fd0\u884c\uff1a\n    \n      # \u542f\u52a8 mlflow \u4f1a\u8bdd\n      mlflow.log_param(\"max_depth\", max_depth)\n      mlflow.log_param(\"min_child_weight\", min_child_weight)\n      mlflow.log_param(\"estimators\", estimators)\n\n      # \u521b\u5efa\u5e76\u62df\u5408\u6a21\u578b\n      model = xgb.XGBRegressor(\n               max_depth=max_depth\u3001\n               min_child_weight=min_child_weight\u3001\n               n_estimators=estimators\n               random_state=42)\n      model.fit(X_train, y_train)\n\n      # MLflow \u6307\u6807\n      predictions = model.predict(X_test)\n      rmse = np.sqrt(mean_squared_error(y_test, predictions))\n      mlflow.log_metric(\"rmse\", rmse)\n\n      # \u5bf9\u6570\u6a21\u578b\n      mlflow.xgboost.log_model(model, \"xgboost-model\", registered_model_name = model_name)\n<div class=\"fusion-text fusion-text-17\"><p>\u8fd0\u884c\u6240\u63d0\u4f9b\u7684\u7b14\u8bb0\u672c\u540e\uff0c\u8ddf\u8e2a\u5b9e\u4f8b\u754c\u9762\u4e2d\u5c06\u65b0\u589e\u4e00\u884c\uff0c\u4e0e\u65b0\u5b9e\u9a8c\u76f8\u5bf9\u5e94\u3002.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27642%27%20height%3D%270%27%20viewBox%3D%270%200%20642%200%27%3E%3Crect%20width%3D%27642%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais5.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 642px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"642\" height=\"auto\" \/><div class=\"fusion-text fusion-text-18\"><p>\u6700\u540e\uff0c\u5982\u679c\u6211\u4eec\u5bf9\u6a21\u578b\u7684\u6027\u80fd\u611f\u5230\u6ee1\u610f\uff0c\u5c31\u53ef\u4ee5\u4ece\u8ddf\u8e2a\u5b9e\u4f8b\u4e2d\u52a0\u8f7d\u6a21\u578b\uff0c\u5e76\u5728 python \u4e2d\u4f7f\u7528\u5b83\u8fdb\u884c\u63a8\u7406\u3002\u8fd9\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4e4b\u524d\u5171\u4eab\u7684\u7b14\u8bb0\u672c\u6765\u5b9e\u73b0\u3002\u8bf7\u6ce8\u610f\uff0c\u5728\u672c\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u8fd0\u884c ID \u52a0\u8f7d\u4e86\u6a21\u578b\uff0c\u4f46\u8bf7\u8bb0\u4f4f\uff0cMlflow \u8fd8\u63d0\u4f9b\u4e86\u5176\u4ed6\u6709\u8da3\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u901a\u8fc7\u6807\u7b7e\u3001\u7248\u672c\u6216\u9636\u6bb5\u6765\u8bc6\u522b\u6a21\u578b\u3002\u66f4\u591a\u8be6\u60c5\u8bf7\u53c2\u8003\u6a21\u578b\u6ce8\u518c\u6587\u6863\u00a0<a class=\"bv ig\" href=\"https:\/\/www.mlflow.org\/docs\/latest\/model-registry.html\" target=\"_blank\" rel=\"noopener ugc nofollow\">\u8fd9\u91cc<\/a>.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-14 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u7ed3\u8bba<\/h2><\/div><div class=\"fusion-text fusion-text-19\"><p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u8bbe\u6cd5\u90e8\u7f72\u4e86 Mlflow \u8ddf\u8e2a\u5b9e\u4f8b\u6765\u5904\u7406\u6211\u4eec\u7684 data \u79d1\u5b66\u5b9e\u9a8c\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a\u5feb\u901f\u793a\u4f8b\u6f14\u793a\u4e86\u5982\u4f55\u8bb0\u5f55\u6a21\u578b\u5e76\u5c06\u5176\u4fdd\u5b58\u8d77\u6765\uff0c\u4ee5\u4fbf\u5c06\u6765\u5728 python \u4e0a\u8fdb\u884c\u63a8\u7406\u3002\u5728\u672c\u7cfb\u5217\u7684\u4e0b\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u5c06\u6b64\u6a21\u578b\u4f5c\u4e3a API \u63d0\u4f9b\u3002\u8fd9\u4e00\u70b9\u975e\u5e38\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u6709\u52a9\u4e8e\u4e0e\u6a21\u578b\u8fdb\u884c\u4ea4\u4e92\u5e76\u5c06\u5176\u96c6\u6210\u5230\u4ea7\u54c1\u6216\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\u6b64\u5916\uff0c\u5728 Kubernetes \u4e0a\u8fd0\u884c\u53ef\u786e\u4fdd\u6a21\u578b\u6613\u4e8e\u6269\u5c55\uff0c\u5e76\u80fd\u5904\u7406\u4e0d\u540c\u7684\u8d1f\u8f7d\u6c34\u5e73\u3002.<\/p>\n<\/div><\/div><\/div><\/div><\/article><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-5 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:40px;--awb-margin-bottom:40px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-center fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-4 fusion_builder_column_1_1 1_1 fusion-flex-column fusion-flex-align-self-center\" style=\"--awb-padding-top:40px;--awb-padding-right:40px;--awb-padding-bottom:40px;--awb-padding-left:40px;--awb-overflow:hidden;--awb-bg-position:left center;--awb-bg-size:cover;--awb-border-color:rgba(10,17,40,0.1);--awb-border-style:solid;--awb-border-radius:4px 4px 4px 4px;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper lazyload fusion-column-has-shadow fusion-flex-justify-content-center fusion-content-layout-column fusion-column-has-bg-image\" data-bg-url=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/background.jpg\" data-bg=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/background.jpg\"><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-right:20px;--awb-margin-left:20px;--awb-max-width:150px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-2 hover-type-none\"><img decoding=\"async\" width=\"72\" height=\"41\" title=\"\u4e2d\u7b49\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2772%27%20height%3D%2741%27%20viewBox%3D%270%200%2072%2041%27%3E%3Crect%20width%3D%2772%27%20height%3D%2741%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/medium.png\" alt class=\"lazyload img-responsive wp-image-60927\"\/><\/span><\/div><div class=\"fusion-title title fusion-title-15 fusion-sep-none fusion-title-center fusion-title-text fusion-title-size-three\" style=\"--awb-margin-top:20px;--awb-margin-bottom:0px;--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-center fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">\u4e2d\u53f7 Blog by Artefact\u3002.<\/h3><\/div><div class=\"fusion-text fusion-text-20\" style=\"--awb-content-alignment:center;\"><p>\u672c\u6587\u6700\u521d\u53d1\u8868\u4e8e <strong>Medium.com<\/strong>.<br \/>\n\u5728\u6211\u4eec\u7684 Medium Blog \u4e0a\u5173\u6ce8\u6211\u4eec\uff01<\/p>\n<\/div><div style=\"text-align:center;\"><a class=\"fusion-button button-flat button-medium button-default fusion-button-default button-1 fusion-button-default-span fusion-button-default-type\" target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-bf27258775e7\"><span class=\"fusion-button-text awb-button__text awb-button__text--default\">\u9605\u8bfb\u6211\u4eec\u7684\u6587\u7ae0<\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/p>","protected":false},"excerpt":{"rendered":"<p>2021\u5e7410\u670822\u65e5<br \/>\nMLflow \u662f\u673a\u5668\u5b66\u4e60\u5b9e\u9a8c\u8ddf\u8e2a\u3001\u6a21\u578b\u7248\u672c\u7ba1\u7406\u548c\u670d\u52a1\u7684\u5e38\u7528\u5de5\u5177\u3002\u5728 \u201c\u5927\u89c4\u6a21\u670d\u52a1 ML \u6a21\u578b \u201d\u7cfb\u5217\u7684\u7b2c\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728 Kubernetes \u4e0a\u90e8\u7f72\u8ddf\u8e2a\u5b9e\u4f8b\uff0c\u5e76\u7528\u5b83\u6765\u8bb0\u5f55\u5b9e\u9a8c\u548c\u5b58\u50a8\u6a21\u578b\u3002.<\/p>","protected":false},"featured_media":65013,"parent":0,"template":"","meta":{"_acf_changed":false,"ep_exclude_from_search":false},"blog-category":[21939],"blog-language":[2991],"class_list":["post-63668","blog","type-blog","status-publish","has-post-thumbnail","hentry","blog-category-medium","blog-language-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog\/63668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/types\/blog"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/media\/65013"}],"wp:attachment":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/media?parent=63668"}],"wp:term":[{"taxonomy":"blog-category","embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog-category?post=63668"},{"taxonomy":"blog-language","embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog-language?post=63668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}