blob: 7f9fdea32bb08eeb2e872f1a09cad5383e65045c [file] [log] [blame]
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4369],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return f}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),f=o,d=p["".concat(s,".").concat(f)]||p[f]||m[f]||l;return n?r.createElement(d,a(a({ref:t},u),{},{components:n})):r.createElement(d,a({ref:t},u))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var l=n.length,a=new Array(l);a[0]=p;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:o,a[1]=i;for(var c=2;c<l;c++)a[c]=n[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}p.displayName="MDXCreateElement"},6482:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return s},default:function(){return f},frontMatter:function(){return i},metadata:function(){return c},toc:function(){return m}});var r=n(7462),o=n(3366),l=(n(7294),n(3905)),a=["components"],i={title:"MLflow UI"},s=void 0,c={unversionedId:"userDocs/others/mlflow",id:"userDocs/others/mlflow",title:"MLflow UI",description:"\x3c!--",source:"@site/docs/userDocs/others/mlflow.md",sourceDirName:"userDocs/others",slug:"/userDocs/others/mlflow",permalink:"/docs/next/userDocs/others/mlflow",editUrl:"https://github.com/apache/submarine/edit/master/website/docs/userDocs/others/mlflow.md",tags:[],version:"current",frontMatter:{title:"MLflow UI"},sidebar:"docs",previous:{title:"Submarine Client",permalink:"/docs/next/userDocs/submarine-sdk/submarine-client"},next:{title:"Tensorboard",permalink:"/docs/next/userDocs/others/tensorboard"}},u={},m=[{value:"Usage",id:"usage",level:3},{value:"Example",id:"example",level:3}],p={toc:m};function f(e){var t=e.components,i=(0,o.Z)(e,a);return(0,l.kt)("wrapper",(0,r.Z)({},p,i,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h3",{id:"usage"},"Usage"),(0,l.kt)("p",null,"MLflow UI shows the tracking result of the experiments. When we\nuse the log_param or log_metric in ModelClient API, we could view\nthe result in MLflow UI. Below is the example of the usage of MLflow\nUI."),(0,l.kt)("h3",{id:"example"},"Example"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},"Run the following code in the cluster")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from submarine import ModelsClient\nimport random\nimport time\n\nif __name__ == "__main__":\n modelClient = ModelsClient()\n with modelClient.start() as run:\n modelClient.log_param("learning_rate", random.random())\n for i in range(100):\n time.sleep(1)\n modelClient.log_metric("mse", random.random() * 100, i)\n modelClient.log_metric("acc", random.random(), i)\n')),(0,l.kt)("ol",{start:2},(0,l.kt)("li",{parentName:"ol"},"In the MLflow UI page, you can see the log_param and the log_metric\nresult. You can also compare the training between different workers.")),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(4522).Z,width:"2192",height:"1222"})))}f.isMDXComponent=!0},4522:function(e,t,n){t.Z=n.p+"assets/images/mlflow-ui-e2fbae31ba60c324e66f00f0ae3caebf.png"}}]);