blob: 021948bb25336a7e2c30fb47a89bae508c445318 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{193:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d}));var n=r(0),a=r.n(n);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),u=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},b=function(e){var t=u(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},p=a.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),b=u(r),p=n,d=b["".concat(o,".").concat(p)]||b[p]||m[p]||i;return r?a.a.createElement(d,c(c({ref:t},l),{},{components:r})):a.a.createElement(d,c({ref:t},l))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,o=new Array(i);o[0]=p;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,o[1]=c;for(var l=2;l<i;l++)o[l]=r[l];return a.a.createElement.apply(null,o)}return a.a.createElement.apply(null,r)}p.displayName="MDXCreateElement"},85:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return o})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return s})),r.d(t,"default",(function(){return u}));var n=r(3),a=r(7),i=(r(0),r(193)),o={title:"Tracking"},c={unversionedId:"userDocs/submarine-sdk/tracking",id:"version-0.6.0/userDocs/submarine-sdk/tracking",isDocsHomePage:!1,title:"Tracking",description:"\x3c!--",source:"@site/versioned_docs/version-0.6.0/userDocs/submarine-sdk/tracking.md",slug:"/userDocs/submarine-sdk/tracking",permalink:"/docs/userDocs/submarine-sdk/tracking",editUrl:"https://github.com/apache/submarine/edit/master/website/versioned_docs/version-0.6.0/userDocs/submarine-sdk/tracking.md",version:"0.6.0",sidebar:"docs",previous:{title:"Model Client",permalink:"/docs/userDocs/submarine-sdk/model-client"},next:{title:"Submarine Spark Security Plugin",permalink:"/docs/userDocs/submarine-security/spark-security/README"}},s=[{value:"Functions",id:"functions",children:[{value:"<code>submarine.get_tracking_uri() -&gt; str</code>",id:"submarineget_tracking_uri---str",children:[]},{value:"<code>submarine.set_tracking_uri(uri: str) -&gt; None</code>",id:"submarineset_tracking_uriuri-str---none",children:[]},{value:"<code>submarine.log_param(key: str, value: str) -&gt; None</code>",id:"submarinelog_paramkey-str-value-str---none",children:[]},{value:"<code>submarine.log_metric(key: str, value: float, step=0) -&gt; None</code>",id:"submarinelog_metrickey-str-value-float-step0---none",children:[]}]}],l={toc:s};function u(e){var t=e.components,r=Object(a.a)(e,["components"]);return Object(i.b)("wrapper",Object(n.a)({},l,r,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"It helps developers use submarine's internal data caching,\ndata exchange, and task tracking capabilities to more efficiently improve the\ndevelopment and execution of machine learning productivity"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Allow data scientist to track distributed ML experiment"),Object(i.b)("li",{parentName:"ul"},"Support store ML parameters and metrics in Submarine-server"),Object(i.b)("li",{parentName:"ul"},"Support hdfs, S3 and mysql (Currently we only support mysql)")),Object(i.b)("h2",{id:"functions"},"Functions"),Object(i.b)("h3",{id:"submarineget_tracking_uri---str"},Object(i.b)("inlineCode",{parentName:"h3"},"submarine.get_tracking_uri() -> str")),Object(i.b)("p",null,"Get the tracking URI. If none has been specified, check the environmental variables. If uri is still none, return the default submarine jdbc url."),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},Object(i.b)("strong",{parentName:"p"},"Returns")),Object(i.b)("ul",{parentName:"blockquote"},Object(i.b)("li",{parentName:"ul"},"The tracking URI."))),Object(i.b)("h3",{id:"submarineset_tracking_uriuri-str---none"},Object(i.b)("inlineCode",{parentName:"h3"},"submarine.set_tracking_uri(uri: str) -> None")),Object(i.b)("p",null,"set the tracking URI. You can also set the SUBMARINE_TRACKING_URI environment variable to have Submarine find a URI from there. The URI should be database connection string."),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},Object(i.b)("strong",{parentName:"p"},"Parameters")),Object(i.b)("ul",{parentName:"blockquote"},Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"uri")," ","-"," Submarine record data to Mysql server. The database URL is expected in the format ",Object(i.b)("inlineCode",{parentName:"li"},"<dialect>+<driver>://<username>:<password>@<host>:<port>/<database>"),".\nBy default it's ",Object(i.b)("inlineCode",{parentName:"li"},"mysql+pymysql://submarine:password@submarine-database:3306/submarine"),".\nMore detail : ",Object(i.b)("a",{parentName:"li",href:"https://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls"},"SQLAlchemy docs")))),Object(i.b)("h3",{id:"submarinelog_paramkey-str-value-str---none"},Object(i.b)("inlineCode",{parentName:"h3"},"submarine.log_param(key: str, value: str) -> None")),Object(i.b)("p",null,"log a single key-value parameter. The key and value are both strings."),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},Object(i.b)("strong",{parentName:"p"},"Parameters")),Object(i.b)("ul",{parentName:"blockquote"},Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"key")," - Parameter name."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"value")," - Parameter value."))),Object(i.b)("h3",{id:"submarinelog_metrickey-str-value-float-step0---none"},Object(i.b)("inlineCode",{parentName:"h3"},"submarine.log_metric(key: str, value: float, step=0) -> None")),Object(i.b)("p",null,"log a single key-value metric. The value must always be a number."),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},Object(i.b)("strong",{parentName:"p"},"Parameters")),Object(i.b)("ul",{parentName:"blockquote"},Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"key")," - Metric name."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"value")," - Metric value."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"step")," - A single integer step at which to log the specified Metrics, by default it's 0."))))}u.isMDXComponent=!0}}]);