diff --git a/404.html b/404.html index b06c8387bb..dcacb4fa6d 100644 --- a/404.html +++ b/404.html @@ -2,7 +2,7 @@ - + Page Not Found | SynapseML @@ -14,14 +14,15 @@ - - - + + + + -
-
Skip to main content

Woops! Page Not Found

The documentation site has recently moved, chances are that the page you're looking for is in the new docs section.

- - +
+
Skip to main content

Sorry! Page Not Found

We have been doing some work on our website, chances are that the page you're looking for is in the new docs section.

+ + \ No newline at end of file diff --git a/assets/css/styles.48553a88.css b/assets/css/styles.48553a88.css new file mode 100644 index 0000000000..fac3c0c59f --- /dev/null +++ b/assets/css/styles.48553a88.css @@ -0,0 +1 @@ +.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.markdown>table,.markdown>table td{min-width:160px}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal);background-color:var(--ifm-code-background)!important;color:var(--ifm-code-color)!important}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.loveSectionPlea_xpLt,.notFoundContainer_NXNv,.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_tbUL,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-webkit-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;-webkit-filter:var(--ifm-breadcrumb-separator-filter);filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-webkit-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;-webkit-transform:translateY(-1px);transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);-webkit-transform:translateY(-.625rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility,-webkit-transform;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_S0QG>:last-child,.collapsibleContent_i85q>:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title,.title_f1Hy{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.menu__caret:before,.menu__link--sublist-caret:after{-webkit-filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;width:1.25rem;content:""}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;filter:var(--ifm-menu-link-sublist-icon-filter);margin-left:auto;min-width:1.25rem;-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear,-webkit-transform var(--ifm-transition-fast) linear}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;filter:var(--ifm-menu-link-sublist-icon-filter);-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear,-webkit-transform var(--ifm-transition-fast) linear}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:-webkit-sticky;position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;position:fixed;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::-webkit-input-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform,-webkit-transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar--show .navbar-sidebar{-webkit-transform:translateZ(0);transform:translateZ(0)}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));-webkit-transform:translateZ(0);transform:translateZ(0);transition:-webkit-transform var(--ifm-transition-fast) ease-in-out;transition:transform var(--ifm-transition-fast) ease-in-out;transition:transform var(--ifm-transition-fast) ease-in-out,-webkit-transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{-webkit-transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0);transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-webkit-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover,.sidebarItemLink_mo7H:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.DocSearch-Hit[aria-selected=true] mark,.content_knG7 a{text-decoration:underline}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--ifm-color-primary:#3bd1ff;--ifm-color-primary-dark:#1ccaff;--ifm-color-primary-darker:#0cc6ff;--ifm-color-primary-darkest:#00a8dc;--ifm-color-primary-light:#5ad8ff;--ifm-color-primary-lighter:#6adcff;--ifm-color-primary-lightest:#99e7ff;--ifm-background-color:#1f201c;--ifm-background-surface-color:#272822;--ifm-background-surface-color-secondary:#2a2b25;--ifm-navbar-background-color:#272822;--ifm-code-background:#2e2f28;--ifm-code-color:#fff;--ifm-heading-color:#fff;--ifm-hero-text-color:#fff;--ifm-color-secondary:#f0f0f0;--ifm-blockquote-color:silver;background-color:#1f201c;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--site-primary-hue-saturation:167,68%;--ifm-color-primary:#3578e5;--ifm-color-primary-dark:#1d68e1;--ifm-color-primary-darker:#1b62d4;--ifm-color-primary-darkest:#1751af;--ifm-color-primary-light:#4e89e8;--ifm-color-primary-lighter:#5a91ea;--ifm-color-primary-lightest:#80aaef;--ifm-color-danger:#ff6188;--ifm-color-danger-dark:#ff3e6d;--ifm-color-danger-darker:#ff2c60;--ifm-color-danger-darkest:#f6003d;--ifm-color-danger-light:#ff84a3;--ifm-color-danger-lighter:#ff96b0;--ifm-color-danger-lightest:#ffcbd8;--ifm-color-success:#a9dc76;--ifm-color-success-dark:#98d55b;--ifm-color-success-darker:#90d24e;--ifm-color-success-darkest:#76bc30;--ifm-color-success-light:#bae391;--ifm-color-success-lighter:#c2e69e;--ifm-color-success-lightest:#dcf1c7;--ifm-color-info:#78dce8;--ifm-color-info-dark:#5ad4e3;--ifm-color-info-darker:#4bd0e0;--ifm-color-info-darkest:#24c0d3;--ifm-color-info-light:#96e4ed;--ifm-color-info-lighter:#a5e8f0;--ifm-color-info-lightest:#d2f3f7;--ifm-color-warning:#ffd866;--ifm-color-warning-dark:#ffcf42;--ifm-color-warning-darker:#ffca30;--ifm-color-warning-darkest:#faba00;--ifm-color-warning-light:#ffe18a;--ifm-color-warning-lighter:#ffe69c;--ifm-color-warning-lightest:#fff3d1;--ifm-navbar-background-color:#f9f9f9;--ifm-background-surface-color:#f9f9f9;--ifm-background-surface-color-secondary:#f3f3f3;--ifm-background-color:#fff;--ifm-heading-color:#000;--ifm-hero-text-color:#000;--ifm-blockquote-color:#3c3c3c;--ifm-alert-color:#000;--ifm-code-font-size:95%;--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-tag-list-border:var(--ifm-color-emphasis-300)}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;-webkit-transform:rotate(3deg) translateY(-4px);transform:rotate(3deg) translateY(-4px);width:100px}.footer.footer--dark{--ifm-footer-background-color:#272822}a>code{color:var(--ifm-link-color)!important}a.contents__link>code{color:var(--ifm-code-color)}html[data-theme=dark] .admonition h5{color:var(--ifm-background-color)}.menu--responsive>button{background-color:var(--ifm-color-primary);border-color:var(--ifm-color-primary)}.header-icon-link{padding:var(--ifm-navbar-item-padding-vertical) calc(var(--ifm-navbar-item-padding-horizontal)*.8)}.header-icon-link:hover{opacity:.6}.header-download-link:before{background:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z'/%3E%3C/svg%3E") no-repeat;content:"";display:flex;height:24px;width:24px}html[data-theme=dark] .header-download-link:before{background:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z' style='fill:%23ffffff'/%3E%3C/svg%3E") no-repeat}.header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;content:"";display:flex;height:24px;width:24px}html[data-theme=dark] .header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat}html[data-theme=dark] .DocSearch{--docsearch-text-color:var(--ifm-font-color-base);--docsearch-muted-color:var(--ifm-color-secondary-darkest);--docsearch-container-background:#2e2f28;--docsearch-modal-background:var(--ifm-background-color);--docsearch-searchbox-background:var(--ifm-background-color);--docsearch-searchbox-focus-background:var(--ifm-color-black);--docsearch-hit-color:var(--ifm-font-color-base);--docsearch-hit-active-color:var(--ifm-color-white);--docsearch-hit-background:var(--ifm-color-emphasis-100);--docsearch-footer-background:var(--ifm-background-surface-color);--docsearch-key-gradient:linear-gradient(-26.5deg,var(--ifm-color-emphasis-200) 0%,var(--ifm-color-emphasis-100) 100%)}.markdown>table{border:none}div[class^=announcementBar_]{--site-announcement-bar-stripe-color1:hsl(var(--site-primary-hue-saturation),85%);--site-announcement-bar-stripe-color2:hsl(var(--site-primary-hue-saturation),95%);background:repeating-linear-gradient(35deg,var(--site-announcement-bar-stripe-color1),var(--site-announcement-bar-stripe-color1) 20px,var(--site-announcement-bar-stripe-color2) 10px,var(--site-announcement-bar-stripe-color2) 40px);font-weight:700}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_b6E3,.sidebarLogo_isFc,.themedImage_ToTc,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedImage--dark_i4oU,[data-theme=light] .themedImage--light_HNdA{display:initial}.iconExternalLink_nPIU{margin-left:.3rem}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:-webkit-transform var(--ifm-transition-fast) ease;transition:transform var(--ifm-transition-fast) ease;transition:transform var(--ifm-transition-fast) ease,-webkit-transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{-webkit-transform:translate3d(0,calc(-100% - 2px),0);transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.codeBlockContent_xAFg:hover>.copyButton_C2v_,.codeBlockTitle_mgIA:hover+.codeBlockContent_xAFg .copyButton_C2v_,.copyButton_C2v_:focus,.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-webkit-input-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{-webkit-animation:1s linear infinite a;animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;-webkit-transform:scale(0);transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;-webkit-transform:scale(1);transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_PEFL{display:none;margin:0}.docMainContainer_gTbr,.docPage__5DB{display:flex;width:100%}.docPage__5DB{flex:1 0}.docsWrapper_BCFX{display:flex;flex:1 0 auto}.notFoundBlob_cRmD{max-width:300px}.videoContainer_aIYh{margin:40px 0;text-align:center;width:100%}.videosTitle_lBaH{margin-top:20px}.watchNowButton_wrG3{background-color:#00bbf1;border:0;color:#fff;height:50px;padding:9px 15px;width:300px}.sidebar_re4s{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 2rem)}.sidebarItemTitle_pO2u{font-size:var(--ifm-h3-font-size);font-weight:var(--ifm-font-weight-bold)}.container_mt6G,.sidebarItemList_Yudw{font-size:.9rem}.sidebarItem__DBe{margin-top:.7rem}.sidebarItemLink_mo7H{color:var(--ifm-font-color-base);display:block}.sidebarItemLinkActive_I1ZP{color:var(--ifm-color-primary)!important}.authorCol_Hf19{flex-grow:1!important;max-width:inherit!important}.imageOnlyAuthorRow_pa_O{display:flex;flex-flow:row wrap}.buttons_AeoN,.features_cAfv{align-items:center;display:flex}.imageOnlyAuthorCol_G86a{margin-left:.3rem;margin-right:.3rem}.heroBanner_qdFl{--ifm-heading-color:#fff;--ifm-hero-text-color:#fff;background-attachment:auto,fixed;background-image:linear-gradient(transparent,rgba(0,0,0,.356)),url(/SynapseML/assets/images/background-99ea7ad34efe334417bbead5efc95700.jpg);background-repeat:no-repeat,no-repeat;background-size:auto,cover;overflow:hidden;padding:4rem 0;position:relative;text-align:center}.getStarted_D36F,.heroBanner_qdFl{--ifm-button-background-color:#fff}.buttons_AeoN{justify-content:center}.announcement_XVnd{font-size:24px;font-weight:700;margin:0 auto;padding:48px;text-align:center}.announcementDark_dnMf{background-color:initial}.announcementInner_VmFX{margin:0 auto;max-width:100%}.configSnippets_Iyxf,.heroImg_lMB4{margin:10px 0}.features_cAfv{padding:2rem 0;width:100%}.featureImage_wMIZ{height:150px;width:auto}.heroImg_lMB4{height:200px}.configSnippet_hC0c{font-size:10pt!important}.pitch_XV8K{margin:40px 0}.loveSection_tbp6{--ifm-heading-color:#fff;background-color:#602541;padding:40px 0}.loveImg_zggS{height:200px}.sponsorLink_QcRj{display:inline-block;margin:10px}.microsoftImg_a3bM,.theMetImg_EvOH{max-height:80px;padding:10px}.mitImg_TSc4{max-height:60px;padding:10px}.codeSnippet__w2J,.codeSnippet_f3C9{font-size:10pt}.codeBlockContainer_v98K{border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_xAFg{direction:ltr;position:relative}.codeBlockTitle_mgIA{border-bottom:1px solid var(--ifm-color-emphasis-300);font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_yxlB{border-radius:0;margin:0;padding:0}.copyButton_C2v_{background:rgba(0,0,0,.3);border-radius:var(--ifm-global-radius);color:var(--ifm-color-white);opacity:0;padding:.4rem .5rem;top:calc(var(--ifm-pre-padding)/2);transition:opacity .2s ease-in-out;-webkit-user-select:none;user-select:none}.copyButton_C2v_,.furtherButton_rET3{position:absolute;right:calc(var(--ifm-pre-padding)/2)}.furtherButton_rET3{bottom:calc(var(--ifm-pre-padding)/2)}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;border:0;cursor:pointer}.DocSearch-Input::-webkit-input-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{-webkit-animation:.1s ease-in forwards b;animation:.1s ease-in forwards b;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:focus{outline:0}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top center;transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:-webkit-sticky;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon,.tocCollapsibleContent_vkbj a{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}@-webkit-keyframes b{0%{opacity:0}to{opacity:1}}@keyframes b{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{-webkit-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:-webkit-sticky;position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;-webkit-transform:translate(50%,-50%) rotate(-45deg);transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;-webkit-transform:translate(-50%,-50%) scale(.33);transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;-webkit-transform:scale(.33);transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";-webkit-filter:var(--ifm-menu-link-sublist-icon-filter);filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast);transition:transform var(--ifm-transition-fast);transition:transform var(--ifm-transition-fast),-webkit-transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{-webkit-transform:none;transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.containsTaskList_mC6p{list-style:none}.img_ev3q{height:auto}.admonition_LlT9{margin-bottom:1em}.admonitionHeading_tbUL{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.3rem}.admonitionHeading_tbUL code{text-transform:none}.admonitionIcon_kALy{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_kALy svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.blogPostFooterDetailsFull_mRVl{flex-direction:column}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_m80_{background-color:var(--docusaurus-collapse-button-bg)}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.searchBox_ZlJk{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:-webkit-sticky;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.expandButtonIcon_BlDH,[dir=rtl] .collapseSidebarButtonIcon_kv0_{-webkit-transform:rotate(0);transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_m80_:focus,.expandButton_m80_:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_m80_{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_BlDH{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.docSidebarContainer_b6E3{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_b3ry{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_Xe31{height:100%;max-height:100vh;position:-webkit-sticky;position:sticky;top:0}.docMainContainer_gTbr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_Uz_u{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_czyv{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.sidebar_re4s,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.searchBox_ZlJk{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media screen and (max-width:966px){.heroBanner_qdFl{padding:2rem}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}.title_f1Hy{font-size:2rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);-webkit-animation:none;animation:none;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_dCiT,.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/css/styles.e860a53d.css b/assets/css/styles.e860a53d.css deleted file mode 100644 index 2d134615fb..0000000000 --- a/assets/css/styles.e860a53d.css +++ /dev/null @@ -1 +0,0 @@ -.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.markdown>table,.markdown>table td{min-width:160px}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal);background-color:var(--ifm-code-background)!important;color:var(--ifm-code-color)!important}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.loveSectionPlea_xpLt,.notFoundContainer_NXNv,.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_tbUL,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-webkit-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;-webkit-filter:var(--ifm-breadcrumb-separator-filter);filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area.breadcrumbs__link[href]:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-webkit-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;-webkit-transform:translateY(-1px);transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);-webkit-transform:translateY(-.625rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility,-webkit-transform;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_S0QG>:last-child,.collapsibleContent_i85q>:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title,.title_f1Hy{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.menu__caret:before,.menu__link--sublist-caret:after{-webkit-filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;width:1.25rem;content:""}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;filter:var(--ifm-menu-link-sublist-icon-filter);margin-left:auto;min-width:1.25rem;-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear,-webkit-transform var(--ifm-transition-fast) linear}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;filter:var(--ifm-menu-link-sublist-icon-filter);-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear,-webkit-transform var(--ifm-transition-fast) linear}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.docsWrapper_BCFX,.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:-webkit-sticky;position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;position:fixed;transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::-webkit-input-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);transition-duration:.25s;transition-property:opacity,visibility,transform,-webkit-transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar--show .navbar-sidebar{-webkit-transform:translateZ(0);transform:translateZ(0)}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);right:0;transition-duration:.1s;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));-webkit-transform:translateZ(0);transform:translateZ(0);transition:-webkit-transform var(--ifm-transition-fast) ease-in-out;transition:transform var(--ifm-transition-fast) ease-in-out;transition:transform var(--ifm-transition-fast) ease-in-out,-webkit-transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{-webkit-transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0);transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-webkit-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover,.sidebarItemLink_mo7H:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.DocSearch-Hit[aria-selected=true] mark,.content_knG7 a{text-decoration:underline}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--ifm-color-primary:#3bd1ff;--ifm-color-primary-dark:#1ccaff;--ifm-color-primary-darker:#0cc6ff;--ifm-color-primary-darkest:#00a8dc;--ifm-color-primary-light:#5ad8ff;--ifm-color-primary-lighter:#6adcff;--ifm-color-primary-lightest:#99e7ff;--ifm-background-color:#1f201c;--ifm-background-surface-color:#272822;--ifm-background-surface-color-secondary:#2a2b25;--ifm-navbar-background-color:#272822;--ifm-code-background:#2e2f28;--ifm-code-color:#fff;--ifm-heading-color:#fff;--ifm-hero-text-color:#fff;--ifm-color-secondary:#f0f0f0;--ifm-blockquote-color:silver;background-color:#1f201c;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--site-primary-hue-saturation:167,68%;--ifm-color-primary:#3578e5;--ifm-color-primary-dark:#1d68e1;--ifm-color-primary-darker:#1b62d4;--ifm-color-primary-darkest:#1751af;--ifm-color-primary-light:#4e89e8;--ifm-color-primary-lighter:#5a91ea;--ifm-color-primary-lightest:#80aaef;--ifm-color-danger:#ff6188;--ifm-color-danger-dark:#ff3e6d;--ifm-color-danger-darker:#ff2c60;--ifm-color-danger-darkest:#f6003d;--ifm-color-danger-light:#ff84a3;--ifm-color-danger-lighter:#ff96b0;--ifm-color-danger-lightest:#ffcbd8;--ifm-color-success:#a9dc76;--ifm-color-success-dark:#98d55b;--ifm-color-success-darker:#90d24e;--ifm-color-success-darkest:#76bc30;--ifm-color-success-light:#bae391;--ifm-color-success-lighter:#c2e69e;--ifm-color-success-lightest:#dcf1c7;--ifm-color-info:#78dce8;--ifm-color-info-dark:#5ad4e3;--ifm-color-info-darker:#4bd0e0;--ifm-color-info-darkest:#24c0d3;--ifm-color-info-light:#96e4ed;--ifm-color-info-lighter:#a5e8f0;--ifm-color-info-lightest:#d2f3f7;--ifm-color-warning:#ffd866;--ifm-color-warning-dark:#ffcf42;--ifm-color-warning-darker:#ffca30;--ifm-color-warning-darkest:#faba00;--ifm-color-warning-light:#ffe18a;--ifm-color-warning-lighter:#ffe69c;--ifm-color-warning-lightest:#fff3d1;--ifm-navbar-background-color:#f9f9f9;--ifm-background-surface-color:#f9f9f9;--ifm-background-surface-color-secondary:#f3f3f3;--ifm-background-color:#fff;--ifm-heading-color:#000;--ifm-hero-text-color:#000;--ifm-blockquote-color:#3c3c3c;--ifm-alert-color:#000;--ifm-code-font-size:95%;--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-tag-list-border:var(--ifm-color-emphasis-300)}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;-webkit-transform:rotate(3deg) translateY(-4px);transform:rotate(3deg) translateY(-4px);width:100px}.footer.footer--dark{--ifm-footer-background-color:#272822}a>code{color:var(--ifm-link-color)!important}a.contents__link>code{color:var(--ifm-code-color)}html[data-theme=dark] .admonition h5{color:var(--ifm-background-color)}.menu--responsive>button{background-color:var(--ifm-color-primary);border-color:var(--ifm-color-primary)}.header-icon-link{padding:var(--ifm-navbar-item-padding-vertical) calc(var(--ifm-navbar-item-padding-horizontal)*.8)}.header-icon-link:hover{opacity:.6}.header-download-link:before{background:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z'/%3E%3C/svg%3E") no-repeat;content:"";display:flex;height:24px;width:24px}html[data-theme=dark] .header-download-link:before{background:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z' style='fill:%23ffffff'/%3E%3C/svg%3E") no-repeat}.header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;content:"";display:flex;height:24px;width:24px}html[data-theme=dark] .header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat}html[data-theme=dark] .DocSearch{--docsearch-text-color:var(--ifm-font-color-base);--docsearch-muted-color:var(--ifm-color-secondary-darkest);--docsearch-container-background:#2e2f28;--docsearch-modal-background:var(--ifm-background-color);--docsearch-searchbox-background:var(--ifm-background-color);--docsearch-searchbox-focus-background:var(--ifm-color-black);--docsearch-hit-color:var(--ifm-font-color-base);--docsearch-hit-active-color:var(--ifm-color-white);--docsearch-hit-background:var(--ifm-color-emphasis-100);--docsearch-footer-background:var(--ifm-background-surface-color);--docsearch-key-gradient:linear-gradient(-26.5deg,var(--ifm-color-emphasis-200) 0%,var(--ifm-color-emphasis-100) 100%)}.markdown>table{border:none}div[class^=announcementBar_]{--site-announcement-bar-stripe-color1:hsl(var(--site-primary-hue-saturation),85%);--site-announcement-bar-stripe-color2:hsl(var(--site-primary-hue-saturation),95%);background:repeating-linear-gradient(35deg,var(--site-announcement-bar-stripe-color1),var(--site-announcement-bar-stripe-color1) 20px,var(--site-announcement-bar-stripe-color2) 10px,var(--site-announcement-bar-stripe-color2) 40px);font-weight:700}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}#docusaurus-base-url-issue-banner-container,.collapseSidebarButton_PEFL,.docSidebarContainer_b6E3,.sidebarLogo_isFc,.themedImage_ToTc,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}[data-theme=dark] .themedImage--dark_i4oU,[data-theme=light] .themedImage--light_HNdA{display:initial}.iconExternalLink_nPIU{margin-left:.3rem}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:-webkit-transform var(--ifm-transition-fast) ease;transition:transform var(--ifm-transition-fast) ease;transition:transform var(--ifm-transition-fast) ease,-webkit-transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{-webkit-transform:translate3d(0,calc(-100% - 2px),0);transform:translate3d(0,calc(-100% - 2px),0)}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.codeBlockContent_xAFg:hover>.copyButton_C2v_,.codeBlockTitle_mgIA:hover+.codeBlockContent_xAFg .copyButton_C2v_,.copyButton_C2v_:focus,.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.mainWrapper_z2l0{flex:1 0 auto}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-webkit-input-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{-webkit-animation:1s linear infinite a;animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;-webkit-transform:scale(0);transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.buttonGroup__atx button,.copyButton_C2v_{transition:opacity .2s ease-in-out;opacity:0}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;-webkit-transform:scale(1);transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.docMainContainer_gTbr,.docPage__5DB{display:flex;width:100%}.notFoundBlob_cRmD{max-width:300px}.videoContainer_aIYh{margin:40px 0;text-align:center;width:100%}.videosTitle_lBaH{margin-top:20px}.watchNowButton_wrG3{background-color:#00bbf1;border:0;color:#fff;height:50px;padding:9px 15px;width:300px}.sidebar_re4s{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 2rem)}.sidebarItemTitle_pO2u{font-size:var(--ifm-h3-font-size);font-weight:var(--ifm-font-weight-bold)}.container_mt6G,.sidebarItemList_Yudw{font-size:.9rem}.sidebarItem__DBe{margin-top:.7rem}.sidebarItemLink_mo7H{color:var(--ifm-font-color-base);display:block}.sidebarItemLinkActive_I1ZP{color:var(--ifm-color-primary)!important}.authorCol_Hf19{flex-grow:1!important;max-width:inherit!important}.imageOnlyAuthorRow_pa_O{display:flex;flex-flow:row wrap}.buttons_AeoN,.features_cAfv{align-items:center;display:flex}.imageOnlyAuthorCol_G86a{margin-left:.3rem;margin-right:.3rem}.heroBanner_qdFl{--ifm-heading-color:#fff;--ifm-hero-text-color:#fff;background-attachment:auto,fixed;background-image:linear-gradient(transparent,rgba(0,0,0,.356)),url(/SynapseML/assets/images/background-99ea7ad34efe334417bbead5efc95700.jpg);background-repeat:no-repeat,no-repeat;background-size:auto,cover;overflow:hidden;padding:4rem 0;position:relative;text-align:center}.getStarted_D36F,.heroBanner_qdFl{--ifm-button-background-color:#fff}.buttons_AeoN{justify-content:center}.announcement_XVnd{font-size:24px;font-weight:700;margin:0 auto;padding:48px;text-align:center}.announcementDark_dnMf{background-color:initial}.announcementInner_VmFX{margin:0 auto;max-width:100%}.configSnippets_Iyxf,.heroImg_lMB4{margin:10px 0}.features_cAfv{padding:2rem 0;width:100%}.featureImage_wMIZ{height:150px;width:auto}.heroImg_lMB4{height:200px}.configSnippet_hC0c{font-size:10pt!important}.pitch_XV8K{margin:40px 0}.loveSection_tbp6{--ifm-heading-color:#fff;background-color:#602541;padding:40px 0}.loveImg_zggS{height:200px}.sponsorLink_QcRj{display:inline-block;margin:10px}.microsoftImg_a3bM,.theMetImg_EvOH{max-height:80px;padding:10px}.mitImg_TSc4{max-height:60px;padding:10px}.codeSnippet__w2J,.codeSnippet_f3C9{font-size:10pt}.codeBlockContainer_v98K{border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_xAFg{direction:ltr;position:relative}.codeBlockTitle_mgIA{border-bottom:1px solid var(--ifm-color-emphasis-300);font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_yxlB{border-radius:0;margin:0;padding:0}.copyButton_C2v_{background:rgba(0,0,0,.3);border-radius:var(--ifm-global-radius);color:var(--ifm-color-white);padding:.4rem .5rem;top:calc(var(--ifm-pre-padding)/2);-webkit-user-select:none;user-select:none}.copyButton_C2v_,.furtherButton_rET3{position:absolute;right:calc(var(--ifm-pre-padding)/2)}.furtherButton_rET3{bottom:calc(var(--ifm-pre-padding)/2)}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;border:0;cursor:pointer}.DocSearch-Input::-webkit-input-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{-webkit-animation:.1s ease-in forwards b;animation:.1s ease-in forwards b;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:focus{outline:0}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top center;transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:-webkit-sticky;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon,.tocCollapsibleContent_vkbj a{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}@-webkit-keyframes b{0%{opacity:0}to{opacity:1}}@keyframes b{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{-webkit-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;padding:.4rem}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:-webkit-sticky;position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;-webkit-transform:translate(50%,-50%) rotate(-45deg);transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:.15s;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;-webkit-transform:translate(-50%,-50%) scale(.33);transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;-webkit-transform:scale(.33);transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";-webkit-filter:var(--ifm-menu-link-sublist-icon-filter);filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast);transition:transform var(--ifm-transition-fast);transition:transform var(--ifm-transition-fast),-webkit-transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{-webkit-transform:none;transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.containsTaskList_mC6p{list-style:none}.img_ev3q{height:auto}.admonition_LlT9{margin-bottom:1em}.admonitionHeading_tbUL{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.3rem}.admonitionHeading_tbUL code{text-transform:none}.admonitionIcon_kALy{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_kALy svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.blogPostFooterDetailsFull_mRVl{flex-direction:column}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.breadcrumbHomeIcon_OVgt{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_m80_{background-color:var(--docusaurus-collapse-button-bg)}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.searchBox_ZlJk{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:-webkit-sticky;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.expandButtonIcon_BlDH,[dir=rtl] .collapseSidebarButtonIcon_kv0_{-webkit-transform:rotate(0);transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_m80_:focus,.expandButton_m80_:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;max-height:100vh;padding-top:var(--ifm-navbar-height);position:-webkit-sticky;position:sticky;top:0;transition:opacity 50ms;width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{height:0;opacity:0;overflow:hidden;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_m80_{align-items:center;display:flex;height:100%;justify-content:center;max-height:100vh;position:-webkit-sticky;position:sticky;top:0;transition:background-color var(--ifm-transition-fast) ease}[dir=rtl] .expandButtonIcon_BlDH{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.docSidebarContainer_b6E3{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_b3ry{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.docMainContainer_gTbr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_Uz_u{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_czyv{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.sidebar_re4s,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.searchBox_ZlJk{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media screen and (max-width:966px){.heroBanner_qdFl{padding:2rem}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}.title_f1Hy{font-size:2rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);-webkit-animation:none;animation:none;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_dCiT,.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/js/1512.9e383682.js b/assets/js/1512.9e383682.js deleted file mode 100644 index 377f306218..0000000000 --- a/assets/js/1512.9e383682.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[1512],{3905:function(e,t,n){"use strict";n.d(t,{Zo:function(){return u},kt:function(){return p}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=s(n),p=a,f=d["".concat(c,".").concat(p)]||d[p]||m[p]||o;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var s=2;s0})).map((function(e){return[e-1,[l]]}));return{lineClassNames:Object.fromEntries(c),code:n}}if(void 0===r)return{lineClassNames:{},code:n};for(var s=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return k(["js","jsBlock"],t);case"jsx":case"tsx":return k(["js","jsBlock","jsx"],t);case"html":return k(["js","jsBlock","html"],t);case"python":case"py":case"bash":return k(["bash"],t);case"markdown":case"md":return k(["html","jsx","bash"],t);default:return k(Object.keys(E),t)}}(r,a),u=n.split("\n"),m=Object.fromEntries(a.map((function(e){return[e.className,{start:0,range:""}]}))),d=Object.fromEntries(a.filter((function(e){return e.line})).map((function(e){var t=e.className;return[e.line,t]}))),p=Object.fromEntries(a.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.start,t]}))),f=Object.fromEntries(a.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.end,t]}))),v=0;ve.clientWidth||f.current.querySelector("code").hasAttribute("style");m(t)}),[f]),L(f,h),(0,r.useEffect)((function(){h()}),[i,h]),(0,r.useEffect)((function(){return window.addEventListener("resize",h,{passive:!0}),function(){window.removeEventListener("resize",h)}}),[h]),{codeBlockRef:f,isEnabled:i,isCodeScrollable:s,toggle:v}),I=function(e){var t,n;return null!=(t=null==e||null==(n=e.match(y))?void 0:n.groups.title)?t:""}(k)||C,M=N(g,{metastring:k,language:S,magicComments:x}),H=M.lineClassNames,V=M.code,W=null!=Z?Z:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(k);return r.createElement(w,{as:"div",className:(0,u.Z)(E,S&&!E.includes("language-"+S)&&"language-"+S)},I&&r.createElement("div",{className:T.codeBlockTitle},I),r.createElement("div",{className:T.codeBlockContent},r.createElement(O.ZP,(0,o.Z)({},O.lG,{theme:P,code:V,language:null!=S?S:"text"}),(function(e){var t=e.className,n=e.tokens,a=e.getLineProps,o=e.getTokenProps;return r.createElement("pre",{tabIndex:0,ref:A.codeBlockRef,className:(0,u.Z)(t,T.codeBlock,"thin-scrollbar")},r.createElement("code",{className:(0,u.Z)(T.codeBlockLines,W&&T.codeBlockLinesWithNumbering)},n.map((function(e,t){return r.createElement(z,{key:t,line:e,getLineProps:a,getTokenProps:o,classNames:H[t],showLineNumbers:W})}))))})),r.createElement("div",{className:T.buttonGroup},(A.isEnabled||A.isCodeScrollable)&&r.createElement(R,{className:T.codeButton,onClick:function(){return A.toggle()},isEnabled:A.isEnabled}),r.createElement(D,{className:T.codeButton,code:V}))))}var F=["children"];function q(e){var t=e.children,n=(0,i.Z)(e,F),a=(0,s.Z)(),l=function(e){return r.Children.toArray(e).some((function(e){return(0,r.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(t),c="string"==typeof l?W:B;return r.createElement(c,(0,o.Z)({key:String(a)},n),l)}var G=n(9960);var U=n(6043),$="details_lb9f",Q="isBrowser_bmU9",X="collapsibleContent_i85q",Y=["summary","children"];function J(e){return!!e&&("SUMMARY"===e.tagName||J(e.parentElement))}function K(e,t){return!!e&&(e===t||K(e.parentElement,t))}function ee(e){var t=e.summary,n=e.children,a=(0,i.Z)(e,Y),l=(0,s.Z)(),c=(0,r.useRef)(null),m=(0,U.u)({initialState:!a.open}),d=m.collapsed,p=m.setCollapsed,f=(0,r.useState)(a.open),v=f[0],h=f[1];return r.createElement("details",(0,o.Z)({},a,{ref:c,open:v,"data-collapsed":d,className:(0,u.Z)($,l&&Q,a.className),onMouseDown:function(e){J(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var t=e.target;J(t)&&K(t,c.current)&&(e.preventDefault(),d?(p(!1),h(!0)):p(!0))}}),null!=t?t:r.createElement("summary",null,"Details"),r.createElement(U.z,{lazy:!1,collapsed:d,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){p(e),h(!e)}},r.createElement("div",{className:X},n)))}var te="details_b_Ee";function ne(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return r.createElement(ee,(0,o.Z)({},t,{className:(0,u.Z)("alert alert--info",te,t.className)}))}var re=n(2503);function ae(e){return r.createElement(re.Z,e)}var oe="containsTaskList_mC6p";var ie="img_ev3q";var le="admonition_LlT9",ce="admonitionHeading_tbUL",se="admonitionIcon_kALy",ue="admonitionContent_S0QG";var me={note:{infimaClassName:"secondary",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 14 16"},r.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:r.createElement(I.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 12 16"},r.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:r.createElement(I.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 12 16"},r.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:r.createElement(I.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 14 16"},r.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:r.createElement(I.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 16 16"},r.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:r.createElement(I.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},de={secondary:"note",important:"info",success:"tip",warning:"danger"};function pe(e){var t,n=function(e){var t=r.Children.toArray(e),n=t.find((function(e){var t;return r.isValidElement(e)&&"mdxAdmonitionTitle"===(null==(t=e.props)?void 0:t.mdxType)})),a=r.createElement(r.Fragment,null,t.filter((function(e){return e!==n})));return{mdxAdmonitionTitle:n,rest:a}}(e.children),a=n.mdxAdmonitionTitle,o=n.rest;return Object.assign({},e,{title:null!=(t=e.title)?t:a,children:o})}var fe={head:function(e){var t=r.Children.map(e.children,(function(e){return r.isValidElement(e)?function(e){var t;if(null!=(t=e.props)&&t.mdxType&&e.props.originalType){var n=e.props,a=(n.mdxType,n.originalType,(0,i.Z)(n,c));return r.createElement(e.props.originalType,a)}return e}(e):e}));return r.createElement(l.Z,e,t)},code:function(e){var t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return r.Children.toArray(e.children).every((function(e){var n;return"string"==typeof e&&!e.includes("\n")||(0,r.isValidElement)(e)&&t.includes(null==(n=e.props)?void 0:n.mdxType)}))?r.createElement("code",e):r.createElement(q,e)},a:function(e){return r.createElement(G.Z,e)},pre:function(e){var t;return r.createElement(q,(0,r.isValidElement)(e.children)&&"code"===(null==(t=e.children.props)?void 0:t.originalType)?e.children.props:Object.assign({},e))},details:function(e){var t=r.Children.toArray(e.children),n=t.find((function(e){var t;return r.isValidElement(e)&&"summary"===(null==(t=e.props)?void 0:t.mdxType)})),a=r.createElement(r.Fragment,null,t.filter((function(e){return e!==n})));return r.createElement(ne,(0,o.Z)({},e,{summary:n}),a)},ul:function(e){return r.createElement("ul",(0,o.Z)({},e,{className:(t=e.className,(0,u.Z)(t,(null==t?void 0:t.includes("contains-task-list"))&&oe))}));var t},img:function(e){return r.createElement("img",(0,o.Z)({loading:"lazy"},e,{className:(t=e.className,(0,u.Z)(t,ie))}));var t},h1:function(e){return r.createElement(ae,(0,o.Z)({as:"h1"},e))},h2:function(e){return r.createElement(ae,(0,o.Z)({as:"h2"},e))},h3:function(e){return r.createElement(ae,(0,o.Z)({as:"h3"},e))},h4:function(e){return r.createElement(ae,(0,o.Z)({as:"h4"},e))},h5:function(e){return r.createElement(ae,(0,o.Z)({as:"h5"},e))},h6:function(e){return r.createElement(ae,(0,o.Z)({as:"h6"},e))},admonition:function(e){var t=pe(e),n=t.children,a=t.type,o=t.title,i=t.icon,l=function(e){var t,n=null!=(t=de[e])?t:e;return me[n]||(console.warn('No admonition config found for admonition type "'+n+'". Using Info as fallback.'),me.info)}(a),c=null!=o?o:l.label,s=l.iconComponent,m=null!=i?i:r.createElement(s,null);return r.createElement("div",{className:(0,u.Z)(f.k.common.admonition,f.k.common.admonitionType(e.type),"alert","alert--"+l.infimaClassName,le)},r.createElement("div",{className:ce},r.createElement("span",{className:se},m),c),r.createElement("div",{className:ue},n))},mermaid:function(){return null}};function ve(e){var t=e.children;return r.createElement(a.Zo,{components:fe},t)}},2244:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7294),a=n(6010),o=n(9960);function i(e){var t=e.permalink,n=e.title,i=e.subLabel,l=e.isNext;return r.createElement(o.Z,{className:(0,a.Z)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},i&&r.createElement("div",{className:"pagination-nav__sublabel"},i),r.createElement("div",{className:"pagination-nav__label"},n))}},6233:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7294),a=n(6010),o=n(5999),i=n(9960),l="tag_zVej",c="tagRegular_sFm0",s="tagWithCount_h2kH";function u(e){var t=e.permalink,n=e.label,o=e.count;return r.createElement(i.Z,{href:t,className:(0,a.Z)(l,o?s:c)},n,o&&r.createElement("span",null,o))}var m="tags_jXut",d="tag_QGVx";function p(e){var t=e.tags;return r.createElement(r.Fragment,null,r.createElement("b",null,r.createElement(o.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),r.createElement("ul",{className:(0,a.Z)(m,"padding--none","margin-left--sm")},t.map((function(e){var t=e.label,n=e.permalink;return r.createElement("li",{key:n,className:d},r.createElement(u,{label:t,permalink:n}))}))))}},7594:function(e,t){function n(e){let t,n=[];for(let r of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(r))n.push(parseInt(r,10));else if(t=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,r,a,o]=t;if(r&&o){r=parseInt(r),o=parseInt(o);const e=r0&&e[n-1]===t?e:e.concat(t)},d=function(e,t){var n=e.plain,r=Object.create(null),a=e.styles.reduce((function(e,n){var r=n.languages,a=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=c({},e[t],a);e[t]=n})),e}),r);return a.root=n,a.plain=c({},n,{backgroundColor:null}),a};function p(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var f=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),l(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?d(e.theme,e.language):void 0;return t.themeDict=n})),l(this,"getLineProps",(function(e){var n=e.key,r=e.className,a=e.style,o=c({},p(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),i=t.getThemeDict(t.props);return void 0!==i&&(o.style=i.plain),void 0!==a&&(o.style=void 0!==o.style?c({},o.style,a):a),void 0!==n&&(o.key=n),r&&(o.className+=" "+r),o})),l(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,a=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===a&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===a&&!r)return o[n[0]];var i=r?{display:"inline-block"}:{},l=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[i].concat(l))}})),l(this,"getTokenProps",(function(e){var n=e.key,r=e.className,a=e.style,o=e.token,i=c({},p(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==a&&(i.style=void 0!==i.style?c({},i.style,a):a),void 0!==n&&(i.key=n),r&&(i.className+=" "+r),i})),l(this,"tokenize",(function(e,t,n,r){var a={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",a);var o=a.tokens=e.tokenize(a.code,a.grammar,a.language);return e.hooks.run("after-tokenize",a),o}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,a=e.children,o=this.getThemeDict(this.props),i=t.languages[n];return a({tokens:function(e){for(var t=[[]],n=[e],r=[0],a=[e.length],o=0,i=0,l=[],c=[l];i>-1;){for(;(o=r[i]++)0?p:["plain"],d=f):(p=m(p,f.type),f.alias&&(p=m(p,f.alias)),d=f.content),"string"==typeof d){var v=d.split(s),h=v.length;l.push({types:p,content:v[0]});for(var g=1;g0&&(l=i.getRangeAt(0)),r.append(a),a.select(),a.selectionStart=0,a.selectionEnd=e.length;var c=!1;try{c=document.execCommand("copy")}catch(s){}return a.remove(),l&&(i.removeAllRanges(),i.addRange(l)),o&&o.focus(),c}n.d(t,{Z:function(){return r}})}}]); \ No newline at end of file diff --git a/assets/js/17896441.9cfbca0e.js b/assets/js/17896441.9cfbca0e.js new file mode 100644 index 0000000000..1d1d4f7e1a --- /dev/null +++ b/assets/js/17896441.9cfbca0e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[7918],{8945:function(e,t,a){a.r(t),a.d(t,{default:function(){return he}});var n=a(7294),r=a(833),l=a(4700),i=n.createContext(null);function o(e){var t=e.children,a=function(e){return(0,n.useMemo)((function(){return{metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc}}),[e])}(e.content);return n.createElement(i.Provider,{value:a},t)}function s(){var e=(0,n.useContext)(i);if(null===e)throw new l.i6("DocProvider");return e}function c(){var e,t=s(),a=t.metadata,l=t.frontMatter,i=t.assets;return n.createElement(r.d,{title:a.title,description:a.description,keywords:l.keywords,image:null!=(e=i.image)?e:l.image})}var d=a(6010),m=a(7524),u=a(3117),v=a(5999),f=a(2244);function h(e){var t=e.previous,a=e.next;return n.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,v.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},t&&n.createElement(f.Z,(0,u.Z)({},t,{subLabel:n.createElement(v.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),a&&n.createElement(f.Z,(0,u.Z)({},a,{subLabel:n.createElement(v.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}function p(){var e=s().metadata;return n.createElement(h,{previous:e.previous,next:e.next})}var b=a(2263),E=a(9960),g=a(143),L=a(5281),N=a(373),k=a(4477);var Z={unreleased:function(e){var t=e.siteTitle,a=e.versionMetadata;return n.createElement(v.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){var t=e.siteTitle,a=e.versionMetadata;return n.createElement(v.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function _(e){var t=Z[e.versionMetadata.banner];return n.createElement(t,e)}function C(e){var t=e.versionLabel,a=e.to,r=e.onClick;return n.createElement(v.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:n.createElement("b",null,n.createElement(E.Z,{to:a,onClick:r},n.createElement(v.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function x(e){var t,a=e.className,r=e.versionMetadata,l=(0,b.Z)().siteConfig.title,i=(0,g.gA)({failfast:!0}).pluginId,o=(0,N.J)(i).savePreferredVersionName,s=(0,g.Jo)(i),c=s.latestDocSuggestion,m=s.latestVersionSuggestion,u=null!=c?c:(t=m).docs.find((function(e){return e.id===t.mainDocId}));return n.createElement("div",{className:(0,d.Z)(a,L.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},n.createElement("div",null,n.createElement(_,{siteTitle:l,versionMetadata:r})),n.createElement("div",{className:"margin-top--md"},n.createElement(C,{versionLabel:m.label,to:u.path,onClick:function(){return o(m.name)}})))}function T(e){var t=e.className,a=(0,k.E)();return a.banner?n.createElement(x,{className:t,versionMetadata:a}):null}function H(e){var t=e.className,a=(0,k.E)();return a.badge?n.createElement("span",{className:(0,d.Z)(t,L.k.docs.docVersionBadge,"badge badge--secondary")},n.createElement(v.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:a.label}},"Version: {versionLabel}")):null}function y(e){var t=e.lastUpdatedAt,a=e.formattedLastUpdatedAt;return n.createElement(v.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:n.createElement("b",null,n.createElement("time",{dateTime:new Date(1e3*t).toISOString()},a))}}," on {date}")}function U(e){var t=e.lastUpdatedBy;return n.createElement(v.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:n.createElement("b",null,t)}}," by {user}")}function A(e){var t=e.lastUpdatedAt,a=e.formattedLastUpdatedAt,r=e.lastUpdatedBy;return n.createElement("span",{className:L.k.common.lastUpdated},n.createElement(v.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&a?n.createElement(y,{lastUpdatedAt:t,formattedLastUpdatedAt:a}):"",byUser:r?n.createElement(U,{lastUpdatedBy:r}):""}},"Last updated{atDate}{byUser}"),!1)}var w=a(4881),M=a(6233),I="lastUpdated_vwxv";function B(e){return n.createElement("div",{className:(0,d.Z)(L.k.docs.docFooterTagsRow,"row margin-bottom--sm")},n.createElement("div",{className:"col"},n.createElement(M.Z,e)))}function O(e){var t=e.editUrl,a=e.lastUpdatedAt,r=e.lastUpdatedBy,l=e.formattedLastUpdatedAt;return n.createElement("div",{className:(0,d.Z)(L.k.docs.docFooterEditMetaRow,"row")},n.createElement("div",{className:"col"},t&&n.createElement(w.Z,{editUrl:t})),n.createElement("div",{className:(0,d.Z)("col",I)},(a||r)&&n.createElement(A,{lastUpdatedAt:a,formattedLastUpdatedAt:l,lastUpdatedBy:r})))}function V(){var e=s().metadata,t=e.editUrl,a=e.lastUpdatedAt,r=e.formattedLastUpdatedAt,l=e.lastUpdatedBy,i=e.tags,o=i.length>0,c=!!(t||a||l);return o||c?n.createElement("footer",{className:(0,d.Z)(L.k.docs.docFooter,"docusaurus-mt-lg")},o&&n.createElement(B,{tags:i}),c&&n.createElement(O,{editUrl:t,lastUpdatedAt:a,lastUpdatedBy:l,formattedLastUpdatedAt:r})):null}var S=a(6043),P=a(3743),D=a(102),R="tocCollapsibleButton_TO0P",F="tocCollapsibleButtonExpanded_MG3E",j=["collapsed"];function z(e){var t=e.collapsed,a=(0,D.Z)(e,j);return n.createElement("button",(0,u.Z)({type:"button"},a,{className:(0,d.Z)("clean-btn",R,!t&&F,a.className)}),n.createElement(v.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}var q="tocCollapsible_ETCw",G="tocCollapsibleContent_vkbj",J="tocCollapsibleExpanded_sAul";function Y(e){var t=e.toc,a=e.className,r=e.minHeadingLevel,l=e.maxHeadingLevel,i=(0,S.u)({initialState:!0}),o=i.collapsed,s=i.toggleCollapsed;return n.createElement("div",{className:(0,d.Z)(q,!o&&J,a)},n.createElement(z,{collapsed:o,onClick:s}),n.createElement(S.z,{lazy:!0,className:G,collapsed:o},n.createElement(P.Z,{toc:t,minHeadingLevel:r,maxHeadingLevel:l})))}var K="tocMobile_ITEo";function Q(){var e=s(),t=e.toc,a=e.frontMatter;return n.createElement(Y,{toc:t,minHeadingLevel:a.toc_min_heading_level,maxHeadingLevel:a.toc_max_heading_level,className:(0,d.Z)(L.k.docs.docTocMobile,K)})}var W=a(9407);function X(){var e=s(),t=e.toc,a=e.frontMatter;return n.createElement(W.Z,{toc:t,minHeadingLevel:a.toc_min_heading_level,maxHeadingLevel:a.toc_max_heading_level,className:L.k.docs.docTocDesktop})}var $=a(2503),ee=a(9549);function te(e){var t,a,r,l,i=e.children,o=(t=s(),a=t.metadata,r=t.frontMatter,l=t.contentTitle,r.hide_title||void 0!==l?null:a.title);return n.createElement("div",{className:(0,d.Z)(L.k.docs.docMarkdown,"markdown")},o&&n.createElement("header",null,n.createElement($.Z,{as:"h1"},o)),n.createElement(ee.Z,null,i))}var ae=a(4575),ne=a(8596),re=a(4996);function le(e){return n.createElement("svg",(0,u.Z)({viewBox:"0 0 24 24"},e),n.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}var ie="breadcrumbHomeIcon_YNFT";function oe(){var e=(0,re.Z)("/");return n.createElement("li",{className:"breadcrumbs__item"},n.createElement(E.Z,{"aria-label":(0,v.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},n.createElement(le,{className:ie})))}var se="breadcrumbsContainer_Z_bl";function ce(e){var t=e.children,a=e.href,r="breadcrumbs__link";return e.isLast?n.createElement("span",{className:r,itemProp:"name"},t):a?n.createElement(E.Z,{className:r,href:a,itemProp:"item"},n.createElement("span",{itemProp:"name"},t)):n.createElement("span",{className:r},t)}function de(e){var t=e.children,a=e.active,r=e.index,l=e.addMicrodata;return n.createElement("li",(0,u.Z)({},l&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,d.Z)("breadcrumbs__item",{"breadcrumbs__item--active":a})}),t,n.createElement("meta",{itemProp:"position",content:String(r+1)}))}function me(){var e=(0,ae.s1)(),t=(0,ne.Ns)();return e?n.createElement("nav",{className:(0,d.Z)(L.k.docs.docBreadcrumbs,se),"aria-label":(0,v.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},n.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&n.createElement(oe,null),e.map((function(t,a){var r=a===e.length-1;return n.createElement(de,{key:a,active:r,index:a,addMicrodata:!!t.href},n.createElement(ce,{href:t.href,isLast:r},t.label))})))):null}var ue="docItemContainer_Djhp",ve="docItemCol_VOVn";function fe(e){var t,a,r,l,i,o,c=e.children,u=(t=s(),a=t.frontMatter,r=t.toc,l=(0,m.i)(),i=a.hide_table_of_contents,o=!i&&r.length>0,{hidden:i,mobile:o?n.createElement(Q,null):void 0,desktop:!o||"desktop"!==l&&"ssr"!==l?void 0:n.createElement(X,null)});return n.createElement("div",{className:"row"},n.createElement("div",{className:(0,d.Z)("col",!u.hidden&&ve)},n.createElement(T,null),n.createElement("div",{className:ue},n.createElement("article",null,n.createElement(me,null),n.createElement(H,null),u.mobile,n.createElement(te,null,c),n.createElement(V,null)),n.createElement(p,null))),u.desktop&&n.createElement("div",{className:"col col--3"},u.desktop))}function he(e){var t="docs-doc-id-"+e.content.metadata.unversionedId,a=e.content;return n.createElement(o,{content:e.content},n.createElement(r.FG,{className:t},n.createElement(c,null),n.createElement(fe,null,n.createElement(a,null))))}},9407:function(e,t,a){a.d(t,{Z:function(){return d}});var n=a(3117),r=a(102),l=a(7294),i=a(6010),o=a(3743),s="tableOfContents_bqdL",c=["className"];function d(e){var t=e.className,a=(0,r.Z)(e,c);return l.createElement("div",{className:(0,i.Z)(s,"thin-scrollbar",t)},l.createElement(o.Z,(0,n.Z)({},a,{linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"})))}},3743:function(e,t,a){a.d(t,{Z:function(){return b}});var n=a(3117),r=a(102),l=a(7294),i=a(6668),o=["parentIndex"];function s(e){var t=e.map((function(e){return Object.assign({},e,{parentIndex:-1,children:[]})})),a=Array(7).fill(-1);t.forEach((function(e,t){var n=a.slice(2,e.level);e.parentIndex=Math.max.apply(Math,n),a[e.level]=t}));var n=[];return t.forEach((function(e){var a=e.parentIndex,l=(0,r.Z)(e,o);a>=0?t[a].children.push(l):n.push(l)})),n}function c(e){var t=e.toc,a=e.minHeadingLevel,n=e.maxHeadingLevel;return t.flatMap((function(e){var t=c({toc:e.children,minHeadingLevel:a,maxHeadingLevel:n});return function(e){return e.level>=a&&e.level<=n}(e)?[Object.assign({},e,{children:t})]:t}))}function d(e){var t=e.getBoundingClientRect();return t.top===t.bottom?d(e.parentNode):t}function m(e,t){var a,n,r=t.anchorTopOffset,l=e.find((function(e){return d(e).top>=r}));return l?function(e){return e.top>0&&e.bottom0,c=!!(t||a||l);return o||c?n.createElement("footer",{className:(0,d.Z)(L.k.docs.docFooter,"docusaurus-mt-lg")},o&&n.createElement(B,{tags:i}),c&&n.createElement(O,{editUrl:t,lastUpdatedAt:a,lastUpdatedBy:l,formattedLastUpdatedAt:r})):null}var S=a(6043),P=a(3743),D=a(102),R="tocCollapsibleButton_TO0P",j="tocCollapsibleButtonExpanded_MG3E",z=["collapsed"];function F(e){var t=e.collapsed,a=(0,D.Z)(e,z);return n.createElement("button",(0,u.Z)({type:"button"},a,{className:(0,d.Z)("clean-btn",R,!t&&j,a.className)}),n.createElement(v.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}var q="tocCollapsible_ETCw",G="tocCollapsibleContent_vkbj",J="tocCollapsibleExpanded_sAul";function K(e){var t=e.toc,a=e.className,r=e.minHeadingLevel,l=e.maxHeadingLevel,i=(0,S.u)({initialState:!0}),o=i.collapsed,s=i.toggleCollapsed;return n.createElement("div",{className:(0,d.Z)(q,!o&&J,a)},n.createElement(F,{collapsed:o,onClick:s}),n.createElement(S.z,{lazy:!0,className:G,collapsed:o},n.createElement(P.Z,{toc:t,minHeadingLevel:r,maxHeadingLevel:l})))}var Q="tocMobile_ITEo";function W(){var e=s(),t=e.toc,a=e.frontMatter;return n.createElement(K,{toc:t,minHeadingLevel:a.toc_min_heading_level,maxHeadingLevel:a.toc_max_heading_level,className:(0,d.Z)(L.k.docs.docTocMobile,Q)})}var X=a(9407);function Y(){var e=s(),t=e.toc,a=e.frontMatter;return n.createElement(X.Z,{toc:t,minHeadingLevel:a.toc_min_heading_level,maxHeadingLevel:a.toc_max_heading_level,className:L.k.docs.docTocDesktop})}var $=a(2503),ee=a(883);function te(e){var t,a,r,l,i=e.children,o=(t=s(),a=t.metadata,r=t.frontMatter,l=t.contentTitle,r.hide_title||void 0!==l?null:a.title);return n.createElement("div",{className:(0,d.Z)(L.k.docs.docMarkdown,"markdown")},o&&n.createElement("header",null,n.createElement($.Z,{as:"h1"},o)),n.createElement(ee.Z,null,i))}var ae=a(4575),ne=a(8596),re=a(4996);function le(e){return n.createElement("svg",(0,u.Z)({viewBox:"0 0 24 24"},e),n.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}var ie={breadcrumbsContainer:"breadcrumbsContainer_Z_bl",breadcrumbHomeIcon:"breadcrumbHomeIcon_OVgt"};function oe(e){var t=e.children,a=e.href,r="breadcrumbs__link";return e.isLast?n.createElement("span",{className:r,itemProp:"name"},t):a?n.createElement(E.Z,{className:r,href:a,itemProp:"item"},n.createElement("span",{itemProp:"name"},t)):n.createElement("span",{className:r},t)}function se(e){var t=e.children,a=e.active,r=e.index,l=e.addMicrodata;return n.createElement("li",(0,u.Z)({},l&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,d.Z)("breadcrumbs__item",{"breadcrumbs__item--active":a})}),t,n.createElement("meta",{itemProp:"position",content:String(r+1)}))}function ce(){var e=(0,re.Z)("/");return n.createElement("li",{className:"breadcrumbs__item"},n.createElement(E.Z,{"aria-label":(0,v.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:(0,d.Z)("breadcrumbs__link",ie.breadcrumbsItemLink),href:e},n.createElement(le,{className:ie.breadcrumbHomeIcon})))}function de(){var e=(0,ae.s1)(),t=(0,ne.Ns)();return e?n.createElement("nav",{className:(0,d.Z)(L.k.docs.docBreadcrumbs,ie.breadcrumbsContainer),"aria-label":(0,v.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},n.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&n.createElement(ce,null),e.map((function(t,a){var r=a===e.length-1;return n.createElement(se,{key:a,active:r,index:a,addMicrodata:!!t.href},n.createElement(oe,{href:t.href,isLast:r},t.label))})))):null}var me="docItemContainer_Djhp",ue="docItemCol_VOVn";function ve(e){var t,a,r,l,i,o,c=e.children,u=(t=s(),a=t.frontMatter,r=t.toc,l=(0,m.i)(),i=a.hide_table_of_contents,o=!i&&r.length>0,{hidden:i,mobile:o?n.createElement(W,null):void 0,desktop:!o||"desktop"!==l&&"ssr"!==l?void 0:n.createElement(Y,null)});return n.createElement("div",{className:"row"},n.createElement("div",{className:(0,d.Z)("col",!u.hidden&&ue)},n.createElement(H,null),n.createElement("div",{className:me},n.createElement("article",null,n.createElement(de,null),n.createElement(T,null),u.mobile,n.createElement(te,null,c),n.createElement(V,null)),n.createElement(h,null))),u.desktop&&n.createElement("div",{className:"col col--3"},u.desktop))}function fe(e){var t="docs-doc-id-"+e.content.metadata.unversionedId,a=e.content;return n.createElement(o,{content:e.content},n.createElement(r.FG,{className:t},n.createElement(c,null),n.createElement(ve,null,n.createElement(a,null))))}},9407:function(e,t,a){a.d(t,{Z:function(){return d}});var n=a(3117),r=a(102),l=a(7294),i=a(6010),o=a(3743),s="tableOfContents_bqdL",c=["className"];function d(e){var t=e.className,a=(0,r.Z)(e,c);return l.createElement("div",{className:(0,i.Z)(s,"thin-scrollbar",t)},l.createElement(o.Z,(0,n.Z)({},a,{linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"})))}},3743:function(e,t,a){a.d(t,{Z:function(){return p}});var n=a(3117),r=a(102),l=a(7294),i=a(6668),o=["parentIndex"];function s(e){var t=e.map((function(e){return Object.assign({},e,{parentIndex:-1,children:[]})})),a=Array(7).fill(-1);t.forEach((function(e,t){var n=a.slice(2,e.level);e.parentIndex=Math.max.apply(Math,n),a[e.level]=t}));var n=[];return t.forEach((function(e){var a=e.parentIndex,l=(0,r.Z)(e,o);a>=0?t[a].children.push(l):n.push(l)})),n}function c(e){var t=e.toc,a=e.minHeadingLevel,n=e.maxHeadingLevel;return t.flatMap((function(e){var t=c({toc:e.children,minHeadingLevel:a,maxHeadingLevel:n});return function(e){return e.level>=a&&e.level<=n}(e)?[Object.assign({},e,{children:t})]:t}))}function d(e){var t=e.getBoundingClientRect();return t.top===t.bottom?d(e.parentNode):t}function m(e,t){var a,n,r=t.anchorTopOffset,l=e.find((function(e){return d(e).top>=r}));return l?function(e){return e.top>0&&e.bottom0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},1427:function(e,t,r){"use strict";var n=r(8185),i=r(6479),a=r(2956);function s(e,t,r){return new n(e,t,r)}s.version=r(4392),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},2213:function(e,t,r){"use strict";var n=r(7331);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(3412)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},5396:function(e,t,r){"use strict";var n=r(8937),i=r(9906),a=r(9613),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return a(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},6479:function(e,t,r){"use strict";var n=r(7952),i=r(8937),a=r(4720),s=r(4458),c=r(2629),u=r(9906),o=r(9613),h=r(56),f=r(5396);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return n({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&o(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=c(r);if(this.isNumericRefined(e,t,i))return this;var a=n({},this.numericRefinements);return a[e]=n({},a[e]),a[e][t]?(a[e][t]=a[e][t].slice(),a[e][t].push(i)):a[e][t]=[i],this.setQueryParameters({numericRefinements:a})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,i){return i===e&&n.op===t&&l(n.val,c(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,a,u=c(r),o=void 0!==(i=this.numericRefinements[e][t],a=u,s(i,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return s(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},9677:function(e,t,r){"use strict";e.exports=function(e){return function(t,r){var s=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[s.name]&&e.hierarchicalFacetsRefinements[s.name][0]||"",h=e._getHierarchicalFacetSeparator(s),f=e._getHierarchicalRootPath(s),l=e._getHierarchicalShowParentLevel(s),m=a(e._getHierarchicalFacetSortBy(s)),d=t.every((function(e){return e.exhaustive})),v=function(e,t,r,a,s){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m-1})));if(s){var h=s.attributes.indexOf(t),l=u(e.hierarchicalFacets,(function(e){return e.name===s.name}));o.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=p[t],o.disjunctiveFacets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(o.disjunctiveFacets[m],a.facets_stats,t)),g&&(m=f[t],o.facets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(o.facets[m],a.facets_stats,t))}})),this.hierarchicalFacets=s(this.hierarchicalFacets),h.forEach((function(r){var s=t[g],c=s&&s.facets?s.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(c).forEach((function(t){var r,f=c[t];if(h){r=u(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=u(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=n({},o.hierarchicalFacets[r][m].data,f)}else{r=p[t];var d=a.facets&&a.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:s.exhaustiveFacetsCount},v(o.disjunctiveFacets[r],s.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var c=r[t],h=u(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=u(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0){var m=s[0].split(a)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,c,o.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];o.facets[n]={name:t,data:a.facets[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=s(this.facets),this.disjunctiveFacets=s(this.disjunctiveFacets),this._state=e}function g(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return g(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function y(e,t){var r=c(e,(function(e){return e.name===t}));return r&&r.stats}function R(e,t,r,n,i){var a=c(i,(function(e){return e.name===r})),s=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:u}}p.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},p.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],p.prototype.getFacetValues=function(e,t){var r=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=c(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=c(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t))return c(e.hierarchicalFacets,r)}(this,e);if(r){var n,s=i({},t,{sortBy:p.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),u=this;if(Array.isArray(r))n=[e];else n=u._state.getHierarchicalFacetByName(r.name).attributes;return g((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(u,t);if(Boolean(r))return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var s,c=t.sortRemainingBy;return"hidden"===c?r:(s="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(a(n,s[0],s[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,p.DEFAULT_SORT);return a(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},p.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?y(this.facets,e):this._state.isDisjunctiveFacet(e)?y(this.disjunctiveFacets,e):void 0},p.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(R(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(R(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(R(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=r.split(a),u=c(n,(function(e){return e.name===t})),o=s.reduce((function(e,t){var r=e&&c(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=p},8185:function(e,t,r){"use strict";var n=r(6479),i=r(2956),a=r(2213),s=r(5187),c=r(7331),u=r(3412),o=r(9613),h=r(9906),f=r(7952),l=r(4392),m=r(7050).escapeFacetValue;function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(e);var i=r||{};i.index=t,this.state=n.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function v(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function p(){return this.state.page}u(d,c),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return s._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=s._getQueries(r.index,r),a=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),{content:new i(r,e.results),state:r,_originalResponse:e}}),(function(e){throw a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(null,new i(r,e.results),r)})).catch((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=f({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:h(s._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var c=this.client.initIndex(n.index);if("function"!=typeof c.findAnswers)throw new Error(a);return c.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=s.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:o}]):a?h=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=m(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=v,d.prototype.setPage=v,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:n.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new n(e),this},d.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=p,d.prototype.getPage=p,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=s._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=s._getQueries(n.index,n);return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),c=this._queryId++;this._currentNbQueries++;try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(u){this.emit("error",{error:u})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new a(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},8959:function(e){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},8937:function(e){"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},7050:function(e){"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},4458:function(e){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},3412:function(e){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4720:function(e){"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},7952:function(e){"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n0}},9906:function(e){"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},2262:function(e){"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},2629:function(e){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},5187:function(e,t,r){"use strict";var n=r(7952);function i(e){return Object.keys(e).sort((function(e,t){return e.localeCompare(t)})).reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[s-1];c.facetFilters=s>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).forEach((function(e){(a[e]||[]).forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},56:function(e){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},4392:function(e){"use strict";e.exports="3.11.1"},5157:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(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 r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},v=1,p=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===v||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},v={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:p))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,v)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:k}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},k=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,I=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return I>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.14.2","-").concat(e)}),u()]}),userAgent:_("4.14.2").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:A,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:k,findAnswers:Q}})}}}}))}return V.version="4.14.2",V}()},8824:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(7294),i=r(2263),a=["zero","one","two","few","many","other"];function s(e){return a.filter((function(t){return e.includes(t)}))}var c={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function u(){var e=(0,i.Z)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:s(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),c}var t,r}),[e])}function o(){var e=u();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}}},9172:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return I}});var n=r(7294),i=r(6010),a=r(5157),s=r.n(a),c=r(1427),u=r.n(c),o=r(5742),h=r(9960),f=r(412),l=r(8824),m=r(8022),d=r(4700),v=r(833),p=r(6177),g=r(2128),y=r(2263),R=r(143),F=r(5999),b=r(4774),P="searchQueryInput_u2C7",j="searchVersionInput_m0Ui",_="searchResultsColumn_JPFH",E="algoliaLogo_rT1R",x="algoliaLogoPathFill_WdUC",O="searchResultItem_Tv2o",w="searchResultItemHeading_KbCB",N="searchResultItemPath_lhe1",A="searchResultItemSummary_AEaO",H="searchQueryColumn_RTkw",S="searchVersionColumn_ypXd",T="searchLogoColumn_rJIA",Q="loadingSpinner_XVxU",C="loader_vvXV";function k(e){var t=e.docsSearchVersionsHelpers,r=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return n.createElement("div",{className:(0,i.Z)("col","col--3","padding-left--none",S)},r.map((function(e){var i=e[0],a=e[1],s=r.length>1?i+": ":"";return n.createElement("select",{key:i,onChange:function(e){return t.setSearchVersion(i,e.target.value)},defaultValue:t.searchVersions[i],className:j},a.versions.map((function(e,t){return n.createElement("option",{key:t,label:""+s+e.label,value:e.name})})))})))}function D(){var e,t,r,a,c,v,j=(0,y.Z)(),S=j.siteConfig.themeConfig,D=j.i18n.currentLocale,I=S.algolia,q=I.appId,V=I.apiKey,L=I.indexName,B=I.externalUrlRegex,z=(e=(0,l.c)().selectMessage,function(t){return e(t,(0,F.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}),M=(t=(0,R._r)(),r=(0,n.useState)((function(){return Object.entries(t).reduce((function(e,t){var r,n=t[0],i=t[1];return Object.assign({},e,((r={})[n]=i.versions[0].name,r))}),{})})),a=r[0],c=r[1],v=Object.values(t).some((function(e){return e.versions.length>1})),{allDocsData:t,versioningEnabled:v,searchVersions:a,setSearchVersion:function(e,t){return c((function(r){var n;return Object.assign({},r,((n={})[e]=t,n))}))}}),J=(0,p.O)(),U=J.searchQuery,W=J.setSearchQuery,Z={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},X=(0,n.useReducer)((function(e,t){switch(t.type){case"reset":return Z;case"loading":return Object.assign({},e,{loading:!0});case"update":return U!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":var r=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:r?e.lastPage+1:e.lastPage,hasMore:r});default:return e}}),Z),K=X[0],G=X[1],$=s()(q,V),Y=u()($,L,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});Y.on("result",(function(e){var t=e.results,r=t.query,n=t.hits,i=t.page,a=t.nbHits,s=t.nbPages;if(""!==r&&Array.isArray(n)){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},u=n.map((function(e){var t=e.url,r=e._highlightResult.hierarchy,n=e._snippetResult,i=void 0===n?{}:n,a=new URL(t),s=Object.keys(r).map((function(e){return c(r[e].value)}));return{title:s.pop(),url:(0,m.F)(B,a.href)?a.href:a.pathname+a.hash,summary:i.content?c(i.content.value)+"...":"",breadcrumbs:s}}));G({type:"update",value:{items:u,query:r,totalResults:a,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}else G({type:"reset"})}));var ee=(0,n.useState)(null),te=ee[0],re=ee[1],ne=(0,n.useRef)(0),ie=(0,n.useRef)(f.Z.canUseIntersectionObserver&&new IntersectionObserver((function(e){var t=e[0],r=t.isIntersecting,n=t.boundingClientRect.y;r&&ne.current>n&&G({type:"advance"}),ne.current=n}),{threshold:1})),ae=function(){return U?(0,F.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:U}):(0,F.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})},se=(0,d.zX)((function(e){void 0===e&&(e=0),Y.addDisjunctiveFacetRefinement("docusaurus_tag","default"),Y.addDisjunctiveFacetRefinement("language",D),Object.entries(M.searchVersions).forEach((function(e){var t=e[0],r=e[1];Y.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)})),Y.setQuery(U).setPage(e).search()}));return(0,n.useEffect)((function(){if(te){var e=ie.current;return e?(e.observe(te),function(){return e.unobserve(te)}):function(){return!0}}}),[te]),(0,n.useEffect)((function(){G({type:"reset"}),U&&(G({type:"loading"}),setTimeout((function(){se()}),300))}),[U,M.searchVersions,se]),(0,n.useEffect)((function(){K.lastPage&&0!==K.lastPage&&se(K.lastPage)}),[se,K.lastPage]),n.createElement(b.Z,null,n.createElement(o.Z,null,n.createElement("title",null,(0,g.p)(ae())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,ae()),n.createElement("form",{className:"row",onSubmit:function(e){return e.preventDefault()}},n.createElement("div",{className:(0,i.Z)("col",H,{"col--9":M.versioningEnabled,"col--12":!M.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:P,placeholder:(0,F.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,F.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:function(e){return W(e.target.value)},value:U,autoComplete:"off",autoFocus:!0})),M.versioningEnabled&&n.createElement(k,{docsSearchVersionsHelpers:M})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.Z)("col","col--8",_)},!!K.totalResults&&z(K.totalResults)),n.createElement("div",{className:(0,i.Z)("col","col--4","text--right",T)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,F.I)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:E},n.createElement("g",{fill:"none"},n.createElement("path",{className:x,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),K.items.length>0?n.createElement("main",null,K.items.map((function(e,t){var r=e.title,a=e.url,s=e.summary,c=e.breadcrumbs;return n.createElement("article",{key:t,className:O},n.createElement("h2",{className:w},n.createElement(h.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.Z)("breadcrumbs",N)},c.map((function(e,t){return n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}})})))),s&&n.createElement("p",{className:A,dangerouslySetInnerHTML:{__html:s}}))}))):[U&&!K.loading&&n.createElement("p",{key:"no-results"},n.createElement(F.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!K.loading&&n.createElement("div",{key:"spinner",className:Q})],K.hasMore&&n.createElement("div",{className:C,ref:re},n.createElement(F.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function I(){return n.createElement(v.FG,{className:"search-page-wrapper"},n.createElement(D,null))}}}]); \ No newline at end of file +/*! For license information please see 1a4e3797.e53e5dbe.js.LICENSE.txt */ +(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[7920],{7331:function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},1427:function(e,t,r){"use strict";var n=r(8185),i=r(6479),a=r(2956);function s(e,t,r){return new n(e,t,r)}s.version=r(4392),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},2213:function(e,t,r){"use strict";var n=r(7331);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(3412)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},5396:function(e,t,r){"use strict";var n=r(8937),i=r(9906),a=r(9613),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return a(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},6479:function(e,t,r){"use strict";var n=r(7952),i=r(8937),a=r(4720),s=r(4458),c=r(2629),u=r(9906),o=r(9613),h=r(56),f=r(5396);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return n({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&o(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=c(r);if(this.isNumericRefined(e,t,i))return this;var a=n({},this.numericRefinements);return a[e]=n({},a[e]),a[e][t]?(a[e][t]=a[e][t].slice(),a[e][t].push(i)):a[e][t]=[i],this.setQueryParameters({numericRefinements:a})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,i){return i===e&&n.op===t&&l(n.val,c(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,a,u=c(r),o=void 0!==(i=this.numericRefinements[e][t],a=u,s(i,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return s(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},9677:function(e,t,r){"use strict";e.exports=function(e){return function(t,r){var s=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[s.name]&&e.hierarchicalFacetsRefinements[s.name][0]||"",h=e._getHierarchicalFacetSeparator(s),f=e._getHierarchicalRootPath(s),l=e._getHierarchicalShowParentLevel(s),m=a(e._getHierarchicalFacetSortBy(s)),d=t.every((function(e){return e.exhaustive})),v=function(e,t,r,a,s){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m-1})));if(s){var h=s.attributes.indexOf(t),l=u(e.hierarchicalFacets,(function(e){return e.name===s.name}));o.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=p[t],o.disjunctiveFacets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(o.disjunctiveFacets[m],a.facets_stats,t)),g&&(m=f[t],o.facets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(o.facets[m],a.facets_stats,t))}})),this.hierarchicalFacets=s(this.hierarchicalFacets),h.forEach((function(r){var s=t[g],c=s&&s.facets?s.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(c).forEach((function(t){var r,f=c[t];if(h){r=u(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=u(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=n({},o.hierarchicalFacets[r][m].data,f)}else{r=p[t];var d=a.facets&&a.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:s.exhaustiveFacetsCount},v(o.disjunctiveFacets[r],s.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var c=r[t],h=u(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=u(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0){var m=s[0].split(a)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,c,o.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];o.facets[n]={name:t,data:a.facets[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=s(this.facets),this.disjunctiveFacets=s(this.disjunctiveFacets),this._state=e}function g(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return g(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function y(e,t){var r=c(e,(function(e){return e.name===t}));return r&&r.stats}function R(e,t,r,n,i){var a=c(i,(function(e){return e.name===r})),s=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:u}}p.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},p.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],p.prototype.getFacetValues=function(e,t){var r=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=c(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=c(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t))return c(e.hierarchicalFacets,r)}(this,e);if(r){var n,s=i({},t,{sortBy:p.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),u=this;if(Array.isArray(r))n=[e];else n=u._state.getHierarchicalFacetByName(r.name).attributes;return g((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(u,t);if(Boolean(r))return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var s,c=t.sortRemainingBy;return"hidden"===c?r:(s="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(a(n,s[0],s[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,p.DEFAULT_SORT);return a(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},p.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?y(this.facets,e):this._state.isDisjunctiveFacet(e)?y(this.disjunctiveFacets,e):void 0},p.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(R(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(R(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(R(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=r.split(a),u=c(n,(function(e){return e.name===t})),o=s.reduce((function(e,t){var r=e&&c(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=p},8185:function(e,t,r){"use strict";var n=r(6479),i=r(2956),a=r(2213),s=r(5187),c=r(7331),u=r(3412),o=r(9613),h=r(9906),f=r(7952),l=r(4392),m=r(7050).escapeFacetValue;function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(e);var i=r||{};i.index=t,this.state=n.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function v(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function p(){return this.state.page}u(d,c),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return s._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=s._getQueries(r.index,r),a=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),{content:new i(r,e.results),state:r,_originalResponse:e}}),(function(e){throw a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(null,new i(r,e.results),r)})).catch((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=f({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:h(s._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var c=this.client.initIndex(n.index);if("function"!=typeof c.findAnswers)throw new Error(a);return c.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=s.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:o}]):a?h=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=m(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=v,d.prototype.setPage=v,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:n.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new n(e),this},d.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=p,d.prototype.getPage=p,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=s._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=s._getQueries(n.index,n);return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),c=this._queryId++;this._currentNbQueries++;try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(u){this.emit("error",{error:u})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new a(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},8959:function(e){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},8937:function(e){"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},7050:function(e){"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},4458:function(e){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},3412:function(e){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4720:function(e){"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},7952:function(e){"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n0}},9906:function(e){"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},2262:function(e){"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},2629:function(e){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},5187:function(e,t,r){"use strict";var n=r(7952);function i(e){return Object.keys(e).sort((function(e,t){return e.localeCompare(t)})).reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[s-1];c.facetFilters=s>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).forEach((function(e){(a[e]||[]).forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},56:function(e){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},4392:function(e){"use strict";e.exports="3.11.1"},5157:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(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 r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},v=1,p=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===v||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},v={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:p))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,v)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:k}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},k=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,I=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return I>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.14.2","-").concat(e)}),u()]}),userAgent:_("4.14.2").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:A,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:k,findAnswers:Q}})}}}}))}return V.version="4.14.2",V}()},8824:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(7294),i=r(2263),a=["zero","one","two","few","many","other"];function s(e){return a.filter((function(t){return e.includes(t)}))}var c={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function u(){var e=(0,i.Z)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:s(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),c}var t,r}),[e])}function o(){var e=u();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}}},9172:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return q}});var n=r(7294),i=r(6010),a=r(1427),s=r.n(a),c=r(5157),u=r.n(c),o=r(412),h=r(5742),f=r(9960),l=r(143),m=r(8824),d=r(6177),v=r(4700),p=r(833),g=r(2128),y=r(5999),R=r(2263),F=r(6278),b=r(239),P=r(7452),j="searchQueryInput_u2C7",_="searchVersionInput_m0Ui",E="searchResultsColumn_JPFH",x="algoliaLogo_rT1R",O="algoliaLogoPathFill_WdUC",w="searchResultItem_Tv2o",N="searchResultItemHeading_KbCB",A="searchResultItemPath_lhe1",H="searchResultItemSummary_AEaO",S="searchQueryColumn_RTkw",T="searchVersionColumn_ypXd",Q="searchLogoColumn_rJIA",C="loadingSpinner_XVxU",k="loader_vvXV";function D(e){var t=e.docsSearchVersionsHelpers,r=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return n.createElement("div",{className:(0,i.Z)("col","col--3","padding-left--none",T)},r.map((function(e){var i=e[0],a=e[1],s=r.length>1?i+": ":"";return n.createElement("select",{key:i,onChange:function(e){return t.setSearchVersion(i,e.target.value)},defaultValue:t.searchVersions[i],className:_},a.versions.map((function(e,t){return n.createElement("option",{key:t,label:""+s+e.label,value:e.name})})))})))}function I(){var e,t,r,a,c,p,_=(0,R.Z)().i18n.currentLocale,T=(0,F.L)().algolia,I=T.appId,q=T.apiKey,V=T.indexName,L=(0,b.l)(),B=(e=(0,m.c)().selectMessage,function(t){return e(t,(0,y.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}),z=(t=(0,l._r)(),r=(0,n.useState)((function(){return Object.entries(t).reduce((function(e,t){var r,n=t[0],i=t[1];return Object.assign({},e,((r={})[n]=i.versions[0].name,r))}),{})})),a=r[0],c=r[1],p=Object.values(t).some((function(e){return e.versions.length>1})),{allDocsData:t,versioningEnabled:p,searchVersions:a,setSearchVersion:function(e,t){return c((function(r){var n;return Object.assign({},r,((n={})[e]=t,n))}))}}),M=(0,d.K)(),J=M[0],W=M[1],U={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},Z=(0,n.useReducer)((function(e,t){switch(t.type){case"reset":return U;case"loading":return Object.assign({},e,{loading:!0});case"update":return J!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":var r=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:r?e.lastPage+1:e.lastPage,hasMore:r});default:return e}}),U),K=Z[0],X=Z[1],G=u()(I,q),$=s()(G,V,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});$.on("result",(function(e){var t=e.results,r=t.query,n=t.hits,i=t.page,a=t.nbHits,s=t.nbPages;if(""!==r&&Array.isArray(n)){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},u=n.map((function(e){var t=e.url,r=e._highlightResult.hierarchy,n=e._snippetResult,i=void 0===n?{}:n,a=Object.keys(r).map((function(e){return c(r[e].value)}));return{title:a.pop(),url:L(t),summary:i.content?c(i.content.value)+"...":"",breadcrumbs:a}}));X({type:"update",value:{items:u,query:r,totalResults:a,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}else X({type:"reset"})}));var Y=(0,n.useState)(null),ee=Y[0],te=Y[1],re=(0,n.useRef)(0),ne=(0,n.useRef)(o.Z.canUseIntersectionObserver&&new IntersectionObserver((function(e){var t=e[0],r=t.isIntersecting,n=t.boundingClientRect.y;r&&re.current>n&&X({type:"advance"}),re.current=n}),{threshold:1})),ie=function(){return J?(0,y.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:J}):(0,y.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})},ae=(0,v.zX)((function(e){void 0===e&&(e=0),$.addDisjunctiveFacetRefinement("docusaurus_tag","default"),$.addDisjunctiveFacetRefinement("language",_),Object.entries(z.searchVersions).forEach((function(e){var t=e[0],r=e[1];$.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)})),$.setQuery(J).setPage(e).search()}));return(0,n.useEffect)((function(){if(ee){var e=ne.current;return e?(e.observe(ee),function(){return e.unobserve(ee)}):function(){return!0}}}),[ee]),(0,n.useEffect)((function(){X({type:"reset"}),J&&(X({type:"loading"}),setTimeout((function(){ae()}),300))}),[J,z.searchVersions,ae]),(0,n.useEffect)((function(){K.lastPage&&0!==K.lastPage&&ae(K.lastPage)}),[ae,K.lastPage]),n.createElement(P.Z,null,n.createElement(h.Z,null,n.createElement("title",null,(0,g.p)(ie())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,ie()),n.createElement("form",{className:"row",onSubmit:function(e){return e.preventDefault()}},n.createElement("div",{className:(0,i.Z)("col",S,{"col--9":z.versioningEnabled,"col--12":!z.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:j,placeholder:(0,y.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,y.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:function(e){return W(e.target.value)},value:J,autoComplete:"off",autoFocus:!0})),z.versioningEnabled&&n.createElement(D,{docsSearchVersionsHelpers:z})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.Z)("col","col--8",E)},!!K.totalResults&&B(K.totalResults)),n.createElement("div",{className:(0,i.Z)("col","col--4","text--right",Q)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,y.I)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:x},n.createElement("g",{fill:"none"},n.createElement("path",{className:O,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),K.items.length>0?n.createElement("main",null,K.items.map((function(e,t){var r=e.title,a=e.url,s=e.summary,c=e.breadcrumbs;return n.createElement("article",{key:t,className:w},n.createElement("h2",{className:N},n.createElement(f.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.Z)("breadcrumbs",A)},c.map((function(e,t){return n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}})})))),s&&n.createElement("p",{className:H,dangerouslySetInnerHTML:{__html:s}}))}))):[J&&!K.loading&&n.createElement("p",{key:"no-results"},n.createElement(y.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!K.loading&&n.createElement("div",{key:"spinner",className:C})],K.hasMore&&n.createElement("div",{className:k,ref:te},n.createElement(y.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function q(){return n.createElement(p.FG,{className:"search-page-wrapper"},n.createElement(I,null))}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.2791d2ad.js.LICENSE.txt b/assets/js/1a4e3797.e53e5dbe.js.LICENSE.txt similarity index 100% rename from assets/js/1a4e3797.2791d2ad.js.LICENSE.txt rename to assets/js/1a4e3797.e53e5dbe.js.LICENSE.txt diff --git a/assets/js/1b3ab3b8.8cf319ad.js b/assets/js/1b3ab3b8.8cf319ad.js deleted file mode 100644 index e2f2adabf5..0000000000 --- a/assets/js/1b3ab3b8.8cf319ad.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[3431],{3905:function(e,t,a){a.d(t,{Zo:function(){return m},kt:function(){return y}});var n=a(7294);function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(s[a]=e[a]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}var i=n.createContext({}),c=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},m=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,s=e.mdxType,o=e.originalType,i=e.parentName,m=r(e,["components","mdxType","originalType","parentName"]),u=c(a),y=s,g=u["".concat(i,".").concat(y)]||u[y]||p[y]||o;return a?n.createElement(g,l(l({ref:t},m),{},{components:a})):n.createElement(g,l({ref:t},m))}));function y(e,t){var a=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var o=a.length,l=new Array(o);l[0]=u;var r={};for(var i in t)hasOwnProperty.call(t,i)&&(r[i]=t[i]);r.originalType=e,r.mdxType="string"==typeof e?e:s,l[1]=r;for(var c=2;c child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),h=null!=g?g:f.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),b=(0,r.l)(h,(function(e,t){return e.value===t.value}));if(b.length>0)throw new Error('Docusaurus error: Duplicate values "'+b.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var T=null===y?y:null!=(t=null!=y?y:null==(a=f.find((function(e){return e.props.default})))?void 0:a.props.value)?t:f[0].props.value;if(null!==T&&!h.some((function(e){return e.value===T})))throw new Error('Docusaurus error: The has a defaultValue "'+T+'" but none of its children has the corresponding value. Available values are: '+h.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var k=(0,i.U)(),I=k.tabGroupChoices,S=k.setTabGroupChoices,_=(0,s.useState)(T),C=_[0],x=_[1],D=[],w=(0,c.o5)().blockElementScrollPositionUntilNextRender;if(null!=d){var N=I[d];null!=N&&N!==C&&h.some((function(e){return e.value===N}))&&x(N)}var K=function(e){var t=e.currentTarget,a=D.indexOf(t),n=h[a].value;n!==C&&(w(t),x(n),null!=d&&S(d,String(n)))},L=function(e){var t,a=null;switch(e.key){case"Enter":K(e);break;case"ArrowRight":var n,s=D.indexOf(e.currentTarget)+1;a=null!=(n=D[s])?n:D[0];break;case"ArrowLeft":var o,l=D.indexOf(e.currentTarget)-1;a=null!=(o=D[l])?o:D[D.length-1]}null==(t=a)||t.focus()};return s.createElement("div",{className:(0,o.Z)("tabs-container",m)},s.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":u},v)},h.map((function(e){var t=e.value,a=e.label,l=e.attributes;return s.createElement("li",(0,n.Z)({role:"tab",tabIndex:C===t?0:-1,"aria-selected":C===t,key:t,ref:function(e){return D.push(e)},onKeyDown:L,onClick:K},l,{className:(0,o.Z)("tabs__item",p,null==l?void 0:l.className,{"tabs__item--active":C===t})}),null!=a?a:t)}))),l?(0,s.cloneElement)(f.filter((function(e){return e.props.value===C}))[0],{className:"margin-top--md"}):s.createElement("div",{className:"margin-top--md"},f.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==C})}))))}function y(e){var t=(0,l.Z)();return s.createElement(u,(0,n.Z)({key:String(t)},e))}},1989:function(e,t,a){var n=a(7294),s=a(2263);t.Z=function(e){var t=e.className,a=e.py,o=e.scala,l=e.csharp,r=e.sourceLink,i=(0,s.Z)().siteConfig.customFields.version,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+a,m="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+o,p="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+l;return n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,n.createElement("strong",null,"Python API: "),n.createElement("a",{href:c},t)),n.createElement("td",null,n.createElement("strong",null,"Scala API: "),n.createElement("a",{href:m},t)),n.createElement("td",null,n.createElement("strong",null,".NET API: "),n.createElement("a",{href:p},t)),n.createElement("td",null,n.createElement("strong",null,"Source: "),n.createElement("a",{href:r},t)))))}},3630:function(e,t,a){a.r(t),a.d(t,{assets:function(){return X},contentTitle:function(){return q},default:function(){return Q},frontMatter:function(){return U},metadata:function(){return H},toc:function(){return J}});var n=a(3117),s=a(102),o=(a(7294),a(3905)),l=a(5488),r=a(5162),i=a(1989),c=["components"],m=[{value:"Text Analytics",id:"text-analytics",level:2},{value:"EntityDetector",id:"entitydetector",level:3},{value:"KeyPhraseExtractor",id:"keyphraseextractor",level:3},{value:"LanguageDetector",id:"languagedetector",level:3},{value:"NER",id:"ner",level:3},{value:"PII",id:"pii",level:3},{value:"TextSentiment",id:"textsentiment",level:3}],p={toc:m};function u(e){var t=e.components,a=(0,s.Z)(e,c);return(0,o.kt)("wrapper",(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"text-analytics"},"Text Analytics"),(0,o.kt)("h3",{id:"entitydetector"},"EntityDetector"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("1", "Microsoft released Windows 10"),\n ("2", "In 1975, Bill Gates III and Paul Allen founded the company.")\n], ["id", "text"])\n\nentity = (EntityDetector()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("replies")\n .setErrorCol("error"))\n\nentity.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.EntityDetector\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("1", "Microsoft released Windows 10"),\n ("2", "In 1975, Bill Gates III and Paul Allen founded the company.")\n ).toDF("id", "text")\n\nval entity = (new EntityDetector()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("replies"))\n\nentity.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"EntityDetector",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.EntityDetector",scala:"com/microsoft/azure/synapse/ml/cognitive/EntityDetector.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1EntityDetector.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"keyphraseextractor"},"KeyPhraseExtractor"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("en", "Hello world. This is some input text that I love."),\n ("fr", "Bonjour tout le monde"),\n ("es", "La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer.")\n], ["lang", "text"])\n\nkeyPhrase = (KeyPhraseExtractor()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguageCol("lang")\n .setOutputCol("replies")\n .setErrorCol("error"))\n\nkeyPhrase.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.KeyPhraseExtractor\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("en", "Hello world. This is some input text that I love."),\n ("fr", "Bonjour tout le monde"),\n ("es", "La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer."),\n ("en", null)\n ).toDF("lang", "text")\n\nval keyPhrase = (new KeyPhraseExtractor()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguageCol("lang")\n .setOutputCol("replies"))\n\nkeyPhrase.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"KeyPhraseExtractor",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.KeyPhraseExtractor",scala:"com/microsoft/azure/synapse/ml/cognitive/KeyPhraseExtractor.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1KeyPhraseExtractor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"languagedetector"},"LanguageDetector"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("Hello World",),\n ("Bonjour tout le monde",),\n ("La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer.",),\n ("\u4f60\u597d",),\n ("\u3053\u3093\u306b\u3061\u306f",),\n (":) :( :D",)\n], ["text",])\n\nlanguage = (LanguageDetector()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("language")\n .setErrorCol("error"))\n\nlanguage.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.LanguageDetector\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "Hello World",\n "Bonjour tout le monde",\n "La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer.",\n ":) :( :D"\n ).toDF("text")\n\nval language = (new LanguageDetector()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setOutputCol("replies"))\n\nlanguage.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"LanguageDetector",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.LanguageDetector",scala:"com/microsoft/azure/synapse/ml/cognitive/LanguageDetector.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1LanguageDetector.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"ner"},"NER"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("1", "en", "I had a wonderful trip to Seattle last week."),\n ("2", "en", "I visited Space Needle 2 times.")\n], ["id", "language", "text"])\n\nner = (NER()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguageCol("language")\n .setOutputCol("replies")\n .setErrorCol("error"))\n\nner.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.NER\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("1", "en", "I had a wonderful trip to Seattle last week."),\n ("2", "en", "I visited Space Needle 2 times.")\n ).toDF("id", "language", "text")\n\nval ner = (new NER()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("response"))\n\nner.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"NER",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.NER",scala:"com/microsoft/azure/synapse/ml/cognitive/NER.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1NER.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"pii"},"PII"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("1", "en", "My SSN is 859-98-0987"),\n ("2", "en",\n "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."),\n ("3", "en", "Is 998.214.865-68 your Brazilian CPF number?")\n], ["id", "language", "text"])\n\npii = (PII()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("response"))\n\npii.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.PII\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("1", "en", "My SSN is 859-98-0987"),\n ("2", "en",\n "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."),\n ("3", "en", "Is 998.214.865-68 your Brazilian CPF number?")\n ).toDF("id", "language", "text")\n\nval pii = (new PII()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("response"))\n\npii.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"PII",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.PII",scala:"com/microsoft/azure/synapse/ml/cognitive/PII.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1PII.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"textsentiment"},"TextSentiment"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("I am so happy today, its sunny!", "en-US"),\n ("I am frustrated by this rush hour traffic", "en-US"),\n ("The cognitive services on spark aint bad", "en-US"),\n], ["text", "language"])\n\nsentiment = (TextSentiment()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("sentiment")\n .setErrorCol("error")\n .setLanguageCol("language"))\n\nsentiment.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.TextSentiment\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("en", "Hello world. This is some input text that I love."),\n ("fr", "Bonjour tout le monde"),\n ("es", "La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer."),\n (null, "ich bin ein berliner"),\n (null, null),\n ("en", null)\n ).toDF("lang", "text")\n\nval sentiment = (new TextSentiment()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguageCol("lang")\n .setModelVersion("latest")\n .setShowStats(true)\n .setOutputCol("replies"))\n\nsentiment.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"TextSentiment",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.TextSentiment",scala:"com/microsoft/azure/synapse/ml/cognitive/TextSentiment.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1TextSentiment.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}))}u.isMDXComponent=!0;var y=["components"],g=[{value:"Translator",id:"translator",level:2},{value:"Translate",id:"translate",level:3},{value:"Transliterate",id:"transliterate",level:3},{value:"Detect",id:"detect",level:3},{value:"BreakSentence",id:"breaksentence",level:3},{value:"DictionaryLookup",id:"dictionarylookup",level:3},{value:"DictionaryExamples",id:"dictionaryexamples",level:3},{value:"DocumentTranslator",id:"documenttranslator",level:3}],d={toc:g};function v(e){var t=e.components,a=(0,s.Z)(e,y);return(0,o.kt)("wrapper",(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"translator"},"Translator"),(0,o.kt)("h3",{id:"translate"},"Translate"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["Hello, what is your name?", "Bye"],)\n], ["text",])\n\ntranslate = (Translate()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setToLanguage(["zh-Hans", "fr"])\n .setOutputCol("translation")\n .setConcurrency(5))\n\n(translate\n .transform(df)\n .withColumn("translation", flatten(col("translation.translations")))\n .withColumn("translation", col("translation.text"))\n .select("translation")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.Translate\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("Hello, what is your name?", "Bye")).toDF("text")\n\nval translate = (new Translate()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setToLanguage(Seq("zh-Hans", "fr"))\n .setOutputCol("translation")\n .setConcurrency(5))\n\n(translate\n .transform(df)\n .withColumn("translation", flatten(col("translation.translations")))\n .withColumn("translation", col("translation.text"))\n .select("translation")).show()\n')))),(0,o.kt)(i.Z,{className:"Translate",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.Translate",scala:"com/microsoft/azure/synapse/ml/cognitive/Translate.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1Translate.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"transliterate"},"Transliterate"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["\u3053\u3093\u306b\u3061\u306f", "\u3055\u3088\u3046\u306a\u3089"],)\n], ["text",])\n\ntransliterate = (Transliterate()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setLanguage("ja")\n .setFromScript("Jpan")\n .setToScript("Latn")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(transliterate\n .transform(df)\n .withColumn("text", col("result.text"))\n .withColumn("script", col("result.script"))\n .select("text", "script")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.Transliterate\nimport spark.implicits._\nimport org.apache.spark.sql.functions.col\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("\u3053\u3093\u306b\u3061\u306f", "\u3055\u3088\u3046\u306a\u3089")).toDF("text")\n\nval transliterate = (new Transliterate()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setLanguage("ja")\n .setFromScript("Jpan")\n .setToScript("Latn")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(transliterate\n .transform(df)\n .withColumn("text", col("result.text"))\n .withColumn("script", col("result.script"))\n .select("text", "script")).show()\n')))),(0,o.kt)(i.Z,{className:"Transliterate",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.Transliterate",scala:"com/microsoft/azure/synapse/ml/cognitive/Transliterate.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1Transliterate.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"detect"},"Detect"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["Hello, what is your name?"],)\n], ["text",])\n\ndetect = (Detect()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(detect\n .transform(df)\n .withColumn("language", col("result.language"))\n .select("language")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.Detect\nimport spark.implicits._\nimport org.apache.spark.sql.functions.col\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("Hello, what is your name?")).toDF("text")\n\nval detect = (new Detect()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(detect\n .transform(df)\n .withColumn("language", col("result.language"))\n .select("language")).show()\n')))),(0,o.kt)(i.Z,{className:"Detect",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.Detect",scala:"com/microsoft/azure/synapse/ml/cognitive/Detect.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1Detect.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"breaksentence"},"BreakSentence"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["Hello, what is your name?"],)\n], ["text",])\n\nbreakSentence = (BreakSentence()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(breakSentence\n .transform(df)\n .withColumn("sentLen", flatten(col("result.sentLen")))\n .select("sentLen")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.BreakSentence\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("Hello, what is your name?")).toDF("text")\n\nval breakSentence = (new BreakSentence()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(breakSentence\n .transform(df)\n .withColumn("sentLen", flatten(col("result.sentLen")))\n .select("sentLen")).show()\n')))),(0,o.kt)(i.Z,{className:"BreakSentence",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.BreakSentence",scala:"com/microsoft/azure/synapse/ml/cognitive/BreakSentence.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1BreakSentence.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"dictionarylookup"},"DictionaryLookup"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["fly"],)\n], ["text",])\n\ndictionaryLookup = (DictionaryLookup()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setFromLanguage("en")\n .setToLanguage("es")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(dictionaryLookup\n .transform(df)\n .withColumn("translations", flatten(col("result.translations")))\n .withColumn("normalizedTarget", col("translations.normalizedTarget"))\n .select("normalizedTarget")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.DictionaryLookup\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("fly")).toDF("text")\n\nval dictionaryLookup = (new DictionaryLookup()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setFromLanguage("en")\n .setToLanguage("es")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(dictionaryLookup\n .transform(df)\n .withColumn("translations", flatten(col("result.translations")))\n .withColumn("normalizedTarget", col("translations.normalizedTarget"))\n .select("normalizedTarget")).show()\n')))),(0,o.kt)(i.Z,{className:"DictionaryLookup",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DictionaryLookup",scala:"com/microsoft/azure/synapse/ml/cognitive/DictionaryLookup.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DictionaryLookup.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"dictionaryexamples"},"DictionaryExamples"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = (spark.createDataFrame([\n ("fly", "volar")\n], ["text", "translation"])\n .withColumn("textAndTranslation", array(struct(col("text"), col("translation")))))\n\ndictionaryExamples = (DictionaryExamples()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setFromLanguage("en")\n .setToLanguage("es")\n .setTextAndTranslationCol("textAndTranslation")\n .setOutputCol("result"))\n\n(dictionaryExamples\n .transform(df)\n .withColumn("examples", flatten(col("result.examples")))\n .select("examples")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.{DictionaryExamples, TextAndTranslation}\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List(TextAndTranslation("fly", "volar"))).toDF("textAndTranslation")\n\nval dictionaryExamples = (new DictionaryExamples()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setFromLanguage("en")\n .setToLanguage("es")\n .setTextAndTranslationCol("textAndTranslation")\n .setOutputCol("result"))\n\n(dictionaryExamples\n .transform(df)\n .withColumn("examples", flatten(col("result.examples")))\n .select("examples")).show()\n')))),(0,o.kt)(i.Z,{className:"DictionaryExamples",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DictionaryExamples",scala:"com/microsoft/azure/synapse/ml/cognitive/DictionaryExamples.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DictionaryExamples.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"documenttranslator"},"DocumentTranslator"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ntranslatorName = os.environ.get("TRANSLATOR_NAME", "mmlspark-translator")\n\ndocumentTranslator = (DocumentTranslator()\n .setSubscriptionKey(translatorKey)\n .setServiceName(translatorName)\n .setSourceUrlCol("sourceUrl")\n .setTargetsCol("targets")\n .setOutputCol("translationStatus"))\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.DocumentTranslator\nimport spark.implicits._\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval translatorName = sys.env.getOrElse("TRANSLATOR_NAME", None)\n\nval documentTranslator = (new DocumentTranslator()\n .setSubscriptionKey(translatorKey)\n .setServiceName(translatorName)\n .setSourceUrlCol("sourceUrl")\n .setTargetsCol("targets")\n .setOutputCol("translationStatus"))\n')))),(0,o.kt)(i.Z,{className:"DocumentTranslator",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DocumentTranslator",scala:"com/microsoft/azure/synapse/ml/cognitive/DocumentTranslator.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DocumentTranslator.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/DocumentTranslator.scala",mdxType:"DocTable"}))}v.isMDXComponent=!0;var f=["components"],h=[{value:"Computer Vision",id:"computer-vision",level:2},{value:"OCR",id:"ocr",level:3},{value:"AnalyzeImage",id:"analyzeimage",level:3},{value:"RecognizeText",id:"recognizetext",level:3},{value:"ReadImage",id:"readimage",level:3},{value:"RecognizeDomainSpecificContent",id:"recognizedomainspecificcontent",level:3},{value:"GenerateThumbnails",id:"generatethumbnails",level:3},{value:"TagImage",id:"tagimage",level:3},{value:"DescribeImage",id:"describeimage",level:3}],b={toc:h};function T(e){var t=e.components,a=(0,s.Z)(e,f);return(0,o.kt)("wrapper",(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"computer-vision"},"Computer Vision"),(0,o.kt)("h3",{id:"ocr"},"OCR"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\n\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", ),\n ], ["url", ])\n\nocr = (OCR()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setDetectOrientation(True)\n .setOutputCol("ocr"))\n\nocr.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.OCR\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg"\n ).toDF("url")\n\n\nval ocr = (new OCR()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setDetectOrientation(true)\n .setOutputCol("ocr"))\n\nocr.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"OCR",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.OCR",scala:"com/microsoft/azure/synapse/ml/cognitive/OCR.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1OCR.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzeimage"},"AnalyzeImage"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", "en"),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png", None),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png", "en")\n ], ["image", "language"])\n\n\nai = (AnalyzeImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("image")\n .setLanguageCol("language")\n .setVisualFeatures(["Categories", "Tags", "Description", "Faces", "ImageType", "Color", "Adult", "Objects", "Brands"])\n .setDetails(["Celebrities", "Landmarks"])\n .setOutputCol("features"))\n\nai.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.AnalyzeImage\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", "en"),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png", null),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png", "en")\n ).toDF("url", "language")\n\nval ai = (new AnalyzeImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setLanguageCol("language")\n .setVisualFeatures(Seq("Categories", "Tags", "Description", "Faces", "ImageType", "Color", "Adult", "Objects", "Brands"))\n .setDetails(Seq("Celebrities", "Landmarks"))\n .setOutputCol("features"))\n\nai.transform(df).select("url", "features").show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeImage",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeImage",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeImage.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"recognizetext"},"RecognizeText"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", ),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png", ),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png", )\n ], ["url", ])\n\nrt = (RecognizeText()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setMode("Printed")\n .setOutputCol("ocr")\n .setConcurrency(5))\n\nrt.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.RecognizeText\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png",\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png"\n ).toDF("url")\n\nval rt = (new RecognizeText()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setMode("Printed")\n .setOutputCol("ocr")\n .setConcurrency(5))\n\nrt.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"RecognizeText",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.RecognizeText",scala:"com/microsoft/azure/synapse/ml/cognitive/RecognizeText.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1RecognizeText.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"readimage"},"ReadImage"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", ),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png", ),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png", )\n ], ["url", ])\n\nri = (ReadImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("ocr")\n .setConcurrency(5))\n\nri.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.ReadImage\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png",\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png"\n ).toDF("url")\n\nval ri = (new ReadImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("ocr")\n .setConcurrency(5))\n\nri.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"ReadImage",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.ReadImage",scala:"com/microsoft/azure/synapse/ml/cognitive/ReadImage.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1ReadImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"recognizedomainspecificcontent"},"RecognizeDomainSpecificContent"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg", )\n ], ["url", ])\n\nceleb = (RecognizeDomainSpecificContent()\n .setSubscriptionKey(cognitiveKey)\n .setModel("celebrities")\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("celebs"))\n\nceleb.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.RecognizeDomainSpecificContent\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg"\n ).toDF("url")\n\nval celeb = (new RecognizeDomainSpecificContent()\n .setSubscriptionKey(cognitiveKey)\n .setModel("celebrities")\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("celebs"))\n\nceleb.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"RecognizeDomainSpecificContent",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.RecognizeDomainSpecificContent",scala:"com/microsoft/azure/synapse/ml/cognitive/RecognizeDomainSpecificContent.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1RecognizeDomainSpecificContent.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"generatethumbnails"},"GenerateThumbnails"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg", )\n ], ["url", ])\n\ngt = (GenerateThumbnails()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setHeight(50)\n .setWidth(50)\n .setSmartCropping(True)\n .setImageUrlCol("url")\n .setOutputCol("thumbnails"))\n\ngt.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.GenerateThumbnails\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg"\n ).toDF("url")\n\nval gt = (new GenerateThumbnails()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setHeight(50)\n .setWidth(50)\n .setSmartCropping(true)\n .setImageUrlCol("url")\n .setOutputCol("thumbnails"))\n\ngt.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"GenerateThumbnails",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.GenerateThumbnails",scala:"com/microsoft/azure/synapse/ml/cognitive/GenerateThumbnails.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1GenerateThumbnails.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"tagimage"},"TagImage"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg", )\n ], ["url", ])\n\nti = (TagImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("tags"))\n\nti.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.TagImage\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg"\n ).toDF("url")\n\nval ti = (new TagImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("tags"))\n\nti.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"TagImage",py:"synapse.ml.cognitive.html#module-mmlspark.cognitive.TagImage",scala:"com/microsoft/azure/synapse/ml/cognitive/TagImage.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1TagImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"describeimage"},"DescribeImage"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg", )\n ], ["url", ])\n\ndi = (DescribeImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setMaxCandidates(3)\n .setImageUrlCol("url")\n .setOutputCol("descriptions"))\n\ndi.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.DescribeImage\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg"\n ).toDF("url")\n\nval di = (new DescribeImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setMaxCandidates(3)\n .setImageUrlCol("url")\n .setOutputCol("descriptions"))\n\ndi.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"DescribeImage",py:"synapse.ml.cognitive.html#module-mmlspark.cognitive.DescribeImage",scala:"com/microsoft/azure/synapse/ml/cognitive/DescribeImage.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DescribeImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}))}T.isMDXComponent=!0;var k=["components"],I=[{value:"Form Recognizer",id:"form-recognizer",level:2},{value:"AnalyzeLayout",id:"analyzelayout",level:3},{value:"AnalyzeReceipts",id:"analyzereceipts",level:3},{value:"AnalyzeBusinessCards",id:"analyzebusinesscards",level:3},{value:"AnalyzeInvoices",id:"analyzeinvoices",level:3},{value:"AnalyzeIDDocuments",id:"analyzeiddocuments",level:3},{value:"AnalyzeCustomModel",id:"analyzecustommodel",level:3},{value:"GetCustomModel",id:"getcustommodel",level:3},{value:"ListCustomModels",id:"listcustommodels",level:3},{value:"Form Recognizer V3",id:"form-recognizer-v3",level:2},{value:"AnalyzeDocument",id:"analyzedocument",level:3}],S={toc:I};function _(e){var t=e.components,a=(0,s.Z)(e,k);return(0,o.kt)("wrapper",(0,n.Z)({},S,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"form-recognizer"},"Form Recognizer"),(0,o.kt)("h3",{id:"analyzelayout"},"AnalyzeLayout"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/layout1.jpg",)\n], ["source",])\n\nanalyzeLayout = (AnalyzeLayout()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("layout")\n .setConcurrency(5))\n\n(analyzeLayout.transform(imageDf)\n .withColumn("lines", flatten(col("layout.analyzeResult.readResults.lines")))\n .withColumn("readLayout", col("lines.text"))\n .withColumn("tables", flatten(col("layout.analyzeResult.pageResults.tables")))\n .withColumn("cells", flatten(col("tables.cells")))\n .withColumn("pageLayout", col("cells.text"))\n .select("source", "readLayout", "pageLayout")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeLayout\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/layout1.jpg"\n ).toDF("source")\n\nval analyzeLayout = (new AnalyzeLayout()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("layout")\n .setConcurrency(5))\n\nanalyzeLayout.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeLayout",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeLayout",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeLayout.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeLayout.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzereceipts"},"AnalyzeReceipts"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/receipt1.png",),\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/receipt1.png",)\n], ["image",])\n\nanalyzeReceipts = (AnalyzeReceipts()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("image")\n .setOutputCol("receipts")\n .setConcurrency(5))\n\nanalyzeReceipts.transform(imageDf).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeReceipts\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/receipt1.png",\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/receipt1.png"\n ).toDF("source")\n\nval analyzeReceipts = (new AnalyzeReceipts()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("receipts")\n .setConcurrency(5))\n\nanalyzeReceipts.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeReceipts",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeReceipts",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeReceipts.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeReceipts.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzebusinesscards"},"AnalyzeBusinessCards"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/business_card.jpg",)\n], ["source",])\n\nanalyzeBusinessCards = (AnalyzeBusinessCards()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("businessCards")\n .setConcurrency(5))\n\nanalyzeBusinessCards.transform(imageDf).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeBusinessCards\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/business_card.jpg"\n ).toDF("source")\n\nval analyzeBusinessCards = (new AnalyzeBusinessCards()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("businessCards")\n .setConcurrency(5))\n\nanalyzeBusinessCards.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeBusinessCards",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeBusinessCards",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeBusinessCards.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeBusinessCards.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzeinvoices"},"AnalyzeInvoices"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/invoice2.png",)\n], ["source",])\n\nanalyzeInvoices = (AnalyzeInvoices()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("invoices")\n .setConcurrency(5))\n\n(analyzeInvoices\n .transform(imageDf)\n .withColumn("documents", explode(col("invoices.analyzeResult.documentResults.fields")))\n .select("source", "documents")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeInvoices\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/invoice2.png"\n ).toDF("source")\n\nval analyzeInvoices = (new AnalyzeInvoices()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("invoices")\n .setConcurrency(5))\n\nanalyzeInvoices.transform(imageD4).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeInvoices",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeInvoices",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeInvoices.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeInvoices.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzeiddocuments"},"AnalyzeIDDocuments"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/id1.jpg",)\n], ["source",])\n\nanalyzeIDDocuments = (AnalyzeIDDocuments()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("ids")\n .setConcurrency(5))\n\n(analyzeIDDocuments\n .transform(imageDf)\n .withColumn("documents", explode(col("ids.analyzeResult.documentResults.fields")))\n .select("source", "documents")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeIDDocuments\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/id1.jpg"\n ).toDF("source")\n\nval analyzeIDDocuments = (new AnalyzeIDDocuments()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("ids")\n .setConcurrency(5))\n\nanalyzeIDDocuments.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeIDDocuments",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeIDDocuments",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeIDDocuments.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeIDDocuments.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzecustommodel"},"AnalyzeCustomModel"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nmodelId = "02bc2f58-2beb-4ae3-84fb-08f011b2f7b8" # put your own modelId here\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/invoice2.png",)\n], ["source",])\n\nanalyzeCustomModel = (AnalyzeCustomModel()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setModelId(modelId)\n .setImageUrlCol("source")\n .setOutputCol("output")\n .setConcurrency(5))\n\n(analyzeCustomModel\n .transform(imageDf)\n .withColumn("keyValuePairs", flatten(col("output.analyzeResult.pageResults.keyValuePairs")))\n .withColumn("keys", col("keyValuePairs.key.text"))\n .withColumn("values", col("keyValuePairs.value.text"))\n .withColumn("keyValuePairs", create_map(lit("key"), col("keys"), lit("value"), col("values")))\n .select("source", "keyValuePairs")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeCustomModel\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval modelId = "02bc2f58-2beb-4ae3-84fb-08f011b2f7b8" // put your own modelId here\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/invoice2.png"\n ).toDF("source")\n\nval analyzeCustomModel = (new AnalyzeCustomModel()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setModelId(modelId)\n .setImageUrlCol("source")\n .setOutputCol("output")\n .setConcurrency(5))\n\nanalyzeCustomModel.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeCustomModel",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeCustomModel",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeCustomModel.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeCustomModel.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"getcustommodel"},"GetCustomModel"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nmodelId = "02bc2f58-2beb-4ae3-84fb-08f011b2f7b8" # put your own modelId here\nemptyDf = spark.createDataFrame([("",)])\n\ngetCustomModel = (GetCustomModel()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setModelId(modelId)\n .setIncludeKeys(True)\n .setOutputCol("model")\n .setConcurrency(5))\n\n(getCustomModel\n .transform(emptyDf)\n .withColumn("modelInfo", col("model.ModelInfo"))\n .withColumn("trainResult", col("model.TrainResult"))\n .select("modelInfo", "trainResult")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.GetCustomModel\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval modelId = "02bc2f58-2beb-4ae3-84fb-08f011b2f7b8" // put your own modelId here\nval emptyDf = Seq("").toDF()\n\nval getCustomModel = (new GetCustomModel()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setModelId(modelId)\n .setIncludeKeys(true)\n .setOutputCol("model")\n .setConcurrency(5))\n\ngetCustomModel.transform(emptyDf).show()\n')))),(0,o.kt)(i.Z,{className:"GetCustomModel",py:"synapse.ml.cognitive.html#module-mmlspark.cognitive.GetCustomModel",scala:"com/microsoft/azure/synapse/ml/cognitive/GetCustomModel.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1GetCustomModel.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"listcustommodels"},"ListCustomModels"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nemptyDf = spark.createDataFrame([("",)])\n\nlistCustomModels = (ListCustomModels()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOp("full")\n .setOutputCol("models")\n .setConcurrency(5))\n\n(listCustomModels\n .transform(emptyDf)\n .withColumn("modelIds", col("models.modelList.modelId"))\n .select("modelIds")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.ListCustomModels\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval emptyDf = Seq("").toDF()\n\nval listCustomModels = (new ListCustomModels()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOp("full")\n .setOutputCol("models")\n .setConcurrency(5))\n\nlistCustomModels.transform(emptyDf).show()\n')))),(0,o.kt)(i.Z,{className:"ListCustomModels",py:"synapse.ml.cognitive.html#module-mmlspark.cognitive.ListCustomModels",scala:"com/microsoft/azure/synapse/ml/cognitive/ListCustomModels.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1ListCustomModels.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"form-recognizer-v3"},"Form Recognizer V3"),(0,o.kt)("h3",{id:"analyzedocument"},"AnalyzeDocument"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/layout1.jpg",)\n], ["source",])\n\nanalyzeDocument = (AnalyzeDocument()\n # For supported prebuilt models, please go to documentation page for details\n .setPrebuiltModelId("prebuilt-layout")\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("result")\n .setConcurrency(5))\n\n(analyzeDocument.transform(imageDf)\n .withColumn("content", col("result.analyzeResult.content"))\n .withColumn("cells", flatten(col("result.analyzeResult.tables.cells")))\n .withColumn("cells", col("cells.content"))\n .select("source", "result", "content", "cells")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeDocument\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/layout1.jpg"\n ).toDF("source")\n\nval analyzeDocument = (new AnalyzeDocument()\n .setPrebuiltModelId("prebuilt-layout")\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("result")\n .setConcurrency(5))\n\nanalyzeDocument.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeDocument",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeDocument",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeDocument.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeDocument.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizerV3.scala",mdxType:"DocTable"}))}_.isMDXComponent=!0;var C=["components"],x=[{value:"Anomaly Detection",id:"anomaly-detection",level:2},{value:"DetectLastAnomaly",id:"detectlastanomaly",level:3},{value:"DetectAnomalies",id:"detectanomalies",level:3},{value:"SimpleDetectAnomalies",id:"simpledetectanomalies",level:3}],D={toc:x};function w(e){var t=e.components,a=(0,s.Z)(e,C);return(0,o.kt)("wrapper",(0,n.Z)({},D,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"anomaly-detection"},"Anomaly Detection"),(0,o.kt)("h3",{id:"detectlastanomaly"},"DetectLastAnomaly"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\nfrom pyspark.sql.functions import lit\n\nanomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))\ndf = (spark.createDataFrame([\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 90000.0)\n], ["timestamp", "value"])\n .withColumn("group", lit(1))\n .withColumn("inputs", struct(col("timestamp"), col("value")))\n .groupBy(col("group"))\n .agg(sort_array(collect_list(col("inputs"))).alias("inputs")))\n\ndla = (DetectLastAnomaly()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setSeriesCol("inputs")\n .setGranularity("monthly")\n .setErrorCol("errors"))\n\ndla.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.anomaly.DetectLastAnomaly\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, collect_list, lit, sort_array, struct}\n\nval anomalyKey = sys.env.getOrElse("ANOMALY_API_KEY", None)\nval df = (Seq(\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 90000.0)\n ).toDF("timestamp","value")\n .withColumn("group", lit(1))\n .withColumn("inputs", struct(col("timestamp"), col("value")))\n .groupBy(col("group"))\n .agg(sort_array(collect_list(col("inputs"))).alias("inputs")))\n\nval dla = (new DetectLastAnomaly()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setSeriesCol("inputs")\n .setGranularity("monthly")\n .setErrorCol("errors"))\n\ndla.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"DetectLastAnomaly",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DetectLastAnomaly",scala:"com/microsoft/azure/synapse/ml/cognitive/DetectLastAnomaly.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DetectLastAnomaly.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"detectanomalies"},"DetectAnomalies"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nanomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))\ndf = (spark.createDataFrame([\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 90000.0)\n], ["timestamp", "value"])\n .withColumn("group", lit(1))\n .withColumn("inputs", struct(col("timestamp"), col("value")))\n .groupBy(col("group"))\n .agg(sort_array(collect_list(col("inputs"))).alias("inputs")))\n\nda = (DetectAnomalies()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setSeriesCol("inputs")\n .setGranularity("monthly"))\n\nda.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.anomaly.DetectAnomalies\nimport spark.implicits._\n\nval anomalyKey = sys.env.getOrElse("ANOMALY_API_KEY", None)\nval df = (Seq(\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 90000.0)\n ).toDF("timestamp","value")\n .withColumn("group", lit(1))\n .withColumn("inputs", struct(col("timestamp"), col("value")))\n .groupBy(col("group"))\n .agg(sort_array(collect_list(col("inputs"))).alias("inputs")))\n\nval da = (new DetectAnomalies()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setSeriesCol("inputs")\n .setGranularity("monthly"))\n\nda.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"DetectAnomalies",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DetectAnomalies",scala:"com/microsoft/azure/synapse/ml/cognitive/DetectAnomalies.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DetectAnomalies.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"simpledetectanomalies"},"SimpleDetectAnomalies"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nanomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))\ndf = (spark.createDataFrame([\n ("1972-01-01T00:00:00Z", 826.0, 1.0),\n ("1972-02-01T00:00:00Z", 799.0, 1.0),\n ("1972-03-01T00:00:00Z", 890.0, 1.0),\n ("1972-04-01T00:00:00Z", 900.0, 1.0),\n ("1972-05-01T00:00:00Z", 766.0, 1.0),\n ("1972-06-01T00:00:00Z", 805.0, 1.0),\n ("1972-07-01T00:00:00Z", 821.0, 1.0),\n ("1972-08-01T00:00:00Z", 20000.0, 1.0),\n ("1972-09-01T00:00:00Z", 883.0, 1.0),\n ("1972-10-01T00:00:00Z", 898.0, 1.0),\n ("1972-11-01T00:00:00Z", 957.0, 1.0),\n ("1972-12-01T00:00:00Z", 924.0, 1.0),\n ("1973-01-01T00:00:00Z", 881.0, 1.0),\n ("1973-02-01T00:00:00Z", 837.0, 1.0),\n ("1973-03-01T00:00:00Z", 90000.0, 1.0),\n ("1972-01-01T00:00:00Z", 826.0, 2.0),\n ("1972-02-01T00:00:00Z", 799.0, 2.0),\n ("1972-03-01T00:00:00Z", 890.0, 2.0),\n ("1972-04-01T00:00:00Z", 900.0, 2.0),\n ("1972-05-01T00:00:00Z", 766.0, 2.0),\n ("1972-06-01T00:00:00Z", 805.0, 2.0),\n ("1972-07-01T00:00:00Z", 821.0, 2.0),\n ("1972-08-01T00:00:00Z", 20000.0, 2.0),\n ("1972-09-01T00:00:00Z", 883.0, 2.0),\n ("1972-10-01T00:00:00Z", 898.0, 2.0),\n ("1972-11-01T00:00:00Z", 957.0, 2.0),\n ("1972-12-01T00:00:00Z", 924.0, 2.0),\n ("1973-01-01T00:00:00Z", 881.0, 2.0),\n ("1973-02-01T00:00:00Z", 837.0, 2.0),\n ("1973-03-01T00:00:00Z", 90000.0, 2.0)\n], ["timestamp", "value", "group"]))\n\nsda = (SimpleDetectAnomalies()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setGroupbyCol("group")\n .setGranularity("monthly"))\n\nsda.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.anomaly.SimpleDetectAnomalies\nimport spark.implicits._\n\nval anomalyKey = sys.env.getOrElse("ANOMALY_API_KEY", None)\nval baseSeq = Seq(\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 9000.0)\n )\nval df = (baseSeq.map(p => (p._1,p._2,1.0))\n .++(baseSeq.map(p => (p._1,p._2,2.0)))\n .toDF("timestamp","value","group"))\n\nval sda = (new SimpleDetectAnomalies()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setGroupbyCol("group")\n .setGranularity("monthly"))\n\nsda.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"SimpleDetectAnomalies",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.SimpleDetectAnomalies",scala:"com/microsoft/azure/synapse/ml/cognitive/SimpleDetectAnomalies.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1SimpleDetectAnomalies.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala",mdxType:"DocTable"}))}w.isMDXComponent=!0;var N=["components"],K=[{value:"Face",id:"face",level:2},{value:"DetectFace",id:"detectface",level:3},{value:"FindSimilarFace",id:"findsimilarface",level:3},{value:"GroupFaces",id:"groupfaces",level:3},{value:"IdentifyFaces",id:"identifyfaces",level:3},{value:"VerifyFaces",id:"verifyfaces",level:3}],L={toc:K};function z(e){var t=e.components,a=(0,s.Z)(e,N);return(0,o.kt)("wrapper",(0,n.Z)({},L,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"face"},"Face"),(0,o.kt)("h3",{id:"detectface"},"DetectFace"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",),\n], ["url"])\n\nface = (DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(True)\n .setReturnFaceLandmarks(False)\n .setReturnFaceAttributes(["age", "gender", "headPose", "smile", "facialHair", "glasses", "emotion",\n "hair", "makeup", "occlusion", "accessories", "blur", "exposure", "noise"]))\n\nface.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.DetectFace\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg"\n ).toDF("url")\n\nval face = (new DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("face")\n .setReturnFaceId(true)\n .setReturnFaceLandmarks(true)\n .setReturnFaceAttributes(Seq(\n "age", "gender", "headPose", "smile", "facialHair", "glasses", "emotion",\n "hair", "makeup", "occlusion", "accessories", "blur", "exposure", "noise")))\n\nface.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"DetectFace",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DetectFace",scala:"com/microsoft/azure/synapse/ml/cognitive/DetectFace.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DetectFace.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"findsimilarface"},"FindSimilarFace"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg",)\n], ["url"])\n\ndetector = (DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(True)\n .setReturnFaceLandmarks(False)\n .setReturnFaceAttributes([]))\n\nfaceIdDF = detector.transform(df).select("detected_faces").select(col("detected_faces").getItem(0).getItem("faceId").alias("id"))\nfaceIds = [row.asDict()[\'id\'] for row in faceIdDF.collect()]\n\nfindSimilar = (FindSimilarFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("similar")\n .setFaceIdCol("id")\n .setFaceIds(faceIds))\n\nfindSimilar.transform(faceIdDF).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.{DetectFace, FindSimilarFace}\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg"\n ).toDF("url")\nval detector = (new DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(true)\n .setReturnFaceLandmarks(false)\n .setReturnFaceAttributes(Seq()))\n\nval faceIdDF = (detector.transform(df)\n .select(col("detected_faces").getItem(0).getItem("faceId").alias("id"))\n .cache())\nval faceIds = faceIdDF.collect().map(row => row.getAs[String]("id"))\n\nval findSimilar = (new FindSimilarFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("similar")\n .setFaceIdCol("id")\n .setFaceIds(faceIds))\n\nfindSimilar.transform(faceIdDF).show()\n')))),(0,o.kt)(i.Z,{className:"FindSimilarFace",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.FindSimilarFace",scala:"com/microsoft/azure/synapse/ml/cognitive/FindSimilarFace.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1FindSimilarFace.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"groupfaces"},"GroupFaces"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg",)\n], ["url"])\n\ndetector = (DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(True)\n .setReturnFaceLandmarks(False)\n .setReturnFaceAttributes([]))\n\nfaceIdDF = detector.transform(df).select("detected_faces").select(col("detected_faces").getItem(0).getItem("faceId").alias("id"))\nfaceIds = [row.asDict()[\'id\'] for row in faceIdDF.collect()]\n\ngroup = (GroupFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("grouping")\n .setFaceIds(faceIds))\n\ngroup.transform(faceIdDF).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.{DetectFace, GroupFaces}\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg"\n ).toDF("url")\nval detector = (new DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(true)\n .setReturnFaceLandmarks(false)\n .setReturnFaceAttributes(Seq()))\n\nval faceIdDF = (detector.transform(df)\n .select(col("detected_faces").getItem(0).getItem("faceId").alias("id"))\n .cache())\nval faceIds = faceIdDF.collect().map(row => row.getAs[String]("id"))\n\nval group = (new GroupFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("grouping")\n .setFaceIds(faceIds))\n\ngroup.transform(faceIdDF).show()\n')))),(0,o.kt)(i.Z,{className:"GroupFaces",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.GroupFaces",scala:"com/microsoft/azure/synapse/ml/cognitive/GroupFaces.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1GroupFaces.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"identifyfaces"},"IdentifyFaces"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\npgId = "PUT_YOUR_PERSON_GROUP_ID"\n\nidentifyFaces = (IdentifyFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setFaceIdsCol("faces")\n .setPersonGroupId(pgId)\n .setOutputCol("identified_faces"))\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.IdentifyFaces\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval pgId = "PUT_YOUR_PERSON_GROUP_ID"\n\nval identifyFaces = (new IdentifyFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setFaceIdsCol("faces")\n .setPersonGroupId(pgId)\n .setOutputCol("identified_faces"))\n')))),(0,o.kt)(i.Z,{className:"IdentifyFaces",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.IdentifyFaces",scala:"com/microsoft/azure/synapse/ml/cognitive/IdentifyFaces.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1IdentifyFaces.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"verifyfaces"},"VerifyFaces"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg",)\n], ["url"])\n\ndetector = (DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(True)\n .setReturnFaceLandmarks(False)\n .setReturnFaceAttributes([]))\n\nfaceIdDF = detector.transform(df).select("detected_faces").select(col("detected_faces").getItem(0).getItem("faceId").alias("faceId1"))\nfaceIdDF2 = faceIdDF.withColumn("faceId2", lit(faceIdDF.take(1)[0].asDict()[\'faceId1\']))\n\nverify = (VerifyFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("same")\n .setFaceId1Col("faceId1")\n .setFaceId2Col("faceId2"))\n\nverify.transform(faceIdDF2).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.{DetectFace, VerifyFaces}\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg"\n ).toDF("url")\n\nval detector = (new DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(true)\n .setReturnFaceLandmarks(false)\n .setReturnFaceAttributes(Seq()))\n\nval faceIdDF = (detector.transform(df)\n .select(col("detected_faces").getItem(0).getItem("faceId").alias("faceId1"))\n .cache())\nval faceIdDF2 = faceIdDF.withColumn("faceId2", lit(faceIdDF.take(1).head.getString(0)))\n\nval verify = (new VerifyFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("same")\n .setFaceId1Col("faceId1")\n .setFaceId2Col("faceId2"))\n\nverify.transform(faceIdDF2).show()\n')))),(0,o.kt)(i.Z,{className:"VerifyFaces",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.VerifyFaces",scala:"com/microsoft/azure/synapse/ml/cognitive/VerifyFaces.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1VerifyFaces.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}))}z.isMDXComponent=!0;var Z=["components"],E=[{value:"Speech To Text",id:"speech-to-text",level:2},{value:"SpeechToText",id:"speechtotext",level:3},{value:"SpeechToTextSDK",id:"speechtotextsdk",level:3}],A={toc:E};function O(e){var t=e.components,a=(0,s.Z)(e,Z);return(0,o.kt)("wrapper",(0,n.Z)({},A,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"speech-to-text"},"Speech To Text"),(0,o.kt)("h3",{id:"speechtotext"},"SpeechToText"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\nimport requests\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nlink = "https://mmlspark.blob.core.windows.net/datasets/Speech/audio2.wav"\naudioBytes = requests.get(link).content\ndf = spark.createDataFrame([(audioBytes,)\n ], ["audio"])\n\nstt = (SpeechToText()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("text")\n .setAudioDataCol("audio")\n .setLanguage("en-US")\n .setFormat("simple"))\n\nstt.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.speech.SpeechToText\nimport org.apache.commons.compress.utils.IOUtils\nimport spark.implicits._\nimport java.net.URL\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval audioBytes = IOUtils.toByteArray(new URL("https://mmlspark.blob.core.windows.net/datasets/Speech/test1.wav").openStream())\n\nval df: DataFrame = Seq(\n Tuple1(audioBytes)\n ).toDF("audio")\n\nval stt = (new SpeechToText()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("text")\n .setAudioDataCol("audio")\n .setLanguage("en-US")\n .setFormat("simple"))\n\nstt.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"SpeechToText",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.SpeechToText",scala:"com/microsoft/azure/synapse/ml/cognitive/SpeechToText.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1SpeechToText.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/SpeechToText.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"speechtotextsdk"},"SpeechToTextSDK"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\nimport requests\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([("https://mmlspark.blob.core.windows.net/datasets/Speech/audio2.wav",)\n ], ["url"])\n\nspeech_to_text = (SpeechToTextSDK()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("text")\n .setAudioDataCol("url")\n .setLanguage("en-US")\n .setProfanity("Masked"))\n\nspeech_to_text.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.speech.SpeechToTextSDK\nimport spark.implicits._\nimport org.apache.commons.compress.utils.IOUtils\nimport java.net.URL\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/Speech/audio2.wav"\n ).toDF("url")\n\nval speech_to_text = (new SpeechToTextSDK()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("text")\n .setAudioDataCol("url")\n .setLanguage("en-US")\n .setProfanity("Masked"))\n\nspeech_to_text.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"SpeechToTextSDK",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.SpeechToTextSDK",scala:"com/microsoft/azure/synapse/ml/cognitive/SpeechToTextSDK.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1SpeechToTextSDK.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/SpeechToTextSDK.scala",mdxType:"DocTable"}))}O.isMDXComponent=!0;var F=["components"],R=[{value:"Azure Search",id:"azure-search",level:2},{value:"AzureSearch",id:"azuresearch",level:3}],P={toc:R};function M(e){var t=e.components,a=(0,s.Z)(e,F);return(0,o.kt)("wrapper",(0,n.Z)({},P,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"azure-search"},"Azure Search"),(0,o.kt)("h3",{id:"azuresearch"},"AzureSearch"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nazureSearchKey = os.environ.get("AZURE_SEARCH_KEY", getSecret("azure-search-key"))\ntestServiceName = "mmlspark-azure-search"\n\nindexName = "test-website"\n\ndef createSimpleIndexJson(indexName):\n json_str = """\n {\n "name": "%s",\n "fields": [\n {\n "name": "id",\n "type": "Edm.String",\n "key": true,\n "facetable": false\n },\n {\n "name": "fileName",\n "type": "Edm.String",\n "searchable": false,\n "sortable": false,\n "facetable": false\n },\n {\n "name": "text",\n "type": "Edm.String",\n "filterable": false,\n "sortable": false,\n "facetable": false\n }\n ]\n }\n """\n\n return json_str % indexName\n\ndf = (spark.createDataFrame([\n ("upload", "0", "file0", "text0"),\n ("upload", "1", "file1", "text1"),\n ("upload", "2", "file2", "text2"),\n ("upload", "3", "file3", "text3")\n], ["searchAction", "id", "fileName", "text"]))\n\nad = (AddDocuments()\n .setSubscriptionKey(azureSearchKey)\n .setServiceName(testServiceName)\n .setOutputCol("out")\n .setErrorCol("err")\n .setIndexName(indexName)\n .setActionCol("searchAction"))\n\nad.transform(df).show()\n\nAzureSearchWriter.writeToAzureSearch(df,\n subscriptionKey=azureSearchKey,\n actionCol="searchAction",\n serviceName=testServiceName,\n indexJson=createSimpleIndexJson(indexName))\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.search.{AddDocuments, AzureSearchWriter}\nimport spark.implicits._\n\nval azureSearchKey = sys.env.getOrElse("AZURE_SEARCH_KEY", None)\nval testServiceName = "mmlspark-azure-search"\n\nval indexName = "test-website"\n\ndef createSimpleIndexJson(indexName: String) = {\n s"""\n |{\n | "name": "$indexName",\n | "fields": [\n | {\n | "name": "id",\n | "type": "Edm.String",\n | "key": true,\n | "facetable": false\n | },\n | {\n | "name": "fileName",\n | "type": "Edm.String",\n | "searchable": false,\n | "sortable": false,\n | "facetable": false\n | },\n | {\n | "name": "text",\n | "type": "Edm.String",\n | "filterable": false,\n | "sortable": false,\n | "facetable": false\n | }\n | ]\n | }\n """.stripMargin\n}\n\nval df = ((0 until 4)\n .map(i => ("upload", s"$i", s"file$i", s"text$i"))\n .toDF("searchAction", "id", "fileName", "text"))\n\nval ad = (new AddDocuments()\n .setSubscriptionKey(azureSearchKey)\n .setServiceName(testServiceName)\n .setOutputCol("out")\n .setErrorCol("err")\n .setIndexName(indexName)\n .setActionCol("searchAction"))\n\nad.transform(df).show()\n\nAzureSearchWriter.write(df,\n Map("subscriptionKey" -> azureSearchKey,\n "actionCol" -> "searchAction",\n "serviceName" -> testServiceName,\n "indexJson" -> createSimpleIndexJson(indexName)))\n')))),(0,o.kt)(i.Z,{className:"AzureSearch",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AzureSearch",scala:"com/microsoft/azure/synapse/ml/cognitive/AzureSearch.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AddDocuments.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AzureSearch.scala",mdxType:"DocTable"}))}M.isMDXComponent=!0;var V=["components"],G=[{value:"Bing Image Search",id:"bing-image-search",level:2},{value:"BingImageSearch",id:"bingimagesearch",level:3}],Y={toc:G};function B(e){var t=e.components,a=(0,s.Z)(e,V);return(0,o.kt)("wrapper",(0,n.Z)({},Y,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"bing-image-search"},"Bing Image Search"),(0,o.kt)("h3",{id:"bingimagesearch"},"BingImageSearch"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nbingSearchKey = os.environ.get("BING_SEARCH_KEY", getSecret("bing-search-key"))\n\n# Number of images Bing will return per query\nimgsPerBatch = 10\n# A list of offsets, used to page into the search results\noffsets = [(i*imgsPerBatch,) for i in range(100)]\n# Since web content is our data, we create a dataframe with options on that data: offsets\nbingParameters = spark.createDataFrame(offsets, ["offset"])\n\n# Run the Bing Image Search service with our text query\nbingSearch = (BingImageSearch()\n .setSubscriptionKey(bingSearchKey)\n .setOffsetCol("offset")\n .setQuery("Martin Luther King Jr. quotes")\n .setCount(imgsPerBatch)\n .setOutputCol("images"))\n\n# Transformer that extracts and flattens the richly structured output of Bing Image Search into a simple URL column\ngetUrls = BingImageSearch.getUrlTransformer("images", "url")\n\n# This displays the full results returned\nbingSearch.transform(bingParameters).show()\n\n# Since we have two services, they are put into a pipeline\npipeline = PipelineModel(stages=[bingSearch, getUrls])\n\n# Show the results of your search: image URLs\npipeline.transform(bingParameters).show()\n\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.bing.BingImageSearch\nimport spark.implicits._\n\nval bingSearchKey = sys.env.getOrElse("BING_SEARCH_KEY", None)\n\n// Number of images Bing will return per query\nval imgsPerBatch = 10\n// A list of offsets, used to page into the search results\nval offsets = (0 until 100).map(i => i*imgsPerBatch)\n// Since web content is our data, we create a dataframe with options on that data: offsets\nval bingParameters = Seq(offsets).toDF("offset")\n\n// Run the Bing Image Search service with our text query\nval bingSearch = (new BingImageSearch()\n .setSubscriptionKey(bingSearchKey)\n .setOffsetCol("offset")\n .setQuery("Martin Luther King Jr. quotes")\n .setCount(imgsPerBatch)\n .setOutputCol("images"))\n\n// Transformer that extracts and flattens the richly structured output of Bing Image Search into a simple URL column\nval getUrls = BingImageSearch.getUrlTransformer("images", "url")\n\n// This displays the full results returned\nbingSearch.transform(bingParameters).show()\n\n// Show the results of your search: image URLs\ngetUrls.transform(bingSearch.transform(bingParameters)).show()\n')))),(0,o.kt)(i.Z,{className:"BingImageSearch",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.BingImageSearch",scala:"com/microsoft/azure/synapse/ml/cognitive/BingImageSearch.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1BingImageSearch.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/BingImageSearch.scala",mdxType:"DocTable"}))}B.isMDXComponent=!0;var j=["components"],U={title:"Transformers - Cognitive",sidebar_label:"Cognitive",hide_title:!0},q=void 0,H={unversionedId:"Quick Examples/transformers/transformers_cognitive",id:"Quick Examples/transformers/transformers_cognitive",title:"Transformers - Cognitive",description:"",source:"@site/docs/Quick Examples/transformers/transformers_cognitive.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_cognitive",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_cognitive",draft:!1,tags:[],version:"current",frontMatter:{title:"Transformers - Cognitive",sidebar_label:"Cognitive",hide_title:!0}},X={},J=[].concat(m,g,h,I,x,K,E,R,G),W={toc:J};function Q(e){var t=e.components,a=(0,s.Z)(e,j);return(0,o.kt)("wrapper",(0,n.Z)({},W,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)(u,{mdxType:"TextAnalytics"}),(0,o.kt)(v,{mdxType:"Translator"}),(0,o.kt)(T,{mdxType:"ComputerVision"}),(0,o.kt)(_,{mdxType:"FormRecognizer"}),(0,o.kt)(w,{mdxType:"AnomalyDetection"}),(0,o.kt)(z,{mdxType:"Face"}),(0,o.kt)(O,{mdxType:"SpeechToText"}),(0,o.kt)(M,{mdxType:"AzureSearch"}),(0,o.kt)(B,{mdxType:"BingImageSearch"}))}Q.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1b3ab3b8.de1e17e7.js b/assets/js/1b3ab3b8.de1e17e7.js new file mode 100644 index 0000000000..728e1db811 --- /dev/null +++ b/assets/js/1b3ab3b8.de1e17e7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[3431],{3905:function(e,t,a){a.d(t,{Zo:function(){return m},kt:function(){return y}});var n=a(7294);function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(s[a]=e[a]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}var i=n.createContext({}),c=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},m=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,s=e.mdxType,o=e.originalType,i=e.parentName,m=r(e,["components","mdxType","originalType","parentName"]),u=c(a),y=s,g=u["".concat(i,".").concat(y)]||u[y]||p[y]||o;return a?n.createElement(g,l(l({ref:t},m),{},{components:a})):n.createElement(g,l({ref:t},m))}));function y(e,t){var a=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var o=a.length,l=new Array(o);l[0]=u;var r={};for(var i in t)hasOwnProperty.call(t,i)&&(r[i]=t[i]);r.originalType=e,r.mdxType="string"==typeof e?e:s,l[1]=r;for(var c=2;c child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function u(e){var t=e.values,a=e.children;return(0,s.useMemo)((function(){var e=null!=t?t:p(a);return function(e){var t=(0,c.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,a])}function y(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function g(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId,o=(0,r.k6)(),l=function(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:a,groupId:n});return[(0,i._X)(l),(0,s.useCallback)((function(e){if(l){var t=new URLSearchParams(o.location.search);t.set(l,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[l,o])]}function d(e){var t,a,n,o,l=e.defaultValue,r=e.queryString,i=void 0!==r&&r,c=e.groupId,p=u(e),d=(0,s.useState)((function(){return function(e){var t,a=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!y({value:a,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var s=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:l,tabValues:p})})),v=d[0],f=d[1],h=g({queryString:i,groupId:c}),b=h[0],T=h[1],k=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),a=(0,m.Nk)(t),n=a[0],o=a[1],[n,(0,s.useCallback)((function(e){t&&o.set(e)}),[t,o])]),I=k[0],S=k[1],_=function(){var e=null!=b?b:I;return y({value:e,tabValues:p})?e:null}();return(0,s.useLayoutEffect)((function(){_&&f(_)}),[_]),{selectedValue:v,selectValue:(0,s.useCallback)((function(e){if(!y({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);f(e),T(e),S(e)}),[T,S,p]),tabValues:p}}var v=a(2389),f="tabList__CuJ",h="tabItem_LNqP";function b(e){var t=e.className,a=e.block,r=e.selectedValue,i=e.selectValue,c=e.tabValues,m=[],p=(0,l.o5)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,a=m.indexOf(t),n=c[a].value;n!==r&&(p(t),i(n))},y=function(e){var t,a=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var n,s=m.indexOf(e.currentTarget)+1;a=null!=(n=m[s])?n:m[0];break;case"ArrowLeft":var o,l=m.indexOf(e.currentTarget)-1;a=null!=(o=m[l])?o:m[m.length-1]}null==(t=a)||t.focus()};return s.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":a},t)},c.map((function(e){var t=e.value,a=e.label,l=e.attributes;return s.createElement("li",(0,n.Z)({role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,key:t,ref:function(e){return m.push(e)},onKeyDown:y,onClick:u},l,{className:(0,o.Z)("tabs__item",h,null==l?void 0:l.className,{"tabs__item--active":r===t})}),null!=a?a:t)})))}function T(e){var t=e.lazy,a=e.children,n=e.selectedValue,o=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){var l=o.find((function(e){return e.props.value===n}));return l?(0,s.cloneElement)(l,{className:"margin-top--md"}):null}return s.createElement("div",{className:"margin-top--md"},o.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==n})})))}function k(e){var t=d(e);return s.createElement("div",{className:(0,o.Z)("tabs-container",f)},s.createElement(b,(0,n.Z)({},e,t)),s.createElement(T,(0,n.Z)({},e,t)))}function I(e){var t=(0,v.Z)();return s.createElement(k,(0,n.Z)({key:String(t)},e))}},1989:function(e,t,a){var n=a(7294),s=a(2263);t.Z=function(e){var t=e.className,a=e.py,o=e.scala,l=e.csharp,r=e.sourceLink,i=(0,s.Z)().siteConfig.customFields.version,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+a,m="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+o,p="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+l;return n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,n.createElement("strong",null,"Python API: "),n.createElement("a",{href:c},t)),n.createElement("td",null,n.createElement("strong",null,"Scala API: "),n.createElement("a",{href:m},t)),n.createElement("td",null,n.createElement("strong",null,".NET API: "),n.createElement("a",{href:p},t)),n.createElement("td",null,n.createElement("strong",null,"Source: "),n.createElement("a",{href:r},t)))))}},3630:function(e,t,a){a.r(t),a.d(t,{assets:function(){return X},contentTitle:function(){return U},default:function(){return Q},frontMatter:function(){return j},metadata:function(){return H},toc:function(){return J}});var n=a(3117),s=a(102),o=(a(7294),a(3905)),l=a(4866),r=a(5162),i=a(1989),c=["components"],m=[{value:"Text Analytics",id:"text-analytics",level:2},{value:"EntityDetector",id:"entitydetector",level:3},{value:"KeyPhraseExtractor",id:"keyphraseextractor",level:3},{value:"LanguageDetector",id:"languagedetector",level:3},{value:"NER",id:"ner",level:3},{value:"PII",id:"pii",level:3},{value:"TextSentiment",id:"textsentiment",level:3}],p={toc:m};function u(e){var t=e.components,a=(0,s.Z)(e,c);return(0,o.kt)("wrapper",(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"text-analytics"},"Text Analytics"),(0,o.kt)("h3",{id:"entitydetector"},"EntityDetector"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("1", "Microsoft released Windows 10"),\n ("2", "In 1975, Bill Gates III and Paul Allen founded the company.")\n], ["id", "text"])\n\nentity = (EntityDetector()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("replies")\n .setErrorCol("error"))\n\nentity.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.EntityDetector\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("1", "Microsoft released Windows 10"),\n ("2", "In 1975, Bill Gates III and Paul Allen founded the company.")\n ).toDF("id", "text")\n\nval entity = (new EntityDetector()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("replies"))\n\nentity.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"EntityDetector",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.EntityDetector",scala:"com/microsoft/azure/synapse/ml/cognitive/EntityDetector.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1EntityDetector.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"keyphraseextractor"},"KeyPhraseExtractor"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("en", "Hello world. This is some input text that I love."),\n ("fr", "Bonjour tout le monde"),\n ("es", "La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer.")\n], ["lang", "text"])\n\nkeyPhrase = (KeyPhraseExtractor()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguageCol("lang")\n .setOutputCol("replies")\n .setErrorCol("error"))\n\nkeyPhrase.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.KeyPhraseExtractor\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("en", "Hello world. This is some input text that I love."),\n ("fr", "Bonjour tout le monde"),\n ("es", "La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer."),\n ("en", null)\n ).toDF("lang", "text")\n\nval keyPhrase = (new KeyPhraseExtractor()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguageCol("lang")\n .setOutputCol("replies"))\n\nkeyPhrase.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"KeyPhraseExtractor",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.KeyPhraseExtractor",scala:"com/microsoft/azure/synapse/ml/cognitive/KeyPhraseExtractor.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1KeyPhraseExtractor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"languagedetector"},"LanguageDetector"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("Hello World",),\n ("Bonjour tout le monde",),\n ("La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer.",),\n ("\u4f60\u597d",),\n ("\u3053\u3093\u306b\u3061\u306f",),\n (":) :( :D",)\n], ["text",])\n\nlanguage = (LanguageDetector()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("language")\n .setErrorCol("error"))\n\nlanguage.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.LanguageDetector\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "Hello World",\n "Bonjour tout le monde",\n "La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer.",\n ":) :( :D"\n ).toDF("text")\n\nval language = (new LanguageDetector()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setOutputCol("replies"))\n\nlanguage.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"LanguageDetector",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.LanguageDetector",scala:"com/microsoft/azure/synapse/ml/cognitive/LanguageDetector.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1LanguageDetector.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"ner"},"NER"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("1", "en", "I had a wonderful trip to Seattle last week."),\n ("2", "en", "I visited Space Needle 2 times.")\n], ["id", "language", "text"])\n\nner = (NER()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguageCol("language")\n .setOutputCol("replies")\n .setErrorCol("error"))\n\nner.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.NER\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("1", "en", "I had a wonderful trip to Seattle last week."),\n ("2", "en", "I visited Space Needle 2 times.")\n ).toDF("id", "language", "text")\n\nval ner = (new NER()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("response"))\n\nner.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"NER",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.NER",scala:"com/microsoft/azure/synapse/ml/cognitive/NER.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1NER.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"pii"},"PII"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("1", "en", "My SSN is 859-98-0987"),\n ("2", "en",\n "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."),\n ("3", "en", "Is 998.214.865-68 your Brazilian CPF number?")\n], ["id", "language", "text"])\n\npii = (PII()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("response"))\n\npii.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.PII\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("1", "en", "My SSN is 859-98-0987"),\n ("2", "en",\n "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."),\n ("3", "en", "Is 998.214.865-68 your Brazilian CPF number?")\n ).toDF("id", "language", "text")\n\nval pii = (new PII()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguage("en")\n .setOutputCol("response"))\n\npii.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"PII",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.PII",scala:"com/microsoft/azure/synapse/ml/cognitive/PII.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1PII.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"textsentiment"},"TextSentiment"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntextKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("I am so happy today, its sunny!", "en-US"),\n ("I am frustrated by this rush hour traffic", "en-US"),\n ("The cognitive services on spark aint bad", "en-US"),\n], ["text", "language"])\n\nsentiment = (TextSentiment()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("sentiment")\n .setErrorCol("error")\n .setLanguageCol("language"))\n\nsentiment.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.text.TextSentiment\nimport spark.implicits._\n\nval textKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("en", "Hello world. This is some input text that I love."),\n ("fr", "Bonjour tout le monde"),\n ("es", "La carretera estaba atascada. Hab\xeda mucho tr\xe1fico el d\xeda de ayer."),\n (null, "ich bin ein berliner"),\n (null, null),\n ("en", null)\n ).toDF("lang", "text")\n\nval sentiment = (new TextSentiment()\n .setSubscriptionKey(textKey)\n .setLocation("eastus")\n .setLanguageCol("lang")\n .setModelVersion("latest")\n .setShowStats(true)\n .setOutputCol("replies"))\n\nsentiment.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"TextSentiment",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.TextSentiment",scala:"com/microsoft/azure/synapse/ml/cognitive/TextSentiment.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1TextSentiment.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextAnalytics.scala",mdxType:"DocTable"}))}u.isMDXComponent=!0;var y=["components"],g=[{value:"Translator",id:"translator",level:2},{value:"Translate",id:"translate",level:3},{value:"Transliterate",id:"transliterate",level:3},{value:"Detect",id:"detect",level:3},{value:"BreakSentence",id:"breaksentence",level:3},{value:"DictionaryLookup",id:"dictionarylookup",level:3},{value:"DictionaryExamples",id:"dictionaryexamples",level:3},{value:"DocumentTranslator",id:"documenttranslator",level:3}],d={toc:g};function v(e){var t=e.components,a=(0,s.Z)(e,y);return(0,o.kt)("wrapper",(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"translator"},"Translator"),(0,o.kt)("h3",{id:"translate"},"Translate"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["Hello, what is your name?", "Bye"],)\n], ["text",])\n\ntranslate = (Translate()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setToLanguage(["zh-Hans", "fr"])\n .setOutputCol("translation")\n .setConcurrency(5))\n\n(translate\n .transform(df)\n .withColumn("translation", flatten(col("translation.translations")))\n .withColumn("translation", col("translation.text"))\n .select("translation")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.Translate\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("Hello, what is your name?", "Bye")).toDF("text")\n\nval translate = (new Translate()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setToLanguage(Seq("zh-Hans", "fr"))\n .setOutputCol("translation")\n .setConcurrency(5))\n\n(translate\n .transform(df)\n .withColumn("translation", flatten(col("translation.translations")))\n .withColumn("translation", col("translation.text"))\n .select("translation")).show()\n')))),(0,o.kt)(i.Z,{className:"Translate",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.Translate",scala:"com/microsoft/azure/synapse/ml/cognitive/Translate.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1Translate.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"transliterate"},"Transliterate"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["\u3053\u3093\u306b\u3061\u306f", "\u3055\u3088\u3046\u306a\u3089"],)\n], ["text",])\n\ntransliterate = (Transliterate()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setLanguage("ja")\n .setFromScript("Jpan")\n .setToScript("Latn")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(transliterate\n .transform(df)\n .withColumn("text", col("result.text"))\n .withColumn("script", col("result.script"))\n .select("text", "script")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.Transliterate\nimport spark.implicits._\nimport org.apache.spark.sql.functions.col\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("\u3053\u3093\u306b\u3061\u306f", "\u3055\u3088\u3046\u306a\u3089")).toDF("text")\n\nval transliterate = (new Transliterate()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setLanguage("ja")\n .setFromScript("Jpan")\n .setToScript("Latn")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(transliterate\n .transform(df)\n .withColumn("text", col("result.text"))\n .withColumn("script", col("result.script"))\n .select("text", "script")).show()\n')))),(0,o.kt)(i.Z,{className:"Transliterate",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.Transliterate",scala:"com/microsoft/azure/synapse/ml/cognitive/Transliterate.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1Transliterate.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"detect"},"Detect"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["Hello, what is your name?"],)\n], ["text",])\n\ndetect = (Detect()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(detect\n .transform(df)\n .withColumn("language", col("result.language"))\n .select("language")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.Detect\nimport spark.implicits._\nimport org.apache.spark.sql.functions.col\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("Hello, what is your name?")).toDF("text")\n\nval detect = (new Detect()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(detect\n .transform(df)\n .withColumn("language", col("result.language"))\n .select("language")).show()\n')))),(0,o.kt)(i.Z,{className:"Detect",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.Detect",scala:"com/microsoft/azure/synapse/ml/cognitive/Detect.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1Detect.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"breaksentence"},"BreakSentence"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["Hello, what is your name?"],)\n], ["text",])\n\nbreakSentence = (BreakSentence()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(breakSentence\n .transform(df)\n .withColumn("sentLen", flatten(col("result.sentLen")))\n .select("sentLen")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.BreakSentence\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("Hello, what is your name?")).toDF("text")\n\nval breakSentence = (new BreakSentence()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(breakSentence\n .transform(df)\n .withColumn("sentLen", flatten(col("result.sentLen")))\n .select("sentLen")).show()\n')))),(0,o.kt)(i.Z,{className:"BreakSentence",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.BreakSentence",scala:"com/microsoft/azure/synapse/ml/cognitive/BreakSentence.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1BreakSentence.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"dictionarylookup"},"DictionaryLookup"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = spark.createDataFrame([\n (["fly"],)\n], ["text",])\n\ndictionaryLookup = (DictionaryLookup()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setFromLanguage("en")\n .setToLanguage("es")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(dictionaryLookup\n .transform(df)\n .withColumn("translations", flatten(col("result.translations")))\n .withColumn("normalizedTarget", col("translations.normalizedTarget"))\n .select("normalizedTarget")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.DictionaryLookup\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List("fly")).toDF("text")\n\nval dictionaryLookup = (new DictionaryLookup()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setFromLanguage("en")\n .setToLanguage("es")\n .setTextCol("text")\n .setOutputCol("result"))\n\n(dictionaryLookup\n .transform(df)\n .withColumn("translations", flatten(col("result.translations")))\n .withColumn("normalizedTarget", col("translations.normalizedTarget"))\n .select("normalizedTarget")).show()\n')))),(0,o.kt)(i.Z,{className:"DictionaryLookup",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DictionaryLookup",scala:"com/microsoft/azure/synapse/ml/cognitive/DictionaryLookup.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DictionaryLookup.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"dictionaryexamples"},"DictionaryExamples"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ndf = (spark.createDataFrame([\n ("fly", "volar")\n], ["text", "translation"])\n .withColumn("textAndTranslation", array(struct(col("text"), col("translation")))))\n\ndictionaryExamples = (DictionaryExamples()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setFromLanguage("en")\n .setToLanguage("es")\n .setTextAndTranslationCol("textAndTranslation")\n .setOutputCol("result"))\n\n(dictionaryExamples\n .transform(df)\n .withColumn("examples", flatten(col("result.examples")))\n .select("examples")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.{DictionaryExamples, TextAndTranslation}\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, flatten}\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval df = Seq(List(TextAndTranslation("fly", "volar"))).toDF("textAndTranslation")\n\nval dictionaryExamples = (new DictionaryExamples()\n .setSubscriptionKey(translatorKey)\n .setLocation("eastus")\n .setFromLanguage("en")\n .setToLanguage("es")\n .setTextAndTranslationCol("textAndTranslation")\n .setOutputCol("result"))\n\n(dictionaryExamples\n .transform(df)\n .withColumn("examples", flatten(col("result.examples")))\n .select("examples")).show()\n')))),(0,o.kt)(i.Z,{className:"DictionaryExamples",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DictionaryExamples",scala:"com/microsoft/azure/synapse/ml/cognitive/DictionaryExamples.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DictionaryExamples.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/TextTranslator.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"documenttranslator"},"DocumentTranslator"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ntranslatorKey = os.environ.get("TRANSLATOR_KEY", getSecret("translator-key"))\ntranslatorName = os.environ.get("TRANSLATOR_NAME", "mmlspark-translator")\n\ndocumentTranslator = (DocumentTranslator()\n .setSubscriptionKey(translatorKey)\n .setServiceName(translatorName)\n .setSourceUrlCol("sourceUrl")\n .setTargetsCol("targets")\n .setOutputCol("translationStatus"))\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.translate.DocumentTranslator\nimport spark.implicits._\n\nval translatorKey = sys.env.getOrElse("TRANSLATOR_KEY", None)\nval translatorName = sys.env.getOrElse("TRANSLATOR_NAME", None)\n\nval documentTranslator = (new DocumentTranslator()\n .setSubscriptionKey(translatorKey)\n .setServiceName(translatorName)\n .setSourceUrlCol("sourceUrl")\n .setTargetsCol("targets")\n .setOutputCol("translationStatus"))\n')))),(0,o.kt)(i.Z,{className:"DocumentTranslator",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DocumentTranslator",scala:"com/microsoft/azure/synapse/ml/cognitive/DocumentTranslator.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DocumentTranslator.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/DocumentTranslator.scala",mdxType:"DocTable"}))}v.isMDXComponent=!0;var f=["components"],h=[{value:"Computer Vision",id:"computer-vision",level:2},{value:"OCR",id:"ocr",level:3},{value:"AnalyzeImage",id:"analyzeimage",level:3},{value:"RecognizeText",id:"recognizetext",level:3},{value:"ReadImage",id:"readimage",level:3},{value:"RecognizeDomainSpecificContent",id:"recognizedomainspecificcontent",level:3},{value:"GenerateThumbnails",id:"generatethumbnails",level:3},{value:"TagImage",id:"tagimage",level:3},{value:"DescribeImage",id:"describeimage",level:3}],b={toc:h};function T(e){var t=e.components,a=(0,s.Z)(e,f);return(0,o.kt)("wrapper",(0,n.Z)({},b,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"computer-vision"},"Computer Vision"),(0,o.kt)("h3",{id:"ocr"},"OCR"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\n\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", ),\n ], ["url", ])\n\nocr = (OCR()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setDetectOrientation(True)\n .setOutputCol("ocr"))\n\nocr.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.OCR\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg"\n ).toDF("url")\n\n\nval ocr = (new OCR()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setDetectOrientation(true)\n .setOutputCol("ocr"))\n\nocr.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"OCR",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.OCR",scala:"com/microsoft/azure/synapse/ml/cognitive/OCR.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1OCR.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzeimage"},"AnalyzeImage"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", "en"),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png", None),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png", "en")\n ], ["image", "language"])\n\n\nai = (AnalyzeImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("image")\n .setLanguageCol("language")\n .setVisualFeatures(["Categories", "Tags", "Description", "Faces", "ImageType", "Color", "Adult", "Objects", "Brands"])\n .setDetails(["Celebrities", "Landmarks"])\n .setOutputCol("features"))\n\nai.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.AnalyzeImage\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", "en"),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png", null),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png", "en")\n ).toDF("url", "language")\n\nval ai = (new AnalyzeImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setLanguageCol("language")\n .setVisualFeatures(Seq("Categories", "Tags", "Description", "Faces", "ImageType", "Color", "Adult", "Objects", "Brands"))\n .setDetails(Seq("Celebrities", "Landmarks"))\n .setOutputCol("features"))\n\nai.transform(df).select("url", "features").show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeImage",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeImage",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeImage.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"recognizetext"},"RecognizeText"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", ),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png", ),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png", )\n ], ["url", ])\n\nrt = (RecognizeText()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setMode("Printed")\n .setOutputCol("ocr")\n .setConcurrency(5))\n\nrt.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.RecognizeText\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png",\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png"\n ).toDF("url")\n\nval rt = (new RecognizeText()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setMode("Printed")\n .setOutputCol("ocr")\n .setConcurrency(5))\n\nrt.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"RecognizeText",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.RecognizeText",scala:"com/microsoft/azure/synapse/ml/cognitive/RecognizeText.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1RecognizeText.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"readimage"},"ReadImage"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg", ),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png", ),\n ("https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png", )\n ], ["url", ])\n\nri = (ReadImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("ocr")\n .setConcurrency(5))\n\nri.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.ReadImage\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test2.png",\n "https://mmlspark.blob.core.windows.net/datasets/OCR/test3.png"\n ).toDF("url")\n\nval ri = (new ReadImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("ocr")\n .setConcurrency(5))\n\nri.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"ReadImage",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.ReadImage",scala:"com/microsoft/azure/synapse/ml/cognitive/ReadImage.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1ReadImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"recognizedomainspecificcontent"},"RecognizeDomainSpecificContent"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg", )\n ], ["url", ])\n\nceleb = (RecognizeDomainSpecificContent()\n .setSubscriptionKey(cognitiveKey)\n .setModel("celebrities")\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("celebs"))\n\nceleb.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.RecognizeDomainSpecificContent\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg"\n ).toDF("url")\n\nval celeb = (new RecognizeDomainSpecificContent()\n .setSubscriptionKey(cognitiveKey)\n .setModel("celebrities")\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("celebs"))\n\nceleb.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"RecognizeDomainSpecificContent",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.RecognizeDomainSpecificContent",scala:"com/microsoft/azure/synapse/ml/cognitive/RecognizeDomainSpecificContent.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1RecognizeDomainSpecificContent.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"generatethumbnails"},"GenerateThumbnails"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg", )\n ], ["url", ])\n\ngt = (GenerateThumbnails()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setHeight(50)\n .setWidth(50)\n .setSmartCropping(True)\n .setImageUrlCol("url")\n .setOutputCol("thumbnails"))\n\ngt.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.GenerateThumbnails\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg"\n ).toDF("url")\n\nval gt = (new GenerateThumbnails()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setHeight(50)\n .setWidth(50)\n .setSmartCropping(true)\n .setImageUrlCol("url")\n .setOutputCol("thumbnails"))\n\ngt.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"GenerateThumbnails",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.GenerateThumbnails",scala:"com/microsoft/azure/synapse/ml/cognitive/GenerateThumbnails.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1GenerateThumbnails.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"tagimage"},"TagImage"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg", )\n ], ["url", ])\n\nti = (TagImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("tags"))\n\nti.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.TagImage\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg"\n ).toDF("url")\n\nval ti = (new TagImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("tags"))\n\nti.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"TagImage",py:"synapse.ml.cognitive.html#module-mmlspark.cognitive.TagImage",scala:"com/microsoft/azure/synapse/ml/cognitive/TagImage.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1TagImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"describeimage"},"DescribeImage"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg", )\n ], ["url", ])\n\ndi = (DescribeImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setMaxCandidates(3)\n .setImageUrlCol("url")\n .setOutputCol("descriptions"))\n\ndi.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.vision.DescribeImage\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg"\n ).toDF("url")\n\nval di = (new DescribeImage()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setMaxCandidates(3)\n .setImageUrlCol("url")\n .setOutputCol("descriptions"))\n\ndi.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"DescribeImage",py:"synapse.ml.cognitive.html#module-mmlspark.cognitive.DescribeImage",scala:"com/microsoft/azure/synapse/ml/cognitive/DescribeImage.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DescribeImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/ComputerVision.scala",mdxType:"DocTable"}))}T.isMDXComponent=!0;var k=["components"],I=[{value:"Form Recognizer",id:"form-recognizer",level:2},{value:"AnalyzeLayout",id:"analyzelayout",level:3},{value:"AnalyzeReceipts",id:"analyzereceipts",level:3},{value:"AnalyzeBusinessCards",id:"analyzebusinesscards",level:3},{value:"AnalyzeInvoices",id:"analyzeinvoices",level:3},{value:"AnalyzeIDDocuments",id:"analyzeiddocuments",level:3},{value:"AnalyzeCustomModel",id:"analyzecustommodel",level:3},{value:"GetCustomModel",id:"getcustommodel",level:3},{value:"ListCustomModels",id:"listcustommodels",level:3},{value:"Form Recognizer V3",id:"form-recognizer-v3",level:2},{value:"AnalyzeDocument",id:"analyzedocument",level:3}],S={toc:I};function _(e){var t=e.components,a=(0,s.Z)(e,k);return(0,o.kt)("wrapper",(0,n.Z)({},S,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"form-recognizer"},"Form Recognizer"),(0,o.kt)("h3",{id:"analyzelayout"},"AnalyzeLayout"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/layout1.jpg",)\n], ["source",])\n\nanalyzeLayout = (AnalyzeLayout()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("layout")\n .setConcurrency(5))\n\n(analyzeLayout.transform(imageDf)\n .withColumn("lines", flatten(col("layout.analyzeResult.readResults.lines")))\n .withColumn("readLayout", col("lines.text"))\n .withColumn("tables", flatten(col("layout.analyzeResult.pageResults.tables")))\n .withColumn("cells", flatten(col("tables.cells")))\n .withColumn("pageLayout", col("cells.text"))\n .select("source", "readLayout", "pageLayout")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeLayout\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/layout1.jpg"\n ).toDF("source")\n\nval analyzeLayout = (new AnalyzeLayout()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("layout")\n .setConcurrency(5))\n\nanalyzeLayout.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeLayout",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeLayout",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeLayout.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeLayout.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzereceipts"},"AnalyzeReceipts"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/receipt1.png",),\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/receipt1.png",)\n], ["image",])\n\nanalyzeReceipts = (AnalyzeReceipts()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("image")\n .setOutputCol("receipts")\n .setConcurrency(5))\n\nanalyzeReceipts.transform(imageDf).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeReceipts\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/receipt1.png",\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/receipt1.png"\n ).toDF("source")\n\nval analyzeReceipts = (new AnalyzeReceipts()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("receipts")\n .setConcurrency(5))\n\nanalyzeReceipts.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeReceipts",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeReceipts",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeReceipts.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeReceipts.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzebusinesscards"},"AnalyzeBusinessCards"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/business_card.jpg",)\n], ["source",])\n\nanalyzeBusinessCards = (AnalyzeBusinessCards()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("businessCards")\n .setConcurrency(5))\n\nanalyzeBusinessCards.transform(imageDf).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeBusinessCards\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/business_card.jpg"\n ).toDF("source")\n\nval analyzeBusinessCards = (new AnalyzeBusinessCards()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("businessCards")\n .setConcurrency(5))\n\nanalyzeBusinessCards.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeBusinessCards",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeBusinessCards",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeBusinessCards.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeBusinessCards.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzeinvoices"},"AnalyzeInvoices"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/invoice2.png",)\n], ["source",])\n\nanalyzeInvoices = (AnalyzeInvoices()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("invoices")\n .setConcurrency(5))\n\n(analyzeInvoices\n .transform(imageDf)\n .withColumn("documents", explode(col("invoices.analyzeResult.documentResults.fields")))\n .select("source", "documents")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeInvoices\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/invoice2.png"\n ).toDF("source")\n\nval analyzeInvoices = (new AnalyzeInvoices()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("invoices")\n .setConcurrency(5))\n\nanalyzeInvoices.transform(imageD4).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeInvoices",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeInvoices",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeInvoices.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeInvoices.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzeiddocuments"},"AnalyzeIDDocuments"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/id1.jpg",)\n], ["source",])\n\nanalyzeIDDocuments = (AnalyzeIDDocuments()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("ids")\n .setConcurrency(5))\n\n(analyzeIDDocuments\n .transform(imageDf)\n .withColumn("documents", explode(col("ids.analyzeResult.documentResults.fields")))\n .select("source", "documents")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeIDDocuments\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/id1.jpg"\n ).toDF("source")\n\nval analyzeIDDocuments = (new AnalyzeIDDocuments()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("ids")\n .setConcurrency(5))\n\nanalyzeIDDocuments.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeIDDocuments",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeIDDocuments",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeIDDocuments.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeIDDocuments.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"analyzecustommodel"},"AnalyzeCustomModel"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nmodelId = "02bc2f58-2beb-4ae3-84fb-08f011b2f7b8" # put your own modelId here\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/invoice2.png",)\n], ["source",])\n\nanalyzeCustomModel = (AnalyzeCustomModel()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setModelId(modelId)\n .setImageUrlCol("source")\n .setOutputCol("output")\n .setConcurrency(5))\n\n(analyzeCustomModel\n .transform(imageDf)\n .withColumn("keyValuePairs", flatten(col("output.analyzeResult.pageResults.keyValuePairs")))\n .withColumn("keys", col("keyValuePairs.key.text"))\n .withColumn("values", col("keyValuePairs.value.text"))\n .withColumn("keyValuePairs", create_map(lit("key"), col("keys"), lit("value"), col("values")))\n .select("source", "keyValuePairs")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeCustomModel\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval modelId = "02bc2f58-2beb-4ae3-84fb-08f011b2f7b8" // put your own modelId here\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/invoice2.png"\n ).toDF("source")\n\nval analyzeCustomModel = (new AnalyzeCustomModel()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setModelId(modelId)\n .setImageUrlCol("source")\n .setOutputCol("output")\n .setConcurrency(5))\n\nanalyzeCustomModel.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeCustomModel",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeCustomModel",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeCustomModel.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeCustomModel.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"getcustommodel"},"GetCustomModel"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nmodelId = "02bc2f58-2beb-4ae3-84fb-08f011b2f7b8" # put your own modelId here\nemptyDf = spark.createDataFrame([("",)])\n\ngetCustomModel = (GetCustomModel()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setModelId(modelId)\n .setIncludeKeys(True)\n .setOutputCol("model")\n .setConcurrency(5))\n\n(getCustomModel\n .transform(emptyDf)\n .withColumn("modelInfo", col("model.ModelInfo"))\n .withColumn("trainResult", col("model.TrainResult"))\n .select("modelInfo", "trainResult")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.GetCustomModel\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval modelId = "02bc2f58-2beb-4ae3-84fb-08f011b2f7b8" // put your own modelId here\nval emptyDf = Seq("").toDF()\n\nval getCustomModel = (new GetCustomModel()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setModelId(modelId)\n .setIncludeKeys(true)\n .setOutputCol("model")\n .setConcurrency(5))\n\ngetCustomModel.transform(emptyDf).show()\n')))),(0,o.kt)(i.Z,{className:"GetCustomModel",py:"synapse.ml.cognitive.html#module-mmlspark.cognitive.GetCustomModel",scala:"com/microsoft/azure/synapse/ml/cognitive/GetCustomModel.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1GetCustomModel.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"listcustommodels"},"ListCustomModels"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nemptyDf = spark.createDataFrame([("",)])\n\nlistCustomModels = (ListCustomModels()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOp("full")\n .setOutputCol("models")\n .setConcurrency(5))\n\n(listCustomModels\n .transform(emptyDf)\n .withColumn("modelIds", col("models.modelList.modelId"))\n .select("modelIds")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.ListCustomModels\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval emptyDf = Seq("").toDF()\n\nval listCustomModels = (new ListCustomModels()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOp("full")\n .setOutputCol("models")\n .setConcurrency(5))\n\nlistCustomModels.transform(emptyDf).show()\n')))),(0,o.kt)(i.Z,{className:"ListCustomModels",py:"synapse.ml.cognitive.html#module-mmlspark.cognitive.ListCustomModels",scala:"com/microsoft/azure/synapse/ml/cognitive/ListCustomModels.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1ListCustomModels.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizer.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"form-recognizer-v3"},"Form Recognizer V3"),(0,o.kt)("h3",{id:"analyzedocument"},"AnalyzeDocument"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nimageDf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/layout1.jpg",)\n], ["source",])\n\nanalyzeDocument = (AnalyzeDocument()\n # For supported prebuilt models, please go to documentation page for details\n .setPrebuiltModelId("prebuilt-layout")\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("result")\n .setConcurrency(5))\n\n(analyzeDocument.transform(imageDf)\n .withColumn("content", col("result.analyzeResult.content"))\n .withColumn("cells", flatten(col("result.analyzeResult.tables.cells")))\n .withColumn("cells", col("cells.content"))\n .select("source", "result", "content", "cells")).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.form.AnalyzeDocument\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval imageDf = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/FormRecognizer/layout1.jpg"\n ).toDF("source")\n\nval analyzeDocument = (new AnalyzeDocument()\n .setPrebuiltModelId("prebuilt-layout")\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("source")\n .setOutputCol("result")\n .setConcurrency(5))\n\nanalyzeDocument.transform(imageDf).show()\n')))),(0,o.kt)(i.Z,{className:"AnalyzeDocument",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AnalyzeDocument",scala:"com/microsoft/azure/synapse/ml/cognitive/AnalyzeDocument.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AnalyzeDocument.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/FormRecognizerV3.scala",mdxType:"DocTable"}))}_.isMDXComponent=!0;var C=["components"],x=[{value:"Anomaly Detection",id:"anomaly-detection",level:2},{value:"DetectLastAnomaly",id:"detectlastanomaly",level:3},{value:"DetectAnomalies",id:"detectanomalies",level:3},{value:"SimpleDetectAnomalies",id:"simpledetectanomalies",level:3}],D={toc:x};function w(e){var t=e.components,a=(0,s.Z)(e,C);return(0,o.kt)("wrapper",(0,n.Z)({},D,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"anomaly-detection"},"Anomaly Detection"),(0,o.kt)("h3",{id:"detectlastanomaly"},"DetectLastAnomaly"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\nfrom pyspark.sql.functions import lit\n\nanomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))\ndf = (spark.createDataFrame([\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 90000.0)\n], ["timestamp", "value"])\n .withColumn("group", lit(1))\n .withColumn("inputs", struct(col("timestamp"), col("value")))\n .groupBy(col("group"))\n .agg(sort_array(collect_list(col("inputs"))).alias("inputs")))\n\ndla = (DetectLastAnomaly()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setSeriesCol("inputs")\n .setGranularity("monthly")\n .setErrorCol("errors"))\n\ndla.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.anomaly.DetectLastAnomaly\nimport spark.implicits._\nimport org.apache.spark.sql.functions.{col, collect_list, lit, sort_array, struct}\n\nval anomalyKey = sys.env.getOrElse("ANOMALY_API_KEY", None)\nval df = (Seq(\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 90000.0)\n ).toDF("timestamp","value")\n .withColumn("group", lit(1))\n .withColumn("inputs", struct(col("timestamp"), col("value")))\n .groupBy(col("group"))\n .agg(sort_array(collect_list(col("inputs"))).alias("inputs")))\n\nval dla = (new DetectLastAnomaly()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setSeriesCol("inputs")\n .setGranularity("monthly")\n .setErrorCol("errors"))\n\ndla.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"DetectLastAnomaly",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DetectLastAnomaly",scala:"com/microsoft/azure/synapse/ml/cognitive/DetectLastAnomaly.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DetectLastAnomaly.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"detectanomalies"},"DetectAnomalies"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nanomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))\ndf = (spark.createDataFrame([\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 90000.0)\n], ["timestamp", "value"])\n .withColumn("group", lit(1))\n .withColumn("inputs", struct(col("timestamp"), col("value")))\n .groupBy(col("group"))\n .agg(sort_array(collect_list(col("inputs"))).alias("inputs")))\n\nda = (DetectAnomalies()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setSeriesCol("inputs")\n .setGranularity("monthly"))\n\nda.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.anomaly.DetectAnomalies\nimport spark.implicits._\n\nval anomalyKey = sys.env.getOrElse("ANOMALY_API_KEY", None)\nval df = (Seq(\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 90000.0)\n ).toDF("timestamp","value")\n .withColumn("group", lit(1))\n .withColumn("inputs", struct(col("timestamp"), col("value")))\n .groupBy(col("group"))\n .agg(sort_array(collect_list(col("inputs"))).alias("inputs")))\n\nval da = (new DetectAnomalies()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setSeriesCol("inputs")\n .setGranularity("monthly"))\n\nda.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"DetectAnomalies",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DetectAnomalies",scala:"com/microsoft/azure/synapse/ml/cognitive/DetectAnomalies.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DetectAnomalies.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"simpledetectanomalies"},"SimpleDetectAnomalies"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nanomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))\ndf = (spark.createDataFrame([\n ("1972-01-01T00:00:00Z", 826.0, 1.0),\n ("1972-02-01T00:00:00Z", 799.0, 1.0),\n ("1972-03-01T00:00:00Z", 890.0, 1.0),\n ("1972-04-01T00:00:00Z", 900.0, 1.0),\n ("1972-05-01T00:00:00Z", 766.0, 1.0),\n ("1972-06-01T00:00:00Z", 805.0, 1.0),\n ("1972-07-01T00:00:00Z", 821.0, 1.0),\n ("1972-08-01T00:00:00Z", 20000.0, 1.0),\n ("1972-09-01T00:00:00Z", 883.0, 1.0),\n ("1972-10-01T00:00:00Z", 898.0, 1.0),\n ("1972-11-01T00:00:00Z", 957.0, 1.0),\n ("1972-12-01T00:00:00Z", 924.0, 1.0),\n ("1973-01-01T00:00:00Z", 881.0, 1.0),\n ("1973-02-01T00:00:00Z", 837.0, 1.0),\n ("1973-03-01T00:00:00Z", 90000.0, 1.0),\n ("1972-01-01T00:00:00Z", 826.0, 2.0),\n ("1972-02-01T00:00:00Z", 799.0, 2.0),\n ("1972-03-01T00:00:00Z", 890.0, 2.0),\n ("1972-04-01T00:00:00Z", 900.0, 2.0),\n ("1972-05-01T00:00:00Z", 766.0, 2.0),\n ("1972-06-01T00:00:00Z", 805.0, 2.0),\n ("1972-07-01T00:00:00Z", 821.0, 2.0),\n ("1972-08-01T00:00:00Z", 20000.0, 2.0),\n ("1972-09-01T00:00:00Z", 883.0, 2.0),\n ("1972-10-01T00:00:00Z", 898.0, 2.0),\n ("1972-11-01T00:00:00Z", 957.0, 2.0),\n ("1972-12-01T00:00:00Z", 924.0, 2.0),\n ("1973-01-01T00:00:00Z", 881.0, 2.0),\n ("1973-02-01T00:00:00Z", 837.0, 2.0),\n ("1973-03-01T00:00:00Z", 90000.0, 2.0)\n], ["timestamp", "value", "group"]))\n\nsda = (SimpleDetectAnomalies()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setGroupbyCol("group")\n .setGranularity("monthly"))\n\nsda.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.anomaly.SimpleDetectAnomalies\nimport spark.implicits._\n\nval anomalyKey = sys.env.getOrElse("ANOMALY_API_KEY", None)\nval baseSeq = Seq(\n ("1972-01-01T00:00:00Z", 826.0),\n ("1972-02-01T00:00:00Z", 799.0),\n ("1972-03-01T00:00:00Z", 890.0),\n ("1972-04-01T00:00:00Z", 900.0),\n ("1972-05-01T00:00:00Z", 766.0),\n ("1972-06-01T00:00:00Z", 805.0),\n ("1972-07-01T00:00:00Z", 821.0),\n ("1972-08-01T00:00:00Z", 20000.0),\n ("1972-09-01T00:00:00Z", 883.0),\n ("1972-10-01T00:00:00Z", 898.0),\n ("1972-11-01T00:00:00Z", 957.0),\n ("1972-12-01T00:00:00Z", 924.0),\n ("1973-01-01T00:00:00Z", 881.0),\n ("1973-02-01T00:00:00Z", 837.0),\n ("1973-03-01T00:00:00Z", 9000.0)\n )\nval df = (baseSeq.map(p => (p._1,p._2,1.0))\n .++(baseSeq.map(p => (p._1,p._2,2.0)))\n .toDF("timestamp","value","group"))\n\nval sda = (new SimpleDetectAnomalies()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("anomalies")\n .setGroupbyCol("group")\n .setGranularity("monthly"))\n\nsda.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"SimpleDetectAnomalies",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.SimpleDetectAnomalies",scala:"com/microsoft/azure/synapse/ml/cognitive/SimpleDetectAnomalies.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1SimpleDetectAnomalies.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala",mdxType:"DocTable"}))}w.isMDXComponent=!0;var N=["components"],K=[{value:"Face",id:"face",level:2},{value:"DetectFace",id:"detectface",level:3},{value:"FindSimilarFace",id:"findsimilarface",level:3},{value:"GroupFaces",id:"groupfaces",level:3},{value:"IdentifyFaces",id:"identifyfaces",level:3},{value:"VerifyFaces",id:"verifyfaces",level:3}],L={toc:K};function z(e){var t=e.components,a=(0,s.Z)(e,N);return(0,o.kt)("wrapper",(0,n.Z)({},L,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"face"},"Face"),(0,o.kt)("h3",{id:"detectface"},"DetectFace"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",),\n], ["url"])\n\nface = (DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(True)\n .setReturnFaceLandmarks(False)\n .setReturnFaceAttributes(["age", "gender", "headPose", "smile", "facialHair", "glasses", "emotion",\n "hair", "makeup", "occlusion", "accessories", "blur", "exposure", "noise"]))\n\nface.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.DetectFace\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg"\n ).toDF("url")\n\nval face = (new DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("face")\n .setReturnFaceId(true)\n .setReturnFaceLandmarks(true)\n .setReturnFaceAttributes(Seq(\n "age", "gender", "headPose", "smile", "facialHair", "glasses", "emotion",\n "hair", "makeup", "occlusion", "accessories", "blur", "exposure", "noise")))\n\nface.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"DetectFace",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.DetectFace",scala:"com/microsoft/azure/synapse/ml/cognitive/DetectFace.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1DetectFace.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"findsimilarface"},"FindSimilarFace"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg",)\n], ["url"])\n\ndetector = (DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(True)\n .setReturnFaceLandmarks(False)\n .setReturnFaceAttributes([]))\n\nfaceIdDF = detector.transform(df).select("detected_faces").select(col("detected_faces").getItem(0).getItem("faceId").alias("id"))\nfaceIds = [row.asDict()[\'id\'] for row in faceIdDF.collect()]\n\nfindSimilar = (FindSimilarFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("similar")\n .setFaceIdCol("id")\n .setFaceIds(faceIds))\n\nfindSimilar.transform(faceIdDF).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.{DetectFace, FindSimilarFace}\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg"\n ).toDF("url")\nval detector = (new DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(true)\n .setReturnFaceLandmarks(false)\n .setReturnFaceAttributes(Seq()))\n\nval faceIdDF = (detector.transform(df)\n .select(col("detected_faces").getItem(0).getItem("faceId").alias("id"))\n .cache())\nval faceIds = faceIdDF.collect().map(row => row.getAs[String]("id"))\n\nval findSimilar = (new FindSimilarFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("similar")\n .setFaceIdCol("id")\n .setFaceIds(faceIds))\n\nfindSimilar.transform(faceIdDF).show()\n')))),(0,o.kt)(i.Z,{className:"FindSimilarFace",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.FindSimilarFace",scala:"com/microsoft/azure/synapse/ml/cognitive/FindSimilarFace.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1FindSimilarFace.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"groupfaces"},"GroupFaces"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg",)\n], ["url"])\n\ndetector = (DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(True)\n .setReturnFaceLandmarks(False)\n .setReturnFaceAttributes([]))\n\nfaceIdDF = detector.transform(df).select("detected_faces").select(col("detected_faces").getItem(0).getItem("faceId").alias("id"))\nfaceIds = [row.asDict()[\'id\'] for row in faceIdDF.collect()]\n\ngroup = (GroupFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("grouping")\n .setFaceIds(faceIds))\n\ngroup.transform(faceIdDF).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.{DetectFace, GroupFaces}\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg"\n ).toDF("url")\nval detector = (new DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(true)\n .setReturnFaceLandmarks(false)\n .setReturnFaceAttributes(Seq()))\n\nval faceIdDF = (detector.transform(df)\n .select(col("detected_faces").getItem(0).getItem("faceId").alias("id"))\n .cache())\nval faceIds = faceIdDF.collect().map(row => row.getAs[String]("id"))\n\nval group = (new GroupFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("grouping")\n .setFaceIds(faceIds))\n\ngroup.transform(faceIdDF).show()\n')))),(0,o.kt)(i.Z,{className:"GroupFaces",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.GroupFaces",scala:"com/microsoft/azure/synapse/ml/cognitive/GroupFaces.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1GroupFaces.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"identifyfaces"},"IdentifyFaces"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\npgId = "PUT_YOUR_PERSON_GROUP_ID"\n\nidentifyFaces = (IdentifyFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setFaceIdsCol("faces")\n .setPersonGroupId(pgId)\n .setOutputCol("identified_faces"))\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.IdentifyFaces\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval pgId = "PUT_YOUR_PERSON_GROUP_ID"\n\nval identifyFaces = (new IdentifyFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setFaceIdsCol("faces")\n .setPersonGroupId(pgId)\n .setOutputCol("identified_faces"))\n')))),(0,o.kt)(i.Z,{className:"IdentifyFaces",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.IdentifyFaces",scala:"com/microsoft/azure/synapse/ml/cognitive/IdentifyFaces.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1IdentifyFaces.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"verifyfaces"},"VerifyFaces"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",),\n ("https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg",)\n], ["url"])\n\ndetector = (DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(True)\n .setReturnFaceLandmarks(False)\n .setReturnFaceAttributes([]))\n\nfaceIdDF = detector.transform(df).select("detected_faces").select(col("detected_faces").getItem(0).getItem("faceId").alias("faceId1"))\nfaceIdDF2 = faceIdDF.withColumn("faceId2", lit(faceIdDF.take(1)[0].asDict()[\'faceId1\']))\n\nverify = (VerifyFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("same")\n .setFaceId1Col("faceId1")\n .setFaceId2Col("faceId2"))\n\nverify.transform(faceIdDF2).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.face.{DetectFace, VerifyFaces}\nimport spark.implicits._\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test1.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test2.jpg",\n "https://mmlspark.blob.core.windows.net/datasets/DSIR/test3.jpg"\n ).toDF("url")\n\nval detector = (new DetectFace()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setImageUrlCol("url")\n .setOutputCol("detected_faces")\n .setReturnFaceId(true)\n .setReturnFaceLandmarks(false)\n .setReturnFaceAttributes(Seq()))\n\nval faceIdDF = (detector.transform(df)\n .select(col("detected_faces").getItem(0).getItem("faceId").alias("faceId1"))\n .cache())\nval faceIdDF2 = faceIdDF.withColumn("faceId2", lit(faceIdDF.take(1).head.getString(0)))\n\nval verify = (new VerifyFaces()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("same")\n .setFaceId1Col("faceId1")\n .setFaceId2Col("faceId2"))\n\nverify.transform(faceIdDF2).show()\n')))),(0,o.kt)(i.Z,{className:"VerifyFaces",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.VerifyFaces",scala:"com/microsoft/azure/synapse/ml/cognitive/VerifyFaces.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1VerifyFaces.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/Face.scala",mdxType:"DocTable"}))}z.isMDXComponent=!0;var Z=["components"],E=[{value:"Speech To Text",id:"speech-to-text",level:2},{value:"SpeechToText",id:"speechtotext",level:3},{value:"SpeechToTextSDK",id:"speechtotextsdk",level:3}],A={toc:E};function O(e){var t=e.components,a=(0,s.Z)(e,Z);return(0,o.kt)("wrapper",(0,n.Z)({},A,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"speech-to-text"},"Speech To Text"),(0,o.kt)("h3",{id:"speechtotext"},"SpeechToText"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\nimport requests\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\nlink = "https://mmlspark.blob.core.windows.net/datasets/Speech/audio2.wav"\naudioBytes = requests.get(link).content\ndf = spark.createDataFrame([(audioBytes,)\n ], ["audio"])\n\nstt = (SpeechToText()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("text")\n .setAudioDataCol("audio")\n .setLanguage("en-US")\n .setFormat("simple"))\n\nstt.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.speech.SpeechToText\nimport org.apache.commons.compress.utils.IOUtils\nimport spark.implicits._\nimport java.net.URL\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval audioBytes = IOUtils.toByteArray(new URL("https://mmlspark.blob.core.windows.net/datasets/Speech/test1.wav").openStream())\n\nval df: DataFrame = Seq(\n Tuple1(audioBytes)\n ).toDF("audio")\n\nval stt = (new SpeechToText()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("text")\n .setAudioDataCol("audio")\n .setLanguage("en-US")\n .setFormat("simple"))\n\nstt.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"SpeechToText",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.SpeechToText",scala:"com/microsoft/azure/synapse/ml/cognitive/SpeechToText.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1SpeechToText.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/SpeechToText.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"speechtotextsdk"},"SpeechToTextSDK"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\nimport requests\n\ncognitiveKey = os.environ.get("COGNITIVE_API_KEY", getSecret("cognitive-api-key"))\ndf = spark.createDataFrame([("https://mmlspark.blob.core.windows.net/datasets/Speech/audio2.wav",)\n ], ["url"])\n\nspeech_to_text = (SpeechToTextSDK()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("text")\n .setAudioDataCol("url")\n .setLanguage("en-US")\n .setProfanity("Masked"))\n\nspeech_to_text.transform(df).show()\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.speech.SpeechToTextSDK\nimport spark.implicits._\nimport org.apache.commons.compress.utils.IOUtils\nimport java.net.URL\n\nval cognitiveKey = sys.env.getOrElse("COGNITIVE_API_KEY", None)\nval df: DataFrame = Seq(\n "https://mmlspark.blob.core.windows.net/datasets/Speech/audio2.wav"\n ).toDF("url")\n\nval speech_to_text = (new SpeechToTextSDK()\n .setSubscriptionKey(cognitiveKey)\n .setLocation("eastus")\n .setOutputCol("text")\n .setAudioDataCol("url")\n .setLanguage("en-US")\n .setProfanity("Masked"))\n\nspeech_to_text.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"SpeechToTextSDK",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.SpeechToTextSDK",scala:"com/microsoft/azure/synapse/ml/cognitive/SpeechToTextSDK.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1SpeechToTextSDK.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/SpeechToTextSDK.scala",mdxType:"DocTable"}))}O.isMDXComponent=!0;var F=["components"],R=[{value:"Azure Search",id:"azure-search",level:2},{value:"AzureSearch",id:"azuresearch",level:3}],P={toc:R};function M(e){var t=e.components,a=(0,s.Z)(e,F);return(0,o.kt)("wrapper",(0,n.Z)({},P,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"azure-search"},"Azure Search"),(0,o.kt)("h3",{id:"azuresearch"},"AzureSearch"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nazureSearchKey = os.environ.get("AZURE_SEARCH_KEY", getSecret("azure-search-key"))\ntestServiceName = "mmlspark-azure-search"\n\nindexName = "test-website"\n\ndef createSimpleIndexJson(indexName):\n json_str = """\n {\n "name": "%s",\n "fields": [\n {\n "name": "id",\n "type": "Edm.String",\n "key": true,\n "facetable": false\n },\n {\n "name": "fileName",\n "type": "Edm.String",\n "searchable": false,\n "sortable": false,\n "facetable": false\n },\n {\n "name": "text",\n "type": "Edm.String",\n "filterable": false,\n "sortable": false,\n "facetable": false\n }\n ]\n }\n """\n\n return json_str % indexName\n\ndf = (spark.createDataFrame([\n ("upload", "0", "file0", "text0"),\n ("upload", "1", "file1", "text1"),\n ("upload", "2", "file2", "text2"),\n ("upload", "3", "file3", "text3")\n], ["searchAction", "id", "fileName", "text"]))\n\nad = (AddDocuments()\n .setSubscriptionKey(azureSearchKey)\n .setServiceName(testServiceName)\n .setOutputCol("out")\n .setErrorCol("err")\n .setIndexName(indexName)\n .setActionCol("searchAction"))\n\nad.transform(df).show()\n\nAzureSearchWriter.writeToAzureSearch(df,\n subscriptionKey=azureSearchKey,\n actionCol="searchAction",\n serviceName=testServiceName,\n indexJson=createSimpleIndexJson(indexName))\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.search.{AddDocuments, AzureSearchWriter}\nimport spark.implicits._\n\nval azureSearchKey = sys.env.getOrElse("AZURE_SEARCH_KEY", None)\nval testServiceName = "mmlspark-azure-search"\n\nval indexName = "test-website"\n\ndef createSimpleIndexJson(indexName: String) = {\n s"""\n |{\n | "name": "$indexName",\n | "fields": [\n | {\n | "name": "id",\n | "type": "Edm.String",\n | "key": true,\n | "facetable": false\n | },\n | {\n | "name": "fileName",\n | "type": "Edm.String",\n | "searchable": false,\n | "sortable": false,\n | "facetable": false\n | },\n | {\n | "name": "text",\n | "type": "Edm.String",\n | "filterable": false,\n | "sortable": false,\n | "facetable": false\n | }\n | ]\n | }\n """.stripMargin\n}\n\nval df = ((0 until 4)\n .map(i => ("upload", s"$i", s"file$i", s"text$i"))\n .toDF("searchAction", "id", "fileName", "text"))\n\nval ad = (new AddDocuments()\n .setSubscriptionKey(azureSearchKey)\n .setServiceName(testServiceName)\n .setOutputCol("out")\n .setErrorCol("err")\n .setIndexName(indexName)\n .setActionCol("searchAction"))\n\nad.transform(df).show()\n\nAzureSearchWriter.write(df,\n Map("subscriptionKey" -> azureSearchKey,\n "actionCol" -> "searchAction",\n "serviceName" -> testServiceName,\n "indexJson" -> createSimpleIndexJson(indexName)))\n')))),(0,o.kt)(i.Z,{className:"AzureSearch",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.AzureSearch",scala:"com/microsoft/azure/synapse/ml/cognitive/AzureSearch.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1AddDocuments.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AzureSearch.scala",mdxType:"DocTable"}))}M.isMDXComponent=!0;var V=["components"],G=[{value:"Bing Image Search",id:"bing-image-search",level:2},{value:"BingImageSearch",id:"bingimagesearch",level:3}],Y={toc:G};function q(e){var t=e.components,a=(0,s.Z)(e,V);return(0,o.kt)("wrapper",(0,n.Z)({},Y,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"bing-image-search"},"Bing Image Search"),(0,o.kt)("h3",{id:"bingimagesearch"},"BingImageSearch"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nbingSearchKey = os.environ.get("BING_SEARCH_KEY", getSecret("bing-search-key"))\n\n# Number of images Bing will return per query\nimgsPerBatch = 10\n# A list of offsets, used to page into the search results\noffsets = [(i*imgsPerBatch,) for i in range(100)]\n# Since web content is our data, we create a dataframe with options on that data: offsets\nbingParameters = spark.createDataFrame(offsets, ["offset"])\n\n# Run the Bing Image Search service with our text query\nbingSearch = (BingImageSearch()\n .setSubscriptionKey(bingSearchKey)\n .setOffsetCol("offset")\n .setQuery("Martin Luther King Jr. quotes")\n .setCount(imgsPerBatch)\n .setOutputCol("images"))\n\n# Transformer that extracts and flattens the richly structured output of Bing Image Search into a simple URL column\ngetUrls = BingImageSearch.getUrlTransformer("images", "url")\n\n# This displays the full results returned\nbingSearch.transform(bingParameters).show()\n\n# Since we have two services, they are put into a pipeline\npipeline = PipelineModel(stages=[bingSearch, getUrls])\n\n# Show the results of your search: image URLs\npipeline.transform(bingParameters).show()\n\n'))),(0,o.kt)(r.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.bing.BingImageSearch\nimport spark.implicits._\n\nval bingSearchKey = sys.env.getOrElse("BING_SEARCH_KEY", None)\n\n// Number of images Bing will return per query\nval imgsPerBatch = 10\n// A list of offsets, used to page into the search results\nval offsets = (0 until 100).map(i => i*imgsPerBatch)\n// Since web content is our data, we create a dataframe with options on that data: offsets\nval bingParameters = Seq(offsets).toDF("offset")\n\n// Run the Bing Image Search service with our text query\nval bingSearch = (new BingImageSearch()\n .setSubscriptionKey(bingSearchKey)\n .setOffsetCol("offset")\n .setQuery("Martin Luther King Jr. quotes")\n .setCount(imgsPerBatch)\n .setOutputCol("images"))\n\n// Transformer that extracts and flattens the richly structured output of Bing Image Search into a simple URL column\nval getUrls = BingImageSearch.getUrlTransformer("images", "url")\n\n// This displays the full results returned\nbingSearch.transform(bingParameters).show()\n\n// Show the results of your search: image URLs\ngetUrls.transform(bingSearch.transform(bingParameters)).show()\n')))),(0,o.kt)(i.Z,{className:"BingImageSearch",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.BingImageSearch",scala:"com/microsoft/azure/synapse/ml/cognitive/BingImageSearch.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1BingImageSearch.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/BingImageSearch.scala",mdxType:"DocTable"}))}q.isMDXComponent=!0;var B=["components"],j={title:"Transformers - Cognitive",sidebar_label:"Cognitive",hide_title:!0},U=void 0,H={unversionedId:"Quick Examples/transformers/transformers_cognitive",id:"Quick Examples/transformers/transformers_cognitive",title:"Transformers - Cognitive",description:"",source:"@site/docs/Quick Examples/transformers/transformers_cognitive.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_cognitive",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_cognitive",draft:!1,tags:[],version:"current",frontMatter:{title:"Transformers - Cognitive",sidebar_label:"Cognitive",hide_title:!0}},X={},J=[].concat(m,g,h,I,x,K,E,R,G),W={toc:J};function Q(e){var t=e.components,a=(0,s.Z)(e,B);return(0,o.kt)("wrapper",(0,n.Z)({},W,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)(u,{mdxType:"TextAnalytics"}),(0,o.kt)(v,{mdxType:"Translator"}),(0,o.kt)(T,{mdxType:"ComputerVision"}),(0,o.kt)(_,{mdxType:"FormRecognizer"}),(0,o.kt)(w,{mdxType:"AnomalyDetection"}),(0,o.kt)(z,{mdxType:"Face"}),(0,o.kt)(O,{mdxType:"SpeechToText"}),(0,o.kt)(M,{mdxType:"AzureSearch"}),(0,o.kt)(q,{mdxType:"BingImageSearch"}))}Q.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1be78505.4d15b033.js b/assets/js/1be78505.4d15b033.js new file mode 100644 index 0000000000..f0d3252de7 --- /dev/null +++ b/assets/js/1be78505.4d15b033.js @@ -0,0 +1,2 @@ +/*! For license information please see 1be78505.4d15b033.js.LICENSE.txt */ +(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[9514,3140],{9963:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return xe}});var a=n(7294),r=n(6010),i=n(833),l=n(5281),o=n(3320),c=n(4575),s=n(4477),d=n(1116),u=n(7452),m=n(5999),b=n(2466),v=n(5936);var p="backToTopButton_sjWU",f="backToTopButtonShow_xfvO";function h(){var e=function(e){var t=e.threshold,n=(0,a.useState)(!1),r=n[0],i=n[1],l=(0,a.useRef)(!1),o=(0,b.Ct)(),c=o.startScroll,s=o.cancelScroll;return(0,b.RF)((function(e,n){var a=e.scrollY,r=null==n?void 0:n.scrollY;r&&(l.current?l.current=!1:a>=r?(s(),i(!1)):a=r?(s(),l(!1)):a=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=s(n),p=a,f=d["".concat(c,".").concat(p)]||d[p]||m[p]||o;return n?r.createElement(f,l(l({ref:t},u),{},{components:n})):r.createElement(f,l({ref:t},u))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var s=2;s0})).map((function(e){return[e-1,[i]]}));return{lineClassNames:Object.fromEntries(c),code:n}}if(void 0===r)return{lineClassNames:{},code:n};for(var s=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return k(["js","jsBlock"],t);case"jsx":case"tsx":return k(["js","jsBlock","jsx"],t);case"html":return k(["js","jsBlock","html"],t);case"python":case"py":case"bash":return k(["bash"],t);case"markdown":case"md":return k(["html","jsx","bash"],t);default:return k(Object.keys(E),t)}}(r,a),u=n.split("\n"),m=Object.fromEntries(a.map((function(e){return[e.className,{start:0,range:""}]}))),d=Object.fromEntries(a.filter((function(e){return e.line})).map((function(e){var t=e.className;return[e.line,t]}))),p=Object.fromEntries(a.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.start,t]}))),f=Object.fromEntries(a.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.end,t]}))),v=0;ve.clientWidth||f.current.querySelector("code").hasAttribute("style");m(t)}),[f]),L(f,h),(0,r.useEffect)((function(){h()}),[l,h]),(0,r.useEffect)((function(){return window.addEventListener("resize",h,{passive:!0}),function(){window.removeEventListener("resize",h)}}),[h]),{codeBlockRef:f,isEnabled:l,isCodeScrollable:s,toggle:v}),I=function(e){var t,n;return null!=(t=null==e||null==(n=e.match(y))?void 0:n.groups.title)?t:""}(k)||C,M=N(g,{metastring:k,language:S,magicComments:x}),D=M.lineClassNames,H=M.code,R=null!=Z?Z:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(k);return r.createElement(w,{as:"div",className:(0,u.Z)(E,S&&!E.includes("language-"+S)&&"language-"+S)},I&&r.createElement("div",{className:T.codeBlockTitle},I),r.createElement("div",{className:T.codeBlockContent},r.createElement(O.ZP,(0,o.Z)({},O.lG,{theme:P,code:H,language:null!=S?S:"text"}),(function(e){var t=e.className,n=e.tokens,a=e.getLineProps,o=e.getTokenProps;return r.createElement("pre",{tabIndex:0,ref:A.codeBlockRef,className:(0,u.Z)(t,T.codeBlock,"thin-scrollbar")},r.createElement("code",{className:(0,u.Z)(T.codeBlockLines,R&&T.codeBlockLinesWithNumbering)},n.map((function(e,t){return r.createElement(z,{key:t,line:e,getLineProps:a,getTokenProps:o,classNames:D[t],showLineNumbers:R})}))))})),r.createElement("div",{className:T.buttonGroup},(A.isEnabled||A.isCodeScrollable)&&r.createElement(q,{className:T.codeButton,onClick:function(){return A.toggle()},isEnabled:A.isEnabled}),r.createElement(V,{className:T.codeButton,code:H}))))}var U=["children"];function $(e){var t=e.children,n=(0,l.Z)(e,U),a=(0,s.Z)(),i=function(e){return r.Children.toArray(e).some((function(e){return(0,r.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(t),c="string"==typeof i?G:B;return r.createElement(c,(0,o.Z)({key:String(a)},n),i)}var Q=n(9960);var X=n(6043),Y="details_lb9f",J="isBrowser_bmU9",K="collapsibleContent_i85q",ee=["summary","children"];function te(e){return!!e&&("SUMMARY"===e.tagName||te(e.parentElement))}function ne(e,t){return!!e&&(e===t||ne(e.parentElement,t))}function re(e){var t=e.summary,n=e.children,a=(0,l.Z)(e,ee),i=(0,s.Z)(),c=(0,r.useRef)(null),m=(0,X.u)({initialState:!a.open}),d=m.collapsed,p=m.setCollapsed,f=(0,r.useState)(a.open),v=f[0],h=f[1],g=r.isValidElement(t)?t:r.createElement("summary",null,null!=t?t:"Details");return r.createElement("details",(0,o.Z)({},a,{ref:c,open:v,"data-collapsed":d,className:(0,u.Z)(Y,i&&J,a.className),onMouseDown:function(e){te(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var t=e.target;te(t)&&ne(t,c.current)&&(e.preventDefault(),d?(p(!1),h(!0)):p(!0))}}),g,r.createElement(X.z,{lazy:!1,collapsed:d,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){p(e),h(!e)}},r.createElement("div",{className:K},n)))}var ae="details_b_Ee";function oe(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return r.createElement(re,(0,o.Z)({},t,{className:(0,u.Z)("alert alert--info",ae,t.className)}))}var le=n(2503);function ie(e){return r.createElement(le.Z,e)}var ce="containsTaskList_mC6p";var se="img_ev3q";var ue="admonition_LlT9",me="admonitionHeading_tbUL",de="admonitionIcon_kALy",pe="admonitionContent_S0QG";var fe={note:{infimaClassName:"secondary",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 14 16"},r.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:r.createElement(I.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 12 16"},r.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:r.createElement(I.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 12 16"},r.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:r.createElement(I.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 14 16"},r.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:r.createElement(I.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return r.createElement("svg",{viewBox:"0 0 16 16"},r.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:r.createElement(I.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},ve={secondary:"note",important:"info",success:"tip",warning:"danger"};function he(e){var t,n=function(e){var t=r.Children.toArray(e),n=t.find((function(e){var t;return r.isValidElement(e)&&"mdxAdmonitionTitle"===(null==(t=e.props)?void 0:t.mdxType)})),a=r.createElement(r.Fragment,null,t.filter((function(e){return e!==n})));return{mdxAdmonitionTitle:n,rest:a}}(e.children),a=n.mdxAdmonitionTitle,o=n.rest;return Object.assign({},e,{title:null!=(t=e.title)?t:a,children:o})}var ge={head:function(e){var t=r.Children.map(e.children,(function(e){return r.isValidElement(e)?function(e){var t;if(null!=(t=e.props)&&t.mdxType&&e.props.originalType){var n=e.props,a=(n.mdxType,n.originalType,(0,l.Z)(n,c));return r.createElement(e.props.originalType,a)}return e}(e):e}));return r.createElement(i.Z,e,t)},code:function(e){var t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return r.Children.toArray(e.children).every((function(e){var n;return"string"==typeof e&&!e.includes("\n")||(0,r.isValidElement)(e)&&t.includes(null==(n=e.props)?void 0:n.mdxType)}))?r.createElement("code",e):r.createElement($,e)},a:function(e){return r.createElement(Q.Z,e)},pre:function(e){var t;return r.createElement($,(0,r.isValidElement)(e.children)&&"code"===(null==(t=e.children.props)?void 0:t.originalType)?e.children.props:Object.assign({},e))},details:function(e){var t=r.Children.toArray(e.children),n=t.find((function(e){var t;return r.isValidElement(e)&&"summary"===(null==(t=e.props)?void 0:t.mdxType)})),a=r.createElement(r.Fragment,null,t.filter((function(e){return e!==n})));return r.createElement(oe,(0,o.Z)({},e,{summary:n}),a)},ul:function(e){return r.createElement("ul",(0,o.Z)({},e,{className:(t=e.className,(0,u.Z)(t,(null==t?void 0:t.includes("contains-task-list"))&&ce))}));var t},img:function(e){return r.createElement("img",(0,o.Z)({loading:"lazy"},e,{className:(t=e.className,(0,u.Z)(t,se))}));var t},h1:function(e){return r.createElement(ie,(0,o.Z)({as:"h1"},e))},h2:function(e){return r.createElement(ie,(0,o.Z)({as:"h2"},e))},h3:function(e){return r.createElement(ie,(0,o.Z)({as:"h3"},e))},h4:function(e){return r.createElement(ie,(0,o.Z)({as:"h4"},e))},h5:function(e){return r.createElement(ie,(0,o.Z)({as:"h5"},e))},h6:function(e){return r.createElement(ie,(0,o.Z)({as:"h6"},e))},admonition:function(e){var t=he(e),n=t.children,a=t.type,o=t.title,l=t.icon,i=function(e){var t,n=null!=(t=ve[e])?t:e;return fe[n]||(console.warn('No admonition config found for admonition type "'+n+'". Using Info as fallback.'),fe.info)}(a),c=null!=o?o:i.label,s=i.iconComponent,m=null!=l?l:r.createElement(s,null);return r.createElement("div",{className:(0,u.Z)(f.k.common.admonition,f.k.common.admonitionType(e.type),"alert","alert--"+i.infimaClassName,ue)},r.createElement("div",{className:me},r.createElement("span",{className:de},m),c),r.createElement("div",{className:pe},n))},mermaid:function(){return null}};function ye(e){var t=e.children;return r.createElement(a.Zo,{components:ge},t)}},2244:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7294),a=n(6010),o=n(9960);function l(e){var t=e.permalink,n=e.title,l=e.subLabel,i=e.isNext;return r.createElement(o.Z,{className:(0,a.Z)("pagination-nav__link",i?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},l&&r.createElement("div",{className:"pagination-nav__sublabel"},l),r.createElement("div",{className:"pagination-nav__label"},n))}},6233:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7294),a=n(6010),o=n(5999),l=n(9960),i="tag_zVej",c="tagRegular_sFm0",s="tagWithCount_h2kH";function u(e){var t=e.permalink,n=e.label,o=e.count;return r.createElement(l.Z,{href:t,className:(0,a.Z)(i,o?s:c)},n,o&&r.createElement("span",null,o))}var m="tags_jXut",d="tag_QGVx";function p(e){var t=e.tags;return r.createElement(r.Fragment,null,r.createElement("b",null,r.createElement(o.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),r.createElement("ul",{className:(0,a.Z)(m,"padding--none","margin-left--sm")},t.map((function(e){var t=e.label,n=e.permalink;return r.createElement("li",{key:n,className:d},r.createElement(u,{label:t,permalink:n}))}))))}},7594:function(e,t){function n(e){let t,n=[];for(let r of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(r))n.push(parseInt(r,10));else if(t=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,r,a,o]=t;if(r&&o){r=parseInt(r),o=parseInt(o);const e=r0&&e[n-1]===t?e:e.concat(t)},d=function(e,t){var n=e.plain,r=Object.create(null),a=e.styles.reduce((function(e,n){var r=n.languages,a=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=c({},e[t],a);e[t]=n})),e}),r);return a.root=n,a.plain=c({},n,{backgroundColor:null}),a};function p(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var f=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),i(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?d(e.theme,e.language):void 0;return t.themeDict=n})),i(this,"getLineProps",(function(e){var n=e.key,r=e.className,a=e.style,o=c({},p(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),l=t.getThemeDict(t.props);return void 0!==l&&(o.style=l.plain),void 0!==a&&(o.style=void 0!==o.style?c({},o.style,a):a),void 0!==n&&(o.key=n),r&&(o.className+=" "+r),o})),i(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,a=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===a&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===a&&!r)return o[n[0]];var l=r?{display:"inline-block"}:{},i=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[l].concat(i))}})),i(this,"getTokenProps",(function(e){var n=e.key,r=e.className,a=e.style,o=e.token,l=c({},p(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==a&&(l.style=void 0!==l.style?c({},l.style,a):a),void 0!==n&&(l.key=n),r&&(l.className+=" "+r),l})),i(this,"tokenize",(function(e,t,n,r){var a={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",a);var o=a.tokens=e.tokenize(a.code,a.grammar,a.language);return e.hooks.run("after-tokenize",a),o}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,a=e.children,o=this.getThemeDict(this.props),l=t.languages[n];return a({tokens:function(e){for(var t=[[]],n=[e],r=[0],a=[e.length],o=0,l=0,i=[],c=[i];l>-1;){for(;(o=r[l]++)0?p:["plain"],d=f):(p=m(p,f.type),f.alias&&(p=m(p,f.alias)),d=f.content),"string"==typeof d){var v=d.split(s),h=v.length;i.push({types:p,content:v[0]});for(var g=1;g0&&(i=l.getRangeAt(0)),r.append(a),a.select(),a.selectionStart=0,a.selectionEnd=e.length;var c=!1;try{c=document.execCommand("copy")}catch(s){}return a.remove(),i&&(l.removeAllRanges(),l.addRange(i)),o&&o.focus(),c}n.d(t,{Z:function(){return r}})}}]); \ No newline at end of file diff --git a/assets/js/3140.7f289234.js b/assets/js/3140.7f289234.js deleted file mode 100644 index 8b6f1c86fb..0000000000 --- a/assets/js/3140.7f289234.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 3140.7f289234.js.LICENSE.txt */ -(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[3140],{3140:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l}});var r=n(7294),o=n(4774),a=n(4184),s=n.n(a),i="notFoundContainer_NXNv",c="notFoundBlob_cRmD";var l=function(){return r.createElement(o.Z,{title:"Page Not Found"},r.createElement("div",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:s()("col col--6 col--offset-3",i)},r.createElement("img",{src:"/img/Blobsherlock.svg",className:s()("margin-bottom--lg",c)}),r.createElement("h1",{className:"hero__title"},"Woops! Page Not Found"),r.createElement("p",null,"The documentation site has recently moved, chances are that the page you're looking for is ",r.createElement("a",{href:"/docs/about"},"in the new docs section"),".")))))}},4184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),s=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(u.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=s(n),d=r,f=p["".concat(u,".").concat(d)]||p[d]||m[d]||i;return n?a.createElement(f,l(l({ref:t},c),{},{components:n})):a.createElement(f,l({ref:t},c))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=p;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var s=2;s child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function p(e){var t=e.values,n=e.children;return(0,r.useMemo)((function(){var e=null!=t?t:m(n);return function(e){var t=(0,s.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function d(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,i=(0,o.k6)(),l=function(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:n,groupId:a});return[(0,u._X)(l),(0,r.useCallback)((function(e){if(l){var t=new URLSearchParams(i.location.search);t.set(l,e),i.replace(Object.assign({},i.location,{search:t.toString()}))}}),[l,i])]}function v(e){var t,n,a,i,l=e.defaultValue,o=e.queryString,u=void 0!==o&&o,s=e.groupId,m=p(e),v=(0,r.useState)((function(){return function(e){var t,n=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var r=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:l,tabValues:m})})),y=v[0],b=v[1],g=f({queryString:u,groupId:s}),h=g[0],E=g[1],w=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:s}.groupId),n=(0,c.Nk)(t),a=n[0],i=n[1],[a,(0,r.useCallback)((function(e){t&&i.set(e)}),[t,i])]),T=w[0],k=w[1],S=function(){var e=null!=h?h:T;return d({value:e,tabValues:m})?e:null}();return(0,r.useLayoutEffect)((function(){S&&b(S)}),[S]),{selectedValue:y,selectValue:(0,r.useCallback)((function(e){if(!d({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);b(e),E(e),k(e)}),[E,k,m]),tabValues:m}}var y=n(2389),b="tabList__CuJ",g="tabItem_LNqP";function h(e){var t=e.className,n=e.block,o=e.selectedValue,u=e.selectValue,s=e.tabValues,c=[],m=(0,l.o5)().blockElementScrollPositionUntilNextRender,p=function(e){var t=e.currentTarget,n=c.indexOf(t),a=s[n].value;a!==o&&(m(t),u(a))},d=function(e){var t,n=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":var a,r=c.indexOf(e.currentTarget)+1;n=null!=(a=c[r])?a:c[0];break;case"ArrowLeft":var i,l=c.indexOf(e.currentTarget)-1;n=null!=(i=c[l])?i:c[c.length-1]}null==(t=n)||t.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},s.map((function(e){var t=e.value,n=e.label,l=e.attributes;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:function(e){return c.push(e)},onKeyDown:d,onClick:p},l,{className:(0,i.Z)("tabs__item",g,null==l?void 0:l.className,{"tabs__item--active":o===t})}),null!=n?n:t)})))}function E(e){var t=e.lazy,n=e.children,a=e.selectedValue,i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var l=i.find((function(e){return e.props.value===a}));return l?(0,r.cloneElement)(l,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function w(e){var t=v(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(E,(0,a.Z)({},e,t)))}function T(e){var t=(0,y.Z)();return r.createElement(w,(0,a.Z)({key:String(t)},e))}},1989:function(e,t,n){var a=n(7294),r=n(2263);t.Z=function(e){var t=e.className,n=e.py,i=e.scala,l=e.csharp,o=e.sourceLink,u=(0,r.Z)().siteConfig.customFields.version,s="https://mmlspark.blob.core.windows.net/docs/"+u+"/pyspark/"+n,c="https://mmlspark.blob.core.windows.net/docs/"+u+"/scala/"+i,m="https://mmlspark.blob.core.windows.net/docs/"+u+"/dotnet/"+l;return a.createElement("table",null,a.createElement("tbody",null,a.createElement("tr",null,a.createElement("td",null,a.createElement("strong",null,"Python API: "),a.createElement("a",{href:s},t)),a.createElement("td",null,a.createElement("strong",null,"Scala API: "),a.createElement("a",{href:c},t)),a.createElement("td",null,a.createElement("strong",null,".NET API: "),a.createElement("a",{href:m},t)),a.createElement("td",null,a.createElement("strong",null,"Source: "),a.createElement("a",{href:o},t)))))}},3488:function(e,t,n){n.r(t),n.d(t,{assets:function(){return b},contentTitle:function(){return v},default:function(){return E},frontMatter:function(){return f},metadata:function(){return y},toc:function(){return g}});var a=n(3117),r=n(102),i=(n(7294),n(3905)),l=n(4866),o=n(5162),u=n(1989),s=["components"],c=[{value:"SimpleFitMultivariateAnomaly",id:"simplefitmultivariateanomaly",level:2}],m={toc:c};function p(e){var t=e.components,n=(0,r.Z)(e,s);return(0,i.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"simplefitmultivariateanomaly"},"SimpleFitMultivariateAnomaly"),(0,i.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nanomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))\nstartTime = "2021-01-01T00:00:00Z"\nendTime = "2021-01-03T01:59:00Z"\ntimestampColumn = "timestamp"\ninputColumns = ["feature0", "feature1", "feature2"]\nintermediateSaveDir = "wasbs://madtest@anomalydetectiontest.blob.core.windows.net/intermediateData"\n\nsimpleFitMultivariateAnomaly = (SimpleFitMultivariateAnomaly()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("result")\n .setStartTime(startTime)\n .setEndTime(endTime)\n .setIntermediateSaveDir(intermediateSaveDir)\n .setTimestampCol(timestampColumn)\n .setInputCols(inputColumns)\n .setSlidingWindow(50))\n\n# uncomment below for fitting your own dataframe\n# model = simpleFitMultivariateAnomaly.fit(df)\n# simpleFitMultivariateAnomaly.cleanUpIntermediateData()\n'))),(0,i.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.anomaly.FitMultivariateAnomaly\n\nval startTime: String = "2021-01-01T00:00:00Z"\nval endTime: String = "2021-01-02T12:00:00Z"\nval timestampColumn: String = "timestamp"\nval inputColumns: Array[String] = Array("feature0", "feature1", "feature2")\nval intermediateSaveDir: String = "wasbs://madtest@anomalydetectiontest.blob.core.windows.net/intermediateData"\nval anomalyKey = sys.env.getOrElse("ANOMALY_API_KEY", None)\n\nval simpleFitMultivariateAnomaly = (new SimpleFitMultivariateAnomaly()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("result")\n .setStartTime(startTime)\n .setEndTime(endTime)\n .setIntermediateSaveDir(intermediateSaveDir)\n .setTimestampCol(timestampColumn)\n .setInputCols(inputColumns)\n .setSlidingWindow(50))\n\nval df = (spark.read.format("csv")\n .option("header", True)\n .load("wasbs://datasets@mmlspark.blob.core.windows.net/MAD/mad_example.csv"))\n\nval model = simpleFitMultivariateAnomaly.fit(df)\n\nval result = (model\n .setStartTime(startTime)\n .setEndTime(endTime)\n .setOutputCol("result")\n .setTimestampCol(timestampColumn)\n .setInputCols(inputColumns)\n .transform(df))\n\nresult.show()\n\nsimpleFitMultivariateAnomaly.cleanUpIntermediateData()\nmodel.cleanUpIntermediateData()\n')))),(0,i.kt)(u.Z,{className:"SimpleFitMultivariateAnomaly",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.SimpleFitMultivariateAnomaly",scala:"com/microsoft/azure/synapse/ml/cognitive/SimpleFitMultivariateAnomaly.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1SimpleFitMultivariateAnomaly.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/MultivariateAnomalyDetection.scala",mdxType:"DocTable"}))}p.isMDXComponent=!0;var d=["components"],f={title:"Estimators - Cognitive",sidebar_label:"Cognitive",hide_title:!0},v=void 0,y={unversionedId:"Quick Examples/estimators/estimators_cognitive",id:"Quick Examples/estimators/estimators_cognitive",title:"Estimators - Cognitive",description:"",source:"@site/docs/Quick Examples/estimators/estimators_cognitive.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_cognitive",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_cognitive",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - Cognitive",sidebar_label:"Cognitive",hide_title:!0}},b={},g=[].concat(c),h={toc:g};function E(e){var t=e.components,n=(0,r.Z)(e,d);return(0,i.kt)("wrapper",(0,a.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)(p,{mdxType:"MAD"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/34ff21b6.7cfb09cb.js b/assets/js/34ff21b6.7cfb09cb.js deleted file mode 100644 index f46a232ef0..0000000000 --- a/assets/js/34ff21b6.7cfb09cb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[9362],{3905:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return d}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),p=u(n),d=r,v=p["".concat(s,".").concat(d)]||p[d]||c[d]||i;return n?a.createElement(v,l(l({ref:t},m),{},{components:n})):a.createElement(v,l({ref:t},m))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var u=2;u child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),g=null!=v?v:b.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),h=(0,o.l)(g,(function(e,t){return e.value===t.value}));if(h.length>0)throw new Error('Docusaurus error: Duplicate values "'+h.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var E=null===d?d:null!=(t=null!=d?d:null==(n=b.find((function(e){return e.props.default})))?void 0:n.props.value)?t:b[0].props.value;if(null!==E&&!g.some((function(e){return e.value===E})))throw new Error('Docusaurus error: The has a defaultValue "'+E+'" but none of its children has the corresponding value. Available values are: '+g.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var T=(0,s.U)(),w=T.tabGroupChoices,k=T.setTabGroupChoices,S=(0,r.useState)(E),C=S[0],O=S[1],A=[],D=(0,u.o5)().blockElementScrollPositionUntilNextRender;if(null!=f){var M=w[f];null!=M&&M!==C&&g.some((function(e){return e.value===M}))&&O(M)}var _=function(e){var t=e.currentTarget,n=A.indexOf(t),a=g[n].value;a!==C&&(D(t),O(a),null!=f&&k(f,String(a)))},x=function(e){var t,n=null;switch(e.key){case"Enter":_(e);break;case"ArrowRight":var a,r=A.indexOf(e.currentTarget)+1;n=null!=(a=A[r])?a:A[0];break;case"ArrowLeft":var i,l=A.indexOf(e.currentTarget)-1;n=null!=(i=A[l])?i:A[A.length-1]}null==(t=n)||t.focus()};return r.createElement("div",{className:(0,i.Z)("tabs-container",m)},r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":p},y)},g.map((function(e){var t=e.value,n=e.label,l=e.attributes;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:C===t?0:-1,"aria-selected":C===t,key:t,ref:function(e){return A.push(e)},onKeyDown:x,onClick:_},l,{className:(0,i.Z)("tabs__item",c,null==l?void 0:l.className,{"tabs__item--active":C===t})}),null!=n?n:t)}))),l?(0,r.cloneElement)(b.filter((function(e){return e.props.value===C}))[0],{className:"margin-top--md"}):r.createElement("div",{className:"margin-top--md"},b.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==C})}))))}function d(e){var t=(0,l.Z)();return r.createElement(p,(0,a.Z)({key:String(t)},e))}},1989:function(e,t,n){var a=n(7294),r=n(2263);t.Z=function(e){var t=e.className,n=e.py,i=e.scala,l=e.csharp,o=e.sourceLink,s=(0,r.Z)().siteConfig.customFields.version,u="https://mmlspark.blob.core.windows.net/docs/"+s+"/pyspark/"+n,m="https://mmlspark.blob.core.windows.net/docs/"+s+"/scala/"+i,c="https://mmlspark.blob.core.windows.net/docs/"+s+"/dotnet/"+l;return a.createElement("table",null,a.createElement("tbody",null,a.createElement("tr",null,a.createElement("td",null,a.createElement("strong",null,"Python API: "),a.createElement("a",{href:u},t)),a.createElement("td",null,a.createElement("strong",null,"Scala API: "),a.createElement("a",{href:m},t)),a.createElement("td",null,a.createElement("strong",null,".NET API: "),a.createElement("a",{href:c},t)),a.createElement("td",null,a.createElement("strong",null,"Source: "),a.createElement("a",{href:o},t)))))}},3488:function(e,t,n){n.r(t),n.d(t,{assets:function(){return b},contentTitle:function(){return f},default:function(){return E},frontMatter:function(){return v},metadata:function(){return y},toc:function(){return g}});var a=n(3117),r=n(102),i=(n(7294),n(3905)),l=n(5488),o=n(5162),s=n(1989),u=["components"],m=[{value:"SimpleFitMultivariateAnomaly",id:"simplefitmultivariateanomaly",level:2}],c={toc:m};function p(e){var t=e.components,n=(0,r.Z)(e,u);return(0,i.kt)("wrapper",(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"simplefitmultivariateanomaly"},"SimpleFitMultivariateAnomaly"),(0,i.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,i.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.cognitive import *\n\nanomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))\nstartTime = "2021-01-01T00:00:00Z"\nendTime = "2021-01-03T01:59:00Z"\ntimestampColumn = "timestamp"\ninputColumns = ["feature0", "feature1", "feature2"]\nintermediateSaveDir = "wasbs://madtest@anomalydetectiontest.blob.core.windows.net/intermediateData"\n\nsimpleFitMultivariateAnomaly = (SimpleFitMultivariateAnomaly()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("result")\n .setStartTime(startTime)\n .setEndTime(endTime)\n .setIntermediateSaveDir(intermediateSaveDir)\n .setTimestampCol(timestampColumn)\n .setInputCols(inputColumns)\n .setSlidingWindow(50))\n\n# uncomment below for fitting your own dataframe\n# model = simpleFitMultivariateAnomaly.fit(df)\n# simpleFitMultivariateAnomaly.cleanUpIntermediateData()\n'))),(0,i.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.cognitive.anomaly.FitMultivariateAnomaly\n\nval startTime: String = "2021-01-01T00:00:00Z"\nval endTime: String = "2021-01-02T12:00:00Z"\nval timestampColumn: String = "timestamp"\nval inputColumns: Array[String] = Array("feature0", "feature1", "feature2")\nval intermediateSaveDir: String = "wasbs://madtest@anomalydetectiontest.blob.core.windows.net/intermediateData"\nval anomalyKey = sys.env.getOrElse("ANOMALY_API_KEY", None)\n\nval simpleFitMultivariateAnomaly = (new SimpleFitMultivariateAnomaly()\n .setSubscriptionKey(anomalyKey)\n .setLocation("westus2")\n .setOutputCol("result")\n .setStartTime(startTime)\n .setEndTime(endTime)\n .setIntermediateSaveDir(intermediateSaveDir)\n .setTimestampCol(timestampColumn)\n .setInputCols(inputColumns)\n .setSlidingWindow(50))\n\nval df = (spark.read.format("csv")\n .option("header", True)\n .load("wasbs://datasets@mmlspark.blob.core.windows.net/MAD/mad_example.csv"))\n\nval model = simpleFitMultivariateAnomaly.fit(df)\n\nval result = (model\n .setStartTime(startTime)\n .setEndTime(endTime)\n .setOutputCol("result")\n .setTimestampCol(timestampColumn)\n .setInputCols(inputColumns)\n .transform(df))\n\nresult.show()\n\nsimpleFitMultivariateAnomaly.cleanUpIntermediateData()\nmodel.cleanUpIntermediateData()\n')))),(0,i.kt)(s.Z,{className:"SimpleFitMultivariateAnomaly",py:"synapse.ml.cognitive.html#module-synapse.ml.cognitive.SimpleFitMultivariateAnomaly",scala:"com/microsoft/azure/synapse/ml/cognitive/SimpleFitMultivariateAnomaly.html",csharp:"classSynapse_1_1ML_1_1Cognitive_1_1SimpleFitMultivariateAnomaly.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/MultivariateAnomalyDetection.scala",mdxType:"DocTable"}))}p.isMDXComponent=!0;var d=["components"],v={title:"Estimators - Cognitive",sidebar_label:"Cognitive",hide_title:!0},f=void 0,y={unversionedId:"Quick Examples/estimators/estimators_cognitive",id:"Quick Examples/estimators/estimators_cognitive",title:"Estimators - Cognitive",description:"",source:"@site/docs/Quick Examples/estimators/estimators_cognitive.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_cognitive",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_cognitive",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - Cognitive",sidebar_label:"Cognitive",hide_title:!0}},b={},g=[].concat(m),h={toc:g};function E(e){var t=e.components,n=(0,r.Z)(e,d);return(0,i.kt)("wrapper",(0,a.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)(p,{mdxType:"MAD"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/41ee0cff.9fb48443.js b/assets/js/41ee0cff.1989018a.js similarity index 88% rename from assets/js/41ee0cff.9fb48443.js rename to assets/js/41ee0cff.1989018a.js index 2632b2465e..4b3b30ebee 100644 --- a/assets/js/41ee0cff.9fb48443.js +++ b/assets/js/41ee0cff.1989018a.js @@ -1 +1 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[5702],{3905:function(t,e,n){n.d(e,{Zo:function(){return p},kt:function(){return m}});var r=n(7294);function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}var l=r.createContext({}),c=function(t){var e=r.useContext(l),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},p=function(t){var e=c(t.components);return r.createElement(l.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},d=r.forwardRef((function(t,e){var n=t.components,a=t.mdxType,i=t.originalType,l=t.parentName,p=s(t,["components","mdxType","originalType","parentName"]),d=c(n),m=a,f=d["".concat(l,".").concat(m)]||d[m]||u[m]||i;return n?r.createElement(f,o(o({ref:e},p),{},{components:n})):r.createElement(f,o({ref:e},p))}));function m(t,e){var n=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var i=n.length,o=new Array(i);o[0]=d;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s.mdxType="string"==typeof t?t:a,o[1]=s;for(var c=2;c=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}var l=r.createContext({}),c=function(t){var e=r.useContext(l),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},p=function(t){var e=c(t.components);return r.createElement(l.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},d=r.forwardRef((function(t,e){var n=t.components,a=t.mdxType,i=t.originalType,l=t.parentName,p=s(t,["components","mdxType","originalType","parentName"]),d=c(n),m=a,f=d["".concat(l,".").concat(m)]||d[m]||u[m]||i;return n?r.createElement(f,o(o({ref:e},p),{},{components:n})):r.createElement(f,o({ref:e},p))}));function m(t,e){var n=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var i=n.length,o=new Array(i);o[0]=d;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s.mdxType="string"==typeof t?t:a,o[1]=s;for(var c=2;c=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),c=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},i=function(e){var t=c(e.components);return r.createElement(u.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,a=e.mdxType,l=e.originalType,u=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),p=c(n),f=a,d=p["".concat(u,".").concat(f)]||p[f]||m[f]||l;return n?r.createElement(d,o(o({ref:t},i),{},{components:n})):r.createElement(d,o({ref:t},i))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=p;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var c=2;c child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),h=null!=d?d:y.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),T=(0,s.l)(h,(function(e,t){return e.value===t.value}));if(T.length>0)throw new Error('Docusaurus error: Duplicate values "'+T.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var g=null===f?f:null!=(t=null!=f?f:null==(n=y.find((function(e){return e.props.default})))?void 0:n.props.value)?t:y[0].props.value;if(null!==g&&!h.some((function(e){return e.value===g})))throw new Error('Docusaurus error: The has a defaultValue "'+g+'" but none of its children has the corresponding value. Available values are: '+h.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var E=(0,u.U)(),k=E.tabGroupChoices,O=E.setTabGroupChoices,w=(0,a.useState)(g),D=w[0],M=w[1],x=[],C=(0,c.o5)().blockElementScrollPositionUntilNextRender;if(null!=b){var L=k[b];null!=L&&L!==D&&h.some((function(e){return e.value===L}))&&M(L)}var _=function(e){var t=e.currentTarget,n=x.indexOf(t),r=h[n].value;r!==D&&(C(t),M(r),null!=b&&O(b,String(r)))},I=function(e){var t,n=null;switch(e.key){case"Enter":_(e);break;case"ArrowRight":var r,a=x.indexOf(e.currentTarget)+1;n=null!=(r=x[a])?r:x[0];break;case"ArrowLeft":var l,o=x.indexOf(e.currentTarget)-1;n=null!=(l=x[o])?l:x[x.length-1]}null==(t=n)||t.focus()};return a.createElement("div",{className:(0,l.Z)("tabs-container",i)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":p},v)},h.map((function(e){var t=e.value,n=e.label,o=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:D===t?0:-1,"aria-selected":D===t,key:t,ref:function(e){return x.push(e)},onKeyDown:I,onClick:_},o,{className:(0,l.Z)("tabs__item",m,null==o?void 0:o.className,{"tabs__item--active":D===t})}),null!=n?n:t)}))),o?(0,a.cloneElement)(y.filter((function(e){return e.props.value===D}))[0],{className:"margin-top--md"}):a.createElement("div",{className:"margin-top--md"},y.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==D})}))))}function f(e){var t=(0,o.Z)();return a.createElement(p,(0,r.Z)({key:String(t)},e))}},1989:function(e,t,n){var r=n(7294),a=n(2263);t.Z=function(e){var t=e.className,n=e.py,l=e.scala,o=e.csharp,s=e.sourceLink,u=(0,a.Z)().siteConfig.customFields.version,c="https://mmlspark.blob.core.windows.net/docs/"+u+"/pyspark/"+n,i="https://mmlspark.blob.core.windows.net/docs/"+u+"/scala/"+l,m="https://mmlspark.blob.core.windows.net/docs/"+u+"/dotnet/"+o;return r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",null,r.createElement("strong",null,"Python API: "),r.createElement("a",{href:c},t)),r.createElement("td",null,r.createElement("strong",null,"Scala API: "),r.createElement("a",{href:i},t)),r.createElement("td",null,r.createElement("strong",null,".NET API: "),r.createElement("a",{href:m},t)),r.createElement("td",null,r.createElement("strong",null,"Source: "),r.createElement("a",{href:s},t)))))}},6202:function(e,t,n){n.r(t),n.d(t,{assets:function(){return y},contentTitle:function(){return b},default:function(){return g},frontMatter:function(){return d},metadata:function(){return v},toc:function(){return h}});var r=n(3117),a=n(102),l=(n(7294),n(3905)),o=n(5488),s=n(5162),u=n(1989),c=["components"],i=[{value:"DoubleMLEstimator",id:"doublemlestimator",level:2}],m={toc:i};function p(e){var t=e.components,n=(0,a.Z)(e,c);return(0,l.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"doublemlestimator"},"DoubleMLEstimator"),(0,l.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.causal import *\nfrom pyspark.ml.classification import LogisticRegression\nfrom pyspark.sql.types import StructType, StructField, DoubleType, IntegerType, BooleanType\n\nschema = StructType([\n StructField("Treatment", BooleanType()),\n StructField("Outcome", BooleanType()),\n StructField("col2", DoubleType()),\n StructField("col3", DoubleType()),\n StructField("col4", DoubleType())\n ])\n\n\ndf = spark.createDataFrame([\n (False, True, 0.30, 0.66, 0.2),\n (True, False, 0.38, 0.53, 1.5),\n (False, True, 0.68, 0.98, 3.2),\n (True, False, 0.15, 0.32, 6.6),\n (False, True, 0.50, 0.65, 2.8),\n (True, True, 0.40, 0.54, 3.7),\n (False, True, 0.78, 0.97, 8.1),\n (True, False, 0.12, 0.32, 10.2),\n (False, True, 0.35, 0.63, 1.8),\n (True, False, 0.45, 0.57, 4.3),\n (False, True, 0.75, 0.97, 7.2),\n (True, True, 0.16, 0.32, 11.7)], schema\n)\n\ndml = (DoubleMLEstimator()\n .setTreatmentCol("Treatment")\n .setTreatmentModel(LogisticRegression())\n .setOutcomeCol("Outcome")\n .setOutcomeModel(LogisticRegression())\n .setMaxIter(20))\n\ndmlModel = dml.fit(df)\ndmlModel.getAvgTreatmentEffect()\ndmlModel.getConfidenceInterval()\n'))),(0,l.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.causal._\nimport org.apache.spark.ml.classification.LogisticRegression\n\nval df = (Seq(\n (false, true, 0.50, 0.60, 0),\n (true, false, 0.40, 0.50, 1),\n (false, true, 0.78, 0.99, 2),\n (true, false, 0.12, 0.34, 3),\n (false, true, 0.50, 0.60, 0),\n (true, false, 0.40, 0.50, 1),\n (false, true, 0.78, 0.99, 2),\n (true, false, 0.12, 0.34, 3),\n (false, false, 0.50, 0.60, 0),\n (true, true, 0.40, 0.50, 1),\n (false, true, 0.78, 0.99, 2),\n (true, false, 0.12, 0.34, 3))\n .toDF("Treatment", "Outcome", "col2", "col3", "col4"))\n\nval dml = (new DoubleMLEstimator()\n .setTreatmentCol("Treatment")\n .setTreatmentModel(new LogisticRegression())\n .setOutcomeCol("Outcome")\n .setOutcomeModel(new LogisticRegression())\n .setMaxIter(20))\n\nval dmlModel = dml.fit(df)\ndmlModel.getAvgTreatmentEffect\ndmlModel.getConfidenceInterval\n')))),(0,l.kt)(u.Z,{className:"DoubleMLEstimator",py:"synapse.ml.causal.html#module-synapse.ml.causal.DoubleMLEstimator",scala:"com/microsoft/azure/synapse/ml/causal/DoubleMLEstimator.html",csharp:"classSynapse_1_1ML_1_1Causal_1_1DoubleMLEstimator.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/causal/DoubleMLEstimator.scala",mdxType:"DocTable"}))}p.isMDXComponent=!0;var f=["components"],d={title:"Estimators - Causal",sidebar_label:"Causal Inference",hide_title:!0},b="Causal Inference",v={unversionedId:"Quick Examples/estimators/estimators_causal",id:"Quick Examples/estimators/estimators_causal",title:"Estimators - Causal",description:"",source:"@site/docs/Quick Examples/estimators/estimators_causal.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_causal",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_causal",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - Causal",sidebar_label:"Causal Inference",hide_title:!0}},y={},h=[].concat(i),T={toc:h};function g(e){var t=e.components,n=(0,a.Z)(e,f);return(0,l.kt)("wrapper",(0,r.Z)({},T,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"causal-inference"},"Causal Inference"),(0,l.kt)(p,{mdxType:"DoubleMLEstimator"}))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/521f9727.5b777e9c.js b/assets/js/521f9727.5b777e9c.js new file mode 100644 index 0000000000..98a5a5d35f --- /dev/null +++ b/assets/js/521f9727.5b777e9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[1333],{3905:function(e,t,n){n.d(t,{Zo:function(){return i},kt:function(){return p}});var r=n(7294);function a(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 o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},i=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)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,i=u(e,["components","mdxType","originalType","parentName"]),f=c(n),p=a,d=f["".concat(s,".").concat(p)]||f[p]||m[p]||l;return n?r.createElement(d,o(o({ref:t},i),{},{components:n})):r.createElement(d,o({ref:t},i))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=f;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u.mdxType="string"==typeof e?e:a,o[1]=u;for(var c=2;c child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function f(e){var t=e.values,n=e.children;return(0,a.useMemo)((function(){var e=null!=t?t:m(n);return function(e){var t=(0,c.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function d(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId,l=(0,u.k6)(),o=function(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:n,groupId:r});return[(0,s._X)(o),(0,a.useCallback)((function(e){if(o){var t=new URLSearchParams(l.location.search);t.set(o,e),l.replace(Object.assign({},l.location,{search:t.toString()}))}}),[o,l])]}function b(e){var t,n,r,l,o=e.defaultValue,u=e.queryString,s=void 0!==u&&u,c=e.groupId,m=f(e),b=(0,a.useState)((function(){return function(e){var t,n=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var a=null!=(t=r.find((function(e){return e.default})))?t:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:o,tabValues:m})})),v=b[0],y=b[1],g=d({queryString:s,groupId:c}),h=g[0],E=g[1],T=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),n=(0,i.Nk)(t),r=n[0],l=n[1],[r,(0,a.useCallback)((function(e){t&&l.set(e)}),[t,l])]),k=T[0],w=T[1],O=function(){var e=null!=h?h:k;return p({value:e,tabValues:m})?e:null}();return(0,a.useLayoutEffect)((function(){O&&y(O)}),[O]),{selectedValue:v,selectValue:(0,a.useCallback)((function(e){if(!p({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);y(e),E(e),w(e)}),[E,w,m]),tabValues:m}}var v=n(2389),y="tabList__CuJ",g="tabItem_LNqP";function h(e){var t=e.className,n=e.block,u=e.selectedValue,s=e.selectValue,c=e.tabValues,i=[],m=(0,o.o5)().blockElementScrollPositionUntilNextRender,f=function(e){var t=e.currentTarget,n=i.indexOf(t),r=c[n].value;r!==u&&(m(t),s(r))},p=function(e){var t,n=null;switch(e.key){case"Enter":f(e);break;case"ArrowRight":var r,a=i.indexOf(e.currentTarget)+1;n=null!=(r=i[a])?r:i[0];break;case"ArrowLeft":var l,o=i.indexOf(e.currentTarget)-1;n=null!=(l=i[o])?l:i[i.length-1]}null==(t=n)||t.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},c.map((function(e){var t=e.value,n=e.label,o=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:function(e){return i.push(e)},onKeyDown:p,onClick:f},o,{className:(0,l.Z)("tabs__item",g,null==o?void 0:o.className,{"tabs__item--active":u===t})}),null!=n?n:t)})))}function E(e){var t=e.lazy,n=e.children,r=e.selectedValue,l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var o=l.find((function(e){return e.props.value===r}));return o?(0,a.cloneElement)(o,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r})})))}function T(e){var t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",y)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(E,(0,r.Z)({},e,t)))}function k(e){var t=(0,v.Z)();return a.createElement(T,(0,r.Z)({key:String(t)},e))}},1989:function(e,t,n){var r=n(7294),a=n(2263);t.Z=function(e){var t=e.className,n=e.py,l=e.scala,o=e.csharp,u=e.sourceLink,s=(0,a.Z)().siteConfig.customFields.version,c="https://mmlspark.blob.core.windows.net/docs/"+s+"/pyspark/"+n,i="https://mmlspark.blob.core.windows.net/docs/"+s+"/scala/"+l,m="https://mmlspark.blob.core.windows.net/docs/"+s+"/dotnet/"+o;return r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",null,r.createElement("strong",null,"Python API: "),r.createElement("a",{href:c},t)),r.createElement("td",null,r.createElement("strong",null,"Scala API: "),r.createElement("a",{href:i},t)),r.createElement("td",null,r.createElement("strong",null,".NET API: "),r.createElement("a",{href:m},t)),r.createElement("td",null,r.createElement("strong",null,"Source: "),r.createElement("a",{href:u},t)))))}},6202:function(e,t,n){n.r(t),n.d(t,{assets:function(){return y},contentTitle:function(){return b},default:function(){return E},frontMatter:function(){return d},metadata:function(){return v},toc:function(){return g}});var r=n(3117),a=n(102),l=(n(7294),n(3905)),o=n(4866),u=n(5162),s=n(1989),c=["components"],i=[{value:"DoubleMLEstimator",id:"doublemlestimator",level:2}],m={toc:i};function f(e){var t=e.components,n=(0,a.Z)(e,c);return(0,l.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"doublemlestimator"},"DoubleMLEstimator"),(0,l.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(u.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.causal import *\nfrom pyspark.ml.classification import LogisticRegression\nfrom pyspark.sql.types import StructType, StructField, DoubleType, IntegerType, BooleanType\n\nschema = StructType([\n StructField("Treatment", BooleanType()),\n StructField("Outcome", BooleanType()),\n StructField("col2", DoubleType()),\n StructField("col3", DoubleType()),\n StructField("col4", DoubleType())\n ])\n\n\ndf = spark.createDataFrame([\n (False, True, 0.30, 0.66, 0.2),\n (True, False, 0.38, 0.53, 1.5),\n (False, True, 0.68, 0.98, 3.2),\n (True, False, 0.15, 0.32, 6.6),\n (False, True, 0.50, 0.65, 2.8),\n (True, True, 0.40, 0.54, 3.7),\n (False, True, 0.78, 0.97, 8.1),\n (True, False, 0.12, 0.32, 10.2),\n (False, True, 0.35, 0.63, 1.8),\n (True, False, 0.45, 0.57, 4.3),\n (False, True, 0.75, 0.97, 7.2),\n (True, True, 0.16, 0.32, 11.7)], schema\n)\n\ndml = (DoubleMLEstimator()\n .setTreatmentCol("Treatment")\n .setTreatmentModel(LogisticRegression())\n .setOutcomeCol("Outcome")\n .setOutcomeModel(LogisticRegression())\n .setMaxIter(20))\n\ndmlModel = dml.fit(df)\ndmlModel.getAvgTreatmentEffect()\ndmlModel.getConfidenceInterval()\n'))),(0,l.kt)(u.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.causal._\nimport org.apache.spark.ml.classification.LogisticRegression\n\nval df = (Seq(\n (false, true, 0.50, 0.60, 0),\n (true, false, 0.40, 0.50, 1),\n (false, true, 0.78, 0.99, 2),\n (true, false, 0.12, 0.34, 3),\n (false, true, 0.50, 0.60, 0),\n (true, false, 0.40, 0.50, 1),\n (false, true, 0.78, 0.99, 2),\n (true, false, 0.12, 0.34, 3),\n (false, false, 0.50, 0.60, 0),\n (true, true, 0.40, 0.50, 1),\n (false, true, 0.78, 0.99, 2),\n (true, false, 0.12, 0.34, 3))\n .toDF("Treatment", "Outcome", "col2", "col3", "col4"))\n\nval dml = (new DoubleMLEstimator()\n .setTreatmentCol("Treatment")\n .setTreatmentModel(new LogisticRegression())\n .setOutcomeCol("Outcome")\n .setOutcomeModel(new LogisticRegression())\n .setMaxIter(20))\n\nval dmlModel = dml.fit(df)\ndmlModel.getAvgTreatmentEffect\ndmlModel.getConfidenceInterval\n')))),(0,l.kt)(s.Z,{className:"DoubleMLEstimator",py:"synapse.ml.causal.html#module-synapse.ml.causal.DoubleMLEstimator",scala:"com/microsoft/azure/synapse/ml/causal/DoubleMLEstimator.html",csharp:"classSynapse_1_1ML_1_1Causal_1_1DoubleMLEstimator.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/causal/DoubleMLEstimator.scala",mdxType:"DocTable"}))}f.isMDXComponent=!0;var p=["components"],d={title:"Estimators - Causal",sidebar_label:"Causal Inference",hide_title:!0},b="Causal Inference",v={unversionedId:"Quick Examples/estimators/estimators_causal",id:"Quick Examples/estimators/estimators_causal",title:"Estimators - Causal",description:"",source:"@site/docs/Quick Examples/estimators/estimators_causal.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_causal",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_causal",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - Causal",sidebar_label:"Causal Inference",hide_title:!0}},y={},g=[].concat(i),h={toc:g};function E(e){var t=e.components,n=(0,a.Z)(e,p);return(0,l.kt)("wrapper",(0,r.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"causal-inference"},"Causal Inference"),(0,l.kt)(f,{mdxType:"DoubleMLEstimator"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6048.3ddf9263.js b/assets/js/6048.370dda06.js similarity index 59% rename from assets/js/6048.3ddf9263.js rename to assets/js/6048.370dda06.js index 178365c49b..128489c382 100644 --- a/assets/js/6048.3ddf9263.js +++ b/assets/js/6048.370dda06.js @@ -1 +1 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[6048],{9058:function(e,t,a){a.d(t,{Z:function(){return _}});var r=a(102),n=a(7294),l=a(6010),o=a(4774),i=a(7524),s=a(9960),m=a(5999),c="sidebar_re4s",u="sidebarItemTitle_pO2u",d="sidebarItemList_Yudw",g="sidebarItem__DBe",f="sidebarItemLink_mo7H",v="sidebarItemLinkActive_I1ZP";function p(e){var t=e.sidebar;return n.createElement("aside",{className:"col col--3"},n.createElement("nav",{className:(0,l.Z)(c,"thin-scrollbar"),"aria-label":(0,m.I)({id:"theme.blog.sidebar.navAriaLabel",message:"Blog recent posts navigation",description:"The ARIA label for recent posts in the blog sidebar"})},n.createElement("div",{className:(0,l.Z)(u,"margin-bottom--md")},t.title),n.createElement("ul",{className:(0,l.Z)(d,"clean-list")},t.items.map((function(e){return n.createElement("li",{key:e.permalink,className:g},n.createElement(s.Z,{isNavLink:!0,to:e.permalink,className:f,activeClassName:v},e.title))})))))}var h=a(3102);function E(e){var t=e.sidebar;return n.createElement("ul",{className:"menu__list"},t.items.map((function(e){return n.createElement("li",{key:e.permalink,className:"menu__list-item"},n.createElement(s.Z,{isNavLink:!0,to:e.permalink,className:"menu__link",activeClassName:"menu__link--active"},e.title))})))}function b(e){return n.createElement(h.Zo,{component:E,props:e})}function P(e){var t=e.sidebar,a=(0,i.i)();return null!=t&&t.items.length?"mobile"===a?n.createElement(b,{sidebar:t}):n.createElement(p,{sidebar:t}):null}var N=["sidebar","toc","children"];function _(e){var t=e.sidebar,a=e.toc,i=e.children,s=(0,r.Z)(e,N),m=t&&t.items.length>0;return n.createElement(o.Z,s,n.createElement("div",{className:"container margin-vert--lg"},n.createElement("div",{className:"row"},n.createElement(P,{sidebar:t}),n.createElement("main",{className:(0,l.Z)("col",{"col--7":m,"col--9 col--offset-1":!m}),itemScope:!0,itemType:"http://schema.org/Blog"},i),a&&n.createElement("div",{className:"col col--2"},a))))}},1286:function(e,t,a){a.d(t,{Z:function(){return O}});var r=a(7294),n=a(6010),l=a(9460),o=a(4996);function i(e){var t,a=e.children,n=e.className,i=(0,l.C)(),s=i.frontMatter,m=i.assets,c=(0,o.C)().withBaseUrl,u=null!=(t=m.image)?t:s.image;return r.createElement("article",{className:n,itemProp:"blogPost",itemScope:!0,itemType:"http://schema.org/BlogPosting"},u&&r.createElement("meta",{itemProp:"image",content:c(u,{absolute:!0})}),a)}var s=a(9960),m="title_f1Hy";function c(e){var t=e.className,a=(0,l.C)(),o=a.metadata,i=a.isBlogPostPage,c=o.permalink,u=o.title,d=i?"h1":"h2";return r.createElement(d,{className:(0,n.Z)(m,t),itemProp:"headline"},i?u:r.createElement(s.Z,{itemProp:"url",to:c},u))}var u=a(5999),d=a(8824),g="container_mt6G";function f(e){var t,a=e.readingTime,n=(t=(0,d.c)().selectMessage,function(e){var a=Math.ceil(e);return t(a,(0,u.I)({id:"theme.blog.post.readingTime.plurals",description:'Pluralized label for "{readingTime} min read". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One min read|{readingTime} min read"},{readingTime:a}))});return r.createElement(r.Fragment,null,n(a))}function v(e){var t=e.date,a=e.formattedDate;return r.createElement("time",{dateTime:t,itemProp:"datePublished"},a)}function p(){return r.createElement(r.Fragment,null," \xb7 ")}function h(e){var t=e.className,a=(0,l.C)().metadata,o=a.date,i=a.formattedDate,s=a.readingTime;return r.createElement("div",{className:(0,n.Z)(g,"margin-vert--md",t)},r.createElement(v,{date:o,formattedDate:i}),void 0!==s&&r.createElement(r.Fragment,null,r.createElement(p,null),r.createElement(f,{readingTime:s})))}function E(e){return e.href?r.createElement(s.Z,e):r.createElement(r.Fragment,null,e.children)}function b(e){var t=e.author,a=e.className,l=t.name,o=t.title,i=t.url,s=t.imageURL,m=t.email,c=i||m&&"mailto:"+m||void 0;return r.createElement("div",{className:(0,n.Z)("avatar margin-bottom--sm",a)},s&&r.createElement(E,{href:c,className:"avatar__photo-link"},r.createElement("img",{className:"avatar__photo",src:s,alt:l})),l&&r.createElement("div",{className:"avatar__intro",itemProp:"author",itemScope:!0,itemType:"https://schema.org/Person"},r.createElement("div",{className:"avatar__name"},r.createElement(E,{href:c,itemProp:"url"},r.createElement("span",{itemProp:"name"},l))),o&&r.createElement("small",{className:"avatar__subtitle",itemProp:"description"},o)))}var P="authorCol_Hf19",N="imageOnlyAuthorRow_pa_O",_="imageOnlyAuthorCol_G86a";function Z(e){var t=e.className,a=(0,l.C)(),o=a.metadata.authors,i=a.assets;if(0===o.length)return null;var s=o.every((function(e){return!e.name}));return r.createElement("div",{className:(0,n.Z)("margin-top--md margin-bottom--sm",s?N:"row",t)},o.map((function(e,t){var a;return r.createElement("div",{className:(0,n.Z)(!s&&"col col--6",s?_:P),key:t},r.createElement(b,{author:Object.assign({},e,{imageURL:null!=(a=i.authorsImageUrls[t])?a:e.imageURL})}))})))}function k(){return r.createElement("header",null,r.createElement(c,null),r.createElement(h,null),r.createElement(Z,null))}var C=a(8780),T=a(883);function w(e){var t=e.children,a=e.className,o=(0,l.C)().isBlogPostPage;return r.createElement("div",{id:o?C.blogPostContainerID:void 0,className:(0,n.Z)("markdown",a),itemProp:"articleBody"},r.createElement(T.Z,null,t))}var y=a(4881),B=a(6233),I=a(3117),F=a(102),M=["blogPostTitle"];function L(){return r.createElement("b",null,r.createElement(u.Z,{id:"theme.blog.post.readMore",description:"The label used in blog post item excerpts to link to full blog posts"},"Read More"))}function R(e){var t=e.blogPostTitle,a=(0,F.Z)(e,M);return r.createElement(s.Z,(0,I.Z)({"aria-label":(0,u.I)({message:"Read more about {title}",id:"theme.blog.post.readMoreLabel",description:"The ARIA label for the link to full blog posts from excerpts"},{title:t})},a),r.createElement(L,null))}var x="blogPostFooterDetailsFull_mRVl";function A(){var e=(0,l.C)(),t=e.metadata,a=e.isBlogPostPage,o=t.tags,i=t.title,s=t.editUrl,m=t.hasTruncateMarker,c=!a&&m,u=o.length>0;return u||c||s?r.createElement("footer",{className:(0,n.Z)("row docusaurus-mt-lg",a&&x)},u&&r.createElement("div",{className:(0,n.Z)("col",{"col--9":c})},r.createElement(B.Z,{tags:o})),a&&s&&r.createElement("div",{className:"col margin-top--sm"},r.createElement(y.Z,{editUrl:s})),c&&r.createElement("div",{className:(0,n.Z)("col text--right",{"col--3":u})},r.createElement(R,{blogPostTitle:i,to:t.permalink}))):null}function O(e){var t=e.children,a=e.className,o=(0,l.C)().isBlogPostPage?void 0:"margin-bottom--xl";return r.createElement(i,{className:(0,n.Z)(o,a)},r.createElement(k,null),r.createElement(w,null,t),r.createElement(A,null))}},9460:function(e,t,a){a.d(t,{C:function(){return i},n:function(){return o}});var r=a(7294),n=a(4700),l=r.createContext(null);function o(e){var t=e.children,a=e.content,n=e.isBlogPostPage,o=function(e){var t=e.content,a=e.isBlogPostPage;return(0,r.useMemo)((function(){return{metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,toc:t.toc,isBlogPostPage:a}}),[t,a])}({content:a,isBlogPostPage:void 0!==n&&n});return r.createElement(l.Provider,{value:o},t)}function i(){var e=(0,r.useContext)(l);if(null===e)throw new n.i6("BlogPostProvider");return e}},8824:function(e,t,a){a.d(t,{c:function(){return m}});var r=a(7294),n=a(2263),l=["zero","one","two","few","many","other"];function o(e){return l.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function s(){var e=(0,n.Z)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,a=new Intl.PluralRules(t),{locale:t,pluralForms:o(a.resolvedOptions().pluralCategories),select:function(e){return a.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,a}),[e])}function m(){var e=s();return{selectMessage:function(t,a){return function(e,t,a){var r=e.split("|");if(1===r.length)return r[0];r.length>a.pluralForms.length&&console.error("For locale="+a.locale+", a maximum of "+a.pluralForms.length+" plural forms are expected ("+a.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var n=a.select(t),l=a.pluralForms.indexOf(n);return r[Math.min(l,r.length-1)]}(a,t,e)}}}}}]); \ No newline at end of file +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[6048],{9058:function(e,t,a){a.d(t,{Z:function(){return _}});var r=a(102),n=a(7294),l=a(6010),o=a(7452),i=a(7524),s=a(9960),m=a(5999),c="sidebar_re4s",u="sidebarItemTitle_pO2u",d="sidebarItemList_Yudw",g="sidebarItem__DBe",f="sidebarItemLink_mo7H",v="sidebarItemLinkActive_I1ZP";function p(e){var t=e.sidebar;return n.createElement("aside",{className:"col col--3"},n.createElement("nav",{className:(0,l.Z)(c,"thin-scrollbar"),"aria-label":(0,m.I)({id:"theme.blog.sidebar.navAriaLabel",message:"Blog recent posts navigation",description:"The ARIA label for recent posts in the blog sidebar"})},n.createElement("div",{className:(0,l.Z)(u,"margin-bottom--md")},t.title),n.createElement("ul",{className:(0,l.Z)(d,"clean-list")},t.items.map((function(e){return n.createElement("li",{key:e.permalink,className:g},n.createElement(s.Z,{isNavLink:!0,to:e.permalink,className:f,activeClassName:v},e.title))})))))}var h=a(3102);function E(e){var t=e.sidebar;return n.createElement("ul",{className:"menu__list"},t.items.map((function(e){return n.createElement("li",{key:e.permalink,className:"menu__list-item"},n.createElement(s.Z,{isNavLink:!0,to:e.permalink,className:"menu__link",activeClassName:"menu__link--active"},e.title))})))}function b(e){return n.createElement(h.Zo,{component:E,props:e})}function P(e){var t=e.sidebar,a=(0,i.i)();return null!=t&&t.items.length?"mobile"===a?n.createElement(b,{sidebar:t}):n.createElement(p,{sidebar:t}):null}var N=["sidebar","toc","children"];function _(e){var t=e.sidebar,a=e.toc,i=e.children,s=(0,r.Z)(e,N),m=t&&t.items.length>0;return n.createElement(o.Z,s,n.createElement("div",{className:"container margin-vert--lg"},n.createElement("div",{className:"row"},n.createElement(P,{sidebar:t}),n.createElement("main",{className:(0,l.Z)("col",{"col--7":m,"col--9 col--offset-1":!m}),itemScope:!0,itemType:"http://schema.org/Blog"},i),a&&n.createElement("div",{className:"col col--2"},a))))}},1286:function(e,t,a){a.d(t,{Z:function(){return O}});var r=a(7294),n=a(6010),l=a(9460),o=a(4996);function i(e){var t,a=e.children,n=e.className,i=(0,l.C)(),s=i.frontMatter,m=i.assets,c=(0,o.C)().withBaseUrl,u=null!=(t=m.image)?t:s.image;return r.createElement("article",{className:n,itemProp:"blogPost",itemScope:!0,itemType:"http://schema.org/BlogPosting"},u&&r.createElement("meta",{itemProp:"image",content:c(u,{absolute:!0})}),a)}var s=a(9960),m="title_f1Hy";function c(e){var t=e.className,a=(0,l.C)(),o=a.metadata,i=a.isBlogPostPage,c=o.permalink,u=o.title,d=i?"h1":"h2";return r.createElement(d,{className:(0,n.Z)(m,t),itemProp:"headline"},i?u:r.createElement(s.Z,{itemProp:"url",to:c},u))}var u=a(5999),d=a(8824),g="container_mt6G";function f(e){var t,a=e.readingTime,n=(t=(0,d.c)().selectMessage,function(e){var a=Math.ceil(e);return t(a,(0,u.I)({id:"theme.blog.post.readingTime.plurals",description:'Pluralized label for "{readingTime} min read". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One min read|{readingTime} min read"},{readingTime:a}))});return r.createElement(r.Fragment,null,n(a))}function v(e){var t=e.date,a=e.formattedDate;return r.createElement("time",{dateTime:t,itemProp:"datePublished"},a)}function p(){return r.createElement(r.Fragment,null," \xb7 ")}function h(e){var t=e.className,a=(0,l.C)().metadata,o=a.date,i=a.formattedDate,s=a.readingTime;return r.createElement("div",{className:(0,n.Z)(g,"margin-vert--md",t)},r.createElement(v,{date:o,formattedDate:i}),void 0!==s&&r.createElement(r.Fragment,null,r.createElement(p,null),r.createElement(f,{readingTime:s})))}function E(e){return e.href?r.createElement(s.Z,e):r.createElement(r.Fragment,null,e.children)}function b(e){var t=e.author,a=e.className,l=t.name,o=t.title,i=t.url,s=t.imageURL,m=t.email,c=i||m&&"mailto:"+m||void 0;return r.createElement("div",{className:(0,n.Z)("avatar margin-bottom--sm",a)},s&&r.createElement(E,{href:c,className:"avatar__photo-link"},r.createElement("img",{className:"avatar__photo",src:s,alt:l})),l&&r.createElement("div",{className:"avatar__intro",itemProp:"author",itemScope:!0,itemType:"https://schema.org/Person"},r.createElement("div",{className:"avatar__name"},r.createElement(E,{href:c,itemProp:"url"},r.createElement("span",{itemProp:"name"},l))),o&&r.createElement("small",{className:"avatar__subtitle",itemProp:"description"},o)))}var P="authorCol_Hf19",N="imageOnlyAuthorRow_pa_O",_="imageOnlyAuthorCol_G86a";function Z(e){var t=e.className,a=(0,l.C)(),o=a.metadata.authors,i=a.assets;if(0===o.length)return null;var s=o.every((function(e){return!e.name}));return r.createElement("div",{className:(0,n.Z)("margin-top--md margin-bottom--sm",s?N:"row",t)},o.map((function(e,t){var a;return r.createElement("div",{className:(0,n.Z)(!s&&"col col--6",s?_:P),key:t},r.createElement(b,{author:Object.assign({},e,{imageURL:null!=(a=i.authorsImageUrls[t])?a:e.imageURL})}))})))}function k(){return r.createElement("header",null,r.createElement(c,null),r.createElement(h,null),r.createElement(Z,null))}var C=a(8780),T=a(9549);function w(e){var t=e.children,a=e.className,o=(0,l.C)().isBlogPostPage;return r.createElement("div",{id:o?C.blogPostContainerID:void 0,className:(0,n.Z)("markdown",a),itemProp:"articleBody"},r.createElement(T.Z,null,t))}var y=a(4881),B=a(6233),I=a(3117),F=a(102),M=["blogPostTitle"];function L(){return r.createElement("b",null,r.createElement(u.Z,{id:"theme.blog.post.readMore",description:"The label used in blog post item excerpts to link to full blog posts"},"Read More"))}function R(e){var t=e.blogPostTitle,a=(0,F.Z)(e,M);return r.createElement(s.Z,(0,I.Z)({"aria-label":(0,u.I)({message:"Read more about {title}",id:"theme.blog.post.readMoreLabel",description:"The ARIA label for the link to full blog posts from excerpts"},{title:t})},a),r.createElement(L,null))}var x="blogPostFooterDetailsFull_mRVl";function A(){var e=(0,l.C)(),t=e.metadata,a=e.isBlogPostPage,o=t.tags,i=t.title,s=t.editUrl,m=t.hasTruncateMarker,c=!a&&m,u=o.length>0;return u||c||s?r.createElement("footer",{className:(0,n.Z)("row docusaurus-mt-lg",a&&x)},u&&r.createElement("div",{className:(0,n.Z)("col",{"col--9":c})},r.createElement(B.Z,{tags:o})),a&&s&&r.createElement("div",{className:"col margin-top--sm"},r.createElement(y.Z,{editUrl:s})),c&&r.createElement("div",{className:(0,n.Z)("col text--right",{"col--3":u})},r.createElement(R,{blogPostTitle:i,to:t.permalink}))):null}function O(e){var t=e.children,a=e.className,o=(0,l.C)().isBlogPostPage?void 0:"margin-bottom--xl";return r.createElement(i,{className:(0,n.Z)(o,a)},r.createElement(k,null),r.createElement(w,null,t),r.createElement(A,null))}},9460:function(e,t,a){a.d(t,{C:function(){return i},n:function(){return o}});var r=a(7294),n=a(4700),l=r.createContext(null);function o(e){var t=e.children,a=e.content,n=e.isBlogPostPage,o=function(e){var t=e.content,a=e.isBlogPostPage;return(0,r.useMemo)((function(){return{metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,toc:t.toc,isBlogPostPage:a}}),[t,a])}({content:a,isBlogPostPage:void 0!==n&&n});return r.createElement(l.Provider,{value:o},t)}function i(){var e=(0,r.useContext)(l);if(null===e)throw new n.i6("BlogPostProvider");return e}},8824:function(e,t,a){a.d(t,{c:function(){return m}});var r=a(7294),n=a(2263),l=["zero","one","two","few","many","other"];function o(e){return l.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function s(){var e=(0,n.Z)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,a=new Intl.PluralRules(t),{locale:t,pluralForms:o(a.resolvedOptions().pluralCategories),select:function(e){return a.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,a}),[e])}function m(){var e=s();return{selectMessage:function(t,a){return function(e,t,a){var r=e.split("|");if(1===r.length)return r[0];r.length>a.pluralForms.length&&console.error("For locale="+a.locale+", a maximum of "+a.pluralForms.length+" plural forms are expected ("+a.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var n=a.select(t),l=a.pluralForms.indexOf(n);return r[Math.min(l,r.length-1)]}(a,t,e)}}}}}]); \ No newline at end of file diff --git a/assets/js/69bb4b11.0518e868.js b/assets/js/69bb4b11.0518e868.js new file mode 100644 index 0000000000..c9e89b9a3c --- /dev/null +++ b/assets/js/69bb4b11.0518e868.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[288],{3905:function(e,n,r){r.d(n,{Zo:function(){return i},kt:function(){return f}});var t=r(7294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function l(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var u=t.createContext({}),c=function(e){var n=t.useContext(u),r=n;return e&&(r="function"==typeof e?e(n):l(l({},n),e)),r},i=function(e){var n=c(e.components);return t.createElement(u.Provider,{value:n},e.children)},m={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},p=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),p=c(r),f=a,d=p["".concat(u,".").concat(f)]||p[f]||m[f]||o;return r?t.createElement(d,l(l({ref:n},i),{},{components:r})):t.createElement(d,l({ref:n},i))}));function f(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=p;var s={};for(var u in n)hasOwnProperty.call(n,u)&&(s[u]=n[u]);s.originalType=e,s.mdxType="string"==typeof e?e:a,l[1]=s;for(var c=2;c child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?n:[]}(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}function p(e){var n=e.values,r=e.children;return(0,a.useMemo)((function(){var e=null!=n?n:m(r);return function(e){var n=(0,c.l)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,r])}function f(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function d(e){var n=e.queryString,r=void 0!==n&&n,t=e.groupId,o=(0,s.k6)(),l=function(e){var n=e.queryString,r=void 0!==n&&n,t=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=t?t:null}({queryString:r,groupId:t});return[(0,u._X)(l),(0,a.useCallback)((function(e){if(l){var n=new URLSearchParams(o.location.search);n.set(l,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[l,o])]}function v(e){var n,r,t,o,l=e.defaultValue,s=e.queryString,u=void 0!==s&&s,c=e.groupId,m=p(e),v=(0,a.useState)((function(){return function(e){var n,r=e.defaultValue,t=e.tabValues;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!f({value:r,tabValues:t}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+t.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var a=null!=(n=t.find((function(e){return e.default})))?n:t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:l,tabValues:m})})),b=v[0],g=v[1],y=d({queryString:u,groupId:c}),h=y[0],w=y[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:c}.groupId),r=(0,i.Nk)(n),t=r[0],o=r[1],[t,(0,a.useCallback)((function(e){n&&o.set(e)}),[n,o])]),T=k[0],E=k[1],I=function(){var e=null!=h?h:T;return f({value:e,tabValues:m})?e:null}();return(0,a.useLayoutEffect)((function(){I&&g(I)}),[I]),{selectedValue:b,selectValue:(0,a.useCallback)((function(e){if(!f({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);g(e),w(e),E(e)}),[w,E,m]),tabValues:m}}var b=r(2389),g="tabList__CuJ",y="tabItem_LNqP";function h(e){var n=e.className,r=e.block,s=e.selectedValue,u=e.selectValue,c=e.tabValues,i=[],m=(0,l.o5)().blockElementScrollPositionUntilNextRender,p=function(e){var n=e.currentTarget,r=i.indexOf(n),t=c[r].value;t!==s&&(m(n),u(t))},f=function(e){var n,r=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":var t,a=i.indexOf(e.currentTarget)+1;r=null!=(t=i[a])?t:i[0];break;case"ArrowLeft":var o,l=i.indexOf(e.currentTarget)-1;r=null!=(o=i[l])?o:i[i.length-1]}null==(n=r)||n.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},n)},c.map((function(e){var n=e.value,r=e.label,l=e.attributes;return a.createElement("li",(0,t.Z)({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,key:n,ref:function(e){return i.push(e)},onKeyDown:f,onClick:p},l,{className:(0,o.Z)("tabs__item",y,null==l?void 0:l.className,{"tabs__item--active":s===n})}),null!=r?r:n)})))}function w(e){var n=e.lazy,r=e.children,t=e.selectedValue,o=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){var l=o.find((function(e){return e.props.value===t}));return l?(0,a.cloneElement)(l,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==t})})))}function k(e){var n=v(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g)},a.createElement(h,(0,t.Z)({},e,n)),a.createElement(w,(0,t.Z)({},e,n)))}function T(e){var n=(0,b.Z)();return a.createElement(k,(0,t.Z)({key:String(n)},e))}},1989:function(e,n,r){var t=r(7294),a=r(2263);n.Z=function(e){var n=e.className,r=e.py,o=e.scala,l=e.csharp,s=e.sourceLink,u=(0,a.Z)().siteConfig.customFields.version,c="https://mmlspark.blob.core.windows.net/docs/"+u+"/pyspark/"+r,i="https://mmlspark.blob.core.windows.net/docs/"+u+"/scala/"+o,m="https://mmlspark.blob.core.windows.net/docs/"+u+"/dotnet/"+l;return t.createElement("table",null,t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",null,t.createElement("strong",null,"Python API: "),t.createElement("a",{href:c},n)),t.createElement("td",null,t.createElement("strong",null,"Scala API: "),t.createElement("a",{href:i},n)),t.createElement("td",null,t.createElement("strong",null,".NET API: "),t.createElement("a",{href:m},n)),t.createElement("td",null,t.createElement("strong",null,"Source: "),t.createElement("a",{href:s},n)))))}},4233:function(e,n,r){r.r(n),r.d(n,{assets:function(){return g},contentTitle:function(){return v},default:function(){return w},frontMatter:function(){return d},metadata:function(){return b},toc:function(){return y}});var t=r(3117),a=r(102),o=(r(7294),r(3905)),l=r(4866),s=r(5162),u=r(1989),c=["components"],i=[{value:"ImageTransformer",id:"imagetransformer",level:2},{value:"ImageSetAugmenter",id:"imagesetaugmenter",level:2}],m={toc:i};function p(e){var n=e.components,r=(0,a.Z)(e,c);return(0,o.kt)("wrapper",(0,t.Z)({},m,r,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"imagetransformer"},"ImageTransformer"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.opencv import *\nfrom pyspark.sql.types import FloatType\n\n# images = (spark.read.format("image")\n# .option("dropInvalid", True)\n# .load("wasbs://publicwasb@mmlspark.blob.core.windows.net/explainers/images/david-lusvardi-dWcUncxocQY-unsplash.jpg"))\n\nit = (ImageTransformer(inputCol="image", outputCol="features")\n .resize(224, True)\n .centerCrop(height=224, width=224)\n .normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], color_scale_factor = 1/255)\n .setTensorElementType(FloatType()))\n\n# it.transform(images).show()\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.opencv._\n\nval images = (spark.read.format("image")\n .option("dropInvalid", true)\n .load("wasbs://publicwasb@mmlspark.blob.core.windows.net/explainers/images/david-lusvardi-dWcUncxocQY-unsplash.jpg"))\n\nval it = (new ImageTransformer()\n .setOutputCol("out")\n .resize(height = 15, width = 10))\n\nit.transform(images).show()\n')))),(0,o.kt)(u.Z,{className:"ImageTransformer",py:"synapse.ml.opencv.html#module-synapse.ml.opencv.ImageTransformer",scala:"com/microsoft/azure/synapse/ml/opencv/ImageTransformer.html",csharp:"classSynapse_1_1ML_1_1Opencv_1_1ImageTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/opencv/src/main/scala/com/microsoft/azure/synapse/ml/opencv/ImageTransformer.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"imagesetaugmenter"},"ImageSetAugmenter"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.opencv import *\n\n# images = (spark.read.format("image")\n# .option("dropInvalid", True)\n# .load("wasbs://publicwasb@mmlspark.blob.core.windows.net/explainers/images/david-lusvardi-dWcUncxocQY-unsplash.jpg"))\n\nisa = (ImageSetAugmenter()\n .setInputCol("image")\n .setOutputCol("augmented")\n .setFlipLeftRight(True)\n .setFlipUpDown(True))\n\n# it.transform(images).show()\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.opencv._\n\nval images = (spark.read.format("image")\n .option("dropInvalid", true)\n .load("wasbs://publicwasb@mmlspark.blob.core.windows.net/explainers/images/david-lusvardi-dWcUncxocQY-unsplash.jpg"))\n\nval isa = (new ImageSetAugmenter()\n .setInputCol("image")\n .setOutputCol("augmented")\n .setFlipLeftRight(true)\n .setFlipUpDown(true))\n\nisa.transform(images).show()\n')))),(0,o.kt)(u.Z,{className:"ImageSetAugmenter",py:"synapse.ml.opencv.html#module-synapse.ml.opencv.ImageSetAugmenter",scala:"com/microsoft/azure/synapse/ml/opencv/ImageSetAugmenter.html",csharp:"classSynapse_1_1ML_1_1Opencv_1_1ImageSetAugmenter.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/opencv/src/main/scala/com/microsoft/azure/synapse/ml/opencv/ImageSetAugmenter.scala",mdxType:"DocTable"}))}p.isMDXComponent=!0;var f=["components"],d={title:"Transformers - OpenCV",sidebar_label:"OpenCV",hide_title:!0},v="OpenCV",b={unversionedId:"Quick Examples/transformers/transformers_opencv",id:"Quick Examples/transformers/transformers_opencv",title:"Transformers - OpenCV",description:"",source:"@site/docs/Quick Examples/transformers/transformers_opencv.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_opencv",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_opencv",draft:!1,tags:[],version:"current",frontMatter:{title:"Transformers - OpenCV",sidebar_label:"OpenCV",hide_title:!0}},g={},y=[].concat(i),h={toc:y};function w(e){var n=e.components,r=(0,a.Z)(e,f);return(0,o.kt)("wrapper",(0,t.Z)({},h,r,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"opencv"},"OpenCV"),(0,o.kt)(p,{mdxType:"OpenCV"}))}w.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/69bb4b11.1da2b477.js b/assets/js/69bb4b11.1da2b477.js deleted file mode 100644 index 17252db311..0000000000 --- a/assets/js/69bb4b11.1da2b477.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[288],{3905:function(e,n,t){t.d(n,{Zo:function(){return i},kt:function(){return f}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),c=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},i=function(e){var n=c(e.components);return r.createElement(u.Provider,{value:n},e.children)},m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},p=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),p=c(t),f=a,d=p["".concat(u,".").concat(f)]||p[f]||m[f]||o;return t?r.createElement(d,l(l({ref:n},i),{},{components:t})):r.createElement(d,l({ref:n},i))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,l=new Array(o);l[0]=p;var s={};for(var u in n)hasOwnProperty.call(n,u)&&(s[u]=n[u]);s.originalType=e,s.mdxType="string"==typeof e?e:a,l[1]=s;for(var c=2;c child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),y=null!=d?d:g.map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes}})),h=(0,s.l)(y,(function(e,n){return e.value===n.value}));if(h.length>0)throw new Error('Docusaurus error: Duplicate values "'+h.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var k=null===f?f:null!=(n=null!=f?f:null==(t=g.find((function(e){return e.props.default})))?void 0:t.props.value)?n:g[0].props.value;if(null!==k&&!y.some((function(e){return e.value===k})))throw new Error('Docusaurus error: The has a defaultValue "'+k+'" but none of its children has the corresponding value. Available values are: '+y.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var w=(0,u.U)(),T=w.tabGroupChoices,E=w.setTabGroupChoices,O=(0,a.useState)(k),I=O[0],x=O[1],_=[],C=(0,c.o5)().blockElementScrollPositionUntilNextRender;if(null!=v){var N=T[v];null!=N&&N!==I&&y.some((function(e){return e.value===N}))&&x(N)}var S=function(e){var n=e.currentTarget,t=_.indexOf(n),r=y[t].value;r!==I&&(C(n),x(r),null!=v&&E(v,String(r)))},Z=function(e){var n,t=null;switch(e.key){case"Enter":S(e);break;case"ArrowRight":var r,a=_.indexOf(e.currentTarget)+1;t=null!=(r=_[a])?r:_[0];break;case"ArrowLeft":var o,l=_.indexOf(e.currentTarget)-1;t=null!=(o=_[l])?o:_[_.length-1]}null==(n=t)||n.focus()};return a.createElement("div",{className:(0,o.Z)("tabs-container",i)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":p},b)},y.map((function(e){var n=e.value,t=e.label,l=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:I===n?0:-1,"aria-selected":I===n,key:n,ref:function(e){return _.push(e)},onKeyDown:Z,onClick:S},l,{className:(0,o.Z)("tabs__item",m,null==l?void 0:l.className,{"tabs__item--active":I===n})}),null!=t?t:n)}))),l?(0,a.cloneElement)(g.filter((function(e){return e.props.value===I}))[0],{className:"margin-top--md"}):a.createElement("div",{className:"margin-top--md"},g.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==I})}))))}function f(e){var n=(0,l.Z)();return a.createElement(p,(0,r.Z)({key:String(n)},e))}},1989:function(e,n,t){var r=t(7294),a=t(2263);n.Z=function(e){var n=e.className,t=e.py,o=e.scala,l=e.csharp,s=e.sourceLink,u=(0,a.Z)().siteConfig.customFields.version,c="https://mmlspark.blob.core.windows.net/docs/"+u+"/pyspark/"+t,i="https://mmlspark.blob.core.windows.net/docs/"+u+"/scala/"+o,m="https://mmlspark.blob.core.windows.net/docs/"+u+"/dotnet/"+l;return r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",null,r.createElement("strong",null,"Python API: "),r.createElement("a",{href:c},n)),r.createElement("td",null,r.createElement("strong",null,"Scala API: "),r.createElement("a",{href:i},n)),r.createElement("td",null,r.createElement("strong",null,".NET API: "),r.createElement("a",{href:m},n)),r.createElement("td",null,r.createElement("strong",null,"Source: "),r.createElement("a",{href:s},n)))))}},4233:function(e,n,t){t.r(n),t.d(n,{assets:function(){return g},contentTitle:function(){return v},default:function(){return k},frontMatter:function(){return d},metadata:function(){return b},toc:function(){return y}});var r=t(3117),a=t(102),o=(t(7294),t(3905)),l=t(5488),s=t(5162),u=t(1989),c=["components"],i=[{value:"ImageTransformer",id:"imagetransformer",level:2},{value:"ImageSetAugmenter",id:"imagesetaugmenter",level:2}],m={toc:i};function p(e){var n=e.components,t=(0,a.Z)(e,c);return(0,o.kt)("wrapper",(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"imagetransformer"},"ImageTransformer"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.opencv import *\nfrom pyspark.sql.types import FloatType\n\n# images = (spark.read.format("image")\n# .option("dropInvalid", True)\n# .load("wasbs://publicwasb@mmlspark.blob.core.windows.net/explainers/images/david-lusvardi-dWcUncxocQY-unsplash.jpg"))\n\nit = (ImageTransformer(inputCol="image", outputCol="features")\n .resize(224, True)\n .centerCrop(height=224, width=224)\n .normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], color_scale_factor = 1/255)\n .setTensorElementType(FloatType()))\n\n# it.transform(images).show()\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.opencv._\n\nval images = (spark.read.format("image")\n .option("dropInvalid", true)\n .load("wasbs://publicwasb@mmlspark.blob.core.windows.net/explainers/images/david-lusvardi-dWcUncxocQY-unsplash.jpg"))\n\nval it = (new ImageTransformer()\n .setOutputCol("out")\n .resize(height = 15, width = 10))\n\nit.transform(images).show()\n')))),(0,o.kt)(u.Z,{className:"ImageTransformer",py:"synapse.ml.opencv.html#module-synapse.ml.opencv.ImageTransformer",scala:"com/microsoft/azure/synapse/ml/opencv/ImageTransformer.html",csharp:"classSynapse_1_1ML_1_1Opencv_1_1ImageTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/opencv/src/main/scala/com/microsoft/azure/synapse/ml/opencv/ImageTransformer.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"imagesetaugmenter"},"ImageSetAugmenter"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.opencv import *\n\n# images = (spark.read.format("image")\n# .option("dropInvalid", True)\n# .load("wasbs://publicwasb@mmlspark.blob.core.windows.net/explainers/images/david-lusvardi-dWcUncxocQY-unsplash.jpg"))\n\nisa = (ImageSetAugmenter()\n .setInputCol("image")\n .setOutputCol("augmented")\n .setFlipLeftRight(True)\n .setFlipUpDown(True))\n\n# it.transform(images).show()\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.opencv._\n\nval images = (spark.read.format("image")\n .option("dropInvalid", true)\n .load("wasbs://publicwasb@mmlspark.blob.core.windows.net/explainers/images/david-lusvardi-dWcUncxocQY-unsplash.jpg"))\n\nval isa = (new ImageSetAugmenter()\n .setInputCol("image")\n .setOutputCol("augmented")\n .setFlipLeftRight(true)\n .setFlipUpDown(true))\n\nisa.transform(images).show()\n')))),(0,o.kt)(u.Z,{className:"ImageSetAugmenter",py:"synapse.ml.opencv.html#module-synapse.ml.opencv.ImageSetAugmenter",scala:"com/microsoft/azure/synapse/ml/opencv/ImageSetAugmenter.html",csharp:"classSynapse_1_1ML_1_1Opencv_1_1ImageSetAugmenter.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/opencv/src/main/scala/com/microsoft/azure/synapse/ml/opencv/ImageSetAugmenter.scala",mdxType:"DocTable"}))}p.isMDXComponent=!0;var f=["components"],d={title:"Transformers - OpenCV",sidebar_label:"OpenCV",hide_title:!0},v="OpenCV",b={unversionedId:"Quick Examples/transformers/transformers_opencv",id:"Quick Examples/transformers/transformers_opencv",title:"Transformers - OpenCV",description:"",source:"@site/docs/Quick Examples/transformers/transformers_opencv.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_opencv",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_opencv",draft:!1,tags:[],version:"current",frontMatter:{title:"Transformers - OpenCV",sidebar_label:"OpenCV",hide_title:!0}},g={},y=[].concat(i),h={toc:y};function k(e){var n=e.components,t=(0,a.Z)(e,f);return(0,o.kt)("wrapper",(0,r.Z)({},h,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"opencv"},"OpenCV"),(0,o.kt)(p,{mdxType:"OpenCV"}))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7780.a098a211.js b/assets/js/7780.a098a211.js new file mode 100644 index 0000000000..f8f3efad40 --- /dev/null +++ b/assets/js/7780.a098a211.js @@ -0,0 +1,2 @@ +/*! For license information please see 7780.a098a211.js.LICENSE.txt */ +(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[7780],{5162:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7294),a=n(6010),o="tabItem_Ymn6";function l(e){var t=e.children,n=e.hidden,l=e.className;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o,l),hidden:n},t)}},4866:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(3117),a=n(7294),o=n(6010),l=n(2466),u=n(6550),i=n(1980),s=n(7392),c=n(12);function p(e){return function(e){var t,n;return null!=(t=null==(n=a.Children.map(e,(function(e){if(!e||(0,a.isValidElement)(e)&&(t=e.props)&&"object"==typeof t&&"value"in t)return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function f(e){var t=e.values,n=e.children;return(0,a.useMemo)((function(){var e=null!=t?t:p(n);return function(e){var t=(0,s.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function d(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function v(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId,o=(0,u.k6)(),l=function(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:n,groupId:r});return[(0,i._X)(l),(0,a.useCallback)((function(e){if(l){var t=new URLSearchParams(o.location.search);t.set(l,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[l,o])]}function y(e){var t,n,r,o,l=e.defaultValue,u=e.queryString,i=void 0!==u&&u,s=e.groupId,p=f(e),y=(0,a.useState)((function(){return function(e){var t,n=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var a=null!=(t=r.find((function(e){return e.default})))?t:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:l,tabValues:p})})),h=y[0],m=y[1],g=v({queryString:i,groupId:s}),b=g[0],k=g[1],w=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:s}.groupId),n=(0,c.Nk)(t),r=n[0],o=n[1],[r,(0,a.useCallback)((function(e){t&&o.set(e)}),[t,o])]),E=w[0],T=w[1],S=function(){var e=null!=b?b:E;return d({value:e,tabValues:p})?e:null}();return(0,a.useLayoutEffect)((function(){S&&m(S)}),[S]),{selectedValue:h,selectValue:(0,a.useCallback)((function(e){if(!d({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);m(e),k(e),T(e)}),[k,T,p]),tabValues:p}}var h=n(2389),m="tabList__CuJ",g="tabItem_LNqP";function b(e){var t=e.className,n=e.block,u=e.selectedValue,i=e.selectValue,s=e.tabValues,c=[],p=(0,l.o5)().blockElementScrollPositionUntilNextRender,f=function(e){var t=e.currentTarget,n=c.indexOf(t),r=s[n].value;r!==u&&(p(t),i(r))},d=function(e){var t,n=null;switch(e.key){case"Enter":f(e);break;case"ArrowRight":var r,a=c.indexOf(e.currentTarget)+1;n=null!=(r=c[a])?r:c[0];break;case"ArrowLeft":var o,l=c.indexOf(e.currentTarget)-1;n=null!=(o=c[l])?o:c[c.length-1]}null==(t=n)||t.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},s.map((function(e){var t=e.value,n=e.label,l=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:function(e){return c.push(e)},onKeyDown:d,onClick:f},l,{className:(0,o.Z)("tabs__item",g,null==l?void 0:l.className,{"tabs__item--active":u===t})}),null!=n?n:t)})))}function k(e){var t=e.lazy,n=e.children,r=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var l=o.find((function(e){return e.props.value===r}));return l?(0,a.cloneElement)(l,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r})})))}function w(e){var t=y(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",m)},a.createElement(b,(0,r.Z)({},e,t)),a.createElement(k,(0,r.Z)({},e,t)))}function E(e){var t=(0,h.Z)();return a.createElement(w,(0,r.Z)({key:String(t)},e))}},4184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t0&&e[n-1]===t?e:e.concat(t)},f=function(e,t){var n=e.plain,r=Object.create(null),a=e.styles.reduce((function(e,n){var r=n.languages,a=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=i({},e[t],a);e[t]=n})),e}),r);return a.root=n,a.plain=i({},n,{backgroundColor:null}),a};function d(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var v=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),u(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?f(e.theme,e.language):void 0;return t.themeDict=n})),u(this,"getLineProps",(function(e){var n=e.key,r=e.className,a=e.style,o=i({},d(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),l=t.getThemeDict(t.props);return void 0!==l&&(o.style=l.plain),void 0!==a&&(o.style=void 0!==o.style?i({},o.style,a):a),void 0!==n&&(o.key=n),r&&(o.className+=" "+r),o})),u(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,a=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===a&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===a&&!r)return o[n[0]];var l=r?{display:"inline-block"}:{},u=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[l].concat(u))}})),u(this,"getTokenProps",(function(e){var n=e.key,r=e.className,a=e.style,o=e.token,l=i({},d(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==a&&(l.style=void 0!==l.style?i({},l.style,a):a),void 0!==n&&(l.key=n),r&&(l.className+=" "+r),l})),u(this,"tokenize",(function(e,t,n,r){var a={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",a);var o=a.tokens=e.tokenize(a.code,a.grammar,a.language);return e.hooks.run("after-tokenize",a),o}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,a=e.children,o=this.getThemeDict(this.props),l=t.languages[n];return a({tokens:function(e){for(var t=[[]],n=[e],r=[0],a=[e.length],o=0,l=0,u=[],i=[u];l>-1;){for(;(o=r[l]++)0?d:["plain"],f=v):(d=p(d,v.type),v.alias&&(d=p(d,v.alias)),f=v.content),"string"==typeof f){var y=f.split(s),h=y.length;u.push({types:d,content:y[0]});for(var m=1;m0&&(u=l.getRangeAt(0)),r.append(a),a.select(),a.selectionStart=0,a.selectionEnd=e.length;var i=!1;try{i=document.execCommand("copy")}catch(s){}return a.remove(),u&&(l.removeAllRanges(),l.addRange(u)),o&&o.focus(),i}n.d(t,{Z:function(){return r}})}}]); \ No newline at end of file diff --git a/assets/js/c4f5d8e4.da99a3f5.js.LICENSE.txt b/assets/js/7780.a098a211.js.LICENSE.txt similarity index 100% rename from assets/js/c4f5d8e4.da99a3f5.js.LICENSE.txt rename to assets/js/7780.a098a211.js.LICENSE.txt diff --git a/assets/js/792eae7e.164ee831.js b/assets/js/792eae7e.164ee831.js new file mode 100644 index 0000000000..0893a89c39 --- /dev/null +++ b/assets/js/792eae7e.164ee831.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[4275],{3905:function(e,t,r){r.d(t,{Zo:function(){return c},kt:function(){return g}});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),u=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},c=function(e){var t=u(e.components);return a.createElement(i.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(r),g=n,f=p["".concat(i,".").concat(g)]||p[g]||m[g]||l;return r?a.createElement(f,s(s({ref:t},c),{},{components:r})):a.createElement(f,s({ref:t},c))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=r.length,s=new Array(l);s[0]=p;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o.mdxType="string"==typeof e?e:n,s[1]=o;for(var u=2;u child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function p(e){var t=e.values,r=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:m(r);return function(e){var t=(0,u.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,r])}function g(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId,l=(0,o.k6)(),s=function(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:r,groupId:a});return[(0,i._X)(s),(0,n.useCallback)((function(e){if(s){var t=new URLSearchParams(l.location.search);t.set(s,e),l.replace(Object.assign({},l.location,{search:t.toString()}))}}),[s,l])]}function b(e){var t,r,a,l,s=e.defaultValue,o=e.queryString,i=void 0!==o&&o,u=e.groupId,m=p(e),b=(0,n.useState)((function(){return function(e){var t,r=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!g({value:r,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var n=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:s,tabValues:m})})),h=b[0],d=b[1],y=f({queryString:i,groupId:u}),v=y[0],k=y[1],L=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,c.Nk)(t),a=r[0],l=r[1],[a,(0,n.useCallback)((function(e){t&&l.set(e)}),[t,l])]),E=L[0],w=L[1],M=function(){var e=null!=v?v:E;return g({value:e,tabValues:m})?e:null}();return(0,n.useLayoutEffect)((function(){M&&d(M)}),[M]),{selectedValue:h,selectValue:(0,n.useCallback)((function(e){if(!g({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);d(e),k(e),w(e)}),[k,w,m]),tabValues:m}}var h=r(2389),d="tabList__CuJ",y="tabItem_LNqP";function v(e){var t=e.className,r=e.block,o=e.selectedValue,i=e.selectValue,u=e.tabValues,c=[],m=(0,s.o5)().blockElementScrollPositionUntilNextRender,p=function(e){var t=e.currentTarget,r=c.indexOf(t),a=u[r].value;a!==o&&(m(t),i(a))},g=function(e){var t,r=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":var a,n=c.indexOf(e.currentTarget)+1;r=null!=(a=c[n])?a:c[0];break;case"ArrowLeft":var l,s=c.indexOf(e.currentTarget)-1;r=null!=(l=c[s])?l:c[c.length-1]}null==(t=r)||t.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},u.map((function(e){var t=e.value,r=e.label,s=e.attributes;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:function(e){return c.push(e)},onKeyDown:g,onClick:p},s,{className:(0,l.Z)("tabs__item",y,null==s?void 0:s.className,{"tabs__item--active":o===t})}),null!=r?r:t)})))}function k(e){var t=e.lazy,r=e.children,a=e.selectedValue,l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){var s=l.find((function(e){return e.props.value===a}));return s?(0,n.cloneElement)(s,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function L(e){var t=b(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",d)},n.createElement(v,(0,a.Z)({},e,t)),n.createElement(k,(0,a.Z)({},e,t)))}function E(e){var t=(0,h.Z)();return n.createElement(L,(0,a.Z)({key:String(t)},e))}},1989:function(e,t,r){var a=r(7294),n=r(2263);t.Z=function(e){var t=e.className,r=e.py,l=e.scala,s=e.csharp,o=e.sourceLink,i=(0,n.Z)().siteConfig.customFields.version,u="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+r,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+l,m="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+s;return a.createElement("table",null,a.createElement("tbody",null,a.createElement("tr",null,a.createElement("td",null,a.createElement("strong",null,"Python API: "),a.createElement("a",{href:u},t)),a.createElement("td",null,a.createElement("strong",null,"Scala API: "),a.createElement("a",{href:c},t)),a.createElement("td",null,a.createElement("strong",null,".NET API: "),a.createElement("a",{href:m},t)),a.createElement("td",null,a.createElement("strong",null,"Source: "),a.createElement("a",{href:o},t)))))}},8117:function(e,t,r){r.r(t),r.d(t,{assets:function(){return d},contentTitle:function(){return b},default:function(){return k},frontMatter:function(){return f},metadata:function(){return h},toc:function(){return y}});var a=r(3117),n=r(102),l=(r(7294),r(3905)),s=r(4866),o=r(5162),i=r(1989),u=["components"],c=[{value:"LightGBMClassifier",id:"lightgbmclassifier",level:2},{value:"LightGBMRanker",id:"lightgbmranker",level:2},{value:"LightGBMRegressor",id:"lightgbmregressor",level:2}],m={toc:c};function p(e){var t=e.components,r=(0,n.Z)(e,u);return(0,l.kt)("wrapper",(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"lightgbmclassifier"},"LightGBMClassifier"),(0,l.kt)(s.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.lightgbm import *\n\nlgbmClassifier = (LightGBMClassifier()\n .setFeaturesCol("features")\n .setRawPredictionCol("rawPrediction")\n .setDefaultListenPort(12402)\n .setNumLeaves(5)\n .setNumIterations(10)\n .setObjective("binary")\n .setLabelCol("labels")\n .setLeafPredictionCol("leafPrediction")\n .setFeaturesShapCol("featuresShap"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.lightgbm._\n\nval lgbmClassifier = (new LightGBMClassifier()\n .setFeaturesCol("features")\n .setRawPredictionCol("rawPrediction")\n .setDefaultListenPort(12402)\n .setNumLeaves(5)\n .setNumIterations(10)\n .setObjective("binary")\n .setLabelCol("labels")\n .setLeafPredictionCol("leafPrediction")\n .setFeaturesShapCol("featuresShap"))\n')))),(0,l.kt)(i.Z,{className:"LightGBMClassifier",py:"synapse.ml.lightgbm.html#module-synapse.ml.lightgbm.LightGBMClassifier",scala:"com/microsoft/azure/synapse/ml/lightgbm/LightGBMClassifier.html",csharp:"classSynapse_1_1ML_1_1Lightgbm_1_1LightGBMClassifier.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/lightgbm/src/main/scala/com/microsoft/azure/synapse/ml/lightgbm/LightGBMClassifier.scala",mdxType:"DocTable"}),(0,l.kt)("h2",{id:"lightgbmranker"},"LightGBMRanker"),(0,l.kt)(s.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.lightgbm import *\n\nlgbmRanker = (LightGBMRanker()\n .setLabelCol("labels")\n .setFeaturesCol("features")\n .setGroupCol("query")\n .setDefaultListenPort(12402)\n .setRepartitionByGroupingColumn(False)\n .setNumLeaves(5)\n .setNumIterations(10))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.lightgbm._\n\nval lgbmRanker = (new LightGBMRanker()\n .setLabelCol("labels")\n .setFeaturesCol("features")\n .setGroupCol("query")\n .setDefaultListenPort(12402)\n .setRepartitionByGroupingColumn(false)\n .setNumLeaves(5)\n .setNumIterations(10))\n')))),(0,l.kt)(i.Z,{className:"LightGBMRanker",py:"synapse.ml.lightgbm.html#module-synapse.ml.lightgbm.LightGBMRanker",scala:"com/microsoft/azure/synapse/ml/lightgbm/LightGBMRanker.html",csharp:"classSynapse_1_1ML_1_1Lightgbm_1_1LightGBMRanker.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/lightgbm/src/main/scala/com/microsoft/azure/synapse/ml/lightgbm/LightGBMRanker.scala",mdxType:"DocTable"}),(0,l.kt)("h2",{id:"lightgbmregressor"},"LightGBMRegressor"),(0,l.kt)(s.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.lightgbm import *\n\nlgbmRegressor = (LightGBMRegressor()\n .setLabelCol("labels")\n .setFeaturesCol("features")\n .setDefaultListenPort(12402)\n .setNumLeaves(5)\n .setNumIterations(10))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.lightgbm._\n\nval lgbmRegressor = (new LightGBMRegressor()\n .setLabelCol("labels")\n .setFeaturesCol("features")\n .setDefaultListenPort(12402)\n .setNumLeaves(5)\n .setNumIterations(10))\n')))),(0,l.kt)(i.Z,{className:"LightGBMRegressor",py:"synapse.ml.lightgbm.html#module-synapse.ml.lightgbm.LightGBMRegressor",scala:"com/microsoft/azure/synapse/ml/lightgbm/LightGBMRegressor.html",csharp:"classSynapse_1_1ML_1_1Lightgbm_1_1LightGBMRegressor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/lightgbm/src/main/scala/com/microsoft/azure/synapse/ml/lightgbm/LightGBMRegressor.scala",mdxType:"DocTable"}))}p.isMDXComponent=!0;var g=["components"],f={title:"Estimators - LightGBM",sidebar_label:"LightGBM",hide_title:!0},b="LightGBM",h={unversionedId:"Quick Examples/estimators/estimators_lightgbm",id:"Quick Examples/estimators/estimators_lightgbm",title:"Estimators - LightGBM",description:"",source:"@site/docs/Quick Examples/estimators/estimators_lightgbm.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_lightgbm",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_lightgbm",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - LightGBM",sidebar_label:"LightGBM",hide_title:!0}},d={},y=[].concat(c),v={toc:y};function k(e){var t=e.components,r=(0,n.Z)(e,g);return(0,l.kt)("wrapper",(0,a.Z)({},v,r,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"lightgbm"},"LightGBM"),(0,l.kt)(p,{mdxType:"LightGBM"}))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/792eae7e.55dd112f.js b/assets/js/792eae7e.55dd112f.js deleted file mode 100644 index 2aebded342..0000000000 --- a/assets/js/792eae7e.55dd112f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[4275],{3905:function(e,t,a){a.d(t,{Zo:function(){return m},kt:function(){return g}});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function s(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),u=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},m=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),p=u(a),g=n,b=p["".concat(i,".").concat(g)]||p[g]||c[g]||l;return a?r.createElement(b,s(s({ref:t},m),{},{components:a})):r.createElement(b,s({ref:t},m))}));function g(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,s=new Array(l);s[0]=p;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o.mdxType="string"==typeof e?e:n,s[1]=o;for(var u=2;u child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),y=null!=b?b:d.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),v=(0,o.l)(y,(function(e,t){return e.value===t.value}));if(v.length>0)throw new Error('Docusaurus error: Duplicate values "'+v.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var k=null===g?g:null!=(t=null!=g?g:null==(a=d.find((function(e){return e.props.default})))?void 0:a.props.value)?t:d[0].props.value;if(null!==k&&!y.some((function(e){return e.value===k})))throw new Error('Docusaurus error: The has a defaultValue "'+k+'" but none of its children has the corresponding value. Available values are: '+y.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var L=(0,i.U)(),E=L.tabGroupChoices,M=L.setTabGroupChoices,C=(0,n.useState)(k),T=C[0],N=C[1],w=[],G=(0,u.o5)().blockElementScrollPositionUntilNextRender;if(null!=f){var B=E[f];null!=B&&B!==T&&y.some((function(e){return e.value===B}))&&N(B)}var _=function(e){var t=e.currentTarget,a=w.indexOf(t),r=y[a].value;r!==T&&(G(t),N(r),null!=f&&M(f,String(r)))},P=function(e){var t,a=null;switch(e.key){case"Enter":_(e);break;case"ArrowRight":var r,n=w.indexOf(e.currentTarget)+1;a=null!=(r=w[n])?r:w[0];break;case"ArrowLeft":var l,s=w.indexOf(e.currentTarget)-1;a=null!=(l=w[s])?l:w[w.length-1]}null==(t=a)||t.focus()};return n.createElement("div",{className:(0,l.Z)("tabs-container",m)},n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":p},h)},y.map((function(e){var t=e.value,a=e.label,s=e.attributes;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:T===t?0:-1,"aria-selected":T===t,key:t,ref:function(e){return w.push(e)},onKeyDown:P,onClick:_},s,{className:(0,l.Z)("tabs__item",c,null==s?void 0:s.className,{"tabs__item--active":T===t})}),null!=a?a:t)}))),s?(0,n.cloneElement)(d.filter((function(e){return e.props.value===T}))[0],{className:"margin-top--md"}):n.createElement("div",{className:"margin-top--md"},d.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==T})}))))}function g(e){var t=(0,s.Z)();return n.createElement(p,(0,r.Z)({key:String(t)},e))}},1989:function(e,t,a){var r=a(7294),n=a(2263);t.Z=function(e){var t=e.className,a=e.py,l=e.scala,s=e.csharp,o=e.sourceLink,i=(0,n.Z)().siteConfig.customFields.version,u="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+a,m="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+l,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+s;return r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",null,r.createElement("strong",null,"Python API: "),r.createElement("a",{href:u},t)),r.createElement("td",null,r.createElement("strong",null,"Scala API: "),r.createElement("a",{href:m},t)),r.createElement("td",null,r.createElement("strong",null,".NET API: "),r.createElement("a",{href:c},t)),r.createElement("td",null,r.createElement("strong",null,"Source: "),r.createElement("a",{href:o},t)))))}},8117:function(e,t,a){a.r(t),a.d(t,{assets:function(){return d},contentTitle:function(){return f},default:function(){return k},frontMatter:function(){return b},metadata:function(){return h},toc:function(){return y}});var r=a(3117),n=a(102),l=(a(7294),a(3905)),s=a(5488),o=a(5162),i=a(1989),u=["components"],m=[{value:"LightGBMClassifier",id:"lightgbmclassifier",level:2},{value:"LightGBMRanker",id:"lightgbmranker",level:2},{value:"LightGBMRegressor",id:"lightgbmregressor",level:2}],c={toc:m};function p(e){var t=e.components,a=(0,n.Z)(e,u);return(0,l.kt)("wrapper",(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"lightgbmclassifier"},"LightGBMClassifier"),(0,l.kt)(s.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.lightgbm import *\n\nlgbmClassifier = (LightGBMClassifier()\n .setFeaturesCol("features")\n .setRawPredictionCol("rawPrediction")\n .setDefaultListenPort(12402)\n .setNumLeaves(5)\n .setNumIterations(10)\n .setObjective("binary")\n .setLabelCol("labels")\n .setLeafPredictionCol("leafPrediction")\n .setFeaturesShapCol("featuresShap"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.lightgbm._\n\nval lgbmClassifier = (new LightGBMClassifier()\n .setFeaturesCol("features")\n .setRawPredictionCol("rawPrediction")\n .setDefaultListenPort(12402)\n .setNumLeaves(5)\n .setNumIterations(10)\n .setObjective("binary")\n .setLabelCol("labels")\n .setLeafPredictionCol("leafPrediction")\n .setFeaturesShapCol("featuresShap"))\n')))),(0,l.kt)(i.Z,{className:"LightGBMClassifier",py:"synapse.ml.lightgbm.html#module-synapse.ml.lightgbm.LightGBMClassifier",scala:"com/microsoft/azure/synapse/ml/lightgbm/LightGBMClassifier.html",csharp:"classSynapse_1_1ML_1_1Lightgbm_1_1LightGBMClassifier.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/lightgbm/src/main/scala/com/microsoft/azure/synapse/ml/lightgbm/LightGBMClassifier.scala",mdxType:"DocTable"}),(0,l.kt)("h2",{id:"lightgbmranker"},"LightGBMRanker"),(0,l.kt)(s.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.lightgbm import *\n\nlgbmRanker = (LightGBMRanker()\n .setLabelCol("labels")\n .setFeaturesCol("features")\n .setGroupCol("query")\n .setDefaultListenPort(12402)\n .setRepartitionByGroupingColumn(False)\n .setNumLeaves(5)\n .setNumIterations(10))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.lightgbm._\n\nval lgbmRanker = (new LightGBMRanker()\n .setLabelCol("labels")\n .setFeaturesCol("features")\n .setGroupCol("query")\n .setDefaultListenPort(12402)\n .setRepartitionByGroupingColumn(false)\n .setNumLeaves(5)\n .setNumIterations(10))\n')))),(0,l.kt)(i.Z,{className:"LightGBMRanker",py:"synapse.ml.lightgbm.html#module-synapse.ml.lightgbm.LightGBMRanker",scala:"com/microsoft/azure/synapse/ml/lightgbm/LightGBMRanker.html",csharp:"classSynapse_1_1ML_1_1Lightgbm_1_1LightGBMRanker.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/lightgbm/src/main/scala/com/microsoft/azure/synapse/ml/lightgbm/LightGBMRanker.scala",mdxType:"DocTable"}),(0,l.kt)("h2",{id:"lightgbmregressor"},"LightGBMRegressor"),(0,l.kt)(s.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.lightgbm import *\n\nlgbmRegressor = (LightGBMRegressor()\n .setLabelCol("labels")\n .setFeaturesCol("features")\n .setDefaultListenPort(12402)\n .setNumLeaves(5)\n .setNumIterations(10))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.lightgbm._\n\nval lgbmRegressor = (new LightGBMRegressor()\n .setLabelCol("labels")\n .setFeaturesCol("features")\n .setDefaultListenPort(12402)\n .setNumLeaves(5)\n .setNumIterations(10))\n')))),(0,l.kt)(i.Z,{className:"LightGBMRegressor",py:"synapse.ml.lightgbm.html#module-synapse.ml.lightgbm.LightGBMRegressor",scala:"com/microsoft/azure/synapse/ml/lightgbm/LightGBMRegressor.html",csharp:"classSynapse_1_1ML_1_1Lightgbm_1_1LightGBMRegressor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/lightgbm/src/main/scala/com/microsoft/azure/synapse/ml/lightgbm/LightGBMRegressor.scala",mdxType:"DocTable"}))}p.isMDXComponent=!0;var g=["components"],b={title:"Estimators - LightGBM",sidebar_label:"LightGBM",hide_title:!0},f="LightGBM",h={unversionedId:"Quick Examples/estimators/estimators_lightgbm",id:"Quick Examples/estimators/estimators_lightgbm",title:"Estimators - LightGBM",description:"",source:"@site/docs/Quick Examples/estimators/estimators_lightgbm.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_lightgbm",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_lightgbm",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - LightGBM",sidebar_label:"LightGBM",hide_title:!0}},d={},y=[].concat(m),v={toc:y};function k(e){var t=e.components,a=(0,n.Z)(e,g);return(0,l.kt)("wrapper",(0,r.Z)({},v,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"lightgbm"},"LightGBM"),(0,l.kt)(p,{mdxType:"LightGBM"}))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8590feaa.1b456f64.js b/assets/js/8590feaa.1b456f64.js new file mode 100644 index 0000000000..e274565c7a --- /dev/null +++ b/assets/js/8590feaa.1b456f64.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[1871],{3905:function(e,t,a){a.d(t,{Zo:function(){return c},kt:function(){return f}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),u=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(i.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=u(a),f=r,b=m["".concat(i,".").concat(f)]||m[f]||p[f]||o;return a?n.createElement(b,l(l({ref:t},c),{},{components:a})):n.createElement(b,l({ref:t},c))}));function f(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:r,l[1]=s;for(var u=2;u child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function m(e){var t=e.values,a=e.children;return(0,r.useMemo)((function(){var e=null!=t?t:p(a);return function(e){var t=(0,u.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,a])}function f(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function b(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId,o=(0,s.k6)(),l=function(e){var t=e.queryString,a=void 0!==t&&t,n=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:a,groupId:n});return[(0,i._X)(l),(0,r.useCallback)((function(e){if(l){var t=new URLSearchParams(o.location.search);t.set(l,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[l,o])]}function v(e){var t,a,n,o,l=e.defaultValue,s=e.queryString,i=void 0!==s&&s,u=e.groupId,p=m(e),v=(0,r.useState)((function(){return function(e){var t,a=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!f({value:a,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:l,tabValues:p})})),w=v[0],d=v[1],y=b({queryString:i,groupId:u}),h=y[0],g=y[1],k=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),a=(0,c.Nk)(t),n=a[0],o=a[1],[n,(0,r.useCallback)((function(e){t&&o.set(e)}),[t,o])]),V=k[0],_=k[1],T=function(){var e=null!=h?h:V;return f({value:e,tabValues:p})?e:null}();return(0,r.useLayoutEffect)((function(){T&&d(T)}),[T]),{selectedValue:w,selectValue:(0,r.useCallback)((function(e){if(!f({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);d(e),g(e),_(e)}),[g,_,p]),tabValues:p}}var w=a(2389),d="tabList__CuJ",y="tabItem_LNqP";function h(e){var t=e.className,a=e.block,s=e.selectedValue,i=e.selectValue,u=e.tabValues,c=[],p=(0,l.o5)().blockElementScrollPositionUntilNextRender,m=function(e){var t=e.currentTarget,a=c.indexOf(t),n=u[a].value;n!==s&&(p(t),i(n))},f=function(e){var t,a=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":var n,r=c.indexOf(e.currentTarget)+1;a=null!=(n=c[r])?n:c[0];break;case"ArrowLeft":var o,l=c.indexOf(e.currentTarget)-1;a=null!=(o=c[l])?o:c[c.length-1]}null==(t=a)||t.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":a},t)},u.map((function(e){var t=e.value,a=e.label,l=e.attributes;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:function(e){return c.push(e)},onKeyDown:f,onClick:m},l,{className:(0,o.Z)("tabs__item",y,null==l?void 0:l.className,{"tabs__item--active":s===t})}),null!=a?a:t)})))}function g(e){var t=e.lazy,a=e.children,n=e.selectedValue,o=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){var l=o.find((function(e){return e.props.value===n}));return l?(0,r.cloneElement)(l,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n})})))}function k(e){var t=v(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",d)},r.createElement(h,(0,n.Z)({},e,t)),r.createElement(g,(0,n.Z)({},e,t)))}function V(e){var t=(0,w.Z)();return r.createElement(k,(0,n.Z)({key:String(t)},e))}},1989:function(e,t,a){var n=a(7294),r=a(2263);t.Z=function(e){var t=e.className,a=e.py,o=e.scala,l=e.csharp,s=e.sourceLink,i=(0,r.Z)().siteConfig.customFields.version,u="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+a,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+o,p="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+l;return n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,n.createElement("strong",null,"Python API: "),n.createElement("a",{href:u},t)),n.createElement("td",null,n.createElement("strong",null,"Scala API: "),n.createElement("a",{href:c},t)),n.createElement("td",null,n.createElement("strong",null,".NET API: "),n.createElement("a",{href:p},t)),n.createElement("td",null,n.createElement("strong",null,"Source: "),n.createElement("a",{href:s},t)))))}},3505:function(e,t,a){a.r(t),a.d(t,{assets:function(){return d},contentTitle:function(){return v},default:function(){return g},frontMatter:function(){return b},metadata:function(){return w},toc:function(){return y}});var n=a(3117),r=a(102),o=(a(7294),a(3905)),l=a(4866),s=a(5162),i=a(1989),u=["components"],c=[{value:"VectorZipper",id:"vectorzipper",level:2},{value:"VowpalWabbitClassifier",id:"vowpalwabbitclassifier",level:2},{value:"VowpalWabbitFeaturizer",id:"vowpalwabbitfeaturizer",level:2},{value:"VowpalWabbitInteractions",id:"vowpalwabbitinteractions",level:2}],p={toc:c};function m(e){var t=e.components,a=(0,r.Z)(e,u);return(0,o.kt)("wrapper",(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"vectorzipper"},"VectorZipper"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"},{label:".NET",value:"csharp"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\ndf = spark.createDataFrame([\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f")\n], ["action1", "action2"])\n\nactionOneFeaturizer = (VowpalWabbitFeaturizer()\n .setInputCols(["action1"])\n .setOutputCol("sequence_one"))\n\nactionTwoFeaturizer = (VowpalWabbitFeaturizer()\n .setInputCols(["action2"])\n .setOutputCol("sequence_two"))\n\nseqDF = actionTwoFeaturizer.transform(actionOneFeaturizer.transform(df))\n\nvectorZipper = (VectorZipper()\n .setInputCols(["sequence_one", "sequence_two"])\n .setOutputCol("out"))\n\nvectorZipper.transform(seqDF).show()\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\n\nval df = (Seq(\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f")\n ).toDF("action1", "action2"))\n\nval actionOneFeaturizer = (new VowpalWabbitFeaturizer()\n .setInputCols(Array("action1"))\n .setOutputCol("sequence_one"))\n\nval actionTwoFeaturizer = (new VowpalWabbitFeaturizer()\n .setInputCols(Array("action2"))\n .setOutputCol("sequence_two"))\n\nval seqDF = actionTwoFeaturizer.transform(actionOneFeaturizer.transform(df))\n\nval vectorZipper = (new VectorZipper()\n .setInputCols(Array("sequence_one", "sequence_two"))\n .setOutputCol("out"))\n\nvectorZipper.transform(seqDF).show()\n'))),(0,o.kt)(s.Z,{value:"csharp",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-csharp"},'using System;\nusing System.Collections.Generic;\nusing Synapse.ML.Vw;\nusing Microsoft.Spark.Sql;\nusing Microsoft.Spark.Sql.Types;\n\nnamespace SynapseMLApp\n{\n class Program\n {\n static void Main(string[] args)\n {\n SparkSession spark =\n SparkSession\n .Builder()\n .AppName("Example")\n .GetOrCreate();\n\n DataFrame df = spark.CreateDataFrame(\n new List\n {\n new GenericRow(new object[] {"action1_f", "action2_f"}),\n new GenericRow(new object[] {"action1_f", "action2_f"}),\n new GenericRow(new object[] {"action1_f", "action2_f"}),\n new GenericRow(new object[] {"action1_f", "action2_f"})\n },\n new StructType(new List\n {\n new StructField("action1", new StringType()),\n new StructField("action2", new StringType())\n })\n );\n\n var actionOneFeaturizer = new VowpalWabbitFeaturizer()\n .SetInputCols(new string[]{"action1"})\n .SetOutputCol("sequence_one");\n var actionTwoFeaturizer = new VowpalWabbitFeaturizer()\n .SetInputCols(new string[]{"action2"})\n .SetOutputCol("sequence_two");\n var seqDF = actionTwoFeaturizer.Transform(actionOneFeaturizer.Transform(df));\n\n var vectorZipper = new VectorZipper()\n .SetInputCols(new string[]{"sequence_one", "sequence_two"})\n .SetOutputCol("out");\n vectorZipper.Transform(seqDF).Show();\n\n spark.Stop();\n }\n }\n}\n')))),(0,o.kt)(i.Z,{className:"VectorZipper",py:"synapse.ml.vw.html#module-synapse.ml.vw.VectorZipper",scala:"com/microsoft/azure/synapse/ml/vw/VectorZipper.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VectorZipper.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VectorZipper.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"vowpalwabbitclassifier"},"VowpalWabbitClassifier"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},"from synapse.ml.vw import *\n\nvw = (VowpalWabbitClassifier()\n .setNumBits(10)\n .setLearningRate(3.1)\n .setPowerT(0)\n .setLabelConversion(False))\n"))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},"import com.microsoft.azure.synapse.ml.vw._\n\nval vw = (new VowpalWabbitClassifier()\n .setNumBits(10)\n .setLearningRate(3.1)\n .setPowerT(0)\n .setLabelConversion(false))\n")))),(0,o.kt)(i.Z,{className:"VowpalWabbitClassifier",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitClassifier",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitClassifier.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitClassifier.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitClassifier.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"vowpalwabbitfeaturizer"},"VowpalWabbitFeaturizer"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\nfeaturizer = (VowpalWabbitFeaturizer()\n .setStringSplitInputCols(["in"])\n .setPreserveOrderNumBits(2)\n .setNumBits(18)\n .setPrefixStringsWithColumnName(False)\n .setOutputCol("features"))\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\n\nval featurizer = (new VowpalWabbitFeaturizer()\n .setStringSplitInputCols(Array("in"))\n .setPreserveOrderNumBits(2)\n .setNumBits(18)\n .setPrefixStringsWithColumnName(false)\n .setOutputCol("features"))\n')))),(0,o.kt)(i.Z,{className:"VowpalWabbitFeaturizer",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitFeaturizer",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitFeaturizer.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitFeaturizer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitFeaturizer.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"vowpalwabbitinteractions"},"VowpalWabbitInteractions"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\ninteractions = (VowpalWabbitInteractions()\n .setInputCols(["v1"])\n .setOutputCol("out"))\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\nimport org.apache.spark.ml.linalg._\n\ncase class Data(v1: Vector, v2: Vector, v3: Vector)\n\nval df = spark.createDataFrame(Seq(Data(\n Vectors.dense(Array(1.0, 2.0, 3.0)),\n Vectors.sparse(8, Array(5), Array(4.0)),\n Vectors.sparse(11, Array(8, 9), Array(7.0, 8.0))\n)))\n\nval interactions = (new VowpalWabbitInteractions()\n .setInputCols(Array("v1"))\n .setOutputCol("out"))\n\ninteractions.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"VowpalWabbitInteractions",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitInteractions",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitInteractions.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitInteractions.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitInteractions.scala",mdxType:"DocTable"}))}m.isMDXComponent=!0;var f=["components"],b={title:"Transformers - Vowpal Wabbit",sidebar_label:"Vowpal Wabbit",hide_title:!0},v="Vowpal Wabbit",w={unversionedId:"Quick Examples/transformers/transformers_vw",id:"Quick Examples/transformers/transformers_vw",title:"Transformers - Vowpal Wabbit",description:"",source:"@site/docs/Quick Examples/transformers/transformers_vw.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_vw",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_vw",draft:!1,tags:[],version:"current",frontMatter:{title:"Transformers - Vowpal Wabbit",sidebar_label:"Vowpal Wabbit",hide_title:!0}},d={},y=[].concat(c),h={toc:y};function g(e){var t=e.components,a=(0,r.Z)(e,f);return(0,o.kt)("wrapper",(0,n.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"vowpal-wabbit"},"Vowpal Wabbit"),(0,o.kt)(m,{mdxType:"VW"}))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8590feaa.6ba80ec6.js b/assets/js/8590feaa.6ba80ec6.js deleted file mode 100644 index ac670023ab..0000000000 --- a/assets/js/8590feaa.6ba80ec6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[1871],{3905:function(e,t,a){a.d(t,{Zo:function(){return u},kt:function(){return b}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),c=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),m=c(a),b=r,f=m["".concat(i,".").concat(b)]||m[b]||p[b]||o;return a?n.createElement(f,l(l({ref:t},u),{},{components:a})):n.createElement(f,l({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:r,l[1]=s;for(var c=2;c child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),y=null!=f?f:d.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),h=(0,s.l)(y,(function(e,t){return e.value===t.value}));if(h.length>0)throw new Error('Docusaurus error: Duplicate values "'+h.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var k=null===b?b:null!=(t=null!=b?b:null==(a=d.find((function(e){return e.props.default})))?void 0:a.props.value)?t:d[0].props.value;if(null!==k&&!y.some((function(e){return e.value===k})))throw new Error('Docusaurus error: The has a defaultValue "'+k+'" but none of its children has the corresponding value. Available values are: '+y.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var g=(0,i.U)(),_=g.tabGroupChoices,T=g.setTabGroupChoices,V=(0,r.useState)(k),S=V[0],C=V[1],O=[],E=(0,c.o5)().blockElementScrollPositionUntilNextRender;if(null!=v){var N=_[v];null!=N&&N!==S&&y.some((function(e){return e.value===N}))&&C(N)}var Z=function(e){var t=e.currentTarget,a=O.indexOf(t),n=y[a].value;n!==S&&(E(t),C(n),null!=v&&T(v,String(n)))},z=function(e){var t,a=null;switch(e.key){case"Enter":Z(e);break;case"ArrowRight":var n,r=O.indexOf(e.currentTarget)+1;a=null!=(n=O[r])?n:O[0];break;case"ArrowLeft":var o,l=O.indexOf(e.currentTarget)-1;a=null!=(o=O[l])?o:O[O.length-1]}null==(t=a)||t.focus()};return r.createElement("div",{className:(0,o.Z)("tabs-container",u)},r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":m},w)},y.map((function(e){var t=e.value,a=e.label,l=e.attributes;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:S===t?0:-1,"aria-selected":S===t,key:t,ref:function(e){return O.push(e)},onKeyDown:z,onClick:Z},l,{className:(0,o.Z)("tabs__item",p,null==l?void 0:l.className,{"tabs__item--active":S===t})}),null!=a?a:t)}))),l?(0,r.cloneElement)(d.filter((function(e){return e.props.value===S}))[0],{className:"margin-top--md"}):r.createElement("div",{className:"margin-top--md"},d.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==S})}))))}function b(e){var t=(0,l.Z)();return r.createElement(m,(0,n.Z)({key:String(t)},e))}},1989:function(e,t,a){var n=a(7294),r=a(2263);t.Z=function(e){var t=e.className,a=e.py,o=e.scala,l=e.csharp,s=e.sourceLink,i=(0,r.Z)().siteConfig.customFields.version,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+a,u="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+o,p="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+l;return n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,n.createElement("strong",null,"Python API: "),n.createElement("a",{href:c},t)),n.createElement("td",null,n.createElement("strong",null,"Scala API: "),n.createElement("a",{href:u},t)),n.createElement("td",null,n.createElement("strong",null,".NET API: "),n.createElement("a",{href:p},t)),n.createElement("td",null,n.createElement("strong",null,"Source: "),n.createElement("a",{href:s},t)))))}},3505:function(e,t,a){a.r(t),a.d(t,{assets:function(){return d},contentTitle:function(){return v},default:function(){return k},frontMatter:function(){return f},metadata:function(){return w},toc:function(){return y}});var n=a(3117),r=a(102),o=(a(7294),a(3905)),l=a(5488),s=a(5162),i=a(1989),c=["components"],u=[{value:"VectorZipper",id:"vectorzipper",level:2},{value:"VowpalWabbitClassifier",id:"vowpalwabbitclassifier",level:2},{value:"VowpalWabbitFeaturizer",id:"vowpalwabbitfeaturizer",level:2},{value:"VowpalWabbitInteractions",id:"vowpalwabbitinteractions",level:2}],p={toc:u};function m(e){var t=e.components,a=(0,r.Z)(e,c);return(0,o.kt)("wrapper",(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"vectorzipper"},"VectorZipper"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"},{label:".NET",value:"csharp"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\ndf = spark.createDataFrame([\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f")\n], ["action1", "action2"])\n\nactionOneFeaturizer = (VowpalWabbitFeaturizer()\n .setInputCols(["action1"])\n .setOutputCol("sequence_one"))\n\nactionTwoFeaturizer = (VowpalWabbitFeaturizer()\n .setInputCols(["action2"])\n .setOutputCol("sequence_two"))\n\nseqDF = actionTwoFeaturizer.transform(actionOneFeaturizer.transform(df))\n\nvectorZipper = (VectorZipper()\n .setInputCols(["sequence_one", "sequence_two"])\n .setOutputCol("out"))\n\nvectorZipper.transform(seqDF).show()\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\n\nval df = (Seq(\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f"),\n ("action1_f", "action2_f")\n ).toDF("action1", "action2"))\n\nval actionOneFeaturizer = (new VowpalWabbitFeaturizer()\n .setInputCols(Array("action1"))\n .setOutputCol("sequence_one"))\n\nval actionTwoFeaturizer = (new VowpalWabbitFeaturizer()\n .setInputCols(Array("action2"))\n .setOutputCol("sequence_two"))\n\nval seqDF = actionTwoFeaturizer.transform(actionOneFeaturizer.transform(df))\n\nval vectorZipper = (new VectorZipper()\n .setInputCols(Array("sequence_one", "sequence_two"))\n .setOutputCol("out"))\n\nvectorZipper.transform(seqDF).show()\n'))),(0,o.kt)(s.Z,{value:"csharp",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-csharp"},'using System;\nusing System.Collections.Generic;\nusing Synapse.ML.Vw;\nusing Microsoft.Spark.Sql;\nusing Microsoft.Spark.Sql.Types;\n\nnamespace SynapseMLApp\n{\n class Program\n {\n static void Main(string[] args)\n {\n SparkSession spark =\n SparkSession\n .Builder()\n .AppName("Example")\n .GetOrCreate();\n\n DataFrame df = spark.CreateDataFrame(\n new List\n {\n new GenericRow(new object[] {"action1_f", "action2_f"}),\n new GenericRow(new object[] {"action1_f", "action2_f"}),\n new GenericRow(new object[] {"action1_f", "action2_f"}),\n new GenericRow(new object[] {"action1_f", "action2_f"})\n },\n new StructType(new List\n {\n new StructField("action1", new StringType()),\n new StructField("action2", new StringType())\n })\n );\n\n var actionOneFeaturizer = new VowpalWabbitFeaturizer()\n .SetInputCols(new string[]{"action1"})\n .SetOutputCol("sequence_one");\n var actionTwoFeaturizer = new VowpalWabbitFeaturizer()\n .SetInputCols(new string[]{"action2"})\n .SetOutputCol("sequence_two");\n var seqDF = actionTwoFeaturizer.Transform(actionOneFeaturizer.Transform(df));\n\n var vectorZipper = new VectorZipper()\n .SetInputCols(new string[]{"sequence_one", "sequence_two"})\n .SetOutputCol("out");\n vectorZipper.Transform(seqDF).Show();\n\n spark.Stop();\n }\n }\n}\n')))),(0,o.kt)(i.Z,{className:"VectorZipper",py:"synapse.ml.vw.html#module-synapse.ml.vw.VectorZipper",scala:"com/microsoft/azure/synapse/ml/vw/VectorZipper.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VectorZipper.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VectorZipper.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"vowpalwabbitclassifier"},"VowpalWabbitClassifier"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},"from synapse.ml.vw import *\n\nvw = (VowpalWabbitClassifier()\n .setNumBits(10)\n .setLearningRate(3.1)\n .setPowerT(0)\n .setLabelConversion(False))\n"))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},"import com.microsoft.azure.synapse.ml.vw._\n\nval vw = (new VowpalWabbitClassifier()\n .setNumBits(10)\n .setLearningRate(3.1)\n .setPowerT(0)\n .setLabelConversion(false))\n")))),(0,o.kt)(i.Z,{className:"VowpalWabbitClassifier",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitClassifier",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitClassifier.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitClassifier.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitClassifier.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"vowpalwabbitfeaturizer"},"VowpalWabbitFeaturizer"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\nfeaturizer = (VowpalWabbitFeaturizer()\n .setStringSplitInputCols(["in"])\n .setPreserveOrderNumBits(2)\n .setNumBits(18)\n .setPrefixStringsWithColumnName(False)\n .setOutputCol("features"))\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\n\nval featurizer = (new VowpalWabbitFeaturizer()\n .setStringSplitInputCols(Array("in"))\n .setPreserveOrderNumBits(2)\n .setNumBits(18)\n .setPrefixStringsWithColumnName(false)\n .setOutputCol("features"))\n')))),(0,o.kt)(i.Z,{className:"VowpalWabbitFeaturizer",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitFeaturizer",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitFeaturizer.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitFeaturizer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitFeaturizer.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"vowpalwabbitinteractions"},"VowpalWabbitInteractions"),(0,o.kt)(l.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\ninteractions = (VowpalWabbitInteractions()\n .setInputCols(["v1"])\n .setOutputCol("out"))\n'))),(0,o.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\nimport org.apache.spark.ml.linalg._\n\ncase class Data(v1: Vector, v2: Vector, v3: Vector)\n\nval df = spark.createDataFrame(Seq(Data(\n Vectors.dense(Array(1.0, 2.0, 3.0)),\n Vectors.sparse(8, Array(5), Array(4.0)),\n Vectors.sparse(11, Array(8, 9), Array(7.0, 8.0))\n)))\n\nval interactions = (new VowpalWabbitInteractions()\n .setInputCols(Array("v1"))\n .setOutputCol("out"))\n\ninteractions.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"VowpalWabbitInteractions",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitInteractions",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitInteractions.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitInteractions.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitInteractions.scala",mdxType:"DocTable"}))}m.isMDXComponent=!0;var b=["components"],f={title:"Transformers - Vowpal Wabbit",sidebar_label:"Vowpal Wabbit",hide_title:!0},v="Vowpal Wabbit",w={unversionedId:"Quick Examples/transformers/transformers_vw",id:"Quick Examples/transformers/transformers_vw",title:"Transformers - Vowpal Wabbit",description:"",source:"@site/docs/Quick Examples/transformers/transformers_vw.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_vw",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_vw",draft:!1,tags:[],version:"current",frontMatter:{title:"Transformers - Vowpal Wabbit",sidebar_label:"Vowpal Wabbit",hide_title:!0}},d={},y=[].concat(u),h={toc:y};function k(e){var t=e.components,a=(0,r.Z)(e,b);return(0,o.kt)("wrapper",(0,n.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"vowpal-wabbit"},"Vowpal Wabbit"),(0,o.kt)(m,{mdxType:"VW"}))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/88e44e99.908efb2e.js b/assets/js/88e44e99.908efb2e.js new file mode 100644 index 0000000000..65ae5ccbd0 --- /dev/null +++ b/assets/js/88e44e99.908efb2e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[8817],{3905:function(e,t,a){a.d(t,{Zo:function(){return c},kt:function(){return b}});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var u=r.createContext({}),i=function(e){var t=r.useContext(u),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},c=function(e){var t=i(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,u=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=i(a),b=n,f=m["".concat(u,".").concat(b)]||m[b]||p[b]||l;return a?r.createElement(f,o(o({ref:t},c),{},{components:a})):r.createElement(f,o({ref:t},c))}));function b(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,o=new Array(l);o[0]=m;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s.mdxType="string"==typeof e?e:n,o[1]=s;for(var i=2;i child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function m(e){var t=e.values,a=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:p(a);return function(e){var t=(0,i.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,a])}function b(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,a=void 0!==t&&t,r=e.groupId,l=(0,s.k6)(),o=function(e){var t=e.queryString,a=void 0!==t&&t,r=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:a,groupId:r});return[(0,u._X)(o),(0,n.useCallback)((function(e){if(o){var t=new URLSearchParams(l.location.search);t.set(o,e),l.replace(Object.assign({},l.location,{search:t.toString()}))}}),[o,l])]}function d(e){var t,a,r,l,o=e.defaultValue,s=e.queryString,u=void 0!==s&&s,i=e.groupId,p=m(e),d=(0,n.useState)((function(){return function(e){var t,a=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!b({value:a,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var n=null!=(t=r.find((function(e){return e.default})))?t:r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:o,tabValues:p})})),v=d[0],y=d[1],w=f({queryString:u,groupId:i}),h=w[0],g=w[1],E=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:i}.groupId),a=(0,c.Nk)(t),r=a[0],l=a[1],[r,(0,n.useCallback)((function(e){t&&l.set(e)}),[t,l])]),k=E[0],V=E[1],x=function(){var e=null!=h?h:k;return b({value:e,tabValues:p})?e:null}();return(0,n.useLayoutEffect)((function(){x&&y(x)}),[x]),{selectedValue:v,selectValue:(0,n.useCallback)((function(e){if(!b({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);y(e),g(e),V(e)}),[g,V,p]),tabValues:p}}var v=a(2389),y="tabList__CuJ",w="tabItem_LNqP";function h(e){var t=e.className,a=e.block,s=e.selectedValue,u=e.selectValue,i=e.tabValues,c=[],p=(0,o.o5)().blockElementScrollPositionUntilNextRender,m=function(e){var t=e.currentTarget,a=c.indexOf(t),r=i[a].value;r!==s&&(p(t),u(r))},b=function(e){var t,a=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":var r,n=c.indexOf(e.currentTarget)+1;a=null!=(r=c[n])?r:c[0];break;case"ArrowLeft":var l,o=c.indexOf(e.currentTarget)-1;a=null!=(l=c[o])?l:c[c.length-1]}null==(t=a)||t.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},i.map((function(e){var t=e.value,a=e.label,o=e.attributes;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:function(e){return c.push(e)},onKeyDown:b,onClick:m},o,{className:(0,l.Z)("tabs__item",w,null==o?void 0:o.className,{"tabs__item--active":s===t})}),null!=a?a:t)})))}function g(e){var t=e.lazy,a=e.children,r=e.selectedValue,l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){var o=l.find((function(e){return e.props.value===r}));return o?(0,n.cloneElement)(o,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r})})))}function E(e){var t=d(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",y)},n.createElement(h,(0,r.Z)({},e,t)),n.createElement(g,(0,r.Z)({},e,t)))}function k(e){var t=(0,v.Z)();return n.createElement(E,(0,r.Z)({key:String(t)},e))}},1989:function(e,t,a){var r=a(7294),n=a(2263);t.Z=function(e){var t=e.className,a=e.py,l=e.scala,o=e.csharp,s=e.sourceLink,u=(0,n.Z)().siteConfig.customFields.version,i="https://mmlspark.blob.core.windows.net/docs/"+u+"/pyspark/"+a,c="https://mmlspark.blob.core.windows.net/docs/"+u+"/scala/"+l,p="https://mmlspark.blob.core.windows.net/docs/"+u+"/dotnet/"+o;return r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",null,r.createElement("strong",null,"Python API: "),r.createElement("a",{href:i},t)),r.createElement("td",null,r.createElement("strong",null,"Scala API: "),r.createElement("a",{href:c},t)),r.createElement("td",null,r.createElement("strong",null,".NET API: "),r.createElement("a",{href:p},t)),r.createElement("td",null,r.createElement("strong",null,"Source: "),r.createElement("a",{href:s},t)))))}},4859:function(e,t,a){a.r(t),a.d(t,{assets:function(){return y},contentTitle:function(){return d},default:function(){return g},frontMatter:function(){return f},metadata:function(){return v},toc:function(){return w}});var r=a(3117),n=a(102),l=(a(7294),a(3905)),o=a(4866),s=a(5162),u=a(1989),i=["components"],c=[{value:"VowpalWabbitRegressor",id:"vowpalwabbitregressor",level:2},{value:"VowpalWabbitContextualBandit",id:"vowpalwabbitcontextualbandit",level:2}],p={toc:c};function m(e){var t=e.components,a=(0,n.Z)(e,i);return(0,l.kt)("wrapper",(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"vowpalwabbitregressor"},"VowpalWabbitRegressor"),(0,l.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\nvw = (VowpalWabbitRegressor()\n .setLabelCol("Y1")\n .setFeaturesCol("features")\n .setPredictionCol("pred"))\n\nvwRegressor = (VowpalWabbitRegressor()\n .setNumPasses(20)\n .setPassThroughArgs("--holdout_off --loss_function quantile -q :: -l 0.1"))\n'))),(0,l.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\n\nval vw = (new VowpalWabbitRegressor()\n .setLabelCol("Y1")\n .setFeaturesCol("features")\n .setPredictionCol("pred"))\n\nval vwRegressor = (new VowpalWabbitRegressor()\n .setNumPasses(20)\n .setPassThroughArgs("--holdout_off --loss_function quantile -q :: -l 0.1"))\n\n')))),(0,l.kt)(u.Z,{className:"VowpalWabbitRegressor",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitRegressor",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitRegressor.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitRegressor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitRegressor.scala",mdxType:"DocTable"}),(0,l.kt)("h2",{id:"vowpalwabbitcontextualbandit"},"VowpalWabbitContextualBandit"),(0,l.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\ncb = (VowpalWabbitContextualBandit()\n .setPassThroughArgs("--cb_explore_adf --epsilon 0.2 --quiet")\n .setLabelCol("cost")\n .setProbabilityCol("prob")\n .setChosenActionCol("chosen_action")\n .setSharedCol("shared_features")\n .setFeaturesCol("action_features")\n .setUseBarrierExecutionMode(False))\n'))),(0,l.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\n\nval cb = (new VowpalWabbitContextualBandit()\n .setPassThroughArgs("--cb_explore_adf --epsilon 0.2 --quiet")\n .setLabelCol("cost")\n .setProbabilityCol("prob")\n .setChosenActionCol("chosen_action")\n .setSharedCol("shared_features")\n .setFeaturesCol("action_features")\n .setUseBarrierExecutionMode(false))\n\n')))),(0,l.kt)(u.Z,{className:"VowpalWabbitContextualBandit",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitContextualBandit",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitContextualBandit.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitContextualBandit.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitContextualBandit.scala",mdxType:"DocTable"}))}m.isMDXComponent=!0;var b=["components"],f={title:"Estimators - Vowpal Wabbit",sidebar_label:"Vowpal Wabbit",hide_title:!0},d="Vowpal Wabbit",v={unversionedId:"Quick Examples/estimators/estimators_vw",id:"Quick Examples/estimators/estimators_vw",title:"Estimators - Vowpal Wabbit",description:"",source:"@site/docs/Quick Examples/estimators/estimators_vw.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_vw",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_vw",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - Vowpal Wabbit",sidebar_label:"Vowpal Wabbit",hide_title:!0}},y={},w=[].concat(c),h={toc:w};function g(e){var t=e.components,a=(0,n.Z)(e,b);return(0,l.kt)("wrapper",(0,r.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"vowpal-wabbit"},"Vowpal Wabbit"),(0,l.kt)(m,{mdxType:"VW"}))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/88e44e99.af705458.js b/assets/js/88e44e99.af705458.js deleted file mode 100644 index 860c676d7c..0000000000 --- a/assets/js/88e44e99.af705458.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[8817],{3905:function(e,t,a){a.d(t,{Zo:function(){return c},kt:function(){return b}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i=n.createContext({}),u=function(e){var t=n.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(i.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=u(a),b=r,d=m["".concat(i,".").concat(b)]||m[b]||p[b]||l;return a?n.createElement(d,o(o({ref:t},c),{},{components:a})):n.createElement(d,o({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,o=new Array(l);o[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:r,o[1]=s;for(var u=2;u child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),y=null!=d?d:w.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),h=(0,s.l)(y,(function(e,t){return e.value===t.value}));if(h.length>0)throw new Error('Docusaurus error: Duplicate values "'+h.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var g=null===b?b:null!=(t=null!=b?b:null==(a=w.find((function(e){return e.props.default})))?void 0:a.props.value)?t:w[0].props.value;if(null!==g&&!y.some((function(e){return e.value===g})))throw new Error('Docusaurus error: The has a defaultValue "'+g+'" but none of its children has the corresponding value. Available values are: '+y.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var k=(0,i.U)(),E=k.tabGroupChoices,x=k.setTabGroupChoices,_=(0,r.useState)(g),T=_[0],C=_[1],V=[],P=(0,u.o5)().blockElementScrollPositionUntilNextRender;if(null!=f){var O=E[f];null!=O&&O!==T&&y.some((function(e){return e.value===O}))&&C(O)}var N=function(e){var t=e.currentTarget,a=V.indexOf(t),n=y[a].value;n!==T&&(P(t),C(n),null!=f&&x(f,String(n)))},W=function(e){var t,a=null;switch(e.key){case"Enter":N(e);break;case"ArrowRight":var n,r=V.indexOf(e.currentTarget)+1;a=null!=(n=V[r])?n:V[0];break;case"ArrowLeft":var l,o=V.indexOf(e.currentTarget)-1;a=null!=(l=V[o])?l:V[V.length-1]}null==(t=a)||t.focus()};return r.createElement("div",{className:(0,l.Z)("tabs-container",c)},r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":m},v)},y.map((function(e){var t=e.value,a=e.label,o=e.attributes;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:T===t?0:-1,"aria-selected":T===t,key:t,ref:function(e){return V.push(e)},onKeyDown:W,onClick:N},o,{className:(0,l.Z)("tabs__item",p,null==o?void 0:o.className,{"tabs__item--active":T===t})}),null!=a?a:t)}))),o?(0,r.cloneElement)(w.filter((function(e){return e.props.value===T}))[0],{className:"margin-top--md"}):r.createElement("div",{className:"margin-top--md"},w.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==T})}))))}function b(e){var t=(0,o.Z)();return r.createElement(m,(0,n.Z)({key:String(t)},e))}},1989:function(e,t,a){var n=a(7294),r=a(2263);t.Z=function(e){var t=e.className,a=e.py,l=e.scala,o=e.csharp,s=e.sourceLink,i=(0,r.Z)().siteConfig.customFields.version,u="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+a,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+l,p="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+o;return n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,n.createElement("strong",null,"Python API: "),n.createElement("a",{href:u},t)),n.createElement("td",null,n.createElement("strong",null,"Scala API: "),n.createElement("a",{href:c},t)),n.createElement("td",null,n.createElement("strong",null,".NET API: "),n.createElement("a",{href:p},t)),n.createElement("td",null,n.createElement("strong",null,"Source: "),n.createElement("a",{href:s},t)))))}},4859:function(e,t,a){a.r(t),a.d(t,{assets:function(){return w},contentTitle:function(){return f},default:function(){return g},frontMatter:function(){return d},metadata:function(){return v},toc:function(){return y}});var n=a(3117),r=a(102),l=(a(7294),a(3905)),o=a(5488),s=a(5162),i=a(1989),u=["components"],c=[{value:"VowpalWabbitRegressor",id:"vowpalwabbitregressor",level:2},{value:"VowpalWabbitContextualBandit",id:"vowpalwabbitcontextualbandit",level:2}],p={toc:c};function m(e){var t=e.components,a=(0,r.Z)(e,u);return(0,l.kt)("wrapper",(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"vowpalwabbitregressor"},"VowpalWabbitRegressor"),(0,l.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\nvw = (VowpalWabbitRegressor()\n .setLabelCol("Y1")\n .setFeaturesCol("features")\n .setPredictionCol("pred"))\n\nvwRegressor = (VowpalWabbitRegressor()\n .setNumPasses(20)\n .setPassThroughArgs("--holdout_off --loss_function quantile -q :: -l 0.1"))\n'))),(0,l.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\n\nval vw = (new VowpalWabbitRegressor()\n .setLabelCol("Y1")\n .setFeaturesCol("features")\n .setPredictionCol("pred"))\n\nval vwRegressor = (new VowpalWabbitRegressor()\n .setNumPasses(20)\n .setPassThroughArgs("--holdout_off --loss_function quantile -q :: -l 0.1"))\n\n')))),(0,l.kt)(i.Z,{className:"VowpalWabbitRegressor",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitRegressor",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitRegressor.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitRegressor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitRegressor.scala",mdxType:"DocTable"}),(0,l.kt)("h2",{id:"vowpalwabbitcontextualbandit"},"VowpalWabbitContextualBandit"),(0,l.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(s.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.vw import *\n\ncb = (VowpalWabbitContextualBandit()\n .setPassThroughArgs("--cb_explore_adf --epsilon 0.2 --quiet")\n .setLabelCol("cost")\n .setProbabilityCol("prob")\n .setChosenActionCol("chosen_action")\n .setSharedCol("shared_features")\n .setFeaturesCol("action_features")\n .setUseBarrierExecutionMode(False))\n'))),(0,l.kt)(s.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.vw._\n\nval cb = (new VowpalWabbitContextualBandit()\n .setPassThroughArgs("--cb_explore_adf --epsilon 0.2 --quiet")\n .setLabelCol("cost")\n .setProbabilityCol("prob")\n .setChosenActionCol("chosen_action")\n .setSharedCol("shared_features")\n .setFeaturesCol("action_features")\n .setUseBarrierExecutionMode(false))\n\n')))),(0,l.kt)(i.Z,{className:"VowpalWabbitContextualBandit",py:"synapse.ml.vw.html#module-synapse.ml.vw.VowpalWabbitContextualBandit",scala:"com/microsoft/azure/synapse/ml/vw/VowpalWabbitContextualBandit.html",csharp:"classSynapse_1_1ML_1_1Vw_1_1VowpalWabbitContextualBandit.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/vw/src/main/scala/com/microsoft/azure/synapse/ml/vw/VowpalWabbitContextualBandit.scala",mdxType:"DocTable"}))}m.isMDXComponent=!0;var b=["components"],d={title:"Estimators - Vowpal Wabbit",sidebar_label:"Vowpal Wabbit",hide_title:!0},f="Vowpal Wabbit",v={unversionedId:"Quick Examples/estimators/estimators_vw",id:"Quick Examples/estimators/estimators_vw",title:"Estimators - Vowpal Wabbit",description:"",source:"@site/docs/Quick Examples/estimators/estimators_vw.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_vw",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_vw",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - Vowpal Wabbit",sidebar_label:"Vowpal Wabbit",hide_title:!0}},w={},y=[].concat(c),h={toc:y};function g(e){var t=e.components,a=(0,r.Z)(e,b);return(0,l.kt)("wrapper",(0,n.Z)({},h,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"vowpal-wabbit"},"Vowpal Wabbit"),(0,l.kt)(m,{mdxType:"VW"}))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9783ff24.43eb36d8.js b/assets/js/9783ff24.43eb36d8.js new file mode 100644 index 0000000000..992e5c50cb --- /dev/null +++ b/assets/js/9783ff24.43eb36d8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[9006],{3905:function(e,a,n){n.d(a,{Zo:function(){return c},kt:function(){return d}});var t=n(7294);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function r(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function o(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var i=t.createContext({}),m=function(e){var a=t.useContext(i),n=a;return e&&(n="function"==typeof e?e(a):o(o({},a),e)),n},c=function(e){var a=m(e.components);return t.createElement(i.Provider,{value:a},e.children)},u={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},p=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,r=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=m(n),d=s,f=p["".concat(i,".").concat(d)]||p[d]||u[d]||r;return n?t.createElement(f,o(o({ref:a},c),{},{components:n})):t.createElement(f,o({ref:a},c))}));function d(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var r=n.length,o=new Array(r);o[0]=p;var l={};for(var i in a)hasOwnProperty.call(a,i)&&(l[i]=a[i]);l.originalType=e,l.mdxType="string"==typeof e?e:s,o[1]=l;for(var m=2;m child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?a:[]}(e).map((function(e){var a=e.props;return{value:a.value,label:a.label,attributes:a.attributes,default:a.default}}))}function p(e){var a=e.values,n=e.children;return(0,s.useMemo)((function(){var e=null!=a?a:u(n);return function(e){var a=(0,m.l)(e,(function(e,a){return e.value===a.value}));if(a.length>0)throw new Error('Docusaurus error: Duplicate values "'+a.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[a,n])}function d(e){var a=e.value;return e.tabValues.some((function(e){return e.value===a}))}function f(e){var a=e.queryString,n=void 0!==a&&a,t=e.groupId,r=(0,l.k6)(),o=function(e){var a=e.queryString,n=void 0!==a&&a,t=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=t?t:null}({queryString:n,groupId:t});return[(0,i._X)(o),(0,s.useCallback)((function(e){if(o){var a=new URLSearchParams(r.location.search);a.set(o,e),r.replace(Object.assign({},r.location,{search:a.toString()}))}}),[o,r])]}function y(e){var a,n,t,r,o=e.defaultValue,l=e.queryString,i=void 0!==l&&l,m=e.groupId,u=p(e),y=(0,s.useState)((function(){return function(e){var a,n=e.defaultValue,t=e.tabValues;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+t.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var s=null!=(a=t.find((function(e){return e.default})))?a:t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:o,tabValues:u})})),v=y[0],g=y[1],h=f({queryString:i,groupId:m}),k=h[0],b=h[1],T=(a=function(e){return e?"docusaurus.tab."+e:null}({groupId:m}.groupId),n=(0,c.Nk)(a),t=n[0],r=n[1],[t,(0,s.useCallback)((function(e){a&&r.set(e)}),[a,r])]),M=T[0],C=T[1],I=function(){var e=null!=k?k:M;return d({value:e,tabValues:u})?e:null}();return(0,s.useLayoutEffect)((function(){I&&g(I)}),[I]),{selectedValue:v,selectValue:(0,s.useCallback)((function(e){if(!d({value:e,tabValues:u}))throw new Error("Can't select invalid tab value="+e);g(e),b(e),C(e)}),[b,C,u]),tabValues:u}}var v=n(2389),g="tabList__CuJ",h="tabItem_LNqP";function k(e){var a=e.className,n=e.block,l=e.selectedValue,i=e.selectValue,m=e.tabValues,c=[],u=(0,o.o5)().blockElementScrollPositionUntilNextRender,p=function(e){var a=e.currentTarget,n=c.indexOf(a),t=m[n].value;t!==l&&(u(a),i(t))},d=function(e){var a,n=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":var t,s=c.indexOf(e.currentTarget)+1;n=null!=(t=c[s])?t:c[0];break;case"ArrowLeft":var r,o=c.indexOf(e.currentTarget)-1;n=null!=(r=c[o])?r:c[c.length-1]}null==(a=n)||a.focus()};return s.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":n},a)},m.map((function(e){var a=e.value,n=e.label,o=e.attributes;return s.createElement("li",(0,t.Z)({role:"tab",tabIndex:l===a?0:-1,"aria-selected":l===a,key:a,ref:function(e){return c.push(e)},onKeyDown:d,onClick:p},o,{className:(0,r.Z)("tabs__item",h,null==o?void 0:o.className,{"tabs__item--active":l===a})}),null!=n?n:a)})))}function b(e){var a=e.lazy,n=e.children,t=e.selectedValue,r=(Array.isArray(n)?n:[n]).filter(Boolean);if(a){var o=r.find((function(e){return e.props.value===t}));return o?(0,s.cloneElement)(o,{className:"margin-top--md"}):null}return s.createElement("div",{className:"margin-top--md"},r.map((function(e,a){return(0,s.cloneElement)(e,{key:a,hidden:e.props.value!==t})})))}function T(e){var a=y(e);return s.createElement("div",{className:(0,r.Z)("tabs-container",g)},s.createElement(k,(0,t.Z)({},e,a)),s.createElement(b,(0,t.Z)({},e,a)))}function M(e){var a=(0,v.Z)();return s.createElement(T,(0,t.Z)({key:String(a)},e))}},1989:function(e,a,n){var t=n(7294),s=n(2263);a.Z=function(e){var a=e.className,n=e.py,r=e.scala,o=e.csharp,l=e.sourceLink,i=(0,s.Z)().siteConfig.customFields.version,m="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+n,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+r,u="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+o;return t.createElement("table",null,t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",null,t.createElement("strong",null,"Python API: "),t.createElement("a",{href:m},a)),t.createElement("td",null,t.createElement("strong",null,"Scala API: "),t.createElement("a",{href:c},a)),t.createElement("td",null,t.createElement("strong",null,".NET API: "),t.createElement("a",{href:u},a)),t.createElement("td",null,t.createElement("strong",null,"Source: "),t.createElement("a",{href:l},a)))))}},9448:function(e,a,n){n.r(a),n.d(a,{assets:function(){return B},contentTitle:function(){return V},default:function(){return K},frontMatter:function(){return P},metadata:function(){return A},toc:function(){return H}});var t=n(3117),s=n(102),r=(n(7294),n(3905)),o=n(4866),l=n(5162),i=n(1989),m=["components"],c=[{value:"AutoML",id:"automl",level:2},{value:"FindBestModel",id:"findbestmodel",level:3},{value:"TuneHyperparameters",id:"tunehyperparameters",level:3}],u={toc:c};function p(e){var a=e.components,n=(0,s.Z)(e,m);return(0,r.kt)("wrapper",(0,t.Z)({},u,n,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"automl"},"AutoML"),(0,r.kt)("h3",{id:"findbestmodel"},"FindBestModel"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.automl import *\nfrom synapse.ml.train import *\nfrom pyspark.ml.classification import RandomForestClassifier\n\ndf = (spark.createDataFrame([\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, 0, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3)\n], ["Label", "col1", "col2", "col3", "col4"]))\n\n# mocking models\nrandomForestClassifier = (TrainClassifier()\n .setModel(RandomForestClassifier()\n .setMaxBins(32)\n .setMaxDepth(5)\n .setMinInfoGain(0.0)\n .setMinInstancesPerNode(1)\n .setNumTrees(20)\n .setSubsamplingRate(1.0)\n .setSeed(0))\n .setFeaturesCol("mlfeatures")\n .setLabelCol("Label"))\nmodel = randomForestClassifier.fit(df)\n\nfindBestModel = (FindBestModel()\n .setModels([model, model])\n .setEvaluationMetric("accuracy"))\nbestModel = findBestModel.fit(df)\nbestModel.transform(df).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.automl._\nimport com.microsoft.azure.synapse.ml.train._\nimport spark.implicits._\nimport org.apache.spark.ml.Transformer\n\nval df = (Seq(\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, 0, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3)\n ).toDF("Label", "col1", "col2", "col3", "col4"))\n\n// mocking models\nval randomForestClassifier = (new TrainClassifier()\n .setModel(\n new RandomForestClassifier()\n .setMaxBins(32)\n .setMaxDepth(5)\n .setMinInfoGain(0.0)\n .setMinInstancesPerNode(1)\n .setNumTrees(20)\n .setSubsamplingRate(1.0)\n .setSeed(0L))\n .setFeaturesCol("mlfeatures")\n .setLabelCol("Label"))\nval model = randomForestClassifier.fit(df)\n\nval findBestModel = (new FindBestModel()\n .setModels(Array(model.asInstanceOf[Transformer], model.asInstanceOf[Transformer]))\n .setEvaluationMetric("accuracy"))\nval bestModel = findBestModel.fit(df)\nbestModel.transform(df).show()\n')))),(0,r.kt)(i.Z,{className:"FindBestModel",py:"synapse.ml.automl.html#module-synapse.ml.automl.FindBestModel",scala:"com/microsoft/azure/synapse/ml/automl/FindBestModel.html",csharp:"classSynapse_1_1ML_1_1Automl_1_1FindBestModel.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/automl/FindBestModel.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"tunehyperparameters"},"TuneHyperparameters"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.automl import *\nfrom synapse.ml.train import *\nfrom pyspark.ml.classification import LogisticRegression, RandomForestClassifier, GBTClassifier\n\n\ndf = (spark.createDataFrame([\n (0, 1, 1, 1, 1, 1, 1.0, 3, 1, 1),\n (0, 1, 1, 1, 1, 2, 1.0, 1, 1, 1),\n (0, 1, 1, 1, 1, 2, 1.0, 2, 1, 1),\n (0, 1, 2, 3, 1, 2, 1.0, 3, 1, 1),\n (0, 3, 1, 1, 1, 2, 1.0, 3, 1, 1)\n], ["Label", "Clump_Thickness", "Uniformity_of_Cell_Size",\n "Uniformity_of_Cell_Shape", "Marginal_Adhesion", "Single_Epithelial_Cell_Size",\n "Bare_Nuclei", "Bland_Chromatin", "Normal_Nucleoli", "Mitoses"]))\n\nlogReg = LogisticRegression()\nrandForest = RandomForestClassifier()\ngbt = GBTClassifier()\nsmlmodels = [logReg, randForest, gbt]\nmmlmodels = [TrainClassifier(model=model, labelCol="Label") for model in smlmodels]\n\nparamBuilder = (HyperparamBuilder()\n .addHyperparam(logReg, logReg.regParam, RangeHyperParam(0.1, 0.3))\n .addHyperparam(randForest, randForest.numTrees, DiscreteHyperParam([5,10]))\n .addHyperparam(randForest, randForest.maxDepth, DiscreteHyperParam([3,5]))\n .addHyperparam(gbt, gbt.maxBins, RangeHyperParam(8,16))\n .addHyperparam(gbt, gbt.maxDepth, DiscreteHyperParam([3,5])))\nsearchSpace = paramBuilder.build()\n# The search space is a list of params to tuples of estimator and hyperparam\nrandomSpace = RandomSpace(searchSpace)\n\nbestModel = TuneHyperparameters(\n evaluationMetric="accuracy", models=mmlmodels, numFolds=2,\n numRuns=len(mmlmodels) * 2, parallelism=2,\n paramSpace=randomSpace.space(), seed=0).fit(df)\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.automl._\nimport com.microsoft.azure.synapse.ml.train._\nimport spark.implicits._\n\nval logReg = new LogisticRegression()\nval randForest = new RandomForestClassifier()\nval gbt = new GBTClassifier()\nval smlmodels = Seq(logReg, randForest, gbt)\nval mmlmodels = smlmodels.map(model => new TrainClassifier().setModel(model).setLabelCol("Label"))\n\nval paramBuilder = new HyperparamBuilder()\n .addHyperparam(logReg.regParam, new DoubleRangeHyperParam(0.1, 0.3))\n .addHyperparam(randForest.numTrees, new DiscreteHyperParam(List(5,10)))\n .addHyperparam(randForest.maxDepth, new DiscreteHyperParam(List(3,5)))\n .addHyperparam(gbt.maxBins, new IntRangeHyperParam(8,16))\n.addHyperparam(gbt.maxDepth, new DiscreteHyperParam(List(3,5)))\nval searchSpace = paramBuilder.build()\nval randomSpace = new RandomSpace(searchSpace)\n\nval dataset: DataFrame = Seq(\n (0, 1, 1, 1, 1, 1, 1.0, 3, 1, 1),\n (0, 1, 1, 1, 1, 2, 1.0, 1, 1, 1),\n (0, 1, 1, 1, 1, 2, 1.0, 2, 1, 1),\n (0, 1, 2, 3, 1, 2, 1.0, 3, 1, 1),\n (0, 3, 1, 1, 1, 2, 1.0, 3, 1, 1))\n .toDF("Label", "Clump_Thickness", "Uniformity_of_Cell_Size",\n "Uniformity_of_Cell_Shape", "Marginal_Adhesion", "Single_Epithelial_Cell_Size",\n "Bare_Nuclei", "Bland_Chromatin", "Normal_Nucleoli", "Mitoses")\n\nval tuneHyperparameters = new TuneHyperparameters().setEvaluationMetric("accuracy")\n .setModels(mmlmodels.toArray).setNumFolds(2).setNumRuns(mmlmodels.length * 2)\n .setParallelism(1).setParamSpace(randomSpace).setSeed(0)\ntuneHyperparameters.fit(dataset).show()\n')))),(0,r.kt)(i.Z,{className:"TuneHyperparameters",py:"synapse.ml.automl.html#module-synapse.ml.automl.TuneHyperparameters",scala:"com/microsoft/azure/synapse/ml/automl/TuneHyperparameters.html",csharp:"classSynapse_1_1ML_1_1Automl_1_1TuneHyperparameters.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/automl/TuneHyperparameters.scala",mdxType:"DocTable"}))}p.isMDXComponent=!0;var d=["components"],f=[{value:"Featurize",id:"featurize",level:2},{value:"CleanMissingData",id:"cleanmissingdata",level:3},{value:"CountSelector",id:"countselector",level:3},{value:"Featurize",id:"featurize-1",level:3},{value:"ValueIndexer",id:"valueindexer",level:3},{value:"Featurize Text",id:"featurize-text",level:2},{value:"TextFeaturizer",id:"textfeaturizer",level:3}],y={toc:f};function v(e){var a=e.components,n=(0,s.Z)(e,d);return(0,r.kt)("wrapper",(0,t.Z)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"featurize"},"Featurize"),(0,r.kt)("h3",{id:"cleanmissingdata"},"CleanMissingData"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndataset = spark.createDataFrame([\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, None, None),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (None, None, None, None, None),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, None, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, None),\n (0, 3, None, 0.99, 2),\n (1, 4, 0.12, 0.34, 3)\n], ["col1", "col2", "col3", "col4", "col5"])\n\ncmd = (CleanMissingData()\n .setInputCols(dataset.columns)\n .setOutputCols(dataset.columns)\n .setCleaningMode("Mean"))\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport java.lang.{Boolean => JBoolean, Double => JDouble, Integer => JInt}\nimport spark.implicits._\n\ndef createMockDataset: DataFrame = {\n Seq[(JInt, JInt, JDouble, JDouble, JInt)](\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, null, null),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (null, null, null, null, null),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, null, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, null),\n (0, 3, null, 0.99, 2),\n (1, 4, 0.12, 0.34, 3))\n .toDF("col1", "col2", "col3", "col4", "col5")\n }\n\nval dataset = createMockDataset\nval cmd = (new CleanMissingData()\n .setInputCols(dataset.columns)\n .setOutputCols(dataset.columns)\n .setCleaningMode("Mean"))\n')))),(0,r.kt)(i.Z,{className:"CleanMissingData",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.CleanMissingData",scala:"com/microsoft/azure/synapse/ml/featurize/CleanMissingData.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1CleanMissingData.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/CleanMissingData.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"countselector"},"CountSelector"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\nfrom pyspark.ml.linalg import Vectors\n\ndf = spark.createDataFrame([\n (Vectors.sparse(3, [(0, 1.0), (2, 2.0)]), Vectors.dense(1.0, 0.1, 0)),\n (Vectors.sparse(3, [(0, 1.0), (2, 2.0)]), Vectors.dense(1.0, 0.1, 0))\n], ["col1", "col2"])\n\ncs = CountSelector().setInputCol("col1").setOutputCol("col3")\n\ncs.fit(df).transform(df).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport org.apache.spark.ml.linalg.Vectors\nimport spark.implicits._\n\nval df = Seq(\n (Vectors.sparse(3, Seq((0, 1.0), (2, 2.0))), Vectors.dense(1.0, 0.1, 0)),\n (Vectors.sparse(3, Seq((0, 1.0), (2, 2.0))), Vectors.dense(1.0, 0.1, 0))\n ).toDF("col1", "col2")\n\nval cs = (new CountSelector()\n .setInputCol("col1")\n .setOutputCol("col3"))\n\ncs.fit(df).transform(df).show()\n')))),(0,r.kt)(i.Z,{className:"CountSelector",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.CountSelector",scala:"com/microsoft/azure/synapse/ml/featurize/CountSelector.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1CountSelector.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/CountSelector.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"featurize-1"},"Featurize"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndataset = spark.createDataFrame([\n (0, 2, 0.50, 0.60, "pokemon are everywhere"),\n (1, 3, 0.40, 0.50, "they are in the woods"),\n (0, 4, 0.78, 0.99, "they are in the water"),\n (1, 5, 0.12, 0.34, "they are in the fields"),\n (0, 3, 0.78, 0.99, "pokemon - gotta catch em all")\n], ["Label", "col1", "col2", "col3"])\n\nfeat = (Featurize()\n .setNumFeatures(10)\n .setOutputCol("testColumn")\n .setInputCols(["col1", "col2", "col3"])\n .setOneHotEncodeCategoricals(False))\n\nfeat.fit(dataset).transform(dataset).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport spark.implicits._\n\nval dataset = Seq(\n (0, 2, 0.50, 0.60, "pokemon are everywhere"),\n (1, 3, 0.40, 0.50, "they are in the woods"),\n (0, 4, 0.78, 0.99, "they are in the water"),\n (1, 5, 0.12, 0.34, "they are in the fields"),\n (0, 3, 0.78, 0.99, "pokemon - gotta catch em all")).toDF("Label", "col1", "col2", "col3")\n\nval featureColumns = dataset.columns.filter(_ != "Label")\n\nval feat = (new Featurize()\n .setNumFeatures(10)\n .setOutputCol("testColumn")\n .setInputCols(featureColumns)\n .setOneHotEncodeCategoricals(false))\n\nfeat.fit(dataset).transform(dataset).show()\n')))),(0,r.kt)(i.Z,{className:"Featurize",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.Featurize",scala:"com/microsoft/azure/synapse/ml/featurize/Featurize.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1Featurize.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/Featurize.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"valueindexer"},"ValueIndexer"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndf = spark.createDataFrame([\n (-3, 24, 0.32534, True, "piano"),\n (1, 5, 5.67, False, "piano"),\n (-3, 5, 0.32534, False, "guitar")\n], ["int", "long", "double", "bool", "string"])\n\nvi = ValueIndexer().setInputCol("string").setOutputCol("string_cat")\n\nvi.fit(df).transform(df).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport spark.implicits._\n\nval df = Seq[(Int, Long, Double, Boolean, String)](\n (-3, 24L, 0.32534, true, "piano"),\n (1, 5L, 5.67, false, "piano"),\n (-3, 5L, 0.32534, false, "guitar")).toDF("int", "long", "double", "bool", "string")\n\nval vi = new ValueIndexer().setInputCol("string").setOutputCol("string_cat")\n\nvi.fit(df).transform(df).show()\n')))),(0,r.kt)(i.Z,{className:"ValueIndexer",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.ValueIndexer",scala:"com/microsoft/azure/synapse/ml/featurize/ValueIndexer.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1ValueIndexer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/ValueIndexer.scala",mdxType:"DocTable"}),(0,r.kt)("h2",{id:"featurize-text"},"Featurize Text"),(0,r.kt)("h3",{id:"textfeaturizer"},"TextFeaturizer"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize.text import *\n\ndfRaw = spark.createDataFrame([\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, "")\n], ["label", "sentence"])\n\ntfRaw = (TextFeaturizer()\n .setInputCol("sentence")\n .setOutputCol("features")\n .setNumFeatures(20))\n\ntfRaw.fit(dfRaw).transform(dfRaw).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize.text._\nimport spark.implicits._\n\nval dfRaw = Seq((0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, "")).toDF("label", "sentence")\n\nval tfRaw = (new TextFeaturizer()\n .setInputCol("sentence")\n .setOutputCol("features")\n .setNumFeatures(20))\n\ntfRaw.fit(dfRaw).transform(dfRaw).show()\n')))),(0,r.kt)(i.Z,{className:"TextFeaturizer",py:"synapse.ml.featurize.text.html#module-synapse.ml.featurize.text.TextFeaturizer",scala:"com/microsoft/azure/synapse/ml/featurize/text/TextFeaturizer.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1Text_1_1TextFeaturizer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/text/TextFeaturizer.scala",mdxType:"DocTable"}))}v.isMDXComponent=!0;var g=["components"],h=[{value:"Isolation Forest",id:"isolation-forest",level:2},{value:"IsolationForest",id:"isolationforest",level:3}],k={toc:h};function b(e){var a=e.components,n=(0,s.Z)(e,g);return(0,r.kt)("wrapper",(0,t.Z)({},k,n,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"isolation-forest"},"Isolation Forest"),(0,r.kt)("h3",{id:"isolationforest"},"IsolationForest"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.isolationforest import *\n\nisolationForest = (IsolationForest()\n .setNumEstimators(100)\n .setBootstrap(False)\n .setMaxSamples(256)\n .setMaxFeatures(1.0)\n .setFeaturesCol("features")\n .setPredictionCol("predictedLabel")\n .setScoreCol("outlierScore")\n .setContamination(0.02)\n .setContaminationError(0.02 * 0.01)\n .setRandomSeed(1))\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.isolationforest._\nimport spark.implicits._\n\nval isolationForest = (new IsolationForest()\n .setNumEstimators(100)\n .setBootstrap(false)\n .setMaxSamples(256)\n .setMaxFeatures(1.0)\n .setFeaturesCol("features")\n .setPredictionCol("predictedLabel")\n .setScoreCol("outlierScore")\n .setContamination(0.02)\n .setContaminationError(0.02 * 0.01)\n .setRandomSeed(1))\n')))),(0,r.kt)(i.Z,{className:"IsolationForest",py:"synapse.ml.isolationforest.html#module-synapse.ml.isolationforest.IsolationForest",scala:"com/microsoft/azure/synapse/ml/isolationforest/IsolationForest.html",csharp:"classSynapse_1_1ML_1_1Isolationforest_1_1IsolationForest.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/isolationforest/IsolationForest.scala",mdxType:"DocTable"}))}b.isMDXComponent=!0;var T=["components"],M=[{value:"NN",id:"nn",level:2},{value:"ConditionalKNN",id:"conditionalknn",level:3},{value:"KNN",id:"knn",level:3}],C={toc:M};function I(e){var a=e.components,n=(0,s.Z)(e,T);return(0,r.kt)("wrapper",(0,t.Z)({},C,n,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"nn"},"NN"),(0,r.kt)("h3",{id:"conditionalknn"},"ConditionalKNN"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.nn import *\n\ncknn = (ConditionalKNN()\n .setOutputCol("matches")\n .setFeaturesCol("features"))\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.nn._\nimport spark.implicits._\n\nval cknn = (new ConditionalKNN()\n .setOutputCol("matches")\n .setFeaturesCol("features"))\n')))),(0,r.kt)(i.Z,{className:"ConditionalKNN",py:"synapse.ml.nn.html#module-synapse.ml.nn.ConditionalKNN",scala:"com/microsoft/azure/synapse/ml/nn/ConditionalKNN.html",csharp:"classSynapse_1_1ML_1_1Nn_1_1ConditionalKNN.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/nn/ConditionalKNN.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"knn"},"KNN"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.nn import *\n\nknn = (KNN()\n .setOutputCol("matches"))\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.nn._\nimport spark.implicits._\n\nval knn = (new KNN()\n .setOutputCol("matches"))\n')))),(0,r.kt)(i.Z,{className:"KNN",py:"synapse.ml.nn.html#module-synapse.ml.nn.KNN",scala:"com/microsoft/azure/synapse/ml/nn/KNN.html",csharp:"classSynapse_1_1ML_1_1Nn_1_1KNN.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/nn/KNN.scala",mdxType:"DocTable"}))}I.isMDXComponent=!0;var _=["components"],w=[{value:"Recommendation",id:"recommendation",level:2},{value:"RecommendationIndexer, RankingEvaluator, RankingAdapter and RankingTrainValidationSplit",id:"recommendationindexer-rankingevaluator-rankingadapter-and-rankingtrainvalidationsplit",level:3},{value:"SAR",id:"sar",level:3}],N={toc:w};function S(e){var a=e.components,n=(0,s.Z)(e,_);return(0,r.kt)("wrapper",(0,t.Z)({},N,n,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"recommendation"},"Recommendation"),(0,r.kt)("h3",{id:"recommendationindexer-rankingevaluator-rankingadapter-and-rankingtrainvalidationsplit"},"RecommendationIndexer, RankingEvaluator, RankingAdapter and RankingTrainValidationSplit"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.recommendation import *\nfrom pyspark.ml.recommendation import ALS\nfrom pyspark.ml.tuning import *\n\nratings = (spark.createDataFrame([\n ("11", "Movie 01", 2),\n ("11", "Movie 03", 1),\n ("11", "Movie 04", 5),\n ("11", "Movie 05", 3),\n ("11", "Movie 06", 4),\n ("11", "Movie 07", 1),\n ("11", "Movie 08", 5),\n ("11", "Movie 09", 3),\n ("22", "Movie 01", 4),\n ("22", "Movie 02", 5),\n ("22", "Movie 03", 1),\n ("22", "Movie 05", 3),\n ("22", "Movie 06", 3),\n ("22", "Movie 07", 5),\n ("22", "Movie 08", 1),\n ("22", "Movie 10", 3),\n ("33", "Movie 01", 4),\n ("33", "Movie 03", 1),\n ("33", "Movie 04", 5),\n ("33", "Movie 05", 3),\n ("33", "Movie 06", 4),\n ("33", "Movie 08", 1),\n ("33", "Movie 09", 5),\n ("33", "Movie 10", 3),\n ("44", "Movie 01", 4),\n ("44", "Movie 02", 5),\n ("44", "Movie 03", 1),\n ("44", "Movie 05", 3),\n ("44", "Movie 06", 4),\n ("44", "Movie 07", 5),\n ("44", "Movie 08", 1),\n ("44", "Movie 10", 3)\n ], ["customerIDOrg", "itemIDOrg", "rating"])\n .dropDuplicates()\n .cache())\n\nrecommendationIndexer = (RecommendationIndexer()\n .setUserInputCol("customerIDOrg")\n .setUserOutputCol("customerID")\n .setItemInputCol("itemIDOrg")\n .setItemOutputCol("itemID")\n .setRatingCol("rating"))\n\ntransformedDf = (recommendationIndexer.fit(ratings)\n .transform(ratings).cache())\n\nals = (ALS()\n .setNumUserBlocks(1)\n .setNumItemBlocks(1)\n .setUserCol("customerID")\n .setItemCol("itemID")\n .setRatingCol("rating")\n .setSeed(0))\n\nevaluator = (RankingEvaluator()\n .setK(3)\n .setNItems(10))\n\nadapter = (RankingAdapter()\n .setK(evaluator.getK())\n .setRecommender(als))\n\nadapter.fit(transformedDf).transform(transformedDf).show()\n\nparamGrid = (ParamGridBuilder()\n .addGrid(als.regParam, [1.0])\n .build())\n\ntvRecommendationSplit = (RankingTrainValidationSplit()\n .setEstimator(als)\n .setEvaluator(evaluator)\n .setEstimatorParamMaps(paramGrid)\n .setTrainRatio(0.8)\n .setUserCol(recommendationIndexer.getUserOutputCol())\n .setItemCol(recommendationIndexer.getItemOutputCol())\n .setRatingCol("rating"))\n\ntvRecommendationSplit.fit(transformedDf).transform(transformedDf).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.recommendation._\nimport org.apache.spark.ml.recommendation.ALS\nimport org.apache.spark.ml.tuning._\nimport spark.implicits._\n\nval ratings = (Seq(\n ("11", "Movie 01", 2),\n ("11", "Movie 03", 1),\n ("11", "Movie 04", 5),\n ("11", "Movie 05", 3),\n ("11", "Movie 06", 4),\n ("11", "Movie 07", 1),\n ("11", "Movie 08", 5),\n ("11", "Movie 09", 3),\n ("22", "Movie 01", 4),\n ("22", "Movie 02", 5),\n ("22", "Movie 03", 1),\n ("22", "Movie 05", 3),\n ("22", "Movie 06", 3),\n ("22", "Movie 07", 5),\n ("22", "Movie 08", 1),\n ("22", "Movie 10", 3),\n ("33", "Movie 01", 4),\n ("33", "Movie 03", 1),\n ("33", "Movie 04", 5),\n ("33", "Movie 05", 3),\n ("33", "Movie 06", 4),\n ("33", "Movie 08", 1),\n ("33", "Movie 09", 5),\n ("33", "Movie 10", 3),\n ("44", "Movie 01", 4),\n ("44", "Movie 02", 5),\n ("44", "Movie 03", 1),\n ("44", "Movie 05", 3),\n ("44", "Movie 06", 4),\n ("44", "Movie 07", 5),\n ("44", "Movie 08", 1),\n ("44", "Movie 10", 3))\n .toDF("customerIDOrg", "itemIDOrg", "rating")\n .dropDuplicates()\n .cache())\n\nval recommendationIndexer = (new RecommendationIndexer()\n .setUserInputCol("customerIDOrg")\n .setUserOutputCol("customerID")\n .setItemInputCol("itemIDOrg")\n .setItemOutputCol("itemID")\n .setRatingCol("rating"))\n\nval transformedDf = (recommendationIndexer.fit(ratings)\n .transform(ratings).cache())\n\nval als = (new ALS()\n .setNumUserBlocks(1)\n .setNumItemBlocks(1)\n .setUserCol("customerID")\n .setItemCol("itemID")\n .setRatingCol("rating")\n .setSeed(0))\n\nval evaluator = (new RankingEvaluator()\n .setK(3)\n .setNItems(10))\n\nval adapter = (new RankingAdapter()\n .setK(evaluator.getK)\n .setRecommender(als))\n\nadapter.fit(transformedDf).transform(transformedDf).show()\n\nval paramGrid = (new ParamGridBuilder()\n .addGrid(als.regParam, Array(1.0))\n .build())\n\nval tvRecommendationSplit = (new RankingTrainValidationSplit()\n .setEstimator(als)\n .setEvaluator(evaluator)\n .setEstimatorParamMaps(paramGrid)\n .setTrainRatio(0.8)\n .setUserCol(recommendationIndexer.getUserOutputCol)\n .setItemCol(recommendationIndexer.getItemOutputCol)\n .setRatingCol("rating"))\n\ntvRecommendationSplit.fit(transformedDf).transform(transformedDf).show()\n')))),(0,r.kt)(i.Z,{className:"RecommendationIndexer",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.RecommendationIndexer",scala:"com/microsoft/azure/synapse/ml/recommendation/RecommendationIndexer.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1RecommendationIndexer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/RecommendationIndexer.scala",mdxType:"DocTable"}),(0,r.kt)(i.Z,{className:"RankingEvaluator",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.RankingEvaluator",scala:"com/microsoft/azure/synapse/ml/recommendation/RankingEvaluator.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1RankingEvaluator.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/RankingEvaluator.scala",mdxType:"DocTable"}),(0,r.kt)(i.Z,{className:"RankingAdapter",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.RankingAdapter",scala:"com/microsoft/azure/synapse/ml/recommendation/RankingAdapter.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1RankingAdapter.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/RankingAdapter.scala",mdxType:"DocTable"}),(0,r.kt)(i.Z,{className:"RankingTrainValidationSplit",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.RankingTrainValidationSplit",scala:"com/microsoft/azure/synapse/ml/recommendation/RankingTrainValidationSplit.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1RankingTrainValidationSplit.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/RankingTrainValidationSplit.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"sar"},"SAR"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.recommendation import *\n\nratings = (spark.createDataFrame([\n ("11", "Movie 01", 2),\n ("11", "Movie 03", 1),\n ("11", "Movie 04", 5),\n ("11", "Movie 05", 3),\n ("11", "Movie 06", 4),\n ("11", "Movie 07", 1),\n ("11", "Movie 08", 5),\n ("11", "Movie 09", 3),\n ("22", "Movie 01", 4),\n ("22", "Movie 02", 5),\n ("22", "Movie 03", 1),\n ("22", "Movie 05", 3),\n ("22", "Movie 06", 3),\n ("22", "Movie 07", 5),\n ("22", "Movie 08", 1),\n ("22", "Movie 10", 3),\n ("33", "Movie 01", 4),\n ("33", "Movie 03", 1),\n ("33", "Movie 04", 5),\n ("33", "Movie 05", 3),\n ("33", "Movie 06", 4),\n ("33", "Movie 08", 1),\n ("33", "Movie 09", 5),\n ("33", "Movie 10", 3),\n ("44", "Movie 01", 4),\n ("44", "Movie 02", 5),\n ("44", "Movie 03", 1),\n ("44", "Movie 05", 3),\n ("44", "Movie 06", 4),\n ("44", "Movie 07", 5),\n ("44", "Movie 08", 1),\n ("44", "Movie 10", 3)\n ], ["customerIDOrg", "itemIDOrg", "rating"])\n .dropDuplicates()\n .cache())\n\nrecommendationIndexer = (RecommendationIndexer()\n .setUserInputCol("customerIDOrg")\n .setUserOutputCol("customerID")\n .setItemInputCol("itemIDOrg")\n .setItemOutputCol("itemID")\n .setRatingCol("rating"))\n\nalgo = (SAR()\n .setUserCol("customerID")\n .setItemCol("itemID")\n .setRatingCol("rating")\n .setTimeCol("timestamp")\n .setSupportThreshold(1)\n .setSimilarityFunction("jacccard")\n .setActivityTimeFormat("EEE MMM dd HH:mm:ss Z yyyy"))\n\nadapter = (RankingAdapter()\n .setK(5)\n .setRecommender(algo))\n\nres1 = recommendationIndexer.fit(ratings).transform(ratings).cache()\n\nadapter.fit(res1).transform(res1).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.recommendation._\nimport spark.implicits._\n\nval ratings = (Seq(\n ("11", "Movie 01", 2),\n ("11", "Movie 03", 1),\n ("11", "Movie 04", 5),\n ("11", "Movie 05", 3),\n ("11", "Movie 06", 4),\n ("11", "Movie 07", 1),\n ("11", "Movie 08", 5),\n ("11", "Movie 09", 3),\n ("22", "Movie 01", 4),\n ("22", "Movie 02", 5),\n ("22", "Movie 03", 1),\n ("22", "Movie 05", 3),\n ("22", "Movie 06", 3),\n ("22", "Movie 07", 5),\n ("22", "Movie 08", 1),\n ("22", "Movie 10", 3),\n ("33", "Movie 01", 4),\n ("33", "Movie 03", 1),\n ("33", "Movie 04", 5),\n ("33", "Movie 05", 3),\n ("33", "Movie 06", 4),\n ("33", "Movie 08", 1),\n ("33", "Movie 09", 5),\n ("33", "Movie 10", 3),\n ("44", "Movie 01", 4),\n ("44", "Movie 02", 5),\n ("44", "Movie 03", 1),\n ("44", "Movie 05", 3),\n ("44", "Movie 06", 4),\n ("44", "Movie 07", 5),\n ("44", "Movie 08", 1),\n ("44", "Movie 10", 3))\n .toDF("customerIDOrg", "itemIDOrg", "rating")\n .dropDuplicates()\n .cache())\n\nval recommendationIndexer = (new RecommendationIndexer()\n .setUserInputCol("customerIDOrg")\n .setUserOutputCol("customerID")\n .setItemInputCol("itemIDOrg")\n .setItemOutputCol("itemID")\n .setRatingCol("rating"))\n\nval algo = (new SAR()\n .setUserCol("customerID")\n .setItemCol("itemID")\n .setRatingCol("rating")\n .setTimeCol("timestamp")\n .setSupportThreshold(1)\n .setSimilarityFunction("jacccard")\n .setActivityTimeFormat("EEE MMM dd HH:mm:ss Z yyyy"))\n\nval adapter = (new RankingAdapter()\n .setK(5)\n .setRecommender(algo))\n\nval res1 = recommendationIndexer.fit(ratings).transform(ratings).cache()\n\nadapter.fit(res1).transform(res1).show()\n')))),(0,r.kt)(i.Z,{className:"SAR",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.SAR",scala:"com/microsoft/azure/synapse/ml/recommendation/SAR.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1SAR.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/SAR.scala",mdxType:"DocTable"}))}S.isMDXComponent=!0;var x=["components"],D=[{value:"Stages",id:"stages",level:2},{value:"ClassBalancer",id:"classbalancer",level:3},{value:"MultiColumnAdapter",id:"multicolumnadapter",level:3},{value:"Timer",id:"timer",level:3}],R={toc:D};function z(e){var a=e.components,n=(0,s.Z)(e,x);return(0,r.kt)("wrapper",(0,t.Z)({},R,n,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"stages"},"Stages"),(0,r.kt)("h3",{id:"classbalancer"},"ClassBalancer"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 1.0, "Hi I"),\n (1, 1.0, "I wish for snow today"),\n (2, 2.0, "I wish for snow today"),\n (3, 2.0, "I wish for snow today"),\n (4, 2.0, "I wish for snow today"),\n (5, 2.0, "I wish for snow today"),\n (6, 0.0, "I wish for snow today"),\n (7, 1.0, "I wish for snow today"),\n (8, 0.0, "we Cant go to the park, because of the snow!"),\n (9, 2.0, "")\n ], ["index", "label", "sentence"]))\n\ncb = ClassBalancer().setInputCol("label")\n\ncb.fit(df).transform(df).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = Seq(\n (0, 1.0, "Hi I"),\n (1, 1.0, "I wish for snow today"),\n (2, 2.0, "I wish for snow today"),\n (3, 2.0, "I wish for snow today"),\n (4, 2.0, "I wish for snow today"),\n (5, 2.0, "I wish for snow today"),\n (6, 0.0, "I wish for snow today"),\n (7, 1.0, "I wish for snow today"),\n (8, 0.0, "we Cant go to the park, because of the snow!"),\n (9, 2.0, "")).toDF("index", "label", "sentence")\n\nval cb = new ClassBalancer().setInputCol("label")\n\ncb.fit(df).transform(df).show()\n')))),(0,r.kt)(i.Z,{className:"ClassBalancer",py:"synapse.ml.stages.html#module-synapse.ml.stages.ClassBalancer",scala:"com/microsoft/azure/synapse/ml/stages/ClassBalancer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1ClassBalancer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/ClassBalancer.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"multicolumnadapter"},"MultiColumnAdapter"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.ml.feature import Tokenizer\n\ndf = (spark.createDataFrame([\n (0, "This is a test", "this is one too"),\n (1, "could be a test", "bar"),\n (2, "foo", "bar"),\n (3, "foo", "maybe not")\n ], ["label", "words1", "words2"]))\n\nstage1 = Tokenizer()\nmca = (MultiColumnAdapter()\n .setBaseStage(stage1)\n .setInputCols(["words1", "words2"])\n .setOutputCols(["output1", "output2"]))\n\nmca.fit(df).transform(df).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.ml.feature.Tokenizer\n\nval df = (Seq(\n (0, "This is a test", "this is one too"),\n (1, "could be a test", "bar"),\n (2, "foo", "bar"),\n (3, "foo", "maybe not"))\n .toDF("label", "words1", "words2"))\n\nval stage1 = new Tokenizer()\nval mca = (new MultiColumnAdapter()\n .setBaseStage(stage1)\n .setInputCols(Array[String]("words1", "words2"))\n .setOutputCols(Array[String]("output1", "output2")))\n\nmca.fit(df).transform(df).show()\n')))),(0,r.kt)(i.Z,{className:"MultiColumnAdapter",py:"synapse.ml.stages.html#module-synapse.ml.stages.MultiColumnAdapter",scala:"com/microsoft/azure/synapse/ml/stages/MultiColumnAdapter.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1MultiColumnAdapter.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MultiColumnAdapter.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"timer"},"Timer"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.ml.feature import *\n\ndf = (spark.createDataFrame([\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, "")\n ], ["label", "sentence"]))\n\ntok = (Tokenizer()\n .setInputCol("sentence")\n .setOutputCol("tokens"))\n\ndf2 = Timer().setStage(tok).fit(df).transform(df)\n\ndf3 = HashingTF().setInputCol("tokens").setOutputCol("hash").transform(df2)\n\nidf = IDF().setInputCol("hash").setOutputCol("idf")\ntimer = Timer().setStage(idf)\n\ntimer.fit(df3).transform(df3).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.ml.feature._\n\nval df = (Seq(\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, "")\n ).toDF("label", "sentence"))\n\nval tok = (new Tokenizer()\n .setInputCol("sentence")\n .setOutputCol("tokens"))\n\nval df2 = new Timer().setStage(tok).fit(df).transform(df)\n\nval df3 = new HashingTF().setInputCol("tokens").setOutputCol("hash").transform(df2)\n\nval idf = new IDF().setInputCol("hash").setOutputCol("idf")\nval timer = new Timer().setStage(idf)\n\ntimer.fit(df3).transform(df3).show()\n')))),(0,r.kt)(i.Z,{className:"Timer",py:"synapse.ml.stages.html#module-synapse.ml.stages.Timer",scala:"com/microsoft/azure/synapse/ml/stages/Timer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Timer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Timer.scala",mdxType:"DocTable"}))}z.isMDXComponent=!0;var F=["components"],L=[{value:"Train",id:"train",level:2},{value:"TrainClassifier",id:"trainclassifier",level:3},{value:"TrainRegressor",id:"trainregressor",level:3}],Z={toc:L};function E(e){var a=e.components,n=(0,s.Z)(e,F);return(0,r.kt)("wrapper",(0,t.Z)({},Z,n,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"train"},"Train"),(0,r.kt)("h3",{id:"trainclassifier"},"TrainClassifier"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.train import *\nfrom pyspark.ml.classification import LogisticRegression\n\ndf = spark.createDataFrame([\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, 0, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3)],\n ["Label", "col1", "col2", "col3", "col4"]\n)\n\ntc = (TrainClassifier()\n .setModel(LogisticRegression())\n .setLabelCol("Label"))\n\ntc.fit(df).transform(df).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.train._\nimport org.apache.spark.ml.classification.LogisticRegression\n\nval df = (Seq(\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, 0, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3))\n .toDF("Label", "col1", "col2", "col3", "col4"))\n\nval tc = (new TrainClassifier()\n .setModel(new LogisticRegression())\n .setLabelCol("Label"))\n\ntc.fit(df).transform(df).show()\n')))),(0,r.kt)(i.Z,{className:"TrainClassifier",py:"synapse.ml.train.html#module-synapse.ml.train.TrainClassifier",scala:"com/microsoft/azure/synapse/ml/train/TrainClassifier.html",csharp:"classSynapse_1_1ML_1_1Train_1_1TrainClassifier.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/train/TrainClassifier.scala",mdxType:"DocTable"}),(0,r.kt)("h3",{id:"trainregressor"},"TrainRegressor"),(0,r.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.train import *\nfrom pyspark.ml.regression import LinearRegression\n\ndataset = (spark.createDataFrame([\n (0.0, 2, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 4, 0.78, 0.99, 2.0),\n (3.0, 5, 0.12, 0.34, 3.0),\n (0.0, 1, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0),\n (0.0, 0, 0.50, 0.60, 0.0),\n (1.0, 2, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0)],\n ["label", "col1", "col2", "col3", "col4"]))\n\nlinearRegressor = (LinearRegression()\n .setRegParam(0.3)\n .setElasticNetParam(0.8))\ntrainRegressor = (TrainRegressor()\n .setModel(linearRegressor)\n .setLabelCol("label"))\n\ntrainRegressor.fit(dataset).transform(dataset).show()\n'))),(0,r.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.train._\nimport org.apache.spark.ml.regression.LinearRegression\n\nval dataset = (spark.createDataFrame(Seq(\n (0.0, 2, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 4, 0.78, 0.99, 2.0),\n (3.0, 5, 0.12, 0.34, 3.0),\n (0.0, 1, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0),\n (0.0, 0, 0.50, 0.60, 0.0),\n (1.0, 2, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0)))\n .toDF("label", "col1", "col2", "col3", "col4"))\n\nval linearRegressor = (new LinearRegression()\n .setRegParam(0.3)\n .setElasticNetParam(0.8))\nval trainRegressor = (new TrainRegressor()\n .setModel(linearRegressor)\n .setLabelCol("label"))\n\ntrainRegressor.fit(dataset).transform(dataset).show()\n')))),(0,r.kt)(i.Z,{className:"TrainRegressor",py:"synapse.ml.train.html#module-synapse.ml.train.TrainRegressor",scala:"com/microsoft/azure/synapse/ml/train/TrainRegressor.html",csharp:"classSynapse_1_1ML_1_1Train_1_1TrainRegressor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/train/TrainRegressor.scala",mdxType:"DocTable"}))}E.isMDXComponent=!0;var O=["components"],P={title:"Estimators - Core",sidebar_label:"Core",hide_title:!0},V=void 0,A={unversionedId:"Quick Examples/estimators/estimators_core",id:"Quick Examples/estimators/estimators_core",title:"Estimators - Core",description:"",source:"@site/docs/Quick Examples/estimators/estimators_core.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_core",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_core",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - Core",sidebar_label:"Core",hide_title:!0}},B={},H=[].concat(c,f,h,M,w,D,L),q={toc:H};function K(e){var a=e.components,n=(0,s.Z)(e,O);return(0,r.kt)("wrapper",(0,t.Z)({},q,n,{components:a,mdxType:"MDXLayout"}),(0,r.kt)(p,{mdxType:"AutoML"}),(0,r.kt)(v,{mdxType:"Featurize"}),(0,r.kt)(b,{mdxType:"IsolationForest"}),(0,r.kt)(I,{mdxType:"NN"}),(0,r.kt)(S,{mdxType:"Recommendation"}),(0,r.kt)(z,{mdxType:"Stages"}),(0,r.kt)(E,{mdxType:"Train"}))}K.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9783ff24.e3dc009a.js b/assets/js/9783ff24.e3dc009a.js deleted file mode 100644 index 574400c7e8..0000000000 --- a/assets/js/9783ff24.e3dc009a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[9006],{3905:function(e,a,n){n.d(a,{Zo:function(){return c},kt:function(){return d}});var t=n(7294);function s(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function o(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function r(e){for(var a=1;a=0||(s[n]=e[n]);return s}(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var i=t.createContext({}),m=function(e){var a=t.useContext(i),n=a;return e&&(n="function"==typeof e?e(a):r(r({},a),e)),n},c=function(e){var a=m(e.components);return t.createElement(i.Provider,{value:a},e.children)},p={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},u=t.forwardRef((function(e,a){var n=e.components,s=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=m(n),d=s,f=u["".concat(i,".").concat(d)]||u[d]||p[d]||o;return n?t.createElement(f,r(r({ref:a},c),{},{components:n})):t.createElement(f,r({ref:a},c))}));function d(e,a){var n=arguments,s=a&&a.mdxType;if("string"==typeof e||s){var o=n.length,r=new Array(o);r[0]=u;var l={};for(var i in a)hasOwnProperty.call(a,i)&&(l[i]=a[i]);l.originalType=e,l.mdxType="string"==typeof e?e:s,r[1]=l;for(var m=2;m child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),h=null!=f?f:g.map((function(e){var a=e.props;return{value:a.value,label:a.label,attributes:a.attributes}})),k=(0,l.l)(h,(function(e,a){return e.value===a.value}));if(k.length>0)throw new Error('Docusaurus error: Duplicate values "'+k.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var b=null===d?d:null!=(a=null!=d?d:null==(n=g.find((function(e){return e.props.default})))?void 0:n.props.value)?a:g[0].props.value;if(null!==b&&!h.some((function(e){return e.value===b})))throw new Error('Docusaurus error: The has a defaultValue "'+b+'" but none of its children has the corresponding value. Available values are: '+h.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var T=(0,i.U)(),M=T.tabGroupChoices,C=T.setTabGroupChoices,I=(0,s.useState)(b),_=I[0],N=I[1],w=[],x=(0,m.o5)().blockElementScrollPositionUntilNextRender;if(null!=y){var S=M[y];null!=S&&S!==_&&h.some((function(e){return e.value===S}))&&N(S)}var D=function(e){var a=e.currentTarget,n=w.indexOf(a),t=h[n].value;t!==_&&(x(a),N(t),null!=y&&C(y,String(t)))},R=function(e){var a,n=null;switch(e.key){case"Enter":D(e);break;case"ArrowRight":var t,s=w.indexOf(e.currentTarget)+1;n=null!=(t=w[s])?t:w[0];break;case"ArrowLeft":var o,r=w.indexOf(e.currentTarget)-1;n=null!=(o=w[r])?o:w[w.length-1]}null==(a=n)||a.focus()};return s.createElement("div",{className:(0,o.Z)("tabs-container",c)},s.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":u},v)},h.map((function(e){var a=e.value,n=e.label,r=e.attributes;return s.createElement("li",(0,t.Z)({role:"tab",tabIndex:_===a?0:-1,"aria-selected":_===a,key:a,ref:function(e){return w.push(e)},onKeyDown:R,onClick:D},r,{className:(0,o.Z)("tabs__item",p,null==r?void 0:r.className,{"tabs__item--active":_===a})}),null!=n?n:a)}))),r?(0,s.cloneElement)(g.filter((function(e){return e.props.value===_}))[0],{className:"margin-top--md"}):s.createElement("div",{className:"margin-top--md"},g.map((function(e,a){return(0,s.cloneElement)(e,{key:a,hidden:e.props.value!==_})}))))}function d(e){var a=(0,r.Z)();return s.createElement(u,(0,t.Z)({key:String(a)},e))}},1989:function(e,a,n){var t=n(7294),s=n(2263);a.Z=function(e){var a=e.className,n=e.py,o=e.scala,r=e.csharp,l=e.sourceLink,i=(0,s.Z)().siteConfig.customFields.version,m="https://mmlspark.blob.core.windows.net/docs/"+i+"/pyspark/"+n,c="https://mmlspark.blob.core.windows.net/docs/"+i+"/scala/"+o,p="https://mmlspark.blob.core.windows.net/docs/"+i+"/dotnet/"+r;return t.createElement("table",null,t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",null,t.createElement("strong",null,"Python API: "),t.createElement("a",{href:m},a)),t.createElement("td",null,t.createElement("strong",null,"Scala API: "),t.createElement("a",{href:c},a)),t.createElement("td",null,t.createElement("strong",null,".NET API: "),t.createElement("a",{href:p},a)),t.createElement("td",null,t.createElement("strong",null,"Source: "),t.createElement("a",{href:l},a)))))}},9448:function(e,a,n){n.r(a),n.d(a,{assets:function(){return V},contentTitle:function(){return A},default:function(){return U},frontMatter:function(){return P},metadata:function(){return B},toc:function(){return H}});var t=n(3117),s=n(102),o=(n(7294),n(3905)),r=n(5488),l=n(5162),i=n(1989),m=["components"],c=[{value:"AutoML",id:"automl",level:2},{value:"FindBestModel",id:"findbestmodel",level:3},{value:"TuneHyperparameters",id:"tunehyperparameters",level:3}],p={toc:c};function u(e){var a=e.components,n=(0,s.Z)(e,m);return(0,o.kt)("wrapper",(0,t.Z)({},p,n,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"automl"},"AutoML"),(0,o.kt)("h3",{id:"findbestmodel"},"FindBestModel"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.automl import *\nfrom synapse.ml.train import *\nfrom pyspark.ml.classification import RandomForestClassifier\n\ndf = (spark.createDataFrame([\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, 0, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3)\n], ["Label", "col1", "col2", "col3", "col4"]))\n\n# mocking models\nrandomForestClassifier = (TrainClassifier()\n .setModel(RandomForestClassifier()\n .setMaxBins(32)\n .setMaxDepth(5)\n .setMinInfoGain(0.0)\n .setMinInstancesPerNode(1)\n .setNumTrees(20)\n .setSubsamplingRate(1.0)\n .setSeed(0))\n .setFeaturesCol("mlfeatures")\n .setLabelCol("Label"))\nmodel = randomForestClassifier.fit(df)\n\nfindBestModel = (FindBestModel()\n .setModels([model, model])\n .setEvaluationMetric("accuracy"))\nbestModel = findBestModel.fit(df)\nbestModel.transform(df).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.automl._\nimport com.microsoft.azure.synapse.ml.train._\nimport spark.implicits._\nimport org.apache.spark.ml.Transformer\n\nval df = (Seq(\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, 0, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3)\n ).toDF("Label", "col1", "col2", "col3", "col4"))\n\n// mocking models\nval randomForestClassifier = (new TrainClassifier()\n .setModel(\n new RandomForestClassifier()\n .setMaxBins(32)\n .setMaxDepth(5)\n .setMinInfoGain(0.0)\n .setMinInstancesPerNode(1)\n .setNumTrees(20)\n .setSubsamplingRate(1.0)\n .setSeed(0L))\n .setFeaturesCol("mlfeatures")\n .setLabelCol("Label"))\nval model = randomForestClassifier.fit(df)\n\nval findBestModel = (new FindBestModel()\n .setModels(Array(model.asInstanceOf[Transformer], model.asInstanceOf[Transformer]))\n .setEvaluationMetric("accuracy"))\nval bestModel = findBestModel.fit(df)\nbestModel.transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"FindBestModel",py:"synapse.ml.automl.html#module-synapse.ml.automl.FindBestModel",scala:"com/microsoft/azure/synapse/ml/automl/FindBestModel.html",csharp:"classSynapse_1_1ML_1_1Automl_1_1FindBestModel.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/automl/FindBestModel.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"tunehyperparameters"},"TuneHyperparameters"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.automl import *\nfrom synapse.ml.train import *\nfrom pyspark.ml.classification import LogisticRegression, RandomForestClassifier, GBTClassifier\n\n\ndf = (spark.createDataFrame([\n (0, 1, 1, 1, 1, 1, 1.0, 3, 1, 1),\n (0, 1, 1, 1, 1, 2, 1.0, 1, 1, 1),\n (0, 1, 1, 1, 1, 2, 1.0, 2, 1, 1),\n (0, 1, 2, 3, 1, 2, 1.0, 3, 1, 1),\n (0, 3, 1, 1, 1, 2, 1.0, 3, 1, 1)\n], ["Label", "Clump_Thickness", "Uniformity_of_Cell_Size",\n "Uniformity_of_Cell_Shape", "Marginal_Adhesion", "Single_Epithelial_Cell_Size",\n "Bare_Nuclei", "Bland_Chromatin", "Normal_Nucleoli", "Mitoses"]))\n\nlogReg = LogisticRegression()\nrandForest = RandomForestClassifier()\ngbt = GBTClassifier()\nsmlmodels = [logReg, randForest, gbt]\nmmlmodels = [TrainClassifier(model=model, labelCol="Label") for model in smlmodels]\n\nparamBuilder = (HyperparamBuilder()\n .addHyperparam(logReg, logReg.regParam, RangeHyperParam(0.1, 0.3))\n .addHyperparam(randForest, randForest.numTrees, DiscreteHyperParam([5,10]))\n .addHyperparam(randForest, randForest.maxDepth, DiscreteHyperParam([3,5]))\n .addHyperparam(gbt, gbt.maxBins, RangeHyperParam(8,16))\n .addHyperparam(gbt, gbt.maxDepth, DiscreteHyperParam([3,5])))\nsearchSpace = paramBuilder.build()\n# The search space is a list of params to tuples of estimator and hyperparam\nrandomSpace = RandomSpace(searchSpace)\n\nbestModel = TuneHyperparameters(\n evaluationMetric="accuracy", models=mmlmodels, numFolds=2,\n numRuns=len(mmlmodels) * 2, parallelism=2,\n paramSpace=randomSpace.space(), seed=0).fit(df)\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.automl._\nimport com.microsoft.azure.synapse.ml.train._\nimport spark.implicits._\n\nval logReg = new LogisticRegression()\nval randForest = new RandomForestClassifier()\nval gbt = new GBTClassifier()\nval smlmodels = Seq(logReg, randForest, gbt)\nval mmlmodels = smlmodels.map(model => new TrainClassifier().setModel(model).setLabelCol("Label"))\n\nval paramBuilder = new HyperparamBuilder()\n .addHyperparam(logReg.regParam, new DoubleRangeHyperParam(0.1, 0.3))\n .addHyperparam(randForest.numTrees, new DiscreteHyperParam(List(5,10)))\n .addHyperparam(randForest.maxDepth, new DiscreteHyperParam(List(3,5)))\n .addHyperparam(gbt.maxBins, new IntRangeHyperParam(8,16))\n.addHyperparam(gbt.maxDepth, new DiscreteHyperParam(List(3,5)))\nval searchSpace = paramBuilder.build()\nval randomSpace = new RandomSpace(searchSpace)\n\nval dataset: DataFrame = Seq(\n (0, 1, 1, 1, 1, 1, 1.0, 3, 1, 1),\n (0, 1, 1, 1, 1, 2, 1.0, 1, 1, 1),\n (0, 1, 1, 1, 1, 2, 1.0, 2, 1, 1),\n (0, 1, 2, 3, 1, 2, 1.0, 3, 1, 1),\n (0, 3, 1, 1, 1, 2, 1.0, 3, 1, 1))\n .toDF("Label", "Clump_Thickness", "Uniformity_of_Cell_Size",\n "Uniformity_of_Cell_Shape", "Marginal_Adhesion", "Single_Epithelial_Cell_Size",\n "Bare_Nuclei", "Bland_Chromatin", "Normal_Nucleoli", "Mitoses")\n\nval tuneHyperparameters = new TuneHyperparameters().setEvaluationMetric("accuracy")\n .setModels(mmlmodels.toArray).setNumFolds(2).setNumRuns(mmlmodels.length * 2)\n .setParallelism(1).setParamSpace(randomSpace).setSeed(0)\ntuneHyperparameters.fit(dataset).show()\n')))),(0,o.kt)(i.Z,{className:"TuneHyperparameters",py:"synapse.ml.automl.html#module-synapse.ml.automl.TuneHyperparameters",scala:"com/microsoft/azure/synapse/ml/automl/TuneHyperparameters.html",csharp:"classSynapse_1_1ML_1_1Automl_1_1TuneHyperparameters.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/automl/TuneHyperparameters.scala",mdxType:"DocTable"}))}u.isMDXComponent=!0;var d=["components"],f=[{value:"Featurize",id:"featurize",level:2},{value:"CleanMissingData",id:"cleanmissingdata",level:3},{value:"CountSelector",id:"countselector",level:3},{value:"Featurize",id:"featurize-1",level:3},{value:"ValueIndexer",id:"valueindexer",level:3},{value:"Featurize Text",id:"featurize-text",level:2},{value:"TextFeaturizer",id:"textfeaturizer",level:3}],y={toc:f};function v(e){var a=e.components,n=(0,s.Z)(e,d);return(0,o.kt)("wrapper",(0,t.Z)({},y,n,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"featurize"},"Featurize"),(0,o.kt)("h3",{id:"cleanmissingdata"},"CleanMissingData"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndataset = spark.createDataFrame([\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, None, None),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (None, None, None, None, None),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, None, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, None),\n (0, 3, None, 0.99, 2),\n (1, 4, 0.12, 0.34, 3)\n], ["col1", "col2", "col3", "col4", "col5"])\n\ncmd = (CleanMissingData()\n .setInputCols(dataset.columns)\n .setOutputCols(dataset.columns)\n .setCleaningMode("Mean"))\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport java.lang.{Boolean => JBoolean, Double => JDouble, Integer => JInt}\nimport spark.implicits._\n\ndef createMockDataset: DataFrame = {\n Seq[(JInt, JInt, JDouble, JDouble, JInt)](\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, null, null),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (null, null, null, null, null),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, null, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, null),\n (0, 3, null, 0.99, 2),\n (1, 4, 0.12, 0.34, 3))\n .toDF("col1", "col2", "col3", "col4", "col5")\n }\n\nval dataset = createMockDataset\nval cmd = (new CleanMissingData()\n .setInputCols(dataset.columns)\n .setOutputCols(dataset.columns)\n .setCleaningMode("Mean"))\n')))),(0,o.kt)(i.Z,{className:"CleanMissingData",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.CleanMissingData",scala:"com/microsoft/azure/synapse/ml/featurize/CleanMissingData.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1CleanMissingData.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/CleanMissingData.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"countselector"},"CountSelector"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\nfrom pyspark.ml.linalg import Vectors\n\ndf = spark.createDataFrame([\n (Vectors.sparse(3, [(0, 1.0), (2, 2.0)]), Vectors.dense(1.0, 0.1, 0)),\n (Vectors.sparse(3, [(0, 1.0), (2, 2.0)]), Vectors.dense(1.0, 0.1, 0))\n], ["col1", "col2"])\n\ncs = CountSelector().setInputCol("col1").setOutputCol("col3")\n\ncs.fit(df).transform(df).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport org.apache.spark.ml.linalg.Vectors\nimport spark.implicits._\n\nval df = Seq(\n (Vectors.sparse(3, Seq((0, 1.0), (2, 2.0))), Vectors.dense(1.0, 0.1, 0)),\n (Vectors.sparse(3, Seq((0, 1.0), (2, 2.0))), Vectors.dense(1.0, 0.1, 0))\n ).toDF("col1", "col2")\n\nval cs = (new CountSelector()\n .setInputCol("col1")\n .setOutputCol("col3"))\n\ncs.fit(df).transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"CountSelector",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.CountSelector",scala:"com/microsoft/azure/synapse/ml/featurize/CountSelector.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1CountSelector.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/CountSelector.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"featurize-1"},"Featurize"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndataset = spark.createDataFrame([\n (0, 2, 0.50, 0.60, "pokemon are everywhere"),\n (1, 3, 0.40, 0.50, "they are in the woods"),\n (0, 4, 0.78, 0.99, "they are in the water"),\n (1, 5, 0.12, 0.34, "they are in the fields"),\n (0, 3, 0.78, 0.99, "pokemon - gotta catch em all")\n], ["Label", "col1", "col2", "col3"])\n\nfeat = (Featurize()\n .setNumFeatures(10)\n .setOutputCol("testColumn")\n .setInputCols(["col1", "col2", "col3"])\n .setOneHotEncodeCategoricals(False))\n\nfeat.fit(dataset).transform(dataset).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport spark.implicits._\n\nval dataset = Seq(\n (0, 2, 0.50, 0.60, "pokemon are everywhere"),\n (1, 3, 0.40, 0.50, "they are in the woods"),\n (0, 4, 0.78, 0.99, "they are in the water"),\n (1, 5, 0.12, 0.34, "they are in the fields"),\n (0, 3, 0.78, 0.99, "pokemon - gotta catch em all")).toDF("Label", "col1", "col2", "col3")\n\nval featureColumns = dataset.columns.filter(_ != "Label")\n\nval feat = (new Featurize()\n .setNumFeatures(10)\n .setOutputCol("testColumn")\n .setInputCols(featureColumns)\n .setOneHotEncodeCategoricals(false))\n\nfeat.fit(dataset).transform(dataset).show()\n')))),(0,o.kt)(i.Z,{className:"Featurize",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.Featurize",scala:"com/microsoft/azure/synapse/ml/featurize/Featurize.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1Featurize.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/Featurize.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"valueindexer"},"ValueIndexer"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndf = spark.createDataFrame([\n (-3, 24, 0.32534, True, "piano"),\n (1, 5, 5.67, False, "piano"),\n (-3, 5, 0.32534, False, "guitar")\n], ["int", "long", "double", "bool", "string"])\n\nvi = ValueIndexer().setInputCol("string").setOutputCol("string_cat")\n\nvi.fit(df).transform(df).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport spark.implicits._\n\nval df = Seq[(Int, Long, Double, Boolean, String)](\n (-3, 24L, 0.32534, true, "piano"),\n (1, 5L, 5.67, false, "piano"),\n (-3, 5L, 0.32534, false, "guitar")).toDF("int", "long", "double", "bool", "string")\n\nval vi = new ValueIndexer().setInputCol("string").setOutputCol("string_cat")\n\nvi.fit(df).transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"ValueIndexer",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.ValueIndexer",scala:"com/microsoft/azure/synapse/ml/featurize/ValueIndexer.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1ValueIndexer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/ValueIndexer.scala",mdxType:"DocTable"}),(0,o.kt)("h2",{id:"featurize-text"},"Featurize Text"),(0,o.kt)("h3",{id:"textfeaturizer"},"TextFeaturizer"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize.text import *\n\ndfRaw = spark.createDataFrame([\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, "")\n], ["label", "sentence"])\n\ntfRaw = (TextFeaturizer()\n .setInputCol("sentence")\n .setOutputCol("features")\n .setNumFeatures(20))\n\ntfRaw.fit(dfRaw).transform(dfRaw).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize.text._\nimport spark.implicits._\n\nval dfRaw = Seq((0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, "")).toDF("label", "sentence")\n\nval tfRaw = (new TextFeaturizer()\n .setInputCol("sentence")\n .setOutputCol("features")\n .setNumFeatures(20))\n\ntfRaw.fit(dfRaw).transform(dfRaw).show()\n')))),(0,o.kt)(i.Z,{className:"TextFeaturizer",py:"synapse.ml.featurize.text.html#module-synapse.ml.featurize.text.TextFeaturizer",scala:"com/microsoft/azure/synapse/ml/featurize/text/TextFeaturizer.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1Text_1_1TextFeaturizer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/text/TextFeaturizer.scala",mdxType:"DocTable"}))}v.isMDXComponent=!0;var g=["components"],h=[{value:"Isolation Forest",id:"isolation-forest",level:2},{value:"IsolationForest",id:"isolationforest",level:3}],k={toc:h};function b(e){var a=e.components,n=(0,s.Z)(e,g);return(0,o.kt)("wrapper",(0,t.Z)({},k,n,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"isolation-forest"},"Isolation Forest"),(0,o.kt)("h3",{id:"isolationforest"},"IsolationForest"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.isolationforest import *\n\nisolationForest = (IsolationForest()\n .setNumEstimators(100)\n .setBootstrap(False)\n .setMaxSamples(256)\n .setMaxFeatures(1.0)\n .setFeaturesCol("features")\n .setPredictionCol("predictedLabel")\n .setScoreCol("outlierScore")\n .setContamination(0.02)\n .setContaminationError(0.02 * 0.01)\n .setRandomSeed(1))\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.isolationforest._\nimport spark.implicits._\n\nval isolationForest = (new IsolationForest()\n .setNumEstimators(100)\n .setBootstrap(false)\n .setMaxSamples(256)\n .setMaxFeatures(1.0)\n .setFeaturesCol("features")\n .setPredictionCol("predictedLabel")\n .setScoreCol("outlierScore")\n .setContamination(0.02)\n .setContaminationError(0.02 * 0.01)\n .setRandomSeed(1))\n')))),(0,o.kt)(i.Z,{className:"IsolationForest",py:"synapse.ml.isolationforest.html#module-synapse.ml.isolationforest.IsolationForest",scala:"com/microsoft/azure/synapse/ml/isolationforest/IsolationForest.html",csharp:"classSynapse_1_1ML_1_1Isolationforest_1_1IsolationForest.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/isolationforest/IsolationForest.scala",mdxType:"DocTable"}))}b.isMDXComponent=!0;var T=["components"],M=[{value:"NN",id:"nn",level:2},{value:"ConditionalKNN",id:"conditionalknn",level:3},{value:"KNN",id:"knn",level:3}],C={toc:M};function I(e){var a=e.components,n=(0,s.Z)(e,T);return(0,o.kt)("wrapper",(0,t.Z)({},C,n,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"nn"},"NN"),(0,o.kt)("h3",{id:"conditionalknn"},"ConditionalKNN"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.nn import *\n\ncknn = (ConditionalKNN()\n .setOutputCol("matches")\n .setFeaturesCol("features"))\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.nn._\nimport spark.implicits._\n\nval cknn = (new ConditionalKNN()\n .setOutputCol("matches")\n .setFeaturesCol("features"))\n')))),(0,o.kt)(i.Z,{className:"ConditionalKNN",py:"synapse.ml.nn.html#module-synapse.ml.nn.ConditionalKNN",scala:"com/microsoft/azure/synapse/ml/nn/ConditionalKNN.html",csharp:"classSynapse_1_1ML_1_1Nn_1_1ConditionalKNN.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/nn/ConditionalKNN.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"knn"},"KNN"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.nn import *\n\nknn = (KNN()\n .setOutputCol("matches"))\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.nn._\nimport spark.implicits._\n\nval knn = (new KNN()\n .setOutputCol("matches"))\n')))),(0,o.kt)(i.Z,{className:"KNN",py:"synapse.ml.nn.html#module-synapse.ml.nn.KNN",scala:"com/microsoft/azure/synapse/ml/nn/KNN.html",csharp:"classSynapse_1_1ML_1_1Nn_1_1KNN.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/nn/KNN.scala",mdxType:"DocTable"}))}I.isMDXComponent=!0;var _=["components"],N=[{value:"Recommendation",id:"recommendation",level:2},{value:"RecommendationIndexer, RankingEvaluator, RankingAdapter and RankingTrainValidationSplit",id:"recommendationindexer-rankingevaluator-rankingadapter-and-rankingtrainvalidationsplit",level:3},{value:"SAR",id:"sar",level:3}],w={toc:N};function x(e){var a=e.components,n=(0,s.Z)(e,_);return(0,o.kt)("wrapper",(0,t.Z)({},w,n,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"recommendation"},"Recommendation"),(0,o.kt)("h3",{id:"recommendationindexer-rankingevaluator-rankingadapter-and-rankingtrainvalidationsplit"},"RecommendationIndexer, RankingEvaluator, RankingAdapter and RankingTrainValidationSplit"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.recommendation import *\nfrom pyspark.ml.recommendation import ALS\nfrom pyspark.ml.tuning import *\n\nratings = (spark.createDataFrame([\n ("11", "Movie 01", 2),\n ("11", "Movie 03", 1),\n ("11", "Movie 04", 5),\n ("11", "Movie 05", 3),\n ("11", "Movie 06", 4),\n ("11", "Movie 07", 1),\n ("11", "Movie 08", 5),\n ("11", "Movie 09", 3),\n ("22", "Movie 01", 4),\n ("22", "Movie 02", 5),\n ("22", "Movie 03", 1),\n ("22", "Movie 05", 3),\n ("22", "Movie 06", 3),\n ("22", "Movie 07", 5),\n ("22", "Movie 08", 1),\n ("22", "Movie 10", 3),\n ("33", "Movie 01", 4),\n ("33", "Movie 03", 1),\n ("33", "Movie 04", 5),\n ("33", "Movie 05", 3),\n ("33", "Movie 06", 4),\n ("33", "Movie 08", 1),\n ("33", "Movie 09", 5),\n ("33", "Movie 10", 3),\n ("44", "Movie 01", 4),\n ("44", "Movie 02", 5),\n ("44", "Movie 03", 1),\n ("44", "Movie 05", 3),\n ("44", "Movie 06", 4),\n ("44", "Movie 07", 5),\n ("44", "Movie 08", 1),\n ("44", "Movie 10", 3)\n ], ["customerIDOrg", "itemIDOrg", "rating"])\n .dropDuplicates()\n .cache())\n\nrecommendationIndexer = (RecommendationIndexer()\n .setUserInputCol("customerIDOrg")\n .setUserOutputCol("customerID")\n .setItemInputCol("itemIDOrg")\n .setItemOutputCol("itemID")\n .setRatingCol("rating"))\n\ntransformedDf = (recommendationIndexer.fit(ratings)\n .transform(ratings).cache())\n\nals = (ALS()\n .setNumUserBlocks(1)\n .setNumItemBlocks(1)\n .setUserCol("customerID")\n .setItemCol("itemID")\n .setRatingCol("rating")\n .setSeed(0))\n\nevaluator = (RankingEvaluator()\n .setK(3)\n .setNItems(10))\n\nadapter = (RankingAdapter()\n .setK(evaluator.getK())\n .setRecommender(als))\n\nadapter.fit(transformedDf).transform(transformedDf).show()\n\nparamGrid = (ParamGridBuilder()\n .addGrid(als.regParam, [1.0])\n .build())\n\ntvRecommendationSplit = (RankingTrainValidationSplit()\n .setEstimator(als)\n .setEvaluator(evaluator)\n .setEstimatorParamMaps(paramGrid)\n .setTrainRatio(0.8)\n .setUserCol(recommendationIndexer.getUserOutputCol())\n .setItemCol(recommendationIndexer.getItemOutputCol())\n .setRatingCol("rating"))\n\ntvRecommendationSplit.fit(transformedDf).transform(transformedDf).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.recommendation._\nimport org.apache.spark.ml.recommendation.ALS\nimport org.apache.spark.ml.tuning._\nimport spark.implicits._\n\nval ratings = (Seq(\n ("11", "Movie 01", 2),\n ("11", "Movie 03", 1),\n ("11", "Movie 04", 5),\n ("11", "Movie 05", 3),\n ("11", "Movie 06", 4),\n ("11", "Movie 07", 1),\n ("11", "Movie 08", 5),\n ("11", "Movie 09", 3),\n ("22", "Movie 01", 4),\n ("22", "Movie 02", 5),\n ("22", "Movie 03", 1),\n ("22", "Movie 05", 3),\n ("22", "Movie 06", 3),\n ("22", "Movie 07", 5),\n ("22", "Movie 08", 1),\n ("22", "Movie 10", 3),\n ("33", "Movie 01", 4),\n ("33", "Movie 03", 1),\n ("33", "Movie 04", 5),\n ("33", "Movie 05", 3),\n ("33", "Movie 06", 4),\n ("33", "Movie 08", 1),\n ("33", "Movie 09", 5),\n ("33", "Movie 10", 3),\n ("44", "Movie 01", 4),\n ("44", "Movie 02", 5),\n ("44", "Movie 03", 1),\n ("44", "Movie 05", 3),\n ("44", "Movie 06", 4),\n ("44", "Movie 07", 5),\n ("44", "Movie 08", 1),\n ("44", "Movie 10", 3))\n .toDF("customerIDOrg", "itemIDOrg", "rating")\n .dropDuplicates()\n .cache())\n\nval recommendationIndexer = (new RecommendationIndexer()\n .setUserInputCol("customerIDOrg")\n .setUserOutputCol("customerID")\n .setItemInputCol("itemIDOrg")\n .setItemOutputCol("itemID")\n .setRatingCol("rating"))\n\nval transformedDf = (recommendationIndexer.fit(ratings)\n .transform(ratings).cache())\n\nval als = (new ALS()\n .setNumUserBlocks(1)\n .setNumItemBlocks(1)\n .setUserCol("customerID")\n .setItemCol("itemID")\n .setRatingCol("rating")\n .setSeed(0))\n\nval evaluator = (new RankingEvaluator()\n .setK(3)\n .setNItems(10))\n\nval adapter = (new RankingAdapter()\n .setK(evaluator.getK)\n .setRecommender(als))\n\nadapter.fit(transformedDf).transform(transformedDf).show()\n\nval paramGrid = (new ParamGridBuilder()\n .addGrid(als.regParam, Array(1.0))\n .build())\n\nval tvRecommendationSplit = (new RankingTrainValidationSplit()\n .setEstimator(als)\n .setEvaluator(evaluator)\n .setEstimatorParamMaps(paramGrid)\n .setTrainRatio(0.8)\n .setUserCol(recommendationIndexer.getUserOutputCol)\n .setItemCol(recommendationIndexer.getItemOutputCol)\n .setRatingCol("rating"))\n\ntvRecommendationSplit.fit(transformedDf).transform(transformedDf).show()\n')))),(0,o.kt)(i.Z,{className:"RecommendationIndexer",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.RecommendationIndexer",scala:"com/microsoft/azure/synapse/ml/recommendation/RecommendationIndexer.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1RecommendationIndexer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/RecommendationIndexer.scala",mdxType:"DocTable"}),(0,o.kt)(i.Z,{className:"RankingEvaluator",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.RankingEvaluator",scala:"com/microsoft/azure/synapse/ml/recommendation/RankingEvaluator.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1RankingEvaluator.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/RankingEvaluator.scala",mdxType:"DocTable"}),(0,o.kt)(i.Z,{className:"RankingAdapter",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.RankingAdapter",scala:"com/microsoft/azure/synapse/ml/recommendation/RankingAdapter.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1RankingAdapter.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/RankingAdapter.scala",mdxType:"DocTable"}),(0,o.kt)(i.Z,{className:"RankingTrainValidationSplit",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.RankingTrainValidationSplit",scala:"com/microsoft/azure/synapse/ml/recommendation/RankingTrainValidationSplit.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1RankingTrainValidationSplit.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/RankingTrainValidationSplit.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"sar"},"SAR"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.recommendation import *\n\nratings = (spark.createDataFrame([\n ("11", "Movie 01", 2),\n ("11", "Movie 03", 1),\n ("11", "Movie 04", 5),\n ("11", "Movie 05", 3),\n ("11", "Movie 06", 4),\n ("11", "Movie 07", 1),\n ("11", "Movie 08", 5),\n ("11", "Movie 09", 3),\n ("22", "Movie 01", 4),\n ("22", "Movie 02", 5),\n ("22", "Movie 03", 1),\n ("22", "Movie 05", 3),\n ("22", "Movie 06", 3),\n ("22", "Movie 07", 5),\n ("22", "Movie 08", 1),\n ("22", "Movie 10", 3),\n ("33", "Movie 01", 4),\n ("33", "Movie 03", 1),\n ("33", "Movie 04", 5),\n ("33", "Movie 05", 3),\n ("33", "Movie 06", 4),\n ("33", "Movie 08", 1),\n ("33", "Movie 09", 5),\n ("33", "Movie 10", 3),\n ("44", "Movie 01", 4),\n ("44", "Movie 02", 5),\n ("44", "Movie 03", 1),\n ("44", "Movie 05", 3),\n ("44", "Movie 06", 4),\n ("44", "Movie 07", 5),\n ("44", "Movie 08", 1),\n ("44", "Movie 10", 3)\n ], ["customerIDOrg", "itemIDOrg", "rating"])\n .dropDuplicates()\n .cache())\n\nrecommendationIndexer = (RecommendationIndexer()\n .setUserInputCol("customerIDOrg")\n .setUserOutputCol("customerID")\n .setItemInputCol("itemIDOrg")\n .setItemOutputCol("itemID")\n .setRatingCol("rating"))\n\nalgo = (SAR()\n .setUserCol("customerID")\n .setItemCol("itemID")\n .setRatingCol("rating")\n .setTimeCol("timestamp")\n .setSupportThreshold(1)\n .setSimilarityFunction("jacccard")\n .setActivityTimeFormat("EEE MMM dd HH:mm:ss Z yyyy"))\n\nadapter = (RankingAdapter()\n .setK(5)\n .setRecommender(algo))\n\nres1 = recommendationIndexer.fit(ratings).transform(ratings).cache()\n\nadapter.fit(res1).transform(res1).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.recommendation._\nimport spark.implicits._\n\nval ratings = (Seq(\n ("11", "Movie 01", 2),\n ("11", "Movie 03", 1),\n ("11", "Movie 04", 5),\n ("11", "Movie 05", 3),\n ("11", "Movie 06", 4),\n ("11", "Movie 07", 1),\n ("11", "Movie 08", 5),\n ("11", "Movie 09", 3),\n ("22", "Movie 01", 4),\n ("22", "Movie 02", 5),\n ("22", "Movie 03", 1),\n ("22", "Movie 05", 3),\n ("22", "Movie 06", 3),\n ("22", "Movie 07", 5),\n ("22", "Movie 08", 1),\n ("22", "Movie 10", 3),\n ("33", "Movie 01", 4),\n ("33", "Movie 03", 1),\n ("33", "Movie 04", 5),\n ("33", "Movie 05", 3),\n ("33", "Movie 06", 4),\n ("33", "Movie 08", 1),\n ("33", "Movie 09", 5),\n ("33", "Movie 10", 3),\n ("44", "Movie 01", 4),\n ("44", "Movie 02", 5),\n ("44", "Movie 03", 1),\n ("44", "Movie 05", 3),\n ("44", "Movie 06", 4),\n ("44", "Movie 07", 5),\n ("44", "Movie 08", 1),\n ("44", "Movie 10", 3))\n .toDF("customerIDOrg", "itemIDOrg", "rating")\n .dropDuplicates()\n .cache())\n\nval recommendationIndexer = (new RecommendationIndexer()\n .setUserInputCol("customerIDOrg")\n .setUserOutputCol("customerID")\n .setItemInputCol("itemIDOrg")\n .setItemOutputCol("itemID")\n .setRatingCol("rating"))\n\nval algo = (new SAR()\n .setUserCol("customerID")\n .setItemCol("itemID")\n .setRatingCol("rating")\n .setTimeCol("timestamp")\n .setSupportThreshold(1)\n .setSimilarityFunction("jacccard")\n .setActivityTimeFormat("EEE MMM dd HH:mm:ss Z yyyy"))\n\nval adapter = (new RankingAdapter()\n .setK(5)\n .setRecommender(algo))\n\nval res1 = recommendationIndexer.fit(ratings).transform(ratings).cache()\n\nadapter.fit(res1).transform(res1).show()\n')))),(0,o.kt)(i.Z,{className:"SAR",py:"synapse.ml.recommendation.html#module-synapse.ml.recommendation.SAR",scala:"com/microsoft/azure/synapse/ml/recommendation/SAR.html",csharp:"classSynapse_1_1ML_1_1Recommendation_1_1SAR.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/recommendation/SAR.scala",mdxType:"DocTable"}))}x.isMDXComponent=!0;var S=["components"],D=[{value:"Stages",id:"stages",level:2},{value:"ClassBalancer",id:"classbalancer",level:3},{value:"MultiColumnAdapter",id:"multicolumnadapter",level:3},{value:"Timer",id:"timer",level:3}],R={toc:D};function z(e){var a=e.components,n=(0,s.Z)(e,S);return(0,o.kt)("wrapper",(0,t.Z)({},R,n,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"stages"},"Stages"),(0,o.kt)("h3",{id:"classbalancer"},"ClassBalancer"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 1.0, "Hi I"),\n (1, 1.0, "I wish for snow today"),\n (2, 2.0, "I wish for snow today"),\n (3, 2.0, "I wish for snow today"),\n (4, 2.0, "I wish for snow today"),\n (5, 2.0, "I wish for snow today"),\n (6, 0.0, "I wish for snow today"),\n (7, 1.0, "I wish for snow today"),\n (8, 0.0, "we Cant go to the park, because of the snow!"),\n (9, 2.0, "")\n ], ["index", "label", "sentence"]))\n\ncb = ClassBalancer().setInputCol("label")\n\ncb.fit(df).transform(df).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = Seq(\n (0, 1.0, "Hi I"),\n (1, 1.0, "I wish for snow today"),\n (2, 2.0, "I wish for snow today"),\n (3, 2.0, "I wish for snow today"),\n (4, 2.0, "I wish for snow today"),\n (5, 2.0, "I wish for snow today"),\n (6, 0.0, "I wish for snow today"),\n (7, 1.0, "I wish for snow today"),\n (8, 0.0, "we Cant go to the park, because of the snow!"),\n (9, 2.0, "")).toDF("index", "label", "sentence")\n\nval cb = new ClassBalancer().setInputCol("label")\n\ncb.fit(df).transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"ClassBalancer",py:"synapse.ml.stages.html#module-synapse.ml.stages.ClassBalancer",scala:"com/microsoft/azure/synapse/ml/stages/ClassBalancer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1ClassBalancer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/ClassBalancer.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"multicolumnadapter"},"MultiColumnAdapter"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.ml.feature import Tokenizer\n\ndf = (spark.createDataFrame([\n (0, "This is a test", "this is one too"),\n (1, "could be a test", "bar"),\n (2, "foo", "bar"),\n (3, "foo", "maybe not")\n ], ["label", "words1", "words2"]))\n\nstage1 = Tokenizer()\nmca = (MultiColumnAdapter()\n .setBaseStage(stage1)\n .setInputCols(["words1", "words2"])\n .setOutputCols(["output1", "output2"]))\n\nmca.fit(df).transform(df).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.ml.feature.Tokenizer\n\nval df = (Seq(\n (0, "This is a test", "this is one too"),\n (1, "could be a test", "bar"),\n (2, "foo", "bar"),\n (3, "foo", "maybe not"))\n .toDF("label", "words1", "words2"))\n\nval stage1 = new Tokenizer()\nval mca = (new MultiColumnAdapter()\n .setBaseStage(stage1)\n .setInputCols(Array[String]("words1", "words2"))\n .setOutputCols(Array[String]("output1", "output2")))\n\nmca.fit(df).transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"MultiColumnAdapter",py:"synapse.ml.stages.html#module-synapse.ml.stages.MultiColumnAdapter",scala:"com/microsoft/azure/synapse/ml/stages/MultiColumnAdapter.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1MultiColumnAdapter.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MultiColumnAdapter.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"timer"},"Timer"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.ml.feature import *\n\ndf = (spark.createDataFrame([\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, "")\n ], ["label", "sentence"]))\n\ntok = (Tokenizer()\n .setInputCol("sentence")\n .setOutputCol("tokens"))\n\ndf2 = Timer().setStage(tok).fit(df).transform(df)\n\ndf3 = HashingTF().setInputCol("tokens").setOutputCol("hash").transform(df2)\n\nidf = IDF().setInputCol("hash").setOutputCol("idf")\ntimer = Timer().setStage(idf)\n\ntimer.fit(df3).transform(df3).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.ml.feature._\n\nval df = (Seq(\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, "")\n ).toDF("label", "sentence"))\n\nval tok = (new Tokenizer()\n .setInputCol("sentence")\n .setOutputCol("tokens"))\n\nval df2 = new Timer().setStage(tok).fit(df).transform(df)\n\nval df3 = new HashingTF().setInputCol("tokens").setOutputCol("hash").transform(df2)\n\nval idf = new IDF().setInputCol("hash").setOutputCol("idf")\nval timer = new Timer().setStage(idf)\n\ntimer.fit(df3).transform(df3).show()\n')))),(0,o.kt)(i.Z,{className:"Timer",py:"synapse.ml.stages.html#module-synapse.ml.stages.Timer",scala:"com/microsoft/azure/synapse/ml/stages/Timer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Timer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Timer.scala",mdxType:"DocTable"}))}z.isMDXComponent=!0;var F=["components"],L=[{value:"Train",id:"train",level:2},{value:"TrainClassifier",id:"trainclassifier",level:3},{value:"TrainRegressor",id:"trainregressor",level:3}],Z={toc:L};function E(e){var a=e.components,n=(0,s.Z)(e,F);return(0,o.kt)("wrapper",(0,t.Z)({},Z,n,{components:a,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"train"},"Train"),(0,o.kt)("h3",{id:"trainclassifier"},"TrainClassifier"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.train import *\nfrom pyspark.ml.classification import LogisticRegression\n\ndf = spark.createDataFrame([\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, 0, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3)],\n ["Label", "col1", "col2", "col3", "col4"]\n)\n\ntc = (TrainClassifier()\n .setModel(LogisticRegression())\n .setLabelCol("Label"))\n\ntc.fit(df).transform(df).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.train._\nimport org.apache.spark.ml.classification.LogisticRegression\n\nval df = (Seq(\n (0, 2, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 4, 0.78, 0.99, 2),\n (1, 5, 0.12, 0.34, 3),\n (0, 1, 0.50, 0.60, 0),\n (1, 3, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3),\n (0, 0, 0.50, 0.60, 0),\n (1, 2, 0.40, 0.50, 1),\n (0, 3, 0.78, 0.99, 2),\n (1, 4, 0.12, 0.34, 3))\n .toDF("Label", "col1", "col2", "col3", "col4"))\n\nval tc = (new TrainClassifier()\n .setModel(new LogisticRegression())\n .setLabelCol("Label"))\n\ntc.fit(df).transform(df).show()\n')))),(0,o.kt)(i.Z,{className:"TrainClassifier",py:"synapse.ml.train.html#module-synapse.ml.train.TrainClassifier",scala:"com/microsoft/azure/synapse/ml/train/TrainClassifier.html",csharp:"classSynapse_1_1ML_1_1Train_1_1TrainClassifier.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/train/TrainClassifier.scala",mdxType:"DocTable"}),(0,o.kt)("h3",{id:"trainregressor"},"TrainRegressor"),(0,o.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"py",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.train import *\nfrom pyspark.ml.regression import LinearRegression\n\ndataset = (spark.createDataFrame([\n (0.0, 2, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 4, 0.78, 0.99, 2.0),\n (3.0, 5, 0.12, 0.34, 3.0),\n (0.0, 1, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0),\n (0.0, 0, 0.50, 0.60, 0.0),\n (1.0, 2, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0)],\n ["label", "col1", "col2", "col3", "col4"]))\n\nlinearRegressor = (LinearRegression()\n .setRegParam(0.3)\n .setElasticNetParam(0.8))\ntrainRegressor = (TrainRegressor()\n .setModel(linearRegressor)\n .setLabelCol("label"))\n\ntrainRegressor.fit(dataset).transform(dataset).show()\n'))),(0,o.kt)(l.Z,{value:"scala",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.train._\nimport org.apache.spark.ml.regression.LinearRegression\n\nval dataset = (spark.createDataFrame(Seq(\n (0.0, 2, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 4, 0.78, 0.99, 2.0),\n (3.0, 5, 0.12, 0.34, 3.0),\n (0.0, 1, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0),\n (0.0, 0, 0.50, 0.60, 0.0),\n (1.0, 2, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0)))\n .toDF("label", "col1", "col2", "col3", "col4"))\n\nval linearRegressor = (new LinearRegression()\n .setRegParam(0.3)\n .setElasticNetParam(0.8))\nval trainRegressor = (new TrainRegressor()\n .setModel(linearRegressor)\n .setLabelCol("label"))\n\ntrainRegressor.fit(dataset).transform(dataset).show()\n')))),(0,o.kt)(i.Z,{className:"TrainRegressor",py:"synapse.ml.train.html#module-synapse.ml.train.TrainRegressor",scala:"com/microsoft/azure/synapse/ml/train/TrainRegressor.html",csharp:"classSynapse_1_1ML_1_1Train_1_1TrainRegressor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/train/TrainRegressor.scala",mdxType:"DocTable"}))}E.isMDXComponent=!0;var O=["components"],P={title:"Estimators - Core",sidebar_label:"Core",hide_title:!0},A=void 0,B={unversionedId:"Quick Examples/estimators/estimators_core",id:"Quick Examples/estimators/estimators_core",title:"Estimators - Core",description:"",source:"@site/docs/Quick Examples/estimators/estimators_core.md",sourceDirName:"Quick Examples/estimators",slug:"/Quick Examples/estimators/estimators_core",permalink:"/SynapseML/docs/Quick Examples/estimators/estimators_core",draft:!1,tags:[],version:"current",frontMatter:{title:"Estimators - Core",sidebar_label:"Core",hide_title:!0}},V={},H=[].concat(c,f,h,M,N,D,L),K={toc:H};function U(e){var a=e.components,n=(0,s.Z)(e,O);return(0,o.kt)("wrapper",(0,t.Z)({},K,n,{components:a,mdxType:"MDXLayout"}),(0,o.kt)(u,{mdxType:"AutoML"}),(0,o.kt)(v,{mdxType:"Featurize"}),(0,o.kt)(b,{mdxType:"IsolationForest"}),(0,o.kt)(I,{mdxType:"NN"}),(0,o.kt)(x,{mdxType:"Recommendation"}),(0,o.kt)(z,{mdxType:"Stages"}),(0,o.kt)(E,{mdxType:"Train"}))}U.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9e4087bc.5c7f7346.js b/assets/js/9e4087bc.c9f8ef92.js similarity index 96% rename from assets/js/9e4087bc.5c7f7346.js rename to assets/js/9e4087bc.c9f8ef92.js index 3fcfd92120..912f4569a0 100644 --- a/assets/js/9e4087bc.5c7f7346.js +++ b/assets/js/9e4087bc.c9f8ef92.js @@ -1 +1 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[3608],{3169:function(e,t,a){a.r(t),a.d(t,{default:function(){return o}});var r=a(7294),n=a(9960),l=a(5999),c=a(833),i=a(4774);function m(e){var t=e.year,a=e.posts;return r.createElement(r.Fragment,null,r.createElement("h3",null,t),r.createElement("ul",null,a.map((function(e){return r.createElement("li",{key:e.metadata.date},r.createElement(n.Z,{to:e.metadata.permalink},e.metadata.formattedDate," - ",e.metadata.title))}))))}function s(e){var t=e.years;return r.createElement("section",{className:"margin-vert--lg"},r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},t.map((function(e,t){return r.createElement("div",{key:t,className:"col col--4 margin-vert--lg"},r.createElement(m,e))})))))}function o(e){var t,a,n=e.archive,m=(0,l.I)({id:"theme.blog.archive.title",message:"Archive",description:"The page & hero title of the blog archive page"}),o=(0,l.I)({id:"theme.blog.archive.description",message:"Archive",description:"The page & hero description of the blog archive page"}),u=(t=n.blogPosts,a=t.reduceRight((function(e,t){var a,r=t.metadata.date.split("-")[0],n=null!=(a=e.get(r))?a:[];return e.set(r,[t].concat(n))}),new Map),Array.from(a,(function(e){return{year:e[0],posts:e[1]}})));return r.createElement(r.Fragment,null,r.createElement(c.d,{title:m,description:o}),r.createElement(i.Z,null,r.createElement("header",{className:"hero hero--primary"},r.createElement("div",{className:"container"},r.createElement("h1",{className:"hero__title"},m),r.createElement("p",{className:"hero__subtitle"},o))),r.createElement("main",null,u.length>0&&r.createElement(s,{years:u}))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[3608],{3169:function(e,t,a){a.r(t),a.d(t,{default:function(){return o}});var r=a(7294),n=a(9960),l=a(5999),c=a(833),i=a(7452);function m(e){var t=e.year,a=e.posts;return r.createElement(r.Fragment,null,r.createElement("h3",null,t),r.createElement("ul",null,a.map((function(e){return r.createElement("li",{key:e.metadata.date},r.createElement(n.Z,{to:e.metadata.permalink},e.metadata.formattedDate," - ",e.metadata.title))}))))}function s(e){var t=e.years;return r.createElement("section",{className:"margin-vert--lg"},r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},t.map((function(e,t){return r.createElement("div",{key:t,className:"col col--4 margin-vert--lg"},r.createElement(m,e))})))))}function o(e){var t,a,n=e.archive,m=(0,l.I)({id:"theme.blog.archive.title",message:"Archive",description:"The page & hero title of the blog archive page"}),o=(0,l.I)({id:"theme.blog.archive.description",message:"Archive",description:"The page & hero description of the blog archive page"}),u=(t=n.blogPosts,a=t.reduceRight((function(e,t){var a,r=t.metadata.date.split("-")[0],n=null!=(a=e.get(r))?a:[];return e.set(r,[t].concat(n))}),new Map),Array.from(a,(function(e){return{year:e[0],posts:e[1]}})));return r.createElement(r.Fragment,null,r.createElement(c.d,{title:m,description:o}),r.createElement(i.Z,null,r.createElement("header",{className:"hero hero--primary"},r.createElement("div",{className:"container"},r.createElement("h1",{className:"hero__title"},m),r.createElement("p",{className:"hero__subtitle"},o))),r.createElement("main",null,u.length>0&&r.createElement(s,{years:u}))))}}}]); \ No newline at end of file diff --git a/assets/js/bb7a48da.7ffaf0e8.js b/assets/js/bb7a48da.7ffaf0e8.js deleted file mode 100644 index 3c3f6822ad..0000000000 --- a/assets/js/bb7a48da.7ffaf0e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[9242],{3905:function(e,a,t){t.d(a,{Zo:function(){return u},kt:function(){return d}});var s=t(7294);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,s)}return t}function r(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var m=s.createContext({}),p=function(e){var a=s.useContext(m),t=a;return e&&(t="function"==typeof e?e(a):r(r({},a),e)),t},u=function(e){var a=p(e.components);return s.createElement(m.Provider,{value:a},e.children)},c={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},i=s.forwardRef((function(e,a){var t=e.components,n=e.mdxType,l=e.originalType,m=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),i=p(t),d=n,y=i["".concat(m,".").concat(d)]||i[d]||c[d]||l;return t?s.createElement(y,r(r({ref:a},u),{},{components:t})):s.createElement(y,r({ref:a},u))}));function d(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var l=t.length,r=new Array(l);r[0]=i;var o={};for(var m in a)hasOwnProperty.call(a,m)&&(o[m]=a[m]);o.originalType=e,o.mdxType="string"==typeof e?e:n,r[1]=o;for(var p=2;p child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),g=null!=y?y:h.map((function(e){var a=e.props;return{value:a.value,label:a.label,attributes:a.attributes}})),T=(0,o.l)(g,(function(e,a){return e.value===a.value}));if(T.length>0)throw new Error('Docusaurus error: Duplicate values "'+T.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var k=null===d?d:null!=(a=null!=d?d:null==(t=h.find((function(e){return e.props.default})))?void 0:t.props.value)?a:h[0].props.value;if(null!==k&&!g.some((function(e){return e.value===k})))throw new Error('Docusaurus error: The has a defaultValue "'+k+'" but none of its children has the corresponding value. Available values are: '+g.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var v=(0,m.U)(),x=v.tabGroupChoices,S=v.setTabGroupChoices,_=(0,n.useState)(k),N=_[0],C=_[1],I=[],M=(0,p.o5)().blockElementScrollPositionUntilNextRender;if(null!=b){var w=x[b];null!=w&&w!==N&&g.some((function(e){return e.value===w}))&&C(w)}var L=function(e){var a=e.currentTarget,t=I.indexOf(a),s=g[t].value;s!==N&&(M(a),C(s),null!=b&&S(b,String(s)))},D=function(e){var a,t=null;switch(e.key){case"Enter":L(e);break;case"ArrowRight":var s,n=I.indexOf(e.currentTarget)+1;t=null!=(s=I[n])?s:I[0];break;case"ArrowLeft":var l,r=I.indexOf(e.currentTarget)-1;t=null!=(l=I[r])?l:I[I.length-1]}null==(a=t)||a.focus()};return n.createElement("div",{className:(0,l.Z)("tabs-container",u)},n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":i},f)},g.map((function(e){var a=e.value,t=e.label,r=e.attributes;return n.createElement("li",(0,s.Z)({role:"tab",tabIndex:N===a?0:-1,"aria-selected":N===a,key:a,ref:function(e){return I.push(e)},onKeyDown:D,onClick:L},r,{className:(0,l.Z)("tabs__item",c,null==r?void 0:r.className,{"tabs__item--active":N===a})}),null!=t?t:a)}))),r?(0,n.cloneElement)(h.filter((function(e){return e.props.value===N}))[0],{className:"margin-top--md"}):n.createElement("div",{className:"margin-top--md"},h.map((function(e,a){return(0,n.cloneElement)(e,{key:a,hidden:e.props.value!==N})}))))}function d(e){var a=(0,r.Z)();return n.createElement(i,(0,s.Z)({key:String(a)},e))}},1989:function(e,a,t){var s=t(7294),n=t(2263);a.Z=function(e){var a=e.className,t=e.py,l=e.scala,r=e.csharp,o=e.sourceLink,m=(0,n.Z)().siteConfig.customFields.version,p="https://mmlspark.blob.core.windows.net/docs/"+m+"/pyspark/"+t,u="https://mmlspark.blob.core.windows.net/docs/"+m+"/scala/"+l,c="https://mmlspark.blob.core.windows.net/docs/"+m+"/dotnet/"+r;return s.createElement("table",null,s.createElement("tbody",null,s.createElement("tr",null,s.createElement("td",null,s.createElement("strong",null,"Python API: "),s.createElement("a",{href:p},a)),s.createElement("td",null,s.createElement("strong",null,"Scala API: "),s.createElement("a",{href:u},a)),s.createElement("td",null,s.createElement("strong",null,".NET API: "),s.createElement("a",{href:c},a)),s.createElement("td",null,s.createElement("strong",null,"Source: "),s.createElement("a",{href:o},a)))))}},2528:function(e,a,t){t.r(a),t.d(a,{assets:function(){return E},contentTitle:function(){return O},default:function(){return R},frontMatter:function(){return Z},metadata:function(){return F},toc:function(){return B}});var s=t(3117),n=t(102),l=(t(7294),t(3905)),r=t(5488),o=t(5162),m=t(1989),p=["components"],u=[{value:"Explainers",id:"explainers",level:2},{value:"ImageLIME",id:"imagelime",level:3},{value:"ImageSHAP",id:"imageshap",level:3},{value:"TabularLIME",id:"tabularlime",level:3},{value:"TabularSHAP",id:"tabularshap",level:3},{value:"TextLIME",id:"textlime",level:3},{value:"TextSHAP",id:"textshap",level:3},{value:"VectorLIME",id:"vectorlime",level:3},{value:"VectorSHAP",id:"vectorshap",level:3}],c={toc:u};function i(e){var a=e.components,t=(0,n.Z)(e,p);return(0,l.kt)("wrapper",(0,s.Z)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"explainers"},"Explainers"),(0,l.kt)("h3",{id:"imagelime"},"ImageLIME"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nlime = (ImageLIME()\n .setModel(model)\n .setOutputCol("weights")\n .setInputCol("image")\n .setCellSize(150.0)\n .setModifier(50.0)\n .setNumSamples(500)\n .setTargetCol("probability")\n .setTargetClassesCol("top2pred")\n .setSamplingFraction(0.7))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\n\nval lime = (new ImageLIME()\n .setModel(model)\n .setOutputCol("weights")\n .setInputCol("image")\n .setCellSize(150.0)\n .setModifier(50.0)\n .setNumSamples(500)\n .setTargetCol("probability")\n .setTargetClassesCol("top2pred")\n .setSamplingFraction(0.7))\n')))),(0,l.kt)(m.Z,{className:"ImageLIME",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.ImageLIME",scala:"com/microsoft/azure/synapse/ml/explainers/ImageLIME.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1ImageLIME.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/ImageLIME.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"imageshap"},"ImageSHAP"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nshap = (\n ImageSHAP()\n .setModel(model)\n .setOutputCol("shaps")\n .setSuperpixelCol("superpixels")\n .setInputCol("image")\n .setCellSize(150.0)\n .setModifier(50.0)\n .setNumSamples(500)\n .setTargetCol("probability")\n .setTargetClassesCol("top2pred")\n)\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\n\nval shap = (new ImageSHAP()\n .setModel(model)\n .setOutputCol("shaps")\n .setSuperpixelCol("superpixels")\n .setInputCol("image")\n .setCellSize(150.0)\n .setModifier(50.0)\n .setNumSamples(500)\n .setTargetCol("probability")\n .setTargetClassesCol("top2pred")\n))\n')))),(0,l.kt)(m.Z,{className:"ImageSHAP",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.ImageSHAP",scala:"com/microsoft/azure/synapse/ml/explainers/ImageSHAP.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1ImageSHAP.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/ImageSHAP.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"tabularlime"},"TabularLIME"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\ndata = spark.createDataFrame([\n (-6.0, 0),\n (-5.0, 0),\n (5.0, 1),\n (6.0, 1)\n], ["col1", "label"])\n\nlime = (TabularLIME()\n .setModel(model)\n .setInputCols(["col1"])\n .setOutputCol("weights")\n .setBackgroundData(data)\n .setKernelWidth(0.001)\n .setNumSamples(1000)\n .setTargetCol("probability")\n .setTargetClasses([0, 1]))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\nval data = Seq(\n (-6.0, 0),\n (-5.0, 0),\n (5.0, 1),\n (6.0, 1)\n).toDF("col1", "label")\n\nval lime = (new TabularLIME()\n .setInputCols(Array("col1"))\n .setOutputCol("weights")\n .setBackgroundData(data)\n .setKernelWidth(0.001)\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses(Array(0, 1)))\n')))),(0,l.kt)(m.Z,{className:"TabularLIME",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.TabularLIME",scala:"com/microsoft/azure/synapse/ml/explainers/TabularLIME.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1TabularLIME.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/TabularLIME.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"tabularshap"},"TabularSHAP"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\ndata = spark.createDataFrame([\n (-5.0, "a", -5.0, 0),\n (-5.0, "b", -5.0, 0),\n (5.0, "a", 5.0, 1),\n (5.0, "b", 5.0, 1)\n]*100, ["col1", "label"])\n\nshap = (TabularSHAP()\n .setInputCols(["col1", "col2", "col3"])\n .setOutputCol("shapValues")\n .setBackgroundData(data)\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses([1]))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\nval data = (1 to 100).flatMap(_ => Seq(\n (-5d, "a", -5d, 0),\n (-5d, "b", -5d, 0),\n (5d, "a", 5d, 1),\n (5d, "b", 5d, 1)\n )).toDF("col1", "col2", "col3", "label")\n\nval shap = (new TabularSHAP()\n .setInputCols(Array("col1", "col2", "col3"))\n .setOutputCol("shapValues")\n .setBackgroundData(data)\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses(Array(1)))\n')))),(0,l.kt)(m.Z,{className:"TabularSHAP",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.TabularSHAP",scala:"com/microsoft/azure/synapse/ml/explainers/TabularSHAP.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1TabularSHAP.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/TabularSHAP.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"textlime"},"TextLIME"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nlime = (TextLIME()\n .setModel(model)\n .setInputCol("text")\n .setTargetCol("prob")\n .setTargetClasses([1])\n .setOutputCol("weights")\n .setTokensCol("tokens")\n .setSamplingFraction(0.7)\n .setNumSamples(1000))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\n\nval lime = (new TextLIME()\n .setModel(model)\n .setInputCol("text")\n .setTargetCol("prob")\n .setTargetClasses(Array(1))\n .setOutputCol("weights")\n .setTokensCol("tokens")\n .setSamplingFraction(0.7)\n .setNumSamples(1000))\n')))),(0,l.kt)(m.Z,{className:"TextLIME",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.TextLIME",scala:"com/microsoft/azure/synapse/ml/explainers/TextLIME.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1TextLIME.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/TextLIME.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"textshap"},"TextSHAP"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nshap = (TextSHAP()\n .setModel(model)\n .setInputCol("text")\n .setTargetCol("prob")\n .setTargetClasses([1])\n .setOutputCol("weights")\n .setTokensCol("tokens")\n .setNumSamples(1000))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\n\nval shap = (new TextSHAP()\n .setModel(model)\n .setInputCol("text")\n .setTargetCol("prob")\n .setTargetClasses(Array(1))\n .setOutputCol("weights")\n .setTokensCol("tokens")\n .setNumSamples(1000))\n')))),(0,l.kt)(m.Z,{className:"TextSHAP",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.TextSHAP",scala:"com/microsoft/azure/synapse/ml/explainers/TextSHAP.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1TextSHAP.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/TextSHAP.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"vectorlime"},"VectorLIME"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\ndf = spark.createDataFrame([\n ([0.2729799734928408, -0.4637273304253777, 1.565593782147994], 4.541185129673482),\n ([1.9511879801376864, 1.495644437589599, -0.4667847796501322], 0.19526424470709836)\n])\n\nlime = (VectorLIME()\n .setModel(model)\n .setBackgroundData(df)\n .setInputCol("features")\n .setTargetCol("label")\n .setOutputCol("weights")\n .setNumSamples(1000))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport spark.implicits._\nimport breeze.linalg.{*, DenseMatrix => BDM}\nimport breeze.stats.distributions.Rand\nimport org.apache.spark.ml.linalg.Vectors\nimport org.apache.spark.ml.regression.LinearRegression\n\nval d1 = 3\nval d2 = 1\nval coefficients: BDM[Double] = new BDM(d1, d2, Array(1.0, -1.0, 2.0))\n\nval df = {\n val nRows = 100\n val intercept: Double = math.random()\n\n val x: BDM[Double] = BDM.rand(nRows, d1, Rand.gaussian)\n val y = x * coefficients + intercept\n\n val xRows = x(*, ::).iterator.toSeq.map(dv => Vectors.dense(dv.toArray))\n val yRows = y(*, ::).iterator.toSeq.map(dv => dv(0))\n xRows.zip(yRows).toDF("features", "label")\n }\n\nval model: LinearRegressionModel = new LinearRegression().fit(df)\n\nval lime = (new VectorLIME()\n .setModel(model)\n .setBackgroundData(df)\n .setInputCol("features")\n .setTargetCol(model.getPredictionCol)\n .setOutputCol("weights")\n .setNumSamples(1000))\n')))),(0,l.kt)(m.Z,{className:"VectorLIME",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.VectorLIME",scala:"com/microsoft/azure/synapse/ml/explainers/VectorLIME.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1VectorLIME.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/VectorLIME.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"vectorshap"},"VectorSHAP"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nshap = (VectorSHAP()\n .setInputCol("features")\n .setOutputCol("shapValues")\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses([1]))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport spark.implicits._\nimport breeze.linalg.{*, DenseMatrix => BDM}\nimport breeze.stats.distributions.RandBasis\nimport org.apache.spark.ml.classification.LogisticRegression\nimport org.apache.spark.ml.linalg.Vectors\n\nval randBasis = RandBasis.withSeed(123)\nval m: BDM[Double] = BDM.rand[Double](1000, 5, randBasis.gaussian)\nval l: BDV[Double] = m(*, ::).map {\n row =>\n if (row(2) + row(3) > 0.5) 1d else 0d\n }\nval data = m(*, ::).iterator.zip(l.valuesIterator).map {\n case (f, l) => (f.toSpark, l)\n }.toSeq.toDF("features", "label")\n\nval model = new LogisticRegression()\n .setFeaturesCol("features")\n .setLabelCol("label")\n .fit(data)\n\nval shap = (new VectorSHAP()\n .setInputCol("features")\n .setOutputCol("shapValues")\n .setBackgroundData(data)\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses(Array(1))\n\nval infer = Seq(\n Tuple1(Vectors.dense(1d, 1d, 1d, 1d, 1d))\n ) toDF "features"\nval predicted = model.transform(infer)\nshap.transform(predicted).show()\n')))),(0,l.kt)(m.Z,{className:"VectorSHAP",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.VectorSHAP",scala:"com/microsoft/azure/synapse/ml/explainers/VectorSHAP.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1VectorSHAP.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/VectorSHAP.scala",mdxType:"DocTable"}))}i.isMDXComponent=!0;var d=["components"],y=[{value:"Featurize",id:"featurize",level:2},{value:"DataConversion",id:"dataconversion",level:3},{value:"IndexToValue",id:"indextovalue",level:3},{value:"Featurize Text",id:"featurize-text",level:2},{value:"MultiNGram",id:"multingram",level:3},{value:"PageSplitter",id:"pagesplitter",level:3}],b={toc:y};function f(e){var a=e.components,t=(0,n.Z)(e,d);return(0,l.kt)("wrapper",(0,s.Z)({},b,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"featurize"},"Featurize"),(0,l.kt)("h3",{id:"dataconversion"},"DataConversion"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndf = spark.createDataFrame([\n (True, 1, 2, 3, 4, 5.0, 6.0, "7", "8.0"),\n (False, 9, 10, 11, 12, 14.5, 15.5, "16", "17.456"),\n (True, -127, 345, 666, 1234, 18.91, 20.21, "100", "200.12345")\n], ["bool", "byte", "short", "int", "long", "float", "double", "intstring", "doublestring"])\n\ndc = (DataConversion()\n .setCols(["byte"])\n .setConvertTo("boolean"))\n\ndc.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport spark.implicits._\n\nval df = Seq(\n (true: Boolean, 1: Byte, 2: Short, 3: Integer, 4: Long, 5.0F, 6.0, "7", "8.0"),\n (false, 9: Byte, 10: Short, 11: Integer, 12: Long, 14.5F, 15.5, "16", "17.456"),\n (true, -127: Byte, 345: Short, Short.MaxValue + 100, (Int.MaxValue).toLong + 100, 18.91F, 20.21, "100", "200.12345"))\n .toDF("bool", "byte", "short", "int", "long", "float", "double", "intstring", "doublestring")\n\nval dc = (new DataConversion()\n .setCols(Array("byte"))\n .setConvertTo("boolean"))\n\ndc.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"DataConversion",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.DataConversion",scala:"com/microsoft/azure/synapse/ml/featurize/DataConversion.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1DataConversion.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/DataConversion.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"indextovalue"},"IndexToValue"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndf = spark.createDataFrame([\n (-3, 24, 0.32534, True, "piano"),\n (1, 5, 5.67, False, "piano"),\n (-3, 5, 0.32534, False, "guitar")\n], ["int", "long", "double", "bool", "string"])\n\ndf2 = ValueIndexer().setInputCol("string").setOutputCol("string_cat").fit(df).transform(df)\n\nitv = (IndexToValue()\n .setInputCol("string_cat")\n .setOutputCol("string_noncat"))\n\nitv.transform(df2).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport spark.implicits._\n\nval df = Seq[(Int, Long, Double, Boolean, String)](\n (-3, 24L, 0.32534, true, "piano"),\n (1, 5L, 5.67, false, "piano"),\n (-3, 5L, 0.32534, false, "guitar")).toDF("int", "long", "double", "bool", "string")\n\nval df2 = new ValueIndexer().setInputCol("string").setOutputCol("string_cat").fit(df).transform(df)\n\nval itv = (new IndexToValue()\n .setInputCol("string_cat")\n .setOutputCol("string_noncat"))\n\nitv.transform(df2).show()\n')))),(0,l.kt)(m.Z,{className:"IndexToValue",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.IndexToValue",scala:"com/microsoft/azure/synapse/ml/featurize/IndexToValue.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1IndexToValue.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/IndexToValue.scala",mdxType:"DocTable"}),(0,l.kt)("h2",{id:"featurize-text"},"Featurize Text"),(0,l.kt)("h3",{id:"multingram"},"MultiNGram"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize.text import *\nfrom pyspark.ml.feature import Tokenizer\n\ndfRaw = spark.createDataFrame([\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, ""),\n (4, "1 2 3 4 5 6 7 8 9")\n], ["label", "sentence"])\n\ndfTok = (Tokenizer()\n .setInputCol("sentence")\n .setOutputCol("tokens")\n .transform(dfRaw))\n\nmng = (MultiNGram()\n .setLengths([1, 3, 4])\n .setInputCol("tokens")\n .setOutputCol("ngrams"))\n\nmng.transform(dfTok).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize.text._\nimport org.apache.spark.ml.feature.Tokenizer\nimport spark.implicits._\n\nval dfRaw = (Seq(\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, ""),\n (4, (1 to 10).map(_.toString).mkString(" ")))\n .toDF("label", "sentence"))\n\nval dfTok = (new Tokenizer()\n .setInputCol("sentence")\n .setOutputCol("tokens")\n .transform(dfRaw))\n\nval mng = (new MultiNGram()\n .setLengths(Array(1, 3, 4))\n .setInputCol("tokens")\n .setOutputCol("ngrams"))\n\nmng.transform(dfTok).show()\n')))),(0,l.kt)(m.Z,{className:"MultiNGram",py:"synapse.ml.featurize.text.html#module-synapse.ml.featurize.text.MultiNGram",scala:"com/microsoft/azure/synapse/ml/featurize/text/MultiNGram.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1Text_1_1MultiNGram.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/text/MultiNGram.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"pagesplitter"},"PageSplitter"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize.text import *\n\ndf = spark.createDataFrame([\n ("words words words wornssaa ehewjkdiw weijnsikjn xnh", ),\n ("s s s s s s", ),\n ("hsjbhjhnskjhndwjnbvckjbnwkjwenbvfkjhbnwevkjhbnwejhkbnvjkhnbndjkbnd", ),\n ("hsjbhjhnskjhndwjnbvckjbnwkjwenbvfkjhbnwevkjhbnwejhkbnvjkhnbndjkbnd 190872340870271091309831097813097130i3u709781", ),\n ("", ),\n (None, )\n], ["text"])\n\nps = (PageSplitter()\n .setInputCol("text")\n .setMaximumPageLength(20)\n .setMinimumPageLength(10)\n .setOutputCol("pages"))\n\nps.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize.text._\nimport spark.implicits._\n\nval df = Seq(\n "words words words wornssaa ehewjkdiw weijnsikjn xnh",\n "s s s s s s",\n "hsjbhjhnskjhndwjnbvckjbnwkjwenbvfkjhbnwevkjhbnwejhkbnvjkhnbndjkbnd",\n "hsjbhjhnskjhndwjnbvckjbnwkjwenbvfkjhbnwevkjhbnwejhkbnvjkhnbndjkbnd " +\n "190872340870271091309831097813097130i3u709781",\n "",\n null\n ).toDF("text")\n\nval ps = (new PageSplitter()\n .setInputCol("text")\n .setMaximumPageLength(20)\n .setMinimumPageLength(10)\n .setOutputCol("pages"))\n\nps.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"PageSplitter",py:"synapse.ml.featurize.text.html#module-synapse.ml.featurize.text.PageSplitter",scala:"com/microsoft/azure/synapse/ml/featurize/text/PageSplitter.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1Text_1_1PageSplitter.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/text/PageSplitter.scala",mdxType:"DocTable"}))}f.isMDXComponent=!0;var h=["components"],g=[{value:"Image",id:"image",level:2},{value:"UnrollImage",id:"unrollimage",level:3},{value:"UnrollBinaryImage",id:"unrollbinaryimage",level:3},{value:"SuperpixelTransformer",id:"superpixeltransformer",level:3}],T={toc:g};function k(e){var a=e.components,t=(0,n.Z)(e,h);return(0,l.kt)("wrapper",(0,s.Z)({},T,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"image"},"Image"),(0,l.kt)("h3",{id:"unrollimage"},"UnrollImage"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.image import *\nfrom azure.storage.blob import *\n# images = (spark.read.format("image")\n# .option("dropInvalid", True)\n# .load("wasbs://datasets@mmlspark.blob.core.windows.net/LIME/greyscale.jpg"))\n# rit = (ResizeImageTransformer()\n# .setOutputCol("out")\n# .setHeight(15)\n# .setWidth(10))\n# preprocessed = rit.transform(images)\nunroll = (UnrollImage()\n .setInputCol("out")\n .setOutputCol("final"))\n# unroll.transform(preprocessed).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.image._\nimport spark.implicits._\nval images = (spark.read.format("image")\n .option("dropInvalid", true)\n .load("wasbs://datasets@mmlspark.blob.core.windows.net/LIME/greyscale.jpg"))\nval rit = (new ResizeImageTransformer()\n .setOutputCol("out")\n .setHeight(15)\n .setWidth(10))\nval preprocessed = rit.transform(images)\nval unroll = (new UnrollImage()\n .setInputCol(rit.getOutputCol)\n .setOutputCol("final"))\nunroll.transform(preprocessed).show()\n')))),(0,l.kt)(m.Z,{className:"UnrollImage",py:"synapse.ml.image.html#module-synapse.ml.image.UnrollImage",scala:"com/microsoft/azure/synapse/ml/image/UnrollImage.html",csharp:"classSynapse_1_1ML_1_1Image_1_1UnrollImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/image/UnrollImage.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"unrollbinaryimage"},"UnrollBinaryImage"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.image import *\nunroll = (UnrollBinaryImage()\n .setInputCol("input_col")\n .setOutputCol("final"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.image._\nimport spark.implicits._\nval unroll = (new UnrollBinaryImage()\n .setInputCol("input_col")\n .setOutputCol("final"))\n')))),(0,l.kt)(m.Z,{className:"UnrollBinaryImage",py:"synapse.ml.image.html#module-synapse.ml.image.UnrollBinaryImage",scala:"com/microsoft/azure/synapse/ml/image/UnrollBinaryImage.html",csharp:"classSynapse_1_1ML_1_1Image_1_1UnrollBinaryImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/image/UnrollBinaryImage.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"superpixeltransformer"},"SuperpixelTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.image import *\n\nspt = (SuperpixelTransformer()\n .setInputCol("images"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.image._\n\nval spt = (new SuperpixelTransformer()\n .setInputCol("images"))\n')))),(0,l.kt)(m.Z,{className:"SuperpixelTransformer",py:"synapse.ml.lime.html#module-synapse.ml.image.SuperpixelTransformer",scala:"com/microsoft/azure/synapse/ml/image/SuperpixelTransformer.html",csharp:"classSynapse_1_1ML_1_1Image_1_1SuperpixelTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/image/SuperpixelTransformer.scala",mdxType:"DocTable"}))}k.isMDXComponent=!0;var v=["components"],x=[{value:"IO",id:"io",level:2},{value:"HTTPTransformer",id:"httptransformer",level:3},{value:"SimpleHTTPTransformer",id:"simplehttptransformer",level:3},{value:"JSONInputParser",id:"jsoninputparser",level:3},{value:"JSONOutputParser",id:"jsonoutputparser",level:3},{value:"StringOutputParser",id:"stringoutputparser",level:3},{value:"CustomInputParser",id:"custominputparser",level:3},{value:"CustomOutputParser",id:"customoutputparser",level:3}],S={toc:x};function _(e){var a=e.components,t=(0,n.Z)(e,v);return(0,l.kt)("wrapper",(0,s.Z)({},S,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"io"},"IO"),(0,l.kt)("h3",{id:"httptransformer"},"HTTPTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\nfrom pyspark.sql.functions import udf, col\nfrom requests import Request\n\ndef world_bank_request(country):\n return Request("GET", "http://api.worldbank.org/v2/country/{}?format=json".format(country))\n\ndf = (spark.createDataFrame([("br",), ("usa",)], ["country"])\n .withColumn("request", http_udf(world_bank_request)(col("country"))))\n\nht = (HTTPTransformer()\n .setConcurrency(3)\n .setInputCol("request")\n .setOutputCol("response"))\n\nht.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval ht = (new HTTPTransformer()\n .setConcurrency(3)\n .setInputCol("request")\n .setOutputCol("response"))\n')))),(0,l.kt)(m.Z,{className:"HTTPTransformer",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.HTTPTransformer",scala:"com/microsoft/azure/synapse/ml/io/http/HTTPTransformer.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1HTTPTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/HTTPTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"simplehttptransformer"},"SimpleHTTPTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\nfrom pyspark.sql.types import StringType, StructType\n\nsht = (SimpleHTTPTransformer()\n .setInputCol("data")\n .setOutputParser(JSONOutputParser()\n .setDataType(StructType().add("blah", StringType())))\n .setUrl("PUT_YOUR_URL")\n .setOutputCol("results")\n .setConcurrency(3))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\nimport org.apache.spark.sql.types.{StringType, StructType}\n\nval sht = (new SimpleHTTPTransformer()\n .setInputCol("data")\n .setOutputParser(new JSONOutputParser()\n .setDataType(new StructType().add("blah", StringType)))\n .setUrl("PUT_YOUR_URL")\n .setOutputCol("results")\n .setConcurrency(3))\n')))),(0,l.kt)(m.Z,{className:"SimpleHTTPTransformer",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.SimpleHTTPTransformer",scala:"com/microsoft/azure/synapse/ml/io/http/SimpleHTTPTransformer.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1SimpleHTTPTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/SimpleHTTPTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"jsoninputparser"},"JSONInputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\n\njsonIP = (JSONInputParser()\n .setInputCol("data")\n .setOutputCol("out")\n .setUrl("PUT_YOUR_URL"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval jsonIP = (new JSONInputParser()\n .setInputCol("data")\n .setOutputCol("out")\n .setUrl("PUT_YOUR_URL"))\n')))),(0,l.kt)(m.Z,{className:"JSONInputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.JSONInputParser",scala:"com/microsoft/azure/synapse/ml/io/http/JSONInputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1JSONInputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/JSONInputParser.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"jsonoutputparser"},"JSONOutputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\nfrom pyspark.sql.types import StringType, StructType\n\njsonOP = (JSONOutputParser()\n .setDataType(StructType().add("foo", StringType()))\n .setInputCol("unparsedOutput")\n .setOutputCol("parsedOutput"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\nimport org.apache.spark.sql.types.{StringType, StructType}\n\nval jsonOP = (new JSONOutputParser()\n .setDataType(new StructType().add("foo", StringType))\n .setInputCol("unparsedOutput")\n .setOutputCol("parsedOutput"))\n')))),(0,l.kt)(m.Z,{className:"JSONOutputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.JSONOutputParser",scala:"com/microsoft/azure/synapse/ml/io/http/JSONOutputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1JSONOutputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/JSONOutputParser.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"stringoutputparser"},"StringOutputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\n\nsop = (StringOutputParser()\n .setInputCol("unparsedOutput")\n .setOutputCol("out"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval sop = (new StringOutputParser()\n .setInputCol("unparsedOutput")\n .setOutputCol("out"))\n')))),(0,l.kt)(m.Z,{className:"StringOutputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.StringOutputParser",scala:"com/microsoft/azure/synapse/ml/io/http/StringOutputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1StringOutputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/StringOutputParser.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"custominputparser"},"CustomInputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\n\ncip = (CustomInputParser()\n .setInputCol("data")\n .setOutputCol("out"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval cip = (new CustomInputParser()\n .setInputCol("data")\n .setOutputCol("out")\n .setUDF({ x: Int => new HttpPost(s"http://$x") }))\n')))),(0,l.kt)(m.Z,{className:"CustomInputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.CustomInputParser",scala:"com/microsoft/azure/synapse/ml/io/http/CustomInputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1CustomInputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/CustomInputParser.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"customoutputparser"},"CustomOutputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\n\ncop = (CustomOutputParser()\n .setInputCol("unparsedOutput")\n .setOutputCol("out"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval cop = (new CustomOutputParser()\n .setInputCol("unparsedOutput")\n .setOutputCol("out"))\n')))),(0,l.kt)(m.Z,{className:"CustomOutputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.CustomOutputParser",scala:"com/microsoft/azure/synapse/ml/io/http/CustomOutputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1CustomOutputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/CustomOutputParser.scala",mdxType:"DocTable"}))}_.isMDXComponent=!0;var N=["components"],C=[{value:"Stages",id:"stages",level:2},{value:"Cacher",id:"cacher",level:3},{value:"DropColumns",id:"dropcolumns",level:3},{value:"EnsembleByKey",id:"ensemblebykey",level:3},{value:"Explode",id:"explode",level:3},{value:"Lambda",id:"lambda",level:3},{value:"DynamicMiniBatchTransformer",id:"dynamicminibatchtransformer",level:3},{value:"FixedMiniBatchTransformer",id:"fixedminibatchtransformer",level:3},{value:"TimeIntervalMiniBatchTransformer",id:"timeintervalminibatchtransformer",level:3},{value:"FlattenBatch",id:"flattenbatch",level:3},{value:"RenameColumn",id:"renamecolumn",level:3},{value:"Repartition",id:"repartition",level:3},{value:"SelectColumns",id:"selectcolumns",level:3},{value:"StratifiedRepartition",id:"stratifiedrepartition",level:3},{value:"SummarizeData",id:"summarizedata",level:3},{value:"TextPreprocessor",id:"textpreprocessor",level:3},{value:"UDFTransformer",id:"udftransformer",level:3},{value:"UnicodeNormalize",id:"unicodenormalize",level:3}],I={toc:C};function M(e){var a=e.components,t=(0,n.Z)(e,N);return(0,l.kt)("wrapper",(0,s.Z)({},I,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"stages"},"Stages"),(0,l.kt)("h3",{id:"cacher"},"Cacher"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, "guitars", "drums"),\n (1, "piano", "trumpet"),\n (2, "bass", "cymbals"),\n (3, "guitars", "drums"),\n (4, "piano", "trumpet"),\n (5, "bass", "cymbals"),\n (6, "guitars", "drums"),\n (7, "piano", "trumpet"),\n (8, "bass", "cymbals"),\n (9, "guitars", "drums"),\n (10, "piano", "trumpet"),\n (11, "bass", "cymbals")\n ], ["numbers", "words", "more"]))\n\ncacher = Cacher()\n\ncacher.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = Seq(\n (0, "guitars", "drums"),\n (1, "piano", "trumpet"),\n (2, "bass", "cymbals"),\n (3, "guitars", "drums"),\n (4, "piano", "trumpet"),\n (5, "bass", "cymbals"),\n (6, "guitars", "drums"),\n (7, "piano", "trumpet"),\n (8, "bass", "cymbals"),\n (9, "guitars", "drums"),\n (10, "piano", "trumpet"),\n (11, "bass", "cymbals")\n ).toDF("numbers", "words", "more")\n\nval cacher = new Cacher()\n\ncacher.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"HTTPTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.Cacher",scala:"com/microsoft/azure/synapse/ml/stages/Cacher.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Cacher.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Cacher.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"dropcolumns"},"DropColumns"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 0, "guitars", "drums", 1, True),\n (1, 1, "piano", "trumpet", 2, False),\n (2, 2, "bass", "cymbals", 3, True)\n ], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\ndc = DropColumns().setCols([])\n\ndc.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval dc = new DropColumns().setCols(Array())\n\ndc.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"DropColumns",py:"synapse.ml.stages.html#module-synapse.ml.stages.DropColumns",scala:"com/microsoft/azure/synapse/ml/stages/DropColumns.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1DropColumns.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/DropColumns.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"ensemblebykey"},"EnsembleByKey"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.ml.feature import VectorAssembler\n\nscoreDF = (spark.createDataFrame([\n (0, "foo", 1.0, .1),\n (1, "bar", 4.0, -2.0),\n (1, "bar", 0.0, -3.0)\n ], ["label1", "label2", "score1", "score2"]))\n\nva = VectorAssembler().setInputCols(["score1", "score2"]).setOutputCol("v1")\nscoreDF2 = va.transform(scoreDF)\n\nebk = EnsembleByKey().setKeys(["label1"]).setCols(["score1"])\n\nebk.transform(scoreDF2).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.ml.feature.VectorAssembler\n\nval scoreDF = (Seq(\n (0, "foo", 1.0, .1),\n (1, "bar", 4.0, -2.0),\n (1, "bar", 0.0, -3.0))\n .toDF("label1", "label2", "score1", "score2"))\n\nval va = new VectorAssembler().setInputCols(Array("score1", "score2")).setOutputCol("v1")\nval scoreDF2 = va.transform(scoreDF)\n\nval ebk = new EnsembleByKey().setKey("label1").setCol("score1")\n\nebk.transform(scoreDF2).show()\n')))),(0,l.kt)(m.Z,{className:"EnsembleByKey",py:"synapse.ml.stages.html#module-synapse.ml.stages.EnsembleByKey",scala:"com/microsoft/azure/synapse/ml/stages/EnsembleByKey.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1EnsembleByKey.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/EnsembleByKey.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"explode"},"Explode"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, ["guitars", "drums"]),\n (1, ["piano"]),\n (2, [])\n ], ["numbers", "words"]))\n\nexplode = Explode().setInputCol("words").setOutputCol("exploded")\n\nexplode.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, Seq("guitars", "drums")),\n (1, Seq("piano")),\n (2, Seq()))\n .toDF("numbers", "words"))\n\nval explode = new Explode().setInputCol("words").setOutputCol("exploded")\n\nexplode.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"Explode",py:"synapse.ml.stages.html#module-synapse.ml.stages.Explode",scala:"com/microsoft/azure/synapse/ml/stages/Explode.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Explode.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Explode.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"lambda"},"Lambda"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.sql.types import StringType, StructType\n\ndf = (spark.createDataFrame([\n (0, 0.0, "guitars", "drums", 1, True),\n (1, 1.0, "piano", "trumpet", 2, False),\n (2, 2.0, "bass", "cymbals", 3, True)\n ], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\ndef transformFunc(df):\n return df.select("numbers")\n\ndef transformSchemaFunc(schema):\n return StructType([schema("numbers")])\n\nl = (Lambda()\n .setTransformFunc(transformFunc)\n .setTransformSchemaFunc(transformSchemaFunc))\n\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.sql.types.{StringType, StructType}\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval lambda = (new Lambda()\n .setTransform(df => df.select("numbers"))\n .setTransformSchema(schema => new StructType(Array(schema("numbers")))))\n\nlambda.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"Lambda",py:"synapse.ml.stages.html#module-synapse.ml.stages.Lambda",scala:"com/microsoft/azure/synapse/ml/stages/Lambda.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Lambda.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Lambda.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"dynamicminibatchtransformer"},"DynamicMiniBatchTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.sql.types import StringType, StructType\n\ndf = (spark.createDataFrame([(_, "foo") for _ in range(1, 11)], ["in1", "in2"]))\n\ndmbt = DynamicMiniBatchTransformer()\n\ndmbt.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (1 until 11).map(x => (x, "foo")).toDF("in1", "in2")\n\nval dmbt = new DynamicMiniBatchTransformer()\n\ndmbt.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"DynamicMiniBatchTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.DynamicMiniBatchTransformer",scala:"com/microsoft/azure/synapse/ml/stages/DynamicMiniBatchTransformer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1DynamicMiniBatchTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MiniBatchTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"fixedminibatchtransformer"},"FixedMiniBatchTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},"from synapse.ml.stages import *\n\nfmbt = (FixedMiniBatchTransformer()\n .setBuffered(True)\n .setBatchSize(3))\n"))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},"import com.microsoft.azure.synapse.ml.stages._\n\nval fmbt = (new FixedMiniBatchTransformer()\n .setBuffered(true)\n .setBatchSize(3))\n")))),(0,l.kt)(m.Z,{className:"FixedMiniBatchTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.FixedMiniBatchTransformer",scala:"com/microsoft/azure/synapse/ml/stages/FixedMiniBatchTransformer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1FixedMiniBatchTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MiniBatchTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"timeintervalminibatchtransformer"},"TimeIntervalMiniBatchTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([(_, "foo") for _ in range(1, 11)], ["in1", "in2"]))\n\ntimbt = (TimeIntervalMiniBatchTransformer()\n .setMillisToWait(1000)\n .setMaxBatchSize(30))\n\ntimbt.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (1 until 11).map(x => (x, "foo")).toDF("in1", "in2")\n\nval timbt = (new TimeIntervalMiniBatchTransformer()\n .setMillisToWait(1000)\n .setMaxBatchSize(30))\n\ntimbt.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"TimeIntervalMiniBatchTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.TimeIntervalMiniBatchTransformer",scala:"com/microsoft/azure/synapse/ml/stages/TimeIntervalMiniBatchTransformer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1TimeIntervalMiniBatchTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MiniBatchTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"flattenbatch"},"FlattenBatch"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([(_, "foo") for _ in range(1, 11)], ["in1", "in2"]))\n\ntransDF = DynamicMiniBatchTransformer().transform(df)\n\nfb = FlattenBatch()\n\nfb.transform(transDF).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (1 until 11).map(x => (x, "foo")).toDF("in1", "in2")\n\nval transDF = new DynamicMiniBatchTransformer().transform(df)\n\nval fb = new FlattenBatch()\n\nfb.transform(transDF).show()\n')))),(0,l.kt)(m.Z,{className:"FlattenBatch",py:"synapse.ml.stages.html#module-synapse.ml.stages.FlattenBatch",scala:"com/microsoft/azure/synapse/ml/stages/FlattenBatch.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1FlattenBatch.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MiniBatchTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"renamecolumn"},"RenameColumn"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 0, "guitars", "drums", 1, True),\n (1, 1, "piano", "trumpet", 2, False),\n (2, 2, "bass", "cymbals", 3, True)\n], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\nrc = RenameColumn().setInputCol("words").setOutputCol("numbers")\n\nrc.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval rc = new RenameColumn().setInputCol("words").setOutputCol("numbers")\n\nrc.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"RenameColumn",py:"synapse.ml.stages.html#module-synapse.ml.stages.RenameColumn",scala:"com/microsoft/azure/synapse/ml/stages/RenameColumn.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1RenameColumn.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/RenameColumn.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"repartition"},"Repartition"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, "guitars", "drums"),\n (1, "piano", "trumpet"),\n (2, "bass", "cymbals"),\n (3, "guitars", "drums"),\n (4, "piano", "trumpet"),\n (5, "bass", "cymbals"),\n (6, "guitars", "drums"),\n (7, "piano", "trumpet"),\n (8, "bass", "cymbals"),\n (9, "guitars", "drums"),\n (10, "piano", "trumpet"),\n (11, "bass", "cymbals")\n], ["numbers", "words", "more"]))\n\nrepartition = Repartition().setN(1)\n\nrepartition.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, "guitars", "drums"),\n (1, "piano", "trumpet"),\n (2, "bass", "cymbals"),\n (3, "guitars", "drums"),\n (4, "piano", "trumpet"),\n (5, "bass", "cymbals"),\n (6, "guitars", "drums"),\n (7, "piano", "trumpet"),\n (8, "bass", "cymbals"),\n (9, "guitars", "drums"),\n (10, "piano", "trumpet"),\n (11, "bass", "cymbals")\n ).toDF("numbers", "words", "more"))\n\nval repartition = new Repartition().setN(1)\n\nrepartition.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"Repartition",py:"synapse.ml.stages.html#module-synapse.ml.stages.Repartition",scala:"com/microsoft/azure/synapse/ml/stages/Repartition.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Repartition.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Repartition.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"selectcolumns"},"SelectColumns"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 0.0, "guitars", "drums", 1, True),\n (1, 1.0, "piano", "trumpet", 2, False),\n (2, 2.0, "bass", "cymbals", 3, True)\n], ["numbers", "words", "more"]))\n\nsc = SelectColumns().setCols(["words", "more"])\n\nsc.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval sc = new SelectColumns().setCols(Array("words", "more"))\n\nsc.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"SelectColumns",py:"synapse.ml.stages.html#module-synapse.ml.stages.SelectColumns",scala:"com/microsoft/azure/synapse/ml/stages/SelectColumns.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1SelectColumns.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/SelectColumns.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"stratifiedrepartition"},"StratifiedRepartition"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, "Blue", 2),\n (0, "Red", 2),\n (0, "Green", 2),\n (1, "Purple", 2),\n (1, "Orange", 2),\n (1, "Indigo", 2),\n (2, "Violet", 2),\n (2, "Black", 2),\n (2, "White", 2),\n (3, "Gray", 2),\n (3, "Yellow", 2),\n (3, "Cerulean", 2)\n], ["values", "colors", "const"]))\n\nsr = StratifiedRepartition().setLabelCol("values").setMode("equal")\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, "Blue", 2),\n (0, "Red", 2),\n (0, "Green", 2),\n (1, "Purple", 2),\n (1, "Orange", 2),\n (1, "Indigo", 2),\n (2, "Violet", 2),\n (2, "Black", 2),\n (2, "White", 2),\n (3, "Gray", 2),\n (3, "Yellow", 2),\n (3, "Cerulean", 2)\n ).toDF("values", "colors", "const"))\n\nval sr = new StratifiedRepartition().setLabelCol("values").setMode("equal")\n\nsr.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"StratifiedRepartition",py:"synapse.ml.stages.html#module-synapse.ml.stages.StratifiedRepartition",scala:"com/microsoft/azure/synapse/ml/stages/StratifiedRepartition.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1StratifiedRepartition.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/StratifiedRepartition.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"summarizedata"},"SummarizeData"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 0.0, "guitars", "drums", 1, True),\n (1, 1.0, "piano", "trumpet", 2, False),\n (2, 2.0, "bass", "cymbals", 3, True)\n], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\nsummary = SummarizeData()\n\nsummary.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval summary = new SummarizeData()\n\nsummary.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"SummarizeData",py:"synapse.ml.stages.html#module-synapse.ml.stages.SummarizeData",scala:"com/microsoft/azure/synapse/ml/stages/SummarizeData.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1SummarizeData.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/SummarizeData.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"textpreprocessor"},"TextPreprocessor"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n ("The happy sad boy drank sap", ),\n ("The hater sad doy drank sap", ),\n ("foo", ),\n ("The hater sad doy aABc0123456789Zz_", )\n], ["words1"]))\n\ntestMap = {"happy": "sad", "hater": "sap",\n "sad": "sap", "sad doy": "sap"}\n\ntextPreprocessor = (TextPreprocessor()\n .setNormFunc("lowerCase")\n .setMap(testMap)\n .setInputCol("words1")\n .setOutputCol("out"))\n\ntextPreprocessor.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n ("The happy sad boy drank sap", ),\n ("The hater sad doy drank sap", ),\n ("foo", ),\n ("The hater sad doy aABc0123456789Zz_", ))\n .toDF("words1"))\n\nval testMap = Map[String, String] (\n "happy" -> "sad",\n "hater" -> "sap",\n "sad" -> "sap",\n "sad doy" -> "sap"\n )\n\nval textPreprocessor = (new TextPreprocessor()\n .setNormFunc("lowerCase")\n .setMap(testMap)\n .setInputCol("words1")\n .setOutputCol("out"))\n\ntextPreprocessor.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"TextPreprocessor",py:"synapse.ml.stages.html#module-synapse.ml.stages.TextPreprocessor",scala:"com/microsoft/azure/synapse/ml/stages/TextPreprocessor.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1TextPreprocessor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/TextPreprocessor.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"udftransformer"},"UDFTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.sql.functions import udf\n\ndf = (spark.createDataFrame([\n (0, 0.0, "guitars", "drums", 1, True),\n (1, 1.0, "piano", "trumpet", 2, False),\n (2, 2.0, "bass", "cymbals", 3, True)\n], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\nstringToIntegerUDF = udf(lambda x: 1)\n\nudfTransformer = (UDFTransformer()\n .setUDF(stringToIntegerUDF)\n .setInputCol("numbers")\n .setOutputCol("out"))\n\nudfTransformer.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.sql.functions.udf\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval stringToIntegerUDF = udf((_: String) => 1)\n\nval udfTransformer = (new UDFTransformer()\n .setUDF(stringToIntegerUDF)\n .setInputCol("numbers")\n .setOutputCol("out"))\n\nudfTransformer.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"UDFTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.UDFTransformer",scala:"com/microsoft/azure/synapse/ml/stages/UDFTransformer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1UDFTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/UDFTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"unicodenormalize"},"UnicodeNormalize"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n ("Sch\xf6n", 1),\n ("Scho\\u0308n", 1),\n (None, 1)\n], ["words1", "dummy"]))\n\nunicodeNormalize = (UnicodeNormalize()\n .setForm("NFC")\n .setInputCol("words1")\n .setOutputCol("norm1"))\n\nunicodeNormalize.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n ("Sch\xf6n", 1),\n ("Scho\\u0308n", 1),\n (null, 1))\n .toDF("words1", "dummy"))\n\nval unicodeNormalize = (new UnicodeNormalize()\n .setForm("NFC")\n .setInputCol("words1")\n .setOutputCol("norm1"))\n\nunicodeNormalize.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"UnicodeNormalize",py:"synapse.ml.stages.html#module-synapse.ml.stages.UnicodeNormalize",scala:"com/microsoft/azure/synapse/ml/stages/UnicodeNormalize.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1UnicodeNormalize.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/UnicodeNormalize.scala",mdxType:"DocTable"}))}M.isMDXComponent=!0;var w=["components"],L=[{value:"Train",id:"train",level:2},{value:"ComputeModelStatistics",id:"computemodelstatistics",level:3},{value:"ComputePerInstanceStatistics",id:"computeperinstancestatistics",level:3}],D={toc:L};function P(e){var a=e.components,t=(0,n.Z)(e,w);return(0,l.kt)("wrapper",(0,s.Z)({},D,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"train"},"Train"),(0,l.kt)("h3",{id:"computemodelstatistics"},"ComputeModelStatistics"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.train import *\nfrom numpy import random\n\ndf = spark.createDataFrame(\n [(random.rand(), random.rand()) for _ in range(2048)], ["label", "prediction"]\n)\n\ncms = (ComputeModelStatistics()\n .setLabelCol("label")\n .setScoredLabelsCol("prediction")\n .setEvaluationMetric("classification"))\n\ncms.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.train._\nimport scala.util.Random\n\nval rand = new Random(1337)\nval df = (Seq.fill(2048)(rand.nextDouble())\n .zip(Seq.fill(2048)(rand.nextDouble()))\n .toDF("label", "prediction"))\n\nval cms = (new ComputeModelStatistics()\n .setLabelCol("label")\n .setScoredLabelsCol("prediction")\n .setEvaluationMetric("classification"))\n\ncms.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"ComputeModelStatistics",py:"synapse.ml.train.html#module-synapse.ml.train.ComputeModelStatistics",scala:"com/microsoft/azure/synapse/ml/train/ComputeModelStatistics.html",csharp:"classSynapse_1_1ML_1_1Train_1_1ComputeModelStatistics.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/train/ComputeModelStatistics.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"computeperinstancestatistics"},"ComputePerInstanceStatistics"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.train import *\n\ncps = (ComputePerInstanceStatistics()\n .setLabelCol("label")\n .setScoredLabelsCol("LogRegScoredLabelsCol")\n .setScoresCol("LogRegScoresCol")\n .setScoredProbabilitiesCol("LogRegProbCol")\n .setEvaluationMetric("classification"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.train._\nimport org.apache.spark.ml.classification.LogisticRegression\nimport org.apache.spark.ml.feature.FastVectorAssembler\n\nval logisticRegression = (new LogisticRegression()\n .setRegParam(0.3)\n .setElasticNetParam(0.8)\n .setMaxIter(10)\n .setLabelCol("label")\n .setPredictionCol("LogRegScoredLabelsCol")\n .setRawPredictionCol("LogRegScoresCol")\n .setProbabilityCol("LogRegProbCol")\n .setFeaturesCol("features"))\n\nval dataset = spark.createDataFrame(Seq(\n (0.0, 2, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 4, 0.78, 0.99, 2.0),\n (3.0, 5, 0.12, 0.34, 3.0),\n (0.0, 1, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0),\n (0.0, 0, 0.50, 0.60, 0.0),\n (1.0, 2, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0)))\n .toDF("label", "col1", "col2", "col3", "prediction")\n\nval assembler = (new FastVectorAssembler()\n .setInputCols(Array("col1", "col2", "col3"))\n .setOutputCol("features"))\nval assembledDataset = assembler.transform(dataset)\nval model = logisticRegression.fit(assembledDataset)\nval scoredData = model.transform(assembledDataset)\n\nval cps = (new ComputePerInstanceStatistics()\n .setLabelCol("label")\n .setScoredLabelsCol("LogRegScoredLabelsCol")\n .setScoresCol("LogRegScoresCol")\n .setScoredProbabilitiesCol("LogRegProbCol")\n .setEvaluationMetric("classification"))\n\ncps.transform(scoredData).show()\n')))),(0,l.kt)(m.Z,{className:"ComputePerInstanceStatistics",py:"synapse.ml.train.html#module-synapse.ml.train.ComputePerInstanceStatistics",scala:"com/microsoft/azure/synapse/ml/train/ComputePerInstanceStatistics.html",csharp:"classSynapse_1_1ML_1_1Train_1_1ComputePerInstanceStatistics.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/train/ComputePerInstanceStatistics.scala",mdxType:"DocTable"}))}P.isMDXComponent=!0;var z=["components"],Z={title:"Transformers - Core",sidebar_label:"Core",hide_title:!0},O=void 0,F={unversionedId:"Quick Examples/transformers/transformers_core",id:"Quick Examples/transformers/transformers_core",title:"Transformers - Core",description:"",source:"@site/docs/Quick Examples/transformers/transformers_core.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_core",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_core",draft:!1,tags:[],version:"current",frontMatter:{title:"Transformers - Core",sidebar_label:"Core",hide_title:!0}},E={},B=[].concat(u,y,g,x,C,L),V={toc:B};function R(e){var a=e.components,t=(0,n.Z)(e,z);return(0,l.kt)("wrapper",(0,s.Z)({},V,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)(i,{mdxType:"Explainers"}),(0,l.kt)(f,{mdxType:"Featurize"}),(0,l.kt)(k,{mdxType:"Image"}),(0,l.kt)(_,{mdxType:"IO"}),(0,l.kt)(M,{mdxType:"Stages"}),(0,l.kt)(P,{mdxType:"Train"}))}R.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/bb7a48da.cd640b33.js b/assets/js/bb7a48da.cd640b33.js new file mode 100644 index 0000000000..37bbb80e79 --- /dev/null +++ b/assets/js/bb7a48da.cd640b33.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[9242],{3905:function(e,a,t){t.d(a,{Zo:function(){return u},kt:function(){return d}});var s=t(7294);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,s)}return t}function r(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var m=s.createContext({}),p=function(e){var a=s.useContext(m),t=a;return e&&(t="function"==typeof e?e(a):r(r({},a),e)),t},u=function(e){var a=p(e.components);return s.createElement(m.Provider,{value:a},e.children)},c={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},i=s.forwardRef((function(e,a){var t=e.components,n=e.mdxType,l=e.originalType,m=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),i=p(t),d=n,y=i["".concat(m,".").concat(d)]||i[d]||c[d]||l;return t?s.createElement(y,r(r({ref:a},u),{},{components:t})):s.createElement(y,r({ref:a},u))}));function d(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var l=t.length,r=new Array(l);r[0]=i;var o={};for(var m in a)hasOwnProperty.call(a,m)&&(o[m]=a[m]);o.originalType=e,o.mdxType="string"==typeof e?e:n,r[1]=o;for(var p=2;p child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?a:[]}(e).map((function(e){var a=e.props;return{value:a.value,label:a.label,attributes:a.attributes,default:a.default}}))}function i(e){var a=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=a?a:c(t);return function(e){var a=(0,p.l)(e,(function(e,a){return e.value===a.value}));if(a.length>0)throw new Error('Docusaurus error: Duplicate values "'+a.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[a,t])}function d(e){var a=e.value;return e.tabValues.some((function(e){return e.value===a}))}function y(e){var a=e.queryString,t=void 0!==a&&a,s=e.groupId,l=(0,o.k6)(),r=function(e){var a=e.queryString,t=void 0!==a&&a,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:s});return[(0,m._X)(r),(0,n.useCallback)((function(e){if(r){var a=new URLSearchParams(l.location.search);a.set(r,e),l.replace(Object.assign({},l.location,{search:a.toString()}))}}),[r,l])]}function f(e){var a,t,s,l,r=e.defaultValue,o=e.queryString,m=void 0!==o&&o,p=e.groupId,c=i(e),f=(0,n.useState)((function(){return function(e){var a,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var n=null!=(a=s.find((function(e){return e.default})))?a:s[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:r,tabValues:c})})),b=f[0],h=f[1],g=y({queryString:m,groupId:p}),T=g[0],k=g[1],v=(a=function(e){return e?"docusaurus.tab."+e:null}({groupId:p}.groupId),t=(0,u.Nk)(a),s=t[0],l=t[1],[s,(0,n.useCallback)((function(e){a&&l.set(e)}),[a,l])]),x=v[0],S=v[1],_=function(){var e=null!=T?T:x;return d({value:e,tabValues:c})?e:null}();return(0,n.useLayoutEffect)((function(){_&&h(_)}),[_]),{selectedValue:b,selectValue:(0,n.useCallback)((function(e){if(!d({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);h(e),k(e),S(e)}),[k,S,c]),tabValues:c}}var b=t(2389),h="tabList__CuJ",g="tabItem_LNqP";function T(e){var a=e.className,t=e.block,o=e.selectedValue,m=e.selectValue,p=e.tabValues,u=[],c=(0,r.o5)().blockElementScrollPositionUntilNextRender,i=function(e){var a=e.currentTarget,t=u.indexOf(a),s=p[t].value;s!==o&&(c(a),m(s))},d=function(e){var a,t=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":var s,n=u.indexOf(e.currentTarget)+1;t=null!=(s=u[n])?s:u[0];break;case"ArrowLeft":var l,r=u.indexOf(e.currentTarget)-1;t=null!=(l=u[r])?l:u[u.length-1]}null==(a=t)||a.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":t},a)},p.map((function(e){var a=e.value,t=e.label,r=e.attributes;return n.createElement("li",(0,s.Z)({role:"tab",tabIndex:o===a?0:-1,"aria-selected":o===a,key:a,ref:function(e){return u.push(e)},onKeyDown:d,onClick:i},r,{className:(0,l.Z)("tabs__item",g,null==r?void 0:r.className,{"tabs__item--active":o===a})}),null!=t?t:a)})))}function k(e){var a=e.lazy,t=e.children,s=e.selectedValue,l=(Array.isArray(t)?t:[t]).filter(Boolean);if(a){var r=l.find((function(e){return e.props.value===s}));return r?(0,n.cloneElement)(r,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map((function(e,a){return(0,n.cloneElement)(e,{key:a,hidden:e.props.value!==s})})))}function v(e){var a=f(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",h)},n.createElement(T,(0,s.Z)({},e,a)),n.createElement(k,(0,s.Z)({},e,a)))}function x(e){var a=(0,b.Z)();return n.createElement(v,(0,s.Z)({key:String(a)},e))}},1989:function(e,a,t){var s=t(7294),n=t(2263);a.Z=function(e){var a=e.className,t=e.py,l=e.scala,r=e.csharp,o=e.sourceLink,m=(0,n.Z)().siteConfig.customFields.version,p="https://mmlspark.blob.core.windows.net/docs/"+m+"/pyspark/"+t,u="https://mmlspark.blob.core.windows.net/docs/"+m+"/scala/"+l,c="https://mmlspark.blob.core.windows.net/docs/"+m+"/dotnet/"+r;return s.createElement("table",null,s.createElement("tbody",null,s.createElement("tr",null,s.createElement("td",null,s.createElement("strong",null,"Python API: "),s.createElement("a",{href:p},a)),s.createElement("td",null,s.createElement("strong",null,"Scala API: "),s.createElement("a",{href:u},a)),s.createElement("td",null,s.createElement("strong",null,".NET API: "),s.createElement("a",{href:c},a)),s.createElement("td",null,s.createElement("strong",null,"Source: "),s.createElement("a",{href:o},a)))))}},2528:function(e,a,t){t.r(a),t.d(a,{assets:function(){return E},contentTitle:function(){return O},default:function(){return j},frontMatter:function(){return Z},metadata:function(){return F},toc:function(){return V}});var s=t(3117),n=t(102),l=(t(7294),t(3905)),r=t(4866),o=t(5162),m=t(1989),p=["components"],u=[{value:"Explainers",id:"explainers",level:2},{value:"ImageLIME",id:"imagelime",level:3},{value:"ImageSHAP",id:"imageshap",level:3},{value:"TabularLIME",id:"tabularlime",level:3},{value:"TabularSHAP",id:"tabularshap",level:3},{value:"TextLIME",id:"textlime",level:3},{value:"TextSHAP",id:"textshap",level:3},{value:"VectorLIME",id:"vectorlime",level:3},{value:"VectorSHAP",id:"vectorshap",level:3}],c={toc:u};function i(e){var a=e.components,t=(0,n.Z)(e,p);return(0,l.kt)("wrapper",(0,s.Z)({},c,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"explainers"},"Explainers"),(0,l.kt)("h3",{id:"imagelime"},"ImageLIME"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nlime = (ImageLIME()\n .setModel(model)\n .setOutputCol("weights")\n .setInputCol("image")\n .setCellSize(150.0)\n .setModifier(50.0)\n .setNumSamples(500)\n .setTargetCol("probability")\n .setTargetClassesCol("top2pred")\n .setSamplingFraction(0.7))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\n\nval lime = (new ImageLIME()\n .setModel(model)\n .setOutputCol("weights")\n .setInputCol("image")\n .setCellSize(150.0)\n .setModifier(50.0)\n .setNumSamples(500)\n .setTargetCol("probability")\n .setTargetClassesCol("top2pred")\n .setSamplingFraction(0.7))\n')))),(0,l.kt)(m.Z,{className:"ImageLIME",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.ImageLIME",scala:"com/microsoft/azure/synapse/ml/explainers/ImageLIME.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1ImageLIME.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/ImageLIME.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"imageshap"},"ImageSHAP"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nshap = (\n ImageSHAP()\n .setModel(model)\n .setOutputCol("shaps")\n .setSuperpixelCol("superpixels")\n .setInputCol("image")\n .setCellSize(150.0)\n .setModifier(50.0)\n .setNumSamples(500)\n .setTargetCol("probability")\n .setTargetClassesCol("top2pred")\n)\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\n\nval shap = (new ImageSHAP()\n .setModel(model)\n .setOutputCol("shaps")\n .setSuperpixelCol("superpixels")\n .setInputCol("image")\n .setCellSize(150.0)\n .setModifier(50.0)\n .setNumSamples(500)\n .setTargetCol("probability")\n .setTargetClassesCol("top2pred")\n))\n')))),(0,l.kt)(m.Z,{className:"ImageSHAP",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.ImageSHAP",scala:"com/microsoft/azure/synapse/ml/explainers/ImageSHAP.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1ImageSHAP.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/ImageSHAP.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"tabularlime"},"TabularLIME"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\ndata = spark.createDataFrame([\n (-6.0, 0),\n (-5.0, 0),\n (5.0, 1),\n (6.0, 1)\n], ["col1", "label"])\n\nlime = (TabularLIME()\n .setModel(model)\n .setInputCols(["col1"])\n .setOutputCol("weights")\n .setBackgroundData(data)\n .setKernelWidth(0.001)\n .setNumSamples(1000)\n .setTargetCol("probability")\n .setTargetClasses([0, 1]))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\nval data = Seq(\n (-6.0, 0),\n (-5.0, 0),\n (5.0, 1),\n (6.0, 1)\n).toDF("col1", "label")\n\nval lime = (new TabularLIME()\n .setInputCols(Array("col1"))\n .setOutputCol("weights")\n .setBackgroundData(data)\n .setKernelWidth(0.001)\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses(Array(0, 1)))\n')))),(0,l.kt)(m.Z,{className:"TabularLIME",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.TabularLIME",scala:"com/microsoft/azure/synapse/ml/explainers/TabularLIME.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1TabularLIME.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/TabularLIME.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"tabularshap"},"TabularSHAP"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\ndata = spark.createDataFrame([\n (-5.0, "a", -5.0, 0),\n (-5.0, "b", -5.0, 0),\n (5.0, "a", 5.0, 1),\n (5.0, "b", 5.0, 1)\n]*100, ["col1", "label"])\n\nshap = (TabularSHAP()\n .setInputCols(["col1", "col2", "col3"])\n .setOutputCol("shapValues")\n .setBackgroundData(data)\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses([1]))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\nval data = (1 to 100).flatMap(_ => Seq(\n (-5d, "a", -5d, 0),\n (-5d, "b", -5d, 0),\n (5d, "a", 5d, 1),\n (5d, "b", 5d, 1)\n )).toDF("col1", "col2", "col3", "label")\n\nval shap = (new TabularSHAP()\n .setInputCols(Array("col1", "col2", "col3"))\n .setOutputCol("shapValues")\n .setBackgroundData(data)\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses(Array(1)))\n')))),(0,l.kt)(m.Z,{className:"TabularSHAP",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.TabularSHAP",scala:"com/microsoft/azure/synapse/ml/explainers/TabularSHAP.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1TabularSHAP.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/TabularSHAP.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"textlime"},"TextLIME"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nlime = (TextLIME()\n .setModel(model)\n .setInputCol("text")\n .setTargetCol("prob")\n .setTargetClasses([1])\n .setOutputCol("weights")\n .setTokensCol("tokens")\n .setSamplingFraction(0.7)\n .setNumSamples(1000))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\n\nval lime = (new TextLIME()\n .setModel(model)\n .setInputCol("text")\n .setTargetCol("prob")\n .setTargetClasses(Array(1))\n .setOutputCol("weights")\n .setTokensCol("tokens")\n .setSamplingFraction(0.7)\n .setNumSamples(1000))\n')))),(0,l.kt)(m.Z,{className:"TextLIME",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.TextLIME",scala:"com/microsoft/azure/synapse/ml/explainers/TextLIME.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1TextLIME.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/TextLIME.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"textshap"},"TextSHAP"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nshap = (TextSHAP()\n .setModel(model)\n .setInputCol("text")\n .setTargetCol("prob")\n .setTargetClasses([1])\n .setOutputCol("weights")\n .setTokensCol("tokens")\n .setNumSamples(1000))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport com.microsoft.azure.synapse.ml.onnx._\nimport spark.implicits._\n\nval model = (new ONNXModel())\n\nval shap = (new TextSHAP()\n .setModel(model)\n .setInputCol("text")\n .setTargetCol("prob")\n .setTargetClasses(Array(1))\n .setOutputCol("weights")\n .setTokensCol("tokens")\n .setNumSamples(1000))\n')))),(0,l.kt)(m.Z,{className:"TextSHAP",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.TextSHAP",scala:"com/microsoft/azure/synapse/ml/explainers/TextSHAP.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1TextSHAP.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/TextSHAP.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"vectorlime"},"VectorLIME"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\ndf = spark.createDataFrame([\n ([0.2729799734928408, -0.4637273304253777, 1.565593782147994], 4.541185129673482),\n ([1.9511879801376864, 1.495644437589599, -0.4667847796501322], 0.19526424470709836)\n])\n\nlime = (VectorLIME()\n .setModel(model)\n .setBackgroundData(df)\n .setInputCol("features")\n .setTargetCol("label")\n .setOutputCol("weights")\n .setNumSamples(1000))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport spark.implicits._\nimport breeze.linalg.{*, DenseMatrix => BDM}\nimport breeze.stats.distributions.Rand\nimport org.apache.spark.ml.linalg.Vectors\nimport org.apache.spark.ml.regression.LinearRegression\n\nval d1 = 3\nval d2 = 1\nval coefficients: BDM[Double] = new BDM(d1, d2, Array(1.0, -1.0, 2.0))\n\nval df = {\n val nRows = 100\n val intercept: Double = math.random()\n\n val x: BDM[Double] = BDM.rand(nRows, d1, Rand.gaussian)\n val y = x * coefficients + intercept\n\n val xRows = x(*, ::).iterator.toSeq.map(dv => Vectors.dense(dv.toArray))\n val yRows = y(*, ::).iterator.toSeq.map(dv => dv(0))\n xRows.zip(yRows).toDF("features", "label")\n }\n\nval model: LinearRegressionModel = new LinearRegression().fit(df)\n\nval lime = (new VectorLIME()\n .setModel(model)\n .setBackgroundData(df)\n .setInputCol("features")\n .setTargetCol(model.getPredictionCol)\n .setOutputCol("weights")\n .setNumSamples(1000))\n')))),(0,l.kt)(m.Z,{className:"VectorLIME",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.VectorLIME",scala:"com/microsoft/azure/synapse/ml/explainers/VectorLIME.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1VectorLIME.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/VectorLIME.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"vectorshap"},"VectorSHAP"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.explainers import *\nfrom synapse.ml.onnx import ONNXModel\n\nmodel = ONNXModel()\n\nshap = (VectorSHAP()\n .setInputCol("features")\n .setOutputCol("shapValues")\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses([1]))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.explainers._\nimport spark.implicits._\nimport breeze.linalg.{*, DenseMatrix => BDM}\nimport breeze.stats.distributions.RandBasis\nimport org.apache.spark.ml.classification.LogisticRegression\nimport org.apache.spark.ml.linalg.Vectors\n\nval randBasis = RandBasis.withSeed(123)\nval m: BDM[Double] = BDM.rand[Double](1000, 5, randBasis.gaussian)\nval l: BDV[Double] = m(*, ::).map {\n row =>\n if (row(2) + row(3) > 0.5) 1d else 0d\n }\nval data = m(*, ::).iterator.zip(l.valuesIterator).map {\n case (f, l) => (f.toSpark, l)\n }.toSeq.toDF("features", "label")\n\nval model = new LogisticRegression()\n .setFeaturesCol("features")\n .setLabelCol("label")\n .fit(data)\n\nval shap = (new VectorSHAP()\n .setInputCol("features")\n .setOutputCol("shapValues")\n .setBackgroundData(data)\n .setNumSamples(1000)\n .setModel(model)\n .setTargetCol("probability")\n .setTargetClasses(Array(1))\n\nval infer = Seq(\n Tuple1(Vectors.dense(1d, 1d, 1d, 1d, 1d))\n ) toDF "features"\nval predicted = model.transform(infer)\nshap.transform(predicted).show()\n')))),(0,l.kt)(m.Z,{className:"VectorSHAP",py:"synapse.ml.explainers.html#module-synapse.ml.explainers.VectorSHAP",scala:"com/microsoft/azure/synapse/ml/explainers/VectorSHAP.html",csharp:"classSynapse_1_1ML_1_1Explainers_1_1VectorSHAP.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/explainers/VectorSHAP.scala",mdxType:"DocTable"}))}i.isMDXComponent=!0;var d=["components"],y=[{value:"Featurize",id:"featurize",level:2},{value:"DataConversion",id:"dataconversion",level:3},{value:"IndexToValue",id:"indextovalue",level:3},{value:"Featurize Text",id:"featurize-text",level:2},{value:"MultiNGram",id:"multingram",level:3},{value:"PageSplitter",id:"pagesplitter",level:3}],f={toc:y};function b(e){var a=e.components,t=(0,n.Z)(e,d);return(0,l.kt)("wrapper",(0,s.Z)({},f,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"featurize"},"Featurize"),(0,l.kt)("h3",{id:"dataconversion"},"DataConversion"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndf = spark.createDataFrame([\n (True, 1, 2, 3, 4, 5.0, 6.0, "7", "8.0"),\n (False, 9, 10, 11, 12, 14.5, 15.5, "16", "17.456"),\n (True, -127, 345, 666, 1234, 18.91, 20.21, "100", "200.12345")\n], ["bool", "byte", "short", "int", "long", "float", "double", "intstring", "doublestring"])\n\ndc = (DataConversion()\n .setCols(["byte"])\n .setConvertTo("boolean"))\n\ndc.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport spark.implicits._\n\nval df = Seq(\n (true: Boolean, 1: Byte, 2: Short, 3: Integer, 4: Long, 5.0F, 6.0, "7", "8.0"),\n (false, 9: Byte, 10: Short, 11: Integer, 12: Long, 14.5F, 15.5, "16", "17.456"),\n (true, -127: Byte, 345: Short, Short.MaxValue + 100, (Int.MaxValue).toLong + 100, 18.91F, 20.21, "100", "200.12345"))\n .toDF("bool", "byte", "short", "int", "long", "float", "double", "intstring", "doublestring")\n\nval dc = (new DataConversion()\n .setCols(Array("byte"))\n .setConvertTo("boolean"))\n\ndc.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"DataConversion",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.DataConversion",scala:"com/microsoft/azure/synapse/ml/featurize/DataConversion.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1DataConversion.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/DataConversion.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"indextovalue"},"IndexToValue"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize import *\n\ndf = spark.createDataFrame([\n (-3, 24, 0.32534, True, "piano"),\n (1, 5, 5.67, False, "piano"),\n (-3, 5, 0.32534, False, "guitar")\n], ["int", "long", "double", "bool", "string"])\n\ndf2 = ValueIndexer().setInputCol("string").setOutputCol("string_cat").fit(df).transform(df)\n\nitv = (IndexToValue()\n .setInputCol("string_cat")\n .setOutputCol("string_noncat"))\n\nitv.transform(df2).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize._\nimport spark.implicits._\n\nval df = Seq[(Int, Long, Double, Boolean, String)](\n (-3, 24L, 0.32534, true, "piano"),\n (1, 5L, 5.67, false, "piano"),\n (-3, 5L, 0.32534, false, "guitar")).toDF("int", "long", "double", "bool", "string")\n\nval df2 = new ValueIndexer().setInputCol("string").setOutputCol("string_cat").fit(df).transform(df)\n\nval itv = (new IndexToValue()\n .setInputCol("string_cat")\n .setOutputCol("string_noncat"))\n\nitv.transform(df2).show()\n')))),(0,l.kt)(m.Z,{className:"IndexToValue",py:"synapse.ml.featurize.html#module-synapse.ml.featurize.IndexToValue",scala:"com/microsoft/azure/synapse/ml/featurize/IndexToValue.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1IndexToValue.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/IndexToValue.scala",mdxType:"DocTable"}),(0,l.kt)("h2",{id:"featurize-text"},"Featurize Text"),(0,l.kt)("h3",{id:"multingram"},"MultiNGram"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize.text import *\nfrom pyspark.ml.feature import Tokenizer\n\ndfRaw = spark.createDataFrame([\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, ""),\n (4, "1 2 3 4 5 6 7 8 9")\n], ["label", "sentence"])\n\ndfTok = (Tokenizer()\n .setInputCol("sentence")\n .setOutputCol("tokens")\n .transform(dfRaw))\n\nmng = (MultiNGram()\n .setLengths([1, 3, 4])\n .setInputCol("tokens")\n .setOutputCol("ngrams"))\n\nmng.transform(dfTok).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize.text._\nimport org.apache.spark.ml.feature.Tokenizer\nimport spark.implicits._\n\nval dfRaw = (Seq(\n (0, "Hi I"),\n (1, "I wish for snow today"),\n (2, "we Cant go to the park, because of the snow!"),\n (3, ""),\n (4, (1 to 10).map(_.toString).mkString(" ")))\n .toDF("label", "sentence"))\n\nval dfTok = (new Tokenizer()\n .setInputCol("sentence")\n .setOutputCol("tokens")\n .transform(dfRaw))\n\nval mng = (new MultiNGram()\n .setLengths(Array(1, 3, 4))\n .setInputCol("tokens")\n .setOutputCol("ngrams"))\n\nmng.transform(dfTok).show()\n')))),(0,l.kt)(m.Z,{className:"MultiNGram",py:"synapse.ml.featurize.text.html#module-synapse.ml.featurize.text.MultiNGram",scala:"com/microsoft/azure/synapse/ml/featurize/text/MultiNGram.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1Text_1_1MultiNGram.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/text/MultiNGram.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"pagesplitter"},"PageSplitter"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.featurize.text import *\n\ndf = spark.createDataFrame([\n ("words words words wornssaa ehewjkdiw weijnsikjn xnh", ),\n ("s s s s s s", ),\n ("hsjbhjhnskjhndwjnbvckjbnwkjwenbvfkjhbnwevkjhbnwejhkbnvjkhnbndjkbnd", ),\n ("hsjbhjhnskjhndwjnbvckjbnwkjwenbvfkjhbnwevkjhbnwejhkbnvjkhnbndjkbnd 190872340870271091309831097813097130i3u709781", ),\n ("", ),\n (None, )\n], ["text"])\n\nps = (PageSplitter()\n .setInputCol("text")\n .setMaximumPageLength(20)\n .setMinimumPageLength(10)\n .setOutputCol("pages"))\n\nps.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.featurize.text._\nimport spark.implicits._\n\nval df = Seq(\n "words words words wornssaa ehewjkdiw weijnsikjn xnh",\n "s s s s s s",\n "hsjbhjhnskjhndwjnbvckjbnwkjwenbvfkjhbnwevkjhbnwejhkbnvjkhnbndjkbnd",\n "hsjbhjhnskjhndwjnbvckjbnwkjwenbvfkjhbnwevkjhbnwejhkbnvjkhnbndjkbnd " +\n "190872340870271091309831097813097130i3u709781",\n "",\n null\n ).toDF("text")\n\nval ps = (new PageSplitter()\n .setInputCol("text")\n .setMaximumPageLength(20)\n .setMinimumPageLength(10)\n .setOutputCol("pages"))\n\nps.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"PageSplitter",py:"synapse.ml.featurize.text.html#module-synapse.ml.featurize.text.PageSplitter",scala:"com/microsoft/azure/synapse/ml/featurize/text/PageSplitter.html",csharp:"classSynapse_1_1ML_1_1Featurize_1_1Text_1_1PageSplitter.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/featurize/text/PageSplitter.scala",mdxType:"DocTable"}))}b.isMDXComponent=!0;var h=["components"],g=[{value:"Image",id:"image",level:2},{value:"UnrollImage",id:"unrollimage",level:3},{value:"UnrollBinaryImage",id:"unrollbinaryimage",level:3},{value:"SuperpixelTransformer",id:"superpixeltransformer",level:3}],T={toc:g};function k(e){var a=e.components,t=(0,n.Z)(e,h);return(0,l.kt)("wrapper",(0,s.Z)({},T,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"image"},"Image"),(0,l.kt)("h3",{id:"unrollimage"},"UnrollImage"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.image import *\nfrom azure.storage.blob import *\n# images = (spark.read.format("image")\n# .option("dropInvalid", True)\n# .load("wasbs://datasets@mmlspark.blob.core.windows.net/LIME/greyscale.jpg"))\n# rit = (ResizeImageTransformer()\n# .setOutputCol("out")\n# .setHeight(15)\n# .setWidth(10))\n# preprocessed = rit.transform(images)\nunroll = (UnrollImage()\n .setInputCol("out")\n .setOutputCol("final"))\n# unroll.transform(preprocessed).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.image._\nimport spark.implicits._\nval images = (spark.read.format("image")\n .option("dropInvalid", true)\n .load("wasbs://datasets@mmlspark.blob.core.windows.net/LIME/greyscale.jpg"))\nval rit = (new ResizeImageTransformer()\n .setOutputCol("out")\n .setHeight(15)\n .setWidth(10))\nval preprocessed = rit.transform(images)\nval unroll = (new UnrollImage()\n .setInputCol(rit.getOutputCol)\n .setOutputCol("final"))\nunroll.transform(preprocessed).show()\n')))),(0,l.kt)(m.Z,{className:"UnrollImage",py:"synapse.ml.image.html#module-synapse.ml.image.UnrollImage",scala:"com/microsoft/azure/synapse/ml/image/UnrollImage.html",csharp:"classSynapse_1_1ML_1_1Image_1_1UnrollImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/image/UnrollImage.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"unrollbinaryimage"},"UnrollBinaryImage"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.image import *\nunroll = (UnrollBinaryImage()\n .setInputCol("input_col")\n .setOutputCol("final"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.image._\nimport spark.implicits._\nval unroll = (new UnrollBinaryImage()\n .setInputCol("input_col")\n .setOutputCol("final"))\n')))),(0,l.kt)(m.Z,{className:"UnrollBinaryImage",py:"synapse.ml.image.html#module-synapse.ml.image.UnrollBinaryImage",scala:"com/microsoft/azure/synapse/ml/image/UnrollBinaryImage.html",csharp:"classSynapse_1_1ML_1_1Image_1_1UnrollBinaryImage.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/image/UnrollBinaryImage.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"superpixeltransformer"},"SuperpixelTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.image import *\n\nspt = (SuperpixelTransformer()\n .setInputCol("images"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.image._\n\nval spt = (new SuperpixelTransformer()\n .setInputCol("images"))\n')))),(0,l.kt)(m.Z,{className:"SuperpixelTransformer",py:"synapse.ml.lime.html#module-synapse.ml.image.SuperpixelTransformer",scala:"com/microsoft/azure/synapse/ml/image/SuperpixelTransformer.html",csharp:"classSynapse_1_1ML_1_1Image_1_1SuperpixelTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/image/SuperpixelTransformer.scala",mdxType:"DocTable"}))}k.isMDXComponent=!0;var v=["components"],x=[{value:"IO",id:"io",level:2},{value:"HTTPTransformer",id:"httptransformer",level:3},{value:"SimpleHTTPTransformer",id:"simplehttptransformer",level:3},{value:"JSONInputParser",id:"jsoninputparser",level:3},{value:"JSONOutputParser",id:"jsonoutputparser",level:3},{value:"StringOutputParser",id:"stringoutputparser",level:3},{value:"CustomInputParser",id:"custominputparser",level:3},{value:"CustomOutputParser",id:"customoutputparser",level:3}],S={toc:x};function _(e){var a=e.components,t=(0,n.Z)(e,v);return(0,l.kt)("wrapper",(0,s.Z)({},S,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"io"},"IO"),(0,l.kt)("h3",{id:"httptransformer"},"HTTPTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\nfrom pyspark.sql.functions import udf, col\nfrom requests import Request\n\ndef world_bank_request(country):\n return Request("GET", "http://api.worldbank.org/v2/country/{}?format=json".format(country))\n\ndf = (spark.createDataFrame([("br",), ("usa",)], ["country"])\n .withColumn("request", http_udf(world_bank_request)(col("country"))))\n\nht = (HTTPTransformer()\n .setConcurrency(3)\n .setInputCol("request")\n .setOutputCol("response"))\n\nht.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval ht = (new HTTPTransformer()\n .setConcurrency(3)\n .setInputCol("request")\n .setOutputCol("response"))\n')))),(0,l.kt)(m.Z,{className:"HTTPTransformer",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.HTTPTransformer",scala:"com/microsoft/azure/synapse/ml/io/http/HTTPTransformer.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1HTTPTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/HTTPTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"simplehttptransformer"},"SimpleHTTPTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\nfrom pyspark.sql.types import StringType, StructType\n\nsht = (SimpleHTTPTransformer()\n .setInputCol("data")\n .setOutputParser(JSONOutputParser()\n .setDataType(StructType().add("blah", StringType())))\n .setUrl("PUT_YOUR_URL")\n .setOutputCol("results")\n .setConcurrency(3))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\nimport org.apache.spark.sql.types.{StringType, StructType}\n\nval sht = (new SimpleHTTPTransformer()\n .setInputCol("data")\n .setOutputParser(new JSONOutputParser()\n .setDataType(new StructType().add("blah", StringType)))\n .setUrl("PUT_YOUR_URL")\n .setOutputCol("results")\n .setConcurrency(3))\n')))),(0,l.kt)(m.Z,{className:"SimpleHTTPTransformer",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.SimpleHTTPTransformer",scala:"com/microsoft/azure/synapse/ml/io/http/SimpleHTTPTransformer.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1SimpleHTTPTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/SimpleHTTPTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"jsoninputparser"},"JSONInputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\n\njsonIP = (JSONInputParser()\n .setInputCol("data")\n .setOutputCol("out")\n .setUrl("PUT_YOUR_URL"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval jsonIP = (new JSONInputParser()\n .setInputCol("data")\n .setOutputCol("out")\n .setUrl("PUT_YOUR_URL"))\n')))),(0,l.kt)(m.Z,{className:"JSONInputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.JSONInputParser",scala:"com/microsoft/azure/synapse/ml/io/http/JSONInputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1JSONInputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/JSONInputParser.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"jsonoutputparser"},"JSONOutputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\nfrom pyspark.sql.types import StringType, StructType\n\njsonOP = (JSONOutputParser()\n .setDataType(StructType().add("foo", StringType()))\n .setInputCol("unparsedOutput")\n .setOutputCol("parsedOutput"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\nimport org.apache.spark.sql.types.{StringType, StructType}\n\nval jsonOP = (new JSONOutputParser()\n .setDataType(new StructType().add("foo", StringType))\n .setInputCol("unparsedOutput")\n .setOutputCol("parsedOutput"))\n')))),(0,l.kt)(m.Z,{className:"JSONOutputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.JSONOutputParser",scala:"com/microsoft/azure/synapse/ml/io/http/JSONOutputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1JSONOutputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/JSONOutputParser.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"stringoutputparser"},"StringOutputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\n\nsop = (StringOutputParser()\n .setInputCol("unparsedOutput")\n .setOutputCol("out"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval sop = (new StringOutputParser()\n .setInputCol("unparsedOutput")\n .setOutputCol("out"))\n')))),(0,l.kt)(m.Z,{className:"StringOutputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.StringOutputParser",scala:"com/microsoft/azure/synapse/ml/io/http/StringOutputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1StringOutputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/StringOutputParser.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"custominputparser"},"CustomInputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\n\ncip = (CustomInputParser()\n .setInputCol("data")\n .setOutputCol("out"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval cip = (new CustomInputParser()\n .setInputCol("data")\n .setOutputCol("out")\n .setUDF({ x: Int => new HttpPost(s"http://$x") }))\n')))),(0,l.kt)(m.Z,{className:"CustomInputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.CustomInputParser",scala:"com/microsoft/azure/synapse/ml/io/http/CustomInputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1CustomInputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/CustomInputParser.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"customoutputparser"},"CustomOutputParser"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.io.http import *\n\ncop = (CustomOutputParser()\n .setInputCol("unparsedOutput")\n .setOutputCol("out"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.io.http._\n\nval cop = (new CustomOutputParser()\n .setInputCol("unparsedOutput")\n .setOutputCol("out"))\n')))),(0,l.kt)(m.Z,{className:"CustomOutputParser",py:"synapse.ml.io.http.html#module-synapse.ml.io.http.CustomOutputParser",scala:"com/microsoft/azure/synapse/ml/io/http/CustomOutputParser.html",csharp:"classSynapse_1_1ML_1_1Io_1_1Http_1_1CustomOutputParser.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/io/http/CustomOutputParser.scala",mdxType:"DocTable"}))}_.isMDXComponent=!0;var N=["components"],C=[{value:"Stages",id:"stages",level:2},{value:"Cacher",id:"cacher",level:3},{value:"DropColumns",id:"dropcolumns",level:3},{value:"EnsembleByKey",id:"ensemblebykey",level:3},{value:"Explode",id:"explode",level:3},{value:"Lambda",id:"lambda",level:3},{value:"DynamicMiniBatchTransformer",id:"dynamicminibatchtransformer",level:3},{value:"FixedMiniBatchTransformer",id:"fixedminibatchtransformer",level:3},{value:"TimeIntervalMiniBatchTransformer",id:"timeintervalminibatchtransformer",level:3},{value:"FlattenBatch",id:"flattenbatch",level:3},{value:"RenameColumn",id:"renamecolumn",level:3},{value:"Repartition",id:"repartition",level:3},{value:"SelectColumns",id:"selectcolumns",level:3},{value:"StratifiedRepartition",id:"stratifiedrepartition",level:3},{value:"SummarizeData",id:"summarizedata",level:3},{value:"TextPreprocessor",id:"textpreprocessor",level:3},{value:"UDFTransformer",id:"udftransformer",level:3},{value:"UnicodeNormalize",id:"unicodenormalize",level:3}],I={toc:C};function w(e){var a=e.components,t=(0,n.Z)(e,N);return(0,l.kt)("wrapper",(0,s.Z)({},I,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"stages"},"Stages"),(0,l.kt)("h3",{id:"cacher"},"Cacher"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, "guitars", "drums"),\n (1, "piano", "trumpet"),\n (2, "bass", "cymbals"),\n (3, "guitars", "drums"),\n (4, "piano", "trumpet"),\n (5, "bass", "cymbals"),\n (6, "guitars", "drums"),\n (7, "piano", "trumpet"),\n (8, "bass", "cymbals"),\n (9, "guitars", "drums"),\n (10, "piano", "trumpet"),\n (11, "bass", "cymbals")\n ], ["numbers", "words", "more"]))\n\ncacher = Cacher()\n\ncacher.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = Seq(\n (0, "guitars", "drums"),\n (1, "piano", "trumpet"),\n (2, "bass", "cymbals"),\n (3, "guitars", "drums"),\n (4, "piano", "trumpet"),\n (5, "bass", "cymbals"),\n (6, "guitars", "drums"),\n (7, "piano", "trumpet"),\n (8, "bass", "cymbals"),\n (9, "guitars", "drums"),\n (10, "piano", "trumpet"),\n (11, "bass", "cymbals")\n ).toDF("numbers", "words", "more")\n\nval cacher = new Cacher()\n\ncacher.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"HTTPTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.Cacher",scala:"com/microsoft/azure/synapse/ml/stages/Cacher.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Cacher.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Cacher.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"dropcolumns"},"DropColumns"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 0, "guitars", "drums", 1, True),\n (1, 1, "piano", "trumpet", 2, False),\n (2, 2, "bass", "cymbals", 3, True)\n ], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\ndc = DropColumns().setCols([])\n\ndc.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval dc = new DropColumns().setCols(Array())\n\ndc.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"DropColumns",py:"synapse.ml.stages.html#module-synapse.ml.stages.DropColumns",scala:"com/microsoft/azure/synapse/ml/stages/DropColumns.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1DropColumns.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/DropColumns.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"ensemblebykey"},"EnsembleByKey"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.ml.feature import VectorAssembler\n\nscoreDF = (spark.createDataFrame([\n (0, "foo", 1.0, .1),\n (1, "bar", 4.0, -2.0),\n (1, "bar", 0.0, -3.0)\n ], ["label1", "label2", "score1", "score2"]))\n\nva = VectorAssembler().setInputCols(["score1", "score2"]).setOutputCol("v1")\nscoreDF2 = va.transform(scoreDF)\n\nebk = EnsembleByKey().setKeys(["label1"]).setCols(["score1"])\n\nebk.transform(scoreDF2).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.ml.feature.VectorAssembler\n\nval scoreDF = (Seq(\n (0, "foo", 1.0, .1),\n (1, "bar", 4.0, -2.0),\n (1, "bar", 0.0, -3.0))\n .toDF("label1", "label2", "score1", "score2"))\n\nval va = new VectorAssembler().setInputCols(Array("score1", "score2")).setOutputCol("v1")\nval scoreDF2 = va.transform(scoreDF)\n\nval ebk = new EnsembleByKey().setKey("label1").setCol("score1")\n\nebk.transform(scoreDF2).show()\n')))),(0,l.kt)(m.Z,{className:"EnsembleByKey",py:"synapse.ml.stages.html#module-synapse.ml.stages.EnsembleByKey",scala:"com/microsoft/azure/synapse/ml/stages/EnsembleByKey.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1EnsembleByKey.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/EnsembleByKey.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"explode"},"Explode"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, ["guitars", "drums"]),\n (1, ["piano"]),\n (2, [])\n ], ["numbers", "words"]))\n\nexplode = Explode().setInputCol("words").setOutputCol("exploded")\n\nexplode.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, Seq("guitars", "drums")),\n (1, Seq("piano")),\n (2, Seq()))\n .toDF("numbers", "words"))\n\nval explode = new Explode().setInputCol("words").setOutputCol("exploded")\n\nexplode.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"Explode",py:"synapse.ml.stages.html#module-synapse.ml.stages.Explode",scala:"com/microsoft/azure/synapse/ml/stages/Explode.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Explode.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Explode.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"lambda"},"Lambda"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.sql.types import StringType, StructType\n\ndf = (spark.createDataFrame([\n (0, 0.0, "guitars", "drums", 1, True),\n (1, 1.0, "piano", "trumpet", 2, False),\n (2, 2.0, "bass", "cymbals", 3, True)\n ], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\ndef transformFunc(df):\n return df.select("numbers")\n\ndef transformSchemaFunc(schema):\n return StructType([schema("numbers")])\n\nl = (Lambda()\n .setTransformFunc(transformFunc)\n .setTransformSchemaFunc(transformSchemaFunc))\n\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.sql.types.{StringType, StructType}\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval lambda = (new Lambda()\n .setTransform(df => df.select("numbers"))\n .setTransformSchema(schema => new StructType(Array(schema("numbers")))))\n\nlambda.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"Lambda",py:"synapse.ml.stages.html#module-synapse.ml.stages.Lambda",scala:"com/microsoft/azure/synapse/ml/stages/Lambda.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Lambda.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Lambda.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"dynamicminibatchtransformer"},"DynamicMiniBatchTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.sql.types import StringType, StructType\n\ndf = (spark.createDataFrame([(_, "foo") for _ in range(1, 11)], ["in1", "in2"]))\n\ndmbt = DynamicMiniBatchTransformer()\n\ndmbt.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (1 until 11).map(x => (x, "foo")).toDF("in1", "in2")\n\nval dmbt = new DynamicMiniBatchTransformer()\n\ndmbt.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"DynamicMiniBatchTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.DynamicMiniBatchTransformer",scala:"com/microsoft/azure/synapse/ml/stages/DynamicMiniBatchTransformer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1DynamicMiniBatchTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MiniBatchTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"fixedminibatchtransformer"},"FixedMiniBatchTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},"from synapse.ml.stages import *\n\nfmbt = (FixedMiniBatchTransformer()\n .setBuffered(True)\n .setBatchSize(3))\n"))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},"import com.microsoft.azure.synapse.ml.stages._\n\nval fmbt = (new FixedMiniBatchTransformer()\n .setBuffered(true)\n .setBatchSize(3))\n")))),(0,l.kt)(m.Z,{className:"FixedMiniBatchTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.FixedMiniBatchTransformer",scala:"com/microsoft/azure/synapse/ml/stages/FixedMiniBatchTransformer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1FixedMiniBatchTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MiniBatchTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"timeintervalminibatchtransformer"},"TimeIntervalMiniBatchTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([(_, "foo") for _ in range(1, 11)], ["in1", "in2"]))\n\ntimbt = (TimeIntervalMiniBatchTransformer()\n .setMillisToWait(1000)\n .setMaxBatchSize(30))\n\ntimbt.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (1 until 11).map(x => (x, "foo")).toDF("in1", "in2")\n\nval timbt = (new TimeIntervalMiniBatchTransformer()\n .setMillisToWait(1000)\n .setMaxBatchSize(30))\n\ntimbt.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"TimeIntervalMiniBatchTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.TimeIntervalMiniBatchTransformer",scala:"com/microsoft/azure/synapse/ml/stages/TimeIntervalMiniBatchTransformer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1TimeIntervalMiniBatchTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MiniBatchTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"flattenbatch"},"FlattenBatch"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([(_, "foo") for _ in range(1, 11)], ["in1", "in2"]))\n\ntransDF = DynamicMiniBatchTransformer().transform(df)\n\nfb = FlattenBatch()\n\nfb.transform(transDF).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (1 until 11).map(x => (x, "foo")).toDF("in1", "in2")\n\nval transDF = new DynamicMiniBatchTransformer().transform(df)\n\nval fb = new FlattenBatch()\n\nfb.transform(transDF).show()\n')))),(0,l.kt)(m.Z,{className:"FlattenBatch",py:"synapse.ml.stages.html#module-synapse.ml.stages.FlattenBatch",scala:"com/microsoft/azure/synapse/ml/stages/FlattenBatch.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1FlattenBatch.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/MiniBatchTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"renamecolumn"},"RenameColumn"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 0, "guitars", "drums", 1, True),\n (1, 1, "piano", "trumpet", 2, False),\n (2, 2, "bass", "cymbals", 3, True)\n], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\nrc = RenameColumn().setInputCol("words").setOutputCol("numbers")\n\nrc.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval rc = new RenameColumn().setInputCol("words").setOutputCol("numbers")\n\nrc.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"RenameColumn",py:"synapse.ml.stages.html#module-synapse.ml.stages.RenameColumn",scala:"com/microsoft/azure/synapse/ml/stages/RenameColumn.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1RenameColumn.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/RenameColumn.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"repartition"},"Repartition"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, "guitars", "drums"),\n (1, "piano", "trumpet"),\n (2, "bass", "cymbals"),\n (3, "guitars", "drums"),\n (4, "piano", "trumpet"),\n (5, "bass", "cymbals"),\n (6, "guitars", "drums"),\n (7, "piano", "trumpet"),\n (8, "bass", "cymbals"),\n (9, "guitars", "drums"),\n (10, "piano", "trumpet"),\n (11, "bass", "cymbals")\n], ["numbers", "words", "more"]))\n\nrepartition = Repartition().setN(1)\n\nrepartition.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, "guitars", "drums"),\n (1, "piano", "trumpet"),\n (2, "bass", "cymbals"),\n (3, "guitars", "drums"),\n (4, "piano", "trumpet"),\n (5, "bass", "cymbals"),\n (6, "guitars", "drums"),\n (7, "piano", "trumpet"),\n (8, "bass", "cymbals"),\n (9, "guitars", "drums"),\n (10, "piano", "trumpet"),\n (11, "bass", "cymbals")\n ).toDF("numbers", "words", "more"))\n\nval repartition = new Repartition().setN(1)\n\nrepartition.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"Repartition",py:"synapse.ml.stages.html#module-synapse.ml.stages.Repartition",scala:"com/microsoft/azure/synapse/ml/stages/Repartition.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1Repartition.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/Repartition.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"selectcolumns"},"SelectColumns"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 0.0, "guitars", "drums", 1, True),\n (1, 1.0, "piano", "trumpet", 2, False),\n (2, 2.0, "bass", "cymbals", 3, True)\n], ["numbers", "words", "more"]))\n\nsc = SelectColumns().setCols(["words", "more"])\n\nsc.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval sc = new SelectColumns().setCols(Array("words", "more"))\n\nsc.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"SelectColumns",py:"synapse.ml.stages.html#module-synapse.ml.stages.SelectColumns",scala:"com/microsoft/azure/synapse/ml/stages/SelectColumns.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1SelectColumns.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/SelectColumns.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"stratifiedrepartition"},"StratifiedRepartition"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, "Blue", 2),\n (0, "Red", 2),\n (0, "Green", 2),\n (1, "Purple", 2),\n (1, "Orange", 2),\n (1, "Indigo", 2),\n (2, "Violet", 2),\n (2, "Black", 2),\n (2, "White", 2),\n (3, "Gray", 2),\n (3, "Yellow", 2),\n (3, "Cerulean", 2)\n], ["values", "colors", "const"]))\n\nsr = StratifiedRepartition().setLabelCol("values").setMode("equal")\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, "Blue", 2),\n (0, "Red", 2),\n (0, "Green", 2),\n (1, "Purple", 2),\n (1, "Orange", 2),\n (1, "Indigo", 2),\n (2, "Violet", 2),\n (2, "Black", 2),\n (2, "White", 2),\n (3, "Gray", 2),\n (3, "Yellow", 2),\n (3, "Cerulean", 2)\n ).toDF("values", "colors", "const"))\n\nval sr = new StratifiedRepartition().setLabelCol("values").setMode("equal")\n\nsr.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"StratifiedRepartition",py:"synapse.ml.stages.html#module-synapse.ml.stages.StratifiedRepartition",scala:"com/microsoft/azure/synapse/ml/stages/StratifiedRepartition.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1StratifiedRepartition.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/StratifiedRepartition.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"summarizedata"},"SummarizeData"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n (0, 0.0, "guitars", "drums", 1, True),\n (1, 1.0, "piano", "trumpet", 2, False),\n (2, 2.0, "bass", "cymbals", 3, True)\n], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\nsummary = SummarizeData()\n\nsummary.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval summary = new SummarizeData()\n\nsummary.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"SummarizeData",py:"synapse.ml.stages.html#module-synapse.ml.stages.SummarizeData",scala:"com/microsoft/azure/synapse/ml/stages/SummarizeData.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1SummarizeData.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/SummarizeData.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"textpreprocessor"},"TextPreprocessor"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n ("The happy sad boy drank sap", ),\n ("The hater sad doy drank sap", ),\n ("foo", ),\n ("The hater sad doy aABc0123456789Zz_", )\n], ["words1"]))\n\ntestMap = {"happy": "sad", "hater": "sap",\n "sad": "sap", "sad doy": "sap"}\n\ntextPreprocessor = (TextPreprocessor()\n .setNormFunc("lowerCase")\n .setMap(testMap)\n .setInputCol("words1")\n .setOutputCol("out"))\n\ntextPreprocessor.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n ("The happy sad boy drank sap", ),\n ("The hater sad doy drank sap", ),\n ("foo", ),\n ("The hater sad doy aABc0123456789Zz_", ))\n .toDF("words1"))\n\nval testMap = Map[String, String] (\n "happy" -> "sad",\n "hater" -> "sap",\n "sad" -> "sap",\n "sad doy" -> "sap"\n )\n\nval textPreprocessor = (new TextPreprocessor()\n .setNormFunc("lowerCase")\n .setMap(testMap)\n .setInputCol("words1")\n .setOutputCol("out"))\n\ntextPreprocessor.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"TextPreprocessor",py:"synapse.ml.stages.html#module-synapse.ml.stages.TextPreprocessor",scala:"com/microsoft/azure/synapse/ml/stages/TextPreprocessor.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1TextPreprocessor.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/TextPreprocessor.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"udftransformer"},"UDFTransformer"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\nfrom pyspark.sql.functions import udf\n\ndf = (spark.createDataFrame([\n (0, 0.0, "guitars", "drums", 1, True),\n (1, 1.0, "piano", "trumpet", 2, False),\n (2, 2.0, "bass", "cymbals", 3, True)\n], ["numbers", "doubles", "words", "more", "longs", "booleans"]))\n\nstringToIntegerUDF = udf(lambda x: 1)\n\nudfTransformer = (UDFTransformer()\n .setUDF(stringToIntegerUDF)\n .setInputCol("numbers")\n .setOutputCol("out"))\n\nudfTransformer.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\nimport org.apache.spark.sql.functions.udf\n\nval df = (Seq(\n (0, 0.toDouble, "guitars", "drums", 1.toLong, true),\n (1, 1.toDouble, "piano", "trumpet", 2.toLong, false),\n (2, 2.toDouble, "bass", "cymbals", 3.toLong, true))\n .toDF("numbers", "doubles", "words", "more", "longs", "booleans"))\n\nval stringToIntegerUDF = udf((_: String) => 1)\n\nval udfTransformer = (new UDFTransformer()\n .setUDF(stringToIntegerUDF)\n .setInputCol("numbers")\n .setOutputCol("out"))\n\nudfTransformer.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"UDFTransformer",py:"synapse.ml.stages.html#module-synapse.ml.stages.UDFTransformer",scala:"com/microsoft/azure/synapse/ml/stages/UDFTransformer.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1UDFTransformer.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/UDFTransformer.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"unicodenormalize"},"UnicodeNormalize"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.stages import *\n\ndf = (spark.createDataFrame([\n ("Sch\xf6n", 1),\n ("Scho\\u0308n", 1),\n (None, 1)\n], ["words1", "dummy"]))\n\nunicodeNormalize = (UnicodeNormalize()\n .setForm("NFC")\n .setInputCol("words1")\n .setOutputCol("norm1"))\n\nunicodeNormalize.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.stages._\n\nval df = (Seq(\n ("Sch\xf6n", 1),\n ("Scho\\u0308n", 1),\n (null, 1))\n .toDF("words1", "dummy"))\n\nval unicodeNormalize = (new UnicodeNormalize()\n .setForm("NFC")\n .setInputCol("words1")\n .setOutputCol("norm1"))\n\nunicodeNormalize.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"UnicodeNormalize",py:"synapse.ml.stages.html#module-synapse.ml.stages.UnicodeNormalize",scala:"com/microsoft/azure/synapse/ml/stages/UnicodeNormalize.html",csharp:"classSynapse_1_1ML_1_1Stages_1_1UnicodeNormalize.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/stages/UnicodeNormalize.scala",mdxType:"DocTable"}))}w.isMDXComponent=!0;var M=["components"],L=[{value:"Train",id:"train",level:2},{value:"ComputeModelStatistics",id:"computemodelstatistics",level:3},{value:"ComputePerInstanceStatistics",id:"computeperinstancestatistics",level:3}],D={toc:L};function P(e){var a=e.components,t=(0,n.Z)(e,M);return(0,l.kt)("wrapper",(0,s.Z)({},D,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"train"},"Train"),(0,l.kt)("h3",{id:"computemodelstatistics"},"ComputeModelStatistics"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.train import *\nfrom numpy import random\n\ndf = spark.createDataFrame(\n [(random.rand(), random.rand()) for _ in range(2048)], ["label", "prediction"]\n)\n\ncms = (ComputeModelStatistics()\n .setLabelCol("label")\n .setScoredLabelsCol("prediction")\n .setEvaluationMetric("classification"))\n\ncms.transform(df).show()\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.train._\nimport scala.util.Random\n\nval rand = new Random(1337)\nval df = (Seq.fill(2048)(rand.nextDouble())\n .zip(Seq.fill(2048)(rand.nextDouble()))\n .toDF("label", "prediction"))\n\nval cms = (new ComputeModelStatistics()\n .setLabelCol("label")\n .setScoredLabelsCol("prediction")\n .setEvaluationMetric("classification"))\n\ncms.transform(df).show()\n')))),(0,l.kt)(m.Z,{className:"ComputeModelStatistics",py:"synapse.ml.train.html#module-synapse.ml.train.ComputeModelStatistics",scala:"com/microsoft/azure/synapse/ml/train/ComputeModelStatistics.html",csharp:"classSynapse_1_1ML_1_1Train_1_1ComputeModelStatistics.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/train/ComputeModelStatistics.scala",mdxType:"DocTable"}),(0,l.kt)("h3",{id:"computeperinstancestatistics"},"ComputePerInstanceStatistics"),(0,l.kt)(r.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(o.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-python"},'from synapse.ml.train import *\n\ncps = (ComputePerInstanceStatistics()\n .setLabelCol("label")\n .setScoredLabelsCol("LogRegScoredLabelsCol")\n .setScoresCol("LogRegScoresCol")\n .setScoredProbabilitiesCol("LogRegProbCol")\n .setEvaluationMetric("classification"))\n'))),(0,l.kt)(o.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.train._\nimport org.apache.spark.ml.classification.LogisticRegression\nimport org.apache.spark.ml.feature.FastVectorAssembler\n\nval logisticRegression = (new LogisticRegression()\n .setRegParam(0.3)\n .setElasticNetParam(0.8)\n .setMaxIter(10)\n .setLabelCol("label")\n .setPredictionCol("LogRegScoredLabelsCol")\n .setRawPredictionCol("LogRegScoresCol")\n .setProbabilityCol("LogRegProbCol")\n .setFeaturesCol("features"))\n\nval dataset = spark.createDataFrame(Seq(\n (0.0, 2, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 4, 0.78, 0.99, 2.0),\n (3.0, 5, 0.12, 0.34, 3.0),\n (0.0, 1, 0.50, 0.60, 0.0),\n (1.0, 3, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0),\n (0.0, 0, 0.50, 0.60, 0.0),\n (1.0, 2, 0.40, 0.50, 1.0),\n (2.0, 3, 0.78, 0.99, 2.0),\n (3.0, 4, 0.12, 0.34, 3.0)))\n .toDF("label", "col1", "col2", "col3", "prediction")\n\nval assembler = (new FastVectorAssembler()\n .setInputCols(Array("col1", "col2", "col3"))\n .setOutputCol("features"))\nval assembledDataset = assembler.transform(dataset)\nval model = logisticRegression.fit(assembledDataset)\nval scoredData = model.transform(assembledDataset)\n\nval cps = (new ComputePerInstanceStatistics()\n .setLabelCol("label")\n .setScoredLabelsCol("LogRegScoredLabelsCol")\n .setScoresCol("LogRegScoresCol")\n .setScoredProbabilitiesCol("LogRegProbCol")\n .setEvaluationMetric("classification"))\n\ncps.transform(scoredData).show()\n')))),(0,l.kt)(m.Z,{className:"ComputePerInstanceStatistics",py:"synapse.ml.train.html#module-synapse.ml.train.ComputePerInstanceStatistics",scala:"com/microsoft/azure/synapse/ml/train/ComputePerInstanceStatistics.html",csharp:"classSynapse_1_1ML_1_1Train_1_1ComputePerInstanceStatistics.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/core/src/main/scala/com/microsoft/azure/synapse/ml/train/ComputePerInstanceStatistics.scala",mdxType:"DocTable"}))}P.isMDXComponent=!0;var z=["components"],Z={title:"Transformers - Core",sidebar_label:"Core",hide_title:!0},O=void 0,F={unversionedId:"Quick Examples/transformers/transformers_core",id:"Quick Examples/transformers/transformers_core",title:"Transformers - Core",description:"",source:"@site/docs/Quick Examples/transformers/transformers_core.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_core",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_core",draft:!1,tags:[],version:"current",frontMatter:{title:"Transformers - Core",sidebar_label:"Core",hide_title:!0}},E={},V=[].concat(u,y,g,x,C,L),B={toc:V};function j(e){var a=e.components,t=(0,n.Z)(e,z);return(0,l.kt)("wrapper",(0,s.Z)({},B,t,{components:a,mdxType:"MDXLayout"}),(0,l.kt)(i,{mdxType:"Explainers"}),(0,l.kt)(b,{mdxType:"Featurize"}),(0,l.kt)(k,{mdxType:"Image"}),(0,l.kt)(_,{mdxType:"IO"}),(0,l.kt)(w,{mdxType:"Stages"}),(0,l.kt)(P,{mdxType:"Train"}))}j.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c4f5d8e4.da99a3f5.js b/assets/js/c4f5d8e4.da99a3f5.js deleted file mode 100644 index 2d8042c248..0000000000 --- a/assets/js/c4f5d8e4.da99a3f5.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see c4f5d8e4.da99a3f5.js.LICENSE.txt */ -(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[4195],{5162:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var n=a(7294),r=a(6010),s="tabItem_Ymn6";function o(e){var t=e.children,a=e.hidden,o=e.className;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(s,o),hidden:a},t)}},5488:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var n=a(3117),r=a(7294),s=a(6010),o=a(2389),l=a(7392),i=a(7094),c=a(2466),p="tabList__CuJ",u="tabItem_LNqP";function m(e){var t,a,o=e.lazy,m=e.block,d=e.defaultValue,g=e.values,f=e.groupId,h=e.className,y=r.Children.map(e.children,(function(e){if((0,r.isValidElement)(e)&&"value"in e.props)return e;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),v=null!=g?g:y.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),k=(0,l.l)(v,(function(e,t){return e.value===t.value}));if(k.length>0)throw new Error('Docusaurus error: Duplicate values "'+k.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var b=null===d?d:null!=(t=null!=d?d:null==(a=y.find((function(e){return e.props.default})))?void 0:a.props.value)?t:y[0].props.value;if(null!==b&&!v.some((function(e){return e.value===b})))throw new Error('Docusaurus error: The has a defaultValue "'+b+'" but none of its children has the corresponding value. Available values are: '+v.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var E=(0,i.U)(),S=E.tabGroupChoices,_=E.setTabGroupChoices,N=(0,r.useState)(b),T=N[0],L=N[1],C=[],w=(0,c.o5)().blockElementScrollPositionUntilNextRender;if(null!=f){var M=S[f];null!=M&&M!==T&&v.some((function(e){return e.value===M}))&&L(M)}var x=function(e){var t=e.currentTarget,a=C.indexOf(t),n=v[a].value;n!==T&&(w(t),L(n),null!=f&&_(f,String(n)))},Z=function(e){var t,a=null;switch(e.key){case"Enter":x(e);break;case"ArrowRight":var n,r=C.indexOf(e.currentTarget)+1;a=null!=(n=C[r])?n:C[0];break;case"ArrowLeft":var s,o=C.indexOf(e.currentTarget)-1;a=null!=(s=C[o])?s:C[C.length-1]}null==(t=a)||t.focus()};return r.createElement("div",{className:(0,s.Z)("tabs-container",p)},r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":m},h)},v.map((function(e){var t=e.value,a=e.label,o=e.attributes;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:T===t?0:-1,"aria-selected":T===t,key:t,ref:function(e){return C.push(e)},onKeyDown:Z,onClick:x},o,{className:(0,s.Z)("tabs__item",u,null==o?void 0:o.className,{"tabs__item--active":T===t})}),null!=a?a:t)}))),o?(0,r.cloneElement)(y.filter((function(e){return e.props.value===T}))[0],{className:"margin-top--md"}):r.createElement("div",{className:"margin-top--md"},y.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==T})}))))}function d(e){var t=(0,o.Z)();return r.createElement(m,(0,n.Z)({key:String(t)},e))}},5567:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return Z}});var n=a(3117),r=a(7294),s=a(4184),o=a.n(s),l=a(4774),i=a(9960),c=a(2263),p=a(4996),u={heroBanner:"heroBanner_qdFl",getStarted:"getStarted_D36F",buttons:"buttons_AeoN",announcement:"announcement_XVnd",announcementDark:"announcementDark_dnMf",announcementInner:"announcementInner_VmFX",features:"features_cAfv",featureImage:"featureImage_wMIZ",heroImg:"heroImg_lMB4",configSnippet:"configSnippet_hC0c",configSnippets:"configSnippets_Iyxf",pitch:"pitch_XV8K",loveSection:"loveSection_tbp6",loveSectionPlea:"loveSectionPlea_xpLt",loveImg:"loveImg_zggS",sponsorLink:"sponsorLink_QcRj",microsoftImg:"microsoftImg_a3bM",theMetImg:"theMetImg_EvOH",mitImg:"mitImg_TSc4"},m="codeSnippet_f3C9",d=a(2949),g=a(3746),f=a(1354),h=a.n(f);var y=function(e){var t=(0,c.Z)().siteConfig.themeConfig.prism,a=void 0===t?{}:t,s=(0,r.useState)(!1),o=s[0],l=s[1];(0,r.useEffect)((function(){l(!0)}),[]);var i=(0,d.I)().isDarkTheme,p=a.theme||h(),u=a.darkTheme||p,f=i?u:p,y=e.lang,v=void 0===y?"yaml":y,k=e.snippet;return r.createElement(g.ZP,(0,n.Z)({},g.lG,{key:o,theme:f,code:k,language:v}),(function(e){var t=e.className,a=e.style,n=e.tokens,s=e.getLineProps,o=e.getTokenProps;return r.createElement("pre",{className:t+" "+m,style:a},n.map((function(e,t){return r.createElement("div",s({line:e,key:t}),e.map((function(e,t){return r.createElement("span",o({token:e,key:t}))})))})))}))},v=a(6010),k=a(195),b=a(5999),E="codeBlockContainer_v98K",S="codeBlockContent_xAFg",_="copyButton_C2v_",N="furtherButton_rET3";var T=function(e){var t=(0,c.Z)().siteConfig.themeConfig.prism,a=void 0===t?{}:t,s=(0,r.useState)(!1),o=s[0],l=s[1],p=(0,r.useState)(!1),u=p[0],m=p[1];(0,r.useEffect)((function(){m(!0)}),[]);var f=(0,d.I)().isDarkTheme,y=a.theme||h(),T=a.darkTheme||y,L=f?T:y,C=(0,r.useRef)(null),w=e.lang,M=void 0===w?"python":w,x=e.config,Z=e.copyBit,z=e.further,I=Z||x,A=function(){(0,k.Z)(I),l(!0),setTimeout((function(){return l(!1)}),2e3)};return r.createElement(g.ZP,(0,n.Z)({},g.lG,{key:u,theme:L,code:x,language:M}),(function(e){var t=e.className,a=e.style,n=e.tokens,s=e.getLineProps,l=e.getTokenProps;return r.createElement("div",{className:E},r.createElement("div",{className:(0,v.Z)(S,M)},r.createElement("pre",{className:""+t,style:a},n.map((function(e,t){return r.createElement("div",s({line:e,key:t}),e.map((function(e,t){return r.createElement("span",l({token:e,key:t}))})))}))),r.createElement("button",{ref:C,type:"button","aria-label":(0,b.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),className:(0,v.Z)(_,"clean-btn"),onClick:A},o?r.createElement(b.Z,{id:"theme.CodeBlock.copied",description:"The copied button label on code blocks"},"Copied"):r.createElement(b.Z,{id:"theme.CodeBlock.copy",description:"The copy button label on code blocks"},"Copy")),z&&r.createElement(i.Z,{className:(0,v.Z)(N,"button button--outline button--primary"),to:z},"Read more")))}))},L=a(5488),C=a(5162),w=[{label:"Cognitive Services",further:"docs/Explore%20Algorithms/AI%20Services/Overview#text-analytics-sample",config:'from synapse.ml.cognitive import *\n\nsentiment_df = (TextSentiment()\n .setTextCol("text")\n .setLocation("eastus")\n .setSubscriptionKey(key)\n .setOutputCol("sentiment")\n .setErrorCol("error")\n .setLanguageCol("language")\n .transform(input_df))'},{label:"Deep Learning",further:"docs/Explore%20Algorithms/Deep%20Learning/ONNX",config:'from synapse.ml.onnx import *\n\nmodel_prediction_df = (ONNXModel()\n .setModelPayload(model_payload_ml)\n .setDeviceType("CPU")\n .setFeedDict({"input": "features"})\n .setFetchDict({"probability": "probabilities", "prediction": "label"})\n .setMiniBatchSize(64)\n .transform(input_df))'},{label:"Responsible AI",further:"docs/Explore%20Algorithms/Responsible%20AI/Interpreting%20Model%20Predictions",config:'from synapse.ml.explainers import *\n\ninterpretation_df = (TabularSHAP()\n .setInputCols(features)\n .setOutputCol("shapValues")\n .setTargetCol("probability")\n .setTargetClasses([1])\n .setNumSamples(5000)\n .setModel(model)\n .transform(input_df))'},{label:"LightGBM",further:"docs/Explore%20Algorithms/LightGBM/Overview",config:"from synapse.ml.lightgbm import *\n\nquantile_df = (LightGBMRegressor()\n .setApplication('quantile')\n .setAlpha(0.3)\n .setLearningRate(0.3)\n .setNumIterations(100)\n .setNumLeaves(31)\n .fit(train_df)\n .transform(test_df))"},{label:"OpenCV",further:"docs/Explore%20Algorithms/OpenCV/Image%20Transformations",config:'from synapse.ml.opencv import *\n\nimage_df = (ImageTransformer()\n .setInputCol("images")\n .setOutputCol("transformed_images")\n .resize(224, True)\n .centerCrop(224, 224)\n .normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], color_scale_factor = 1/255)\n .transform(input_df))'}],M=[{title:"Simple",imageUrl:"img/simple.svg",description:r.createElement(r.Fragment,null,r.createElement("p",null,"Quickly create, train, and use distributed machine learning tools in only a few lines of code."))},{title:"Scalable",imageUrl:"img/scalable.svg",description:r.createElement(r.Fragment,null,r.createElement("p",null,"Scale ML workloads to hundreds of machines on your"," ",r.createElement("a",{href:"https://spark.apache.org/"},"Apache Spark")," cluster."))},{title:"Multilingual",imageUrl:"img/multilingual.svg",description:r.createElement(r.Fragment,null,r.createElement("p",null,"Use SynapseML from any Spark compatible language including Python, Scala, R, Java, .NET and C#."))},{title:"Open",imageUrl:"img/open_source.svg",description:r.createElement(r.Fragment,null,r.createElement("p",null,"SynapseML is Open Source and can be installed and used on any Spark 3 infrastructure including your local machine, Databricks, Synapse Analytics, and others."))}];function x(e){var t=e.imageUrl,a=e.title,n=e.description,s=(0,p.Z)(t);return r.createElement("div",{className:o()("col col--6",u.feature)},s&&r.createElement("div",{className:"text--center"},r.createElement("img",{className:o()("padding-vert--md",u.featureImage),src:s,alt:a})),r.createElement("h3",null,a),r.createElement("p",null,n))}var Z=function(){var e=(0,c.Z)().siteConfig,t=void 0===e?{}:e;return r.createElement(l.Z,{title:""+t.title,description:"Simple and Distributed Machine Learning",keywords:["SynapseML","Machine Learning"]},r.createElement("header",{className:o()("hero",u.heroBanner)},r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},r.createElement("div",{className:o()("col col--5 col--offset-1")},r.createElement("h1",{className:"hero__title"},t.title),r.createElement("p",{className:"hero__subtitle"},t.tagline),r.createElement("div",{className:u.buttons},r.createElement(i.Z,{className:o()("button button--outline button--primary button--lg",u.getStarted),to:(0,p.Z)("docs/Get%20Started/Install%20SynapseML")},"Get Started"))),r.createElement("div",{className:o()("col col--5")},r.createElement("img",{className:u.heroImg,src:(0,p.Z)("img/logo.svg")}))))),r.createElement("main",null,r.createElement("div",{className:"container"},r.createElement("div",{className:(0,v.Z)(u.announcement,u.announcementDark)},r.createElement("div",{className:u.announcementInner},"Coming from"," ",r.createElement("a",{href:"https://mmlspark.blob.core.windows.net/website/index.html"},"MMLSpark"),"? We have been renamed to SynapseML!"))),r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},r.createElement("div",{className:o()("col col--12")},w&&w.length&&r.createElement("section",{className:u.configSnippets},r.createElement(L.Z,{defaultValue:w[0].label,values:w.map((function(e,t){return{label:e.label,value:e.label}}))},w.map((function(e,t){return r.createElement(C.Z,{key:t,value:e.label},r.createElement(T,(0,n.Z)({className:u.configSnippet},e)))}))))))),M&&M.length&&r.createElement("section",{className:u.features},r.createElement("div",{className:"container margin-vert--md"},r.createElement("div",{className:"row"},M.map((function(e,t){return r.createElement(x,(0,n.Z)({key:t},e))}))))),r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},r.createElement("div",{className:o()(u.pitch+" col")},r.createElement("h2",null,"Installation"),r.createElement("p",null,"Written in Scala, and support multiple languages."," ",r.createElement("a",{href:"https://github.com/microsoft/SynapseML"},"Open source")," ","and cloud native."),r.createElement("p",null,"Note: SynapseML is built-in for"," ",r.createElement("a",{href:"https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-33-runtime"},"Azure Synapse Analytics.")),r.createElement(L.Z,{defaultValue:"Synapse",values:[{label:"Synapse",value:"Synapse"},{label:"Fabric",value:"Fabric"},{label:"Spark Packages",value:"Spark Packages"},{label:"Databricks",value:"Databricks"},{label:"Docker",value:"Docker"},{label:"Python",value:"Python"},{label:"SBT",value:"SBT"},{label:".NET",value:"dotnet"}]},r.createElement(C.Z,{value:"Synapse"},r.createElement("p",null,"SynapseML can be installed on Synapse adding the following to the first cell of a notebook:"),"For Spark3.3 pool:",r.createElement(y,{snippet:'%%configure -f\n{\n "name": "synapseml",\n "conf": {\n "spark.jars.packages": "com.microsoft.azure:synapseml_2.12:0.11.2-spark3.3",\n "spark.jars.repositories": "https://mmlspark.azureedge.net/maven",\n "spark.jars.excludes": "org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind",\n "spark.yarn.user.classpath.first": "true",\n "spark.sql.parquet.enableVectorizedReader": "false"\n }\n}',lang:"bash"}),"For Spark3.2 pool:",r.createElement(y,{snippet:'%%configure -f\n{\n "name": "synapseml",\n "conf": {\n "spark.jars.packages": "com.microsoft.azure:synapseml_2.12:0.11.2,org.apache.spark:spark-avro_2.12:3.3.1",\n "spark.jars.repositories": "https://mmlspark.azureedge.net/maven",\n "spark.jars.excludes": "org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind",\n "spark.yarn.user.classpath.first": "true",\n "spark.sql.parquet.enableVectorizedReader": "false",\n "spark.sql.legacy.replaceDatabricksSparkAvro.enabled": "true"\n }\n}',lang:"bash"})),r.createElement(C.Z,{value:"Fabric"},r.createElement("p",null,"SynapseML is preinstalled on Fabric. To install a different version, adding the following to the first cell of a notebook:"),"For Spark3.3 pool:",r.createElement(y,{snippet:'%%configure -f\n{\n "name": "synapseml",\n "conf": {\n "spark.jars.packages": "com.microsoft.azure:synapseml_2.12:0.11.2-spark3.3",\n "spark.jars.repositories": "https://mmlspark.azureedge.net/maven",\n "spark.jars.excludes": "org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind",\n "spark.yarn.user.classpath.first": "true",\n "spark.sql.parquet.enableVectorizedReader": "false"\n }\n}',lang:"bash"}),"For Spark3.2 pool:",r.createElement(y,{snippet:'%%configure -f\n{\n "name": "synapseml",\n "conf": {\n "spark.jars.packages": "com.microsoft.azure:synapseml_2.12:0.11.2,org.apache.spark:spark-avro_2.12:3.3.1",\n "spark.jars.repositories": "https://mmlspark.azureedge.net/maven",\n "spark.jars.excludes": "org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind",\n "spark.yarn.user.classpath.first": "true",\n "spark.sql.parquet.enableVectorizedReader": "false",\n "spark.sql.legacy.replaceDatabricksSparkAvro.enabled": "true"\n }\n}',lang:"bash"})),r.createElement(C.Z,{value:"Spark Packages"},"SynapseML can be conveniently installed on existing Spark clusters via the --packages option, examples:",r.createElement(y,{snippet:"spark-shell --packages com.microsoft.azure:synapseml_2.12:0.11.2 # Please use 0.11.2 version for Spark3.2 and 0.11.2-spark3.3 version for Spark3.3\npyspark --packages com.microsoft.azure:synapseml_2.12:0.11.2\nspark-submit --packages com.microsoft.azure:synapseml_2.12:0.11.2 MyApp.jar ",lang:"bash"}),"This can be used in other Spark contexts too. For example, you can use SynapseML in"," ",r.createElement("a",{href:"https://github.com/Azure/aztk/"},"AZTK")," by adding it to the"," ",r.createElement("a",{href:"https://github.com/Azure/aztk/wiki/PySpark-on-Azure-with-AZTK#optional-set-up-mmlspark"},".aztk/spark-defaults.conf file"),"."),r.createElement(C.Z,{value:"Databricks"},r.createElement("p",null,"To install SynapseML on the"," ",r.createElement("a",{href:"http://community.cloud.databricks.com"},"Databricks cloud"),", create a new"," ",r.createElement("a",{href:"https://docs.databricks.com/user-guide/libraries.html#libraries-from-maven-pypi-or-spark-packages"},"library from Maven coordinates")," ","in your workspace. in your workspace."),r.createElement("p",null,r.createElement("p",null,"For the coordinates:"),"Spark 3.3 Cluster:",r.createElement(y,{snippet:"com.microsoft.azure:synapseml_2.12:0.11.2-spark3.3",lang:"bash"}),"Spark 3.2 Cluster:",r.createElement(y,{snippet:"com.microsoft.azure:synapseml_2.12:0.11.2",lang:"bash"}),"with the resolver:",r.createElement(y,{snippet:"https://mmlspark.azureedge.net/maven",lang:"bash"}),"Ensure this library is attached to your target cluster(s)."),r.createElement("p",null,"Finally, ensure that your Spark cluster has at least Spark 3.2 and Scala 2.12."),"You can use SynapseML in both your Scala and PySpark notebooks. To get started with our example notebooks import the following databricks archive:",r.createElement(y,{snippet:"https://mmlspark.blob.core.windows.net/dbcs/SynapseMLExamplesv0.11.2.dbc",lang:"bash"})),r.createElement(C.Z,{value:"Docker"},"The easiest way to evaluate SynapseML is via our pre-built Docker container. To do so, run the following command:",r.createElement(y,{snippet:"docker run -it -p 8888:8888 -e ACCEPT_EULA=yes mcr.microsoft.com/mmlspark/release",lang:"bash"}),r.createElement("p",null,"Navigate to"," ",r.createElement("a",{href:"http://localhost:8888"},"http://localhost:8888")," in your web browser to run the sample notebooks. See the"," ",r.createElement("a",{href:"https://github.com/microsoft/SynapseML/blob/master/docs/docker.md"},"documentation")," ","for more on Docker use."),"To read the EULA for using the docker image, run",r.createElement(y,{snippet:"docker run -it -p 8888:8888 mcr.microsoft.com/mmlspark/release eula",lang:"bash"})),r.createElement(C.Z,{value:"Python"},"To try out SynapseML on a Python (or Conda) installation you can get Spark installed via pip with",r.createElement(y,{snippet:"pip install pyspark",lang:"bash"}),"You can then use pyspark as in the above example, or from python:",r.createElement(y,{snippet:'import pyspark\nspark = (pyspark.sql.SparkSession.builder.appName("MyApp")\n .config("spark.jars.packages", "com.microsoft.azure:synapseml_2.12:0.11.2") # Please use 0.11.2 version for Spark3.2 and 0.11.2-spark3.3 version for Spark3.3\n .config("spark.jars.repositories", "https://mmlspark.azureedge.net/maven")\n .getOrCreate())\nimport synapse.ml',lang:"python"})),r.createElement(C.Z,{value:"SBT"},"If you are building a Spark application in Scala, add the following lines to your build.sbt:",r.createElement(y,{snippet:'resolvers += "SynapseML" at "https://mmlspark.azureedge.net/maven"\nlibraryDependencies += "com.microsoft.azure" %% "synapseml_2.12" % "0.11.2" // Please use 0.11.2 version for Spark3.2 and 0.11.2-spark3.3 version for Spark3.3',lang:"jsx"})),r.createElement(C.Z,{value:"dotnet"},"To try out SynapseML with .NET, you should add SynapseML's assembly into reference:",r.createElement(y,{snippet:"dotnet add package SynapseML.Cognitive --version 0.11.2\ndotnet add package SynapseML.Core --version 0.11.2\ndotnet add package SynapseML.Lightgbm --version 0.11.2\ndotnet add package SynapseML.DeepLearning --version 0.11.2\ndotnet add package SynapseML.Opencv --version 0.11.2\ndotnet add package SynapseML.Vw --version 0.11.2",lang:"bash"}),"For detailed installation, please refer this"," ",r.createElement("a",{href:"docs/Reference/Dotnet%20Setup/#installation"},"instruction"),".")))))))}},1354:function(e){e.exports={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["comment"],style:{color:"rgb(136, 132, 111)"}},{types:["string","changed"],style:{color:"rgb(230, 219, 116)"}},{types:["punctuation","tag","deleted"],style:{color:"rgb(249, 38, 114)"}},{types:["number","builtin"],style:{color:"rgb(174, 129, 255)"}},{types:["variable"],style:{color:"rgb(248, 248, 242)"}},{types:["function","attr-name","inserted"],style:{color:"rgb(166, 226, 46)"}}]}},4184:function(e,t){var a;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t0&&e[a-1]===t?e:e.concat(t)},m=function(e,t){var a=e.plain,n=Object.create(null),r=e.styles.reduce((function(e,a){var n=a.languages,r=a.style;return n&&!n.includes(t)||a.types.forEach((function(t){var a=i({},e[t],r);e[t]=a})),e}),n);return r.root=a,r.plain=i({},a,{backgroundColor:null}),r};function d(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(a[n]=e[n]);return a}var g=function(e){function t(){for(var t=this,a=[],n=arguments.length;n--;)a[n]=arguments[n];e.apply(this,a),l(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var a=e.theme?m(e.theme,e.language):void 0;return t.themeDict=a})),l(this,"getLineProps",(function(e){var a=e.key,n=e.className,r=e.style,s=i({},d(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),o=t.getThemeDict(t.props);return void 0!==o&&(s.style=o.plain),void 0!==r&&(s.style=void 0!==s.style?i({},s.style,r):r),void 0!==a&&(s.key=a),n&&(s.className+=" "+n),s})),l(this,"getStyleForToken",(function(e){var a=e.types,n=e.empty,r=a.length,s=t.getThemeDict(t.props);if(void 0!==s){if(1===r&&"plain"===a[0])return n?{display:"inline-block"}:void 0;if(1===r&&!n)return s[a[0]];var o=n?{display:"inline-block"}:{},l=a.map((function(e){return s[e]}));return Object.assign.apply(Object,[o].concat(l))}})),l(this,"getTokenProps",(function(e){var a=e.key,n=e.className,r=e.style,s=e.token,o=i({},d(e,["key","className","style","token"]),{className:"token "+s.types.join(" "),children:s.content,style:t.getStyleForToken(s),key:void 0});return void 0!==r&&(o.style=void 0!==o.style?i({},o.style,r):r),void 0!==a&&(o.key=a),n&&(o.className+=" "+n),o})),l(this,"tokenize",(function(e,t,a,n){var r={code:t,grammar:a,language:n,tokens:[]};e.hooks.run("before-tokenize",r);var s=r.tokens=e.tokenize(r.code,r.grammar,r.language);return e.hooks.run("after-tokenize",r),s}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,a=e.language,n=e.code,r=e.children,s=this.getThemeDict(this.props),o=t.languages[a];return r({tokens:function(e){for(var t=[[]],a=[e],n=[0],r=[e.length],s=0,o=0,l=[],i=[l];o>-1;){for(;(s=n[o]++)0?d:["plain"],m=g):(d=u(d,g.type),g.alias&&(d=u(d,g.alias)),m=g.content),"string"==typeof m){var f=m.split(c),h=f.length;l.push({types:d,content:f[0]});for(var y=1;y0&&(l=o.getRangeAt(0)),n.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;var i=!1;try{i=document.execCommand("copy")}catch(c){}return r.remove(),l&&(o.removeAllRanges(),o.addRange(l)),s&&s.focus(),i}a.d(t,{Z:function(){return n}})}}]); \ No newline at end of file diff --git a/assets/js/c4f5d8e4.efee93f9.js b/assets/js/c4f5d8e4.efee93f9.js new file mode 100644 index 0000000000..3a50932fa1 --- /dev/null +++ b/assets/js/c4f5d8e4.efee93f9.js @@ -0,0 +1 @@ +(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[4195],{5567:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return I}});var n=t(3117),r=t(7294),s=t(4184),l=t.n(s),o=t(7452),c=t(9960),i=t(2263),p=t(4996),m={heroBanner:"heroBanner_qdFl",getStarted:"getStarted_D36F",buttons:"buttons_AeoN",announcement:"announcement_XVnd",announcementDark:"announcementDark_dnMf",announcementInner:"announcementInner_VmFX",features:"features_cAfv",featureImage:"featureImage_wMIZ",heroImg:"heroImg_lMB4",configSnippet:"configSnippet_hC0c",configSnippets:"configSnippets_Iyxf",pitch:"pitch_XV8K",loveSection:"loveSection_tbp6",loveSectionPlea:"loveSectionPlea_xpLt",loveImg:"loveImg_zggS",sponsorLink:"sponsorLink_QcRj",microsoftImg:"microsoftImg_a3bM",theMetImg:"theMetImg_EvOH",mitImg:"mitImg_TSc4"},u="codeSnippet_f3C9",d=t(2949),g=t(3746),f=t(1354),k=t.n(f);var h=function(e){var a=(0,i.Z)().siteConfig.themeConfig.prism,t=void 0===a?{}:a,s=(0,r.useState)(!1),l=s[0],o=s[1];(0,r.useEffect)((function(){o(!0)}),[]);var c=(0,d.I)().isDarkTheme,p=t.theme||k(),m=t.darkTheme||p,f=c?m:p,h=e.lang,y=void 0===h?"yaml":h,b=e.snippet;return r.createElement(g.ZP,(0,n.Z)({},g.lG,{key:l,theme:f,code:b,language:y}),(function(e){var a=e.className,t=e.style,n=e.tokens,s=e.getLineProps,l=e.getTokenProps;return r.createElement("pre",{className:a+" "+u,style:t},n.map((function(e,a){return r.createElement("div",s({line:e,key:a}),e.map((function(e,a){return r.createElement("span",l({token:e,key:a}))})))})))}))},y=t(6010),b=t(195),v=t(5999),E="codeBlockContainer_v98K",S="codeBlockContent_xAFg",_="copyButton_C2v_",L="furtherButton_rET3";var M=function(e){var a=(0,i.Z)().siteConfig.themeConfig.prism,t=void 0===a?{}:a,s=(0,r.useState)(!1),l=s[0],o=s[1],p=(0,r.useState)(!1),m=p[0],u=p[1];(0,r.useEffect)((function(){u(!0)}),[]);var f=(0,d.I)().isDarkTheme,h=t.theme||k(),M=t.darkTheme||h,N=f?M:h,C=(0,r.useRef)(null),T=e.lang,Z=void 0===T?"python":T,w=e.config,I=e.copyBit,z=e.further,x=I||w,A=function(){(0,b.Z)(x),o(!0),setTimeout((function(){return o(!1)}),2e3)};return r.createElement(g.ZP,(0,n.Z)({},g.lG,{key:m,theme:N,code:w,language:Z}),(function(e){var a=e.className,t=e.style,n=e.tokens,s=e.getLineProps,o=e.getTokenProps;return r.createElement("div",{className:E},r.createElement("div",{className:(0,y.Z)(S,Z)},r.createElement("pre",{className:""+a,style:t},n.map((function(e,a){return r.createElement("div",s({line:e,key:a}),e.map((function(e,a){return r.createElement("span",o({token:e,key:a}))})))}))),r.createElement("button",{ref:C,type:"button","aria-label":(0,v.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),className:(0,y.Z)(_,"clean-btn"),onClick:A},l?r.createElement(v.Z,{id:"theme.CodeBlock.copied",description:"The copied button label on code blocks"},"Copied"):r.createElement(v.Z,{id:"theme.CodeBlock.copy",description:"The copy button label on code blocks"},"Copy")),z&&r.createElement(c.Z,{className:(0,y.Z)(L,"button button--outline button--primary"),to:z},"Read more")))}))},N=t(4866),C=t(5162),T=[{label:"Cognitive Services",further:"docs/Explore%20Algorithms/AI%20Services/Overview#text-analytics-sample",config:'from synapse.ml.cognitive import *\n\nsentiment_df = (TextSentiment()\n .setTextCol("text")\n .setLocation("eastus")\n .setSubscriptionKey(key)\n .setOutputCol("sentiment")\n .setErrorCol("error")\n .setLanguageCol("language")\n .transform(input_df))'},{label:"Deep Learning",further:"docs/Explore%20Algorithms/Deep%20Learning/ONNX",config:'from synapse.ml.onnx import *\n\nmodel_prediction_df = (ONNXModel()\n .setModelPayload(model_payload_ml)\n .setDeviceType("CPU")\n .setFeedDict({"input": "features"})\n .setFetchDict({"probability": "probabilities", "prediction": "label"})\n .setMiniBatchSize(64)\n .transform(input_df))'},{label:"Responsible AI",further:"docs/Explore%20Algorithms/Responsible%20AI/Interpreting%20Model%20Predictions",config:'from synapse.ml.explainers import *\n\ninterpretation_df = (TabularSHAP()\n .setInputCols(features)\n .setOutputCol("shapValues")\n .setTargetCol("probability")\n .setTargetClasses([1])\n .setNumSamples(5000)\n .setModel(model)\n .transform(input_df))'},{label:"LightGBM",further:"docs/Explore%20Algorithms/LightGBM/Overview",config:"from synapse.ml.lightgbm import *\n\nquantile_df = (LightGBMRegressor()\n .setApplication('quantile')\n .setAlpha(0.3)\n .setLearningRate(0.3)\n .setNumIterations(100)\n .setNumLeaves(31)\n .fit(train_df)\n .transform(test_df))"},{label:"OpenCV",further:"docs/Explore%20Algorithms/OpenCV/Image%20Transformations",config:'from synapse.ml.opencv import *\n\nimage_df = (ImageTransformer()\n .setInputCol("images")\n .setOutputCol("transformed_images")\n .resize(224, True)\n .centerCrop(224, 224)\n .normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], color_scale_factor = 1/255)\n .transform(input_df))'}],Z=[{title:"Simple",imageUrl:"img/simple.svg",description:r.createElement(r.Fragment,null,r.createElement("p",null,"Quickly create, train, and use distributed machine learning tools in only a few lines of code."))},{title:"Scalable",imageUrl:"img/scalable.svg",description:r.createElement(r.Fragment,null,r.createElement("p",null,"Scale ML workloads to hundreds of machines on your"," ",r.createElement("a",{href:"https://spark.apache.org/"},"Apache Spark")," cluster."))},{title:"Multilingual",imageUrl:"img/multilingual.svg",description:r.createElement(r.Fragment,null,r.createElement("p",null,"Use SynapseML from any Spark compatible language including Python, Scala, R, Java, .NET and C#."))},{title:"Open",imageUrl:"img/open_source.svg",description:r.createElement(r.Fragment,null,r.createElement("p",null,"SynapseML is Open Source and can be installed and used on any Spark 3 infrastructure including your local machine, Databricks, Synapse Analytics, and others."))}];function w(e){var a=e.imageUrl,t=e.title,n=e.description,s=(0,p.Z)(a);return r.createElement("div",{className:l()("col col--6",m.feature)},s&&r.createElement("div",{className:"text--center"},r.createElement("img",{className:l()("padding-vert--md",m.featureImage),src:s,alt:t})),r.createElement("h3",null,t),r.createElement("p",null,n))}var I=function(){var e=(0,i.Z)().siteConfig,a=void 0===e?{}:e;return r.createElement(o.Z,{title:""+a.title,description:"Simple and Distributed Machine Learning",keywords:["SynapseML","Machine Learning"]},r.createElement("header",{className:l()("hero",m.heroBanner)},r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},r.createElement("div",{className:l()("col col--5 col--offset-1")},r.createElement("h1",{className:"hero__title"},a.title),r.createElement("p",{className:"hero__subtitle"},a.tagline),r.createElement("div",{className:m.buttons},r.createElement(c.Z,{className:l()("button button--outline button--primary button--lg",m.getStarted),to:(0,p.Z)("docs/Get%20Started/Install%20SynapseML")},"Get Started"))),r.createElement("div",{className:l()("col col--5")},r.createElement("img",{className:m.heroImg,src:(0,p.Z)("img/logo.svg")}))))),r.createElement("main",null,r.createElement("div",{className:"container"},r.createElement("div",{className:(0,y.Z)(m.announcement,m.announcementDark)},r.createElement("div",{className:m.announcementInner},"Coming from"," ",r.createElement("a",{href:"https://mmlspark.blob.core.windows.net/website/index.html"},"MMLSpark"),"? We have been renamed to SynapseML!"))),r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},r.createElement("div",{className:l()("col col--12")},T&&T.length&&r.createElement("section",{className:m.configSnippets},r.createElement(N.Z,{defaultValue:T[0].label,values:T.map((function(e,a){return{label:e.label,value:e.label}}))},T.map((function(e,a){return r.createElement(C.Z,{key:a,value:e.label},r.createElement(M,(0,n.Z)({className:m.configSnippet},e)))}))))))),Z&&Z.length&&r.createElement("section",{className:m.features},r.createElement("div",{className:"container margin-vert--md"},r.createElement("div",{className:"row"},Z.map((function(e,a){return r.createElement(w,(0,n.Z)({key:a},e))}))))),r.createElement("div",{className:"container"},r.createElement("div",{className:"row"},r.createElement("div",{className:l()(m.pitch+" col")},r.createElement("h2",null,"Installation"),r.createElement("p",null,"Written in Scala, and support multiple languages."," ",r.createElement("a",{href:"https://github.com/microsoft/SynapseML"},"Open source")," ","and cloud native."),r.createElement("p",null,"Note: SynapseML is built-in for"," ",r.createElement("a",{href:"https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-33-runtime"},"Azure Synapse Analytics.")),r.createElement(N.Z,{defaultValue:"Synapse",values:[{label:"Synapse",value:"Synapse"},{label:"Fabric",value:"Fabric"},{label:"Spark Packages",value:"Spark Packages"},{label:"Databricks",value:"Databricks"},{label:"Docker",value:"Docker"},{label:"Python",value:"Python"},{label:"SBT",value:"SBT"},{label:".NET",value:"dotnet"}]},r.createElement(C.Z,{value:"Synapse"},r.createElement("p",null,"SynapseML can be installed on Synapse adding the following to the first cell of a notebook:"),"For Spark3.3 pool:",r.createElement(h,{snippet:'%%configure -f\n{\n "name": "synapseml",\n "conf": {\n "spark.jars.packages": "com.microsoft.azure:synapseml_2.12:0.11.2-spark3.3",\n "spark.jars.repositories": "https://mmlspark.azureedge.net/maven",\n "spark.jars.excludes": "org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind",\n "spark.yarn.user.classpath.first": "true",\n "spark.sql.parquet.enableVectorizedReader": "false"\n }\n}',lang:"bash"}),"For Spark3.2 pool:",r.createElement(h,{snippet:'%%configure -f\n{\n "name": "synapseml",\n "conf": {\n "spark.jars.packages": "com.microsoft.azure:synapseml_2.12:0.11.2,org.apache.spark:spark-avro_2.12:3.3.1",\n "spark.jars.repositories": "https://mmlspark.azureedge.net/maven",\n "spark.jars.excludes": "org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind",\n "spark.yarn.user.classpath.first": "true",\n "spark.sql.parquet.enableVectorizedReader": "false",\n "spark.sql.legacy.replaceDatabricksSparkAvro.enabled": "true"\n }\n}',lang:"bash"})),r.createElement(C.Z,{value:"Fabric"},r.createElement("p",null,"SynapseML is preinstalled on Fabric. To install a different version, adding the following to the first cell of a notebook:"),"For Spark3.3 pool:",r.createElement(h,{snippet:'%%configure -f\n{\n "name": "synapseml",\n "conf": {\n "spark.jars.packages": "com.microsoft.azure:synapseml_2.12:0.11.2-spark3.3",\n "spark.jars.repositories": "https://mmlspark.azureedge.net/maven",\n "spark.jars.excludes": "org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind",\n "spark.yarn.user.classpath.first": "true",\n "spark.sql.parquet.enableVectorizedReader": "false"\n }\n}',lang:"bash"}),"For Spark3.2 pool:",r.createElement(h,{snippet:'%%configure -f\n{\n "name": "synapseml",\n "conf": {\n "spark.jars.packages": "com.microsoft.azure:synapseml_2.12:0.11.2,org.apache.spark:spark-avro_2.12:3.3.1",\n "spark.jars.repositories": "https://mmlspark.azureedge.net/maven",\n "spark.jars.excludes": "org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind",\n "spark.yarn.user.classpath.first": "true",\n "spark.sql.parquet.enableVectorizedReader": "false",\n "spark.sql.legacy.replaceDatabricksSparkAvro.enabled": "true"\n }\n}',lang:"bash"})),r.createElement(C.Z,{value:"Spark Packages"},"SynapseML can be conveniently installed on existing Spark clusters via the --packages option, examples:",r.createElement(h,{snippet:"spark-shell --packages com.microsoft.azure:synapseml_2.12:0.11.2 # Please use 0.11.2 version for Spark3.2 and 0.11.2-spark3.3 version for Spark3.3\npyspark --packages com.microsoft.azure:synapseml_2.12:0.11.2\nspark-submit --packages com.microsoft.azure:synapseml_2.12:0.11.2 MyApp.jar ",lang:"bash"}),"This can be used in other Spark contexts too. For example, you can use SynapseML in"," ",r.createElement("a",{href:"https://github.com/Azure/aztk/"},"AZTK")," by adding it to the"," ",r.createElement("a",{href:"https://github.com/Azure/aztk/wiki/PySpark-on-Azure-with-AZTK#optional-set-up-mmlspark"},".aztk/spark-defaults.conf file"),"."),r.createElement(C.Z,{value:"Databricks"},r.createElement("p",null,"To install SynapseML on the"," ",r.createElement("a",{href:"http://community.cloud.databricks.com"},"Databricks cloud"),", create a new"," ",r.createElement("a",{href:"https://docs.databricks.com/user-guide/libraries.html#libraries-from-maven-pypi-or-spark-packages"},"library from Maven coordinates")," ","in your workspace. in your workspace."),r.createElement("p",null,r.createElement("p",null,"For the coordinates:"),"Spark 3.3 Cluster:",r.createElement(h,{snippet:"com.microsoft.azure:synapseml_2.12:0.11.2-spark3.3",lang:"bash"}),"Spark 3.2 Cluster:",r.createElement(h,{snippet:"com.microsoft.azure:synapseml_2.12:0.11.2",lang:"bash"}),"with the resolver:",r.createElement(h,{snippet:"https://mmlspark.azureedge.net/maven",lang:"bash"}),"Ensure this library is attached to your target cluster(s)."),r.createElement("p",null,"Finally, ensure that your Spark cluster has at least Spark 3.2 and Scala 2.12."),"You can use SynapseML in both your Scala and PySpark notebooks. To get started with our example notebooks import the following databricks archive:",r.createElement(h,{snippet:"https://mmlspark.blob.core.windows.net/dbcs/SynapseMLExamplesv0.11.2.dbc",lang:"bash"})),r.createElement(C.Z,{value:"Docker"},"The easiest way to evaluate SynapseML is via our pre-built Docker container. To do so, run the following command:",r.createElement(h,{snippet:"docker run -it -p 8888:8888 -e ACCEPT_EULA=yes mcr.microsoft.com/mmlspark/release",lang:"bash"}),r.createElement("p",null,"Navigate to"," ",r.createElement("a",{href:"http://localhost:8888"},"http://localhost:8888")," in your web browser to run the sample notebooks. See the"," ",r.createElement("a",{href:"https://github.com/microsoft/SynapseML/blob/master/docs/docker.md"},"documentation")," ","for more on Docker use."),"To read the EULA for using the docker image, run",r.createElement(h,{snippet:"docker run -it -p 8888:8888 mcr.microsoft.com/mmlspark/release eula",lang:"bash"})),r.createElement(C.Z,{value:"Python"},"To try out SynapseML on a Python (or Conda) installation you can get Spark installed via pip with",r.createElement(h,{snippet:"pip install pyspark",lang:"bash"}),"You can then use pyspark as in the above example, or from python:",r.createElement(h,{snippet:'import pyspark\nspark = (pyspark.sql.SparkSession.builder.appName("MyApp")\n .config("spark.jars.packages", "com.microsoft.azure:synapseml_2.12:0.11.2") # Please use 0.11.2 version for Spark3.2 and 0.11.2-spark3.3 version for Spark3.3\n .config("spark.jars.repositories", "https://mmlspark.azureedge.net/maven")\n .getOrCreate())\nimport synapse.ml',lang:"python"})),r.createElement(C.Z,{value:"SBT"},"If you are building a Spark application in Scala, add the following lines to your build.sbt:",r.createElement(h,{snippet:'resolvers += "SynapseML" at "https://mmlspark.azureedge.net/maven"\nlibraryDependencies += "com.microsoft.azure" %% "synapseml_2.12" % "0.11.2" // Please use 0.11.2 version for Spark3.2 and 0.11.2-spark3.3 version for Spark3.3',lang:"jsx"})),r.createElement(C.Z,{value:"dotnet"},"To try out SynapseML with .NET, you should add SynapseML's assembly into reference:",r.createElement(h,{snippet:"dotnet add package SynapseML.Cognitive --version 0.11.2\ndotnet add package SynapseML.Core --version 0.11.2\ndotnet add package SynapseML.Lightgbm --version 0.11.2\ndotnet add package SynapseML.DeepLearning --version 0.11.2\ndotnet add package SynapseML.Opencv --version 0.11.2\ndotnet add package SynapseML.Vw --version 0.11.2",lang:"bash"}),"For detailed installation, please refer this"," ",r.createElement("a",{href:"docs/Reference/Dotnet%20Setup/#installation"},"instruction"),".")))))))}},1354:function(e){e.exports={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["comment"],style:{color:"rgb(136, 132, 111)"}},{types:["string","changed"],style:{color:"rgb(230, 219, 116)"}},{types:["punctuation","tag","deleted"],style:{color:"rgb(249, 38, 114)"}},{types:["number","builtin"],style:{color:"rgb(174, 129, 255)"}},{types:["variable"],style:{color:"rgb(248, 248, 242)"}},{types:["function","attr-name","inserted"],style:{color:"rgb(166, 226, 46)"}}]}}}]); \ No newline at end of file diff --git a/assets/js/f7a32432.82dff3c7.js b/assets/js/f7a32432.82dff3c7.js deleted file mode 100644 index d58aed212d..0000000000 --- a/assets/js/f7a32432.82dff3c7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[4954],{3905:function(e,n,t){t.d(n,{Zo:function(){return i},kt:function(){return d}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},i=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,i=u(e,["components","mdxType","originalType","parentName"]),m=c(t),d=a,f=m["".concat(s,".").concat(d)]||m[d]||p[d]||l;return t?r.createElement(f,o(o({ref:n},i),{},{components:t})):r.createElement(f,o({ref:n},i))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,o=new Array(l);o[0]=m;var u={};for(var s in n)hasOwnProperty.call(n,s)&&(u[s]=n[s]);u.originalType=e,u.mdxType="string"==typeof e?e:a,o[1]=u;for(var c=2;c child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),h=null!=f?f:y.map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes}})),g=(0,u.l)(h,(function(e,n){return e.value===n.value}));if(g.length>0)throw new Error('Docusaurus error: Duplicate values "'+g.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var E=null===d?d:null!=(n=null!=d?d:null==(t=y.find((function(e){return e.props.default})))?void 0:t.props.value)?n:y[0].props.value;if(null!==E&&!h.some((function(e){return e.value===E})))throw new Error('Docusaurus error: The has a defaultValue "'+E+'" but none of its children has the corresponding value. Available values are: '+h.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var O=(0,s.U)(),_=O.tabGroupChoices,N=O.setTabGroupChoices,k=(0,a.useState)(E),w=k[0],x=k[1],T=[],D=(0,c.o5)().blockElementScrollPositionUntilNextRender;if(null!=b){var M=_[b];null!=M&&M!==w&&h.some((function(e){return e.value===M}))&&x(M)}var P=function(e){var n=e.currentTarget,t=T.indexOf(n),r=h[t].value;r!==w&&(D(n),x(r),null!=b&&N(b,String(r)))},Z=function(e){var n,t=null;switch(e.key){case"Enter":P(e);break;case"ArrowRight":var r,a=T.indexOf(e.currentTarget)+1;t=null!=(r=T[a])?r:T[0];break;case"ArrowLeft":var l,o=T.indexOf(e.currentTarget)-1;t=null!=(l=T[o])?l:T[T.length-1]}null==(n=t)||n.focus()};return a.createElement("div",{className:(0,l.Z)("tabs-container",i)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":m},v)},h.map((function(e){var n=e.value,t=e.label,o=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:w===n?0:-1,"aria-selected":w===n,key:n,ref:function(e){return T.push(e)},onKeyDown:Z,onClick:P},o,{className:(0,l.Z)("tabs__item",p,null==o?void 0:o.className,{"tabs__item--active":w===n})}),null!=t?t:n)}))),o?(0,a.cloneElement)(y.filter((function(e){return e.props.value===w}))[0],{className:"margin-top--md"}):a.createElement("div",{className:"margin-top--md"},y.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==w})}))))}function d(e){var n=(0,o.Z)();return a.createElement(m,(0,r.Z)({key:String(n)},e))}},1989:function(e,n,t){var r=t(7294),a=t(2263);n.Z=function(e){var n=e.className,t=e.py,l=e.scala,o=e.csharp,u=e.sourceLink,s=(0,a.Z)().siteConfig.customFields.version,c="https://mmlspark.blob.core.windows.net/docs/"+s+"/pyspark/"+t,i="https://mmlspark.blob.core.windows.net/docs/"+s+"/scala/"+l,p="https://mmlspark.blob.core.windows.net/docs/"+s+"/dotnet/"+o;return r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",null,r.createElement("strong",null,"Python API: "),r.createElement("a",{href:c},n)),r.createElement("td",null,r.createElement("strong",null,"Scala API: "),r.createElement("a",{href:i},n)),r.createElement("td",null,r.createElement("strong",null,".NET API: "),r.createElement("a",{href:p},n)),r.createElement("td",null,r.createElement("strong",null,"Source: "),r.createElement("a",{href:u},n)))))}},9193:function(e,n,t){t.r(n),t.d(n,{assets:function(){return y},contentTitle:function(){return b},default:function(){return E},frontMatter:function(){return f},metadata:function(){return v},toc:function(){return h}});var r=t(3117),a=t(102),l=(t(7294),t(3905)),o=t(5488),u=t(5162),s=t(1989),c=["components"],i=[{value:"ONNXModel",id:"onnxmodel",level:2}],p={toc:i};function m(e){var n=e.components,t=(0,a.Z)(e,c);return(0,l.kt)("wrapper",(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"onnxmodel"},"ONNXModel"),(0,l.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(u.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-py"},'from synapse.ml.onnx import ONNXModel\n\nmodel_path = "PUT_YOUR_MODEL_PATH"\nonnx_ml = (ONNXModel()\n .setModelLocation(model_path)\n .setFeedDict({"float_input": "features"})\n .setFetchDict({"prediction": "output_label", "rawProbability": "output_probability"}))\n'))),(0,l.kt)(u.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.onnx._\n\nval model_path = "PUT_YOUR_MODEL_PATH"\nval onnx_ml = (new ONNXModel()\n .setModelLocation(model_path)\n .setFeedDict(Map("float_input" -> "features"))\n .setFetchDict(Map("prediction" -> "output_label", "rawProbability" -> "output_probability")))\n')))),(0,l.kt)(s.Z,{className:"ONNXModel",py:"synapse.ml.onnx.html#module-synapse.ml.onnx.ONNXModel",scala:"com/microsoft/azure/synapse/ml/onnx/ONNXModel.html",csharp:"classSynapse_1_1ML_1_1Onnx_1_1ONNXModel.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/deep-learning/src/main/scala/com/microsoft/azure/synapse/ml/onnx/ONNXModel.scala",mdxType:"DocTable"}))}m.isMDXComponent=!0;var d=["components"],f={title:"Deep Learning",sidebar_label:"Deep Learning"},b=void 0,v={unversionedId:"Quick Examples/transformers/transformers_deep_learning",id:"Quick Examples/transformers/transformers_deep_learning",title:"Deep Learning",description:"",source:"@site/docs/Quick Examples/transformers/transformers_deep_learning.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_deep_learning",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_deep_learning",draft:!1,tags:[],version:"current",frontMatter:{title:"Deep Learning",sidebar_label:"Deep Learning"}},y={},h=[].concat(i),g={toc:h};function E(e){var n=e.components,t=(0,a.Z)(e,d);return(0,l.kt)("wrapper",(0,r.Z)({},g,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)(m,{mdxType:"ONNXModel"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f7a32432.b7b367ec.js b/assets/js/f7a32432.b7b367ec.js new file mode 100644 index 0000000000..85d7a2fd4b --- /dev/null +++ b/assets/js/f7a32432.b7b367ec.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[4954],{3905:function(e,n,t){t.d(n,{Zo:function(){return s},kt:function(){return f}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=r.createContext({}),i=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=i(e.components);return r.createElement(c.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,c=e.parentName,s=u(e,["components","mdxType","originalType","parentName"]),m=i(t),f=a,d=m["".concat(c,".").concat(f)]||m[f]||p[f]||l;return t?r.createElement(d,o(o({ref:n},s),{},{components:t})):r.createElement(d,o({ref:n},s))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,o=new Array(l);o[0]=m;var u={};for(var c in n)hasOwnProperty.call(n,c)&&(u[c]=n[c]);u.originalType=e,u.mdxType="string"==typeof e?e:a,o[1]=u;for(var i=2;i child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}function m(e){var n=e.values,t=e.children;return(0,a.useMemo)((function(){var e=null!=n?n:p(t);return function(e){var n=(0,i.l)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function f(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function d(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,l=(0,u.k6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:r});return[(0,c._X)(o),(0,a.useCallback)((function(e){if(o){var n=new URLSearchParams(l.location.search);n.set(o,e),l.replace(Object.assign({},l.location,{search:n.toString()}))}}),[o,l])]}function b(e){var n,t,r,l,o=e.defaultValue,u=e.queryString,c=void 0!==u&&u,i=e.groupId,p=m(e),b=(0,a.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!f({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:o,tabValues:p})})),v=b[0],y=b[1],h=d({queryString:c,groupId:i}),g=h[0],E=h[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:i}.groupId),t=(0,s.Nk)(n),r=t[0],l=t[1],[r,(0,a.useCallback)((function(e){n&&l.set(e)}),[n,l])]),O=k[0],w=k[1],_=function(){var e=null!=g?g:O;return f({value:e,tabValues:p})?e:null}();return(0,a.useLayoutEffect)((function(){_&&y(_)}),[_]),{selectedValue:v,selectValue:(0,a.useCallback)((function(e){if(!f({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);y(e),E(e),w(e)}),[E,w,p]),tabValues:p}}var v=t(2389),y="tabList__CuJ",h="tabItem_LNqP";function g(e){var n=e.className,t=e.block,u=e.selectedValue,c=e.selectValue,i=e.tabValues,s=[],p=(0,o.o5)().blockElementScrollPositionUntilNextRender,m=function(e){var n=e.currentTarget,t=s.indexOf(n),r=i[t].value;r!==u&&(p(n),c(r))},f=function(e){var n,t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":var r,a=s.indexOf(e.currentTarget)+1;t=null!=(r=s[a])?r:s[0];break;case"ArrowLeft":var l,o=s.indexOf(e.currentTarget)-1;t=null!=(l=s[o])?l:s[s.length-1]}null==(n=t)||n.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":t},n)},i.map((function(e){var n=e.value,t=e.label,o=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===n?0:-1,"aria-selected":u===n,key:n,ref:function(e){return s.push(e)},onKeyDown:f,onClick:m},o,{className:(0,l.Z)("tabs__item",h,null==o?void 0:o.className,{"tabs__item--active":u===n})}),null!=t?t:n)})))}function E(e){var n=e.lazy,t=e.children,r=e.selectedValue,l=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=l.find((function(e){return e.props.value===r}));return o?(0,a.cloneElement)(o,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==r})})))}function k(e){var n=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",y)},a.createElement(g,(0,r.Z)({},e,n)),a.createElement(E,(0,r.Z)({},e,n)))}function O(e){var n=(0,v.Z)();return a.createElement(k,(0,r.Z)({key:String(n)},e))}},1989:function(e,n,t){var r=t(7294),a=t(2263);n.Z=function(e){var n=e.className,t=e.py,l=e.scala,o=e.csharp,u=e.sourceLink,c=(0,a.Z)().siteConfig.customFields.version,i="https://mmlspark.blob.core.windows.net/docs/"+c+"/pyspark/"+t,s="https://mmlspark.blob.core.windows.net/docs/"+c+"/scala/"+l,p="https://mmlspark.blob.core.windows.net/docs/"+c+"/dotnet/"+o;return r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",null,r.createElement("strong",null,"Python API: "),r.createElement("a",{href:i},n)),r.createElement("td",null,r.createElement("strong",null,"Scala API: "),r.createElement("a",{href:s},n)),r.createElement("td",null,r.createElement("strong",null,".NET API: "),r.createElement("a",{href:p},n)),r.createElement("td",null,r.createElement("strong",null,"Source: "),r.createElement("a",{href:u},n)))))}},9193:function(e,n,t){t.r(n),t.d(n,{assets:function(){return y},contentTitle:function(){return b},default:function(){return E},frontMatter:function(){return d},metadata:function(){return v},toc:function(){return h}});var r=t(3117),a=t(102),l=(t(7294),t(3905)),o=t(4866),u=t(5162),c=t(1989),i=["components"],s=[{value:"ONNXModel",id:"onnxmodel",level:2}],p={toc:s};function m(e){var n=e.components,t=(0,a.Z)(e,i);return(0,l.kt)("wrapper",(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"onnxmodel"},"ONNXModel"),(0,l.kt)(o.Z,{defaultValue:"py",values:[{label:"Python",value:"py"},{label:"Scala",value:"scala"}],mdxType:"Tabs"},(0,l.kt)(u.Z,{value:"py",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-py"},'from synapse.ml.onnx import ONNXModel\n\nmodel_path = "PUT_YOUR_MODEL_PATH"\nonnx_ml = (ONNXModel()\n .setModelLocation(model_path)\n .setFeedDict({"float_input": "features"})\n .setFetchDict({"prediction": "output_label", "rawProbability": "output_probability"}))\n'))),(0,l.kt)(u.Z,{value:"scala",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},'import com.microsoft.azure.synapse.ml.onnx._\n\nval model_path = "PUT_YOUR_MODEL_PATH"\nval onnx_ml = (new ONNXModel()\n .setModelLocation(model_path)\n .setFeedDict(Map("float_input" -> "features"))\n .setFetchDict(Map("prediction" -> "output_label", "rawProbability" -> "output_probability")))\n')))),(0,l.kt)(c.Z,{className:"ONNXModel",py:"synapse.ml.onnx.html#module-synapse.ml.onnx.ONNXModel",scala:"com/microsoft/azure/synapse/ml/onnx/ONNXModel.html",csharp:"classSynapse_1_1ML_1_1Onnx_1_1ONNXModel.html",sourceLink:"https://github.com/microsoft/SynapseML/blob/master/deep-learning/src/main/scala/com/microsoft/azure/synapse/ml/onnx/ONNXModel.scala",mdxType:"DocTable"}))}m.isMDXComponent=!0;var f=["components"],d={title:"Deep Learning",sidebar_label:"Deep Learning"},b=void 0,v={unversionedId:"Quick Examples/transformers/transformers_deep_learning",id:"Quick Examples/transformers/transformers_deep_learning",title:"Deep Learning",description:"",source:"@site/docs/Quick Examples/transformers/transformers_deep_learning.md",sourceDirName:"Quick Examples/transformers",slug:"/Quick Examples/transformers/transformers_deep_learning",permalink:"/SynapseML/docs/Quick Examples/transformers/transformers_deep_learning",draft:!1,tags:[],version:"current",frontMatter:{title:"Deep Learning",sidebar_label:"Deep Learning"}},y={},h=[].concat(s),g={toc:h};function E(e){var n=e.components,t=(0,a.Z)(e,f);return(0,l.kt)("wrapper",(0,r.Z)({},g,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)(m,{mdxType:"ONNXModel"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f85db098.087ba7b0.js b/assets/js/f85db098.087ba7b0.js new file mode 100644 index 0000000000..cf855cb8e6 --- /dev/null +++ b/assets/js/f85db098.087ba7b0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[5049],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return m}});var a=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},u=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=p(t),m=r,h=d["".concat(s,".").concat(m)]||d[m]||c[m]||o;return t?a.createElement(h,l(l({ref:n},u),{},{components:t})):a.createElement(h,l({ref:n},u))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,l=new Array(o);l[0]=d;var i={};for(var s in n)hasOwnProperty.call(n,s)&&(i[s]=n[s]);i.originalType=e,i.mdxType="string"==typeof e?e:r,l[1]=i;for(var p=2;p child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}function d(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:c(t);return function(e){var n=(0,p.l)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function h(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,o=(0,i.k6)(),l=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,r.useCallback)((function(e){if(l){var n=new URLSearchParams(o.location.search);n.set(l,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[l,o])]}function f(e){var n,t,a,o,l=e.defaultValue,i=e.queryString,s=void 0!==i&&i,p=e.groupId,c=d(e),f=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:l,tabValues:c})})),k=f[0],y=f[1],v=h({queryString:s,groupId:p}),b=v[0],g=v[1],w=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:p}.groupId),t=(0,u.Nk)(n),a=t[0],o=t[1],[a,(0,r.useCallback)((function(e){n&&o.set(e)}),[n,o])]),S=w[0],T=w[1],N=function(){var e=null!=b?b:S;return m({value:e,tabValues:c})?e:null}();return(0,r.useLayoutEffect)((function(){N&&y(N)}),[N]),{selectedValue:k,selectValue:(0,r.useCallback)((function(e){if(!m({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);y(e),g(e),T(e)}),[g,T,c]),tabValues:c}}var k=t(2389),y="tabList__CuJ",v="tabItem_LNqP";function b(e){var n=e.className,t=e.block,i=e.selectedValue,s=e.selectValue,p=e.tabValues,u=[],c=(0,l.o5)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=u.indexOf(n),a=p[t].value;a!==i&&(c(n),s(a))},m=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var a,r=u.indexOf(e.currentTarget)+1;t=null!=(a=u[r])?a:u[0];break;case"ArrowLeft":var o,l=u.indexOf(e.currentTarget)-1;t=null!=(o=u[l])?o:u[u.length-1]}null==(n=t)||n.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},p.map((function(e){var n=e.value,t=e.label,l=e.attributes;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===n?0:-1,"aria-selected":i===n,key:n,ref:function(e){return u.push(e)},onKeyDown:m,onClick:d},l,{className:(0,o.Z)("tabs__item",v,null==l?void 0:l.className,{"tabs__item--active":i===n})}),null!=t?t:n)})))}function g(e){var n=e.lazy,t=e.children,a=e.selectedValue,o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var l=o.find((function(e){return e.props.value===a}));return l?(0,r.cloneElement)(l,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})})))}function w(e){var n=f(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",y)},r.createElement(b,(0,a.Z)({},e,n)),r.createElement(g,(0,a.Z)({},e,n)))}function S(e){var n=(0,k.Z)();return r.createElement(w,(0,a.Z)({key:String(n)},e))}},5102:function(e,n,t){t.r(n),t.d(n,{assets:function(){return d},contentTitle:function(){return u},default:function(){return f},frontMatter:function(){return p},metadata:function(){return c},toc:function(){return m}});var a=t(3117),r=t(102),o=(t(7294),t(3905)),l=t(4866),i=t(5162),s=["components"],p={title:".NET setup",hide_title:!0,sidebar_label:".NET setup",description:".NET setup"},u=".NET setup and example for SynapseML",c={unversionedId:"Reference/Dotnet Setup",id:"Reference/Dotnet Setup",title:".NET setup",description:".NET setup",source:"@site/docs/Reference/Dotnet Setup.md",sourceDirName:"Reference",slug:"/Reference/Dotnet Setup",permalink:"/SynapseML/docs/Reference/Dotnet Setup",draft:!1,tags:[],version:"current",frontMatter:{title:".NET setup",hide_title:!0,sidebar_label:".NET setup",description:".NET setup"},sidebar:"docs",previous:{title:"R setup",permalink:"/SynapseML/docs/Reference/R Setup"},next:{title:"Quickstart - LightGBM in Dotnet",permalink:"/SynapseML/docs/Reference/Quickstart - LightGBM in Dotnet"}},d={},m=[{value:"Installation",id:"installation",level:2},{value:"1. Install .NET",id:"1-install-net",level:3},{value:"2. Install Java",id:"2-install-java",level:3},{value:"3. Install Apache Spark",id:"3-install-apache-spark",level:3},{value:"4. Install .NET for Apache Spark",id:"4-install-net-for-apache-spark",level:3},{value:"5. Install WinUtils (Windows Only)",id:"5-install-winutils-windows-only",level:3},{value:"6. Set DOTNET_WORKER_DIR and check dependencies",id:"6-set-dotnet_worker_dir-and-check-dependencies",level:3},{value:"Write a .NET for SynapseML App",id:"write-a-net-for-synapseml-app",level:2},{value:"1. Create a console app",id:"1-create-a-console-app",level:3},{value:"2. Install NuGet package",id:"2-install-nuget-package",level:3},{value:"3. Write your app",id:"3-write-your-app",level:3},{value:"4. Run your .NET App",id:"4-run-your-net-app",level:3},{value:"Next",id:"next",level:2}],h={toc:m};function f(e){var n=e.components,t=(0,r.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},h,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"net-setup-and-example-for-synapseml"},".NET setup and example for SynapseML"),(0,o.kt)("h2",{id:"installation"},"Installation"),(0,o.kt)("h3",{id:"1-install-net"},"1. Install .NET"),(0,o.kt)("p",null,"To start building .NET apps, you need to download and install the .NET SDK (Software Development Kit)."),(0,o.kt)("p",null,"Download and install the ",(0,o.kt)("a",{parentName:"p",href:"https://dotnet.microsoft.com/en-us/download/dotnet/3.1"},".NET Core SDK"),".\nInstalling the SDK adds the dotnet toolchain to your PATH."),(0,o.kt)("p",null,"Once you've installed the .NET Core SDK, open a new command prompt or terminal. Then run ",(0,o.kt)("inlineCode",{parentName:"p"},"dotnet"),"."),(0,o.kt)("p",null,"If the command runs and prints information about how to use dotnet, you can move to the next step.\nIf you receive a ",(0,o.kt)("inlineCode",{parentName:"p"},"'dotnet' is not recognized as an internal or external command")," error, make sure\nyou opened a new command prompt or terminal before running the command."),(0,o.kt)("h3",{id:"2-install-java"},"2. Install Java"),(0,o.kt)("p",null,"Install ",(0,o.kt)("a",{parentName:"p",href:"https://www.oracle.com/java/technologies/downloads/#java8"},"Java 8.1")," for Windows and macOS,\nor ",(0,o.kt)("a",{parentName:"p",href:"https://openjdk.org/install/"},"OpenJDK 8")," for Ubuntu."),(0,o.kt)("p",null,"Select the appropriate version for your operating system. For example, select jdk-8u201-windows-x64.exe\nfor a Windows x64 machine or jdk-8u231-macosx-x64.dmg for macOS. Then, use the command java to verify the installation."),(0,o.kt)("h3",{id:"3-install-apache-spark"},"3. Install Apache Spark"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://spark.apache.org/downloads.html"},"Download and install Apache Spark")," with version >= 3.2.0.\n(SynapseML v0.11.2 only supports spark version >= 3.2.0)"),(0,o.kt)("p",null,"Extract downloaded zipped files (with 7-Zip app on Windows or ",(0,o.kt)("inlineCode",{parentName:"p"},"tar")," on linux) and remember the location of\nextracted files, we take ",(0,o.kt)("inlineCode",{parentName:"p"},"~/bin/spark-3.2.0-bin-hadoop3.2/")," as an example here."),(0,o.kt)("p",null,"Run the following commands to set the environment variables used to locate Apache Spark.\nOn Windows, make sure to run the command prompt in administrator mode."),(0,o.kt)(l.Z,{groupId:"operating-systems",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"win",label:"Windows",default:!0,mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' setx /M HADOOP_HOME C:\\bin\\spark-3.2.0-bin-hadoop3.2\\\n setx /M SPARK_HOME C:\\bin\\spark-3.2.0-bin-hadoop3.2\\\n setx /M PATH "%PATH%;%HADOOP_HOME%;%SPARK_HOME%bin" # Warning: Don\'t run this if your path is already long as it will truncate your path to 1024 characters and potentially remove entries!\n'))),(0,o.kt)(i.Z,{value:"linux",label:"Mac/Linux",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' export SPARK_HOME=~/bin/spark-3.2.0-bin-hadoop3.2/\n export PATH="$SPARK_HOME/bin:$PATH"\n source ~/.bashrc\n')))),(0,o.kt)("p",null,"Once you've installed everything and set your environment variables, open a ",(0,o.kt)("strong",{parentName:"p"},"new")," command prompt or terminal and run the following command:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"spark-submit --version\n")),(0,o.kt)("p",null,"If the command runs and prints version information, you can move to the next step."),(0,o.kt)("p",null,"If you receive a ",(0,o.kt)("inlineCode",{parentName:"p"},"'spark-submit' is not recognized as an internal or external command")," error, make sure you opened a ",(0,o.kt)("strong",{parentName:"p"},"new")," command prompt."),(0,o.kt)("h3",{id:"4-install-net-for-apache-spark"},"4. Install .NET for Apache Spark"),(0,o.kt)("p",null,"Download the ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/dotnet/spark/releases"},"Microsoft.Spark.Worker")," ",(0,o.kt)("strong",{parentName:"p"},"v2.1.1")," release from the .NET for Apache Spark GitHub.\nFor example if you're on a Windows machine and plan to use .NET Core, download the Windows x64 netcoreapp3.1 release."),(0,o.kt)("p",null,"Extract Microsoft.Spark.Worker and remember the location."),(0,o.kt)("h3",{id:"5-install-winutils-windows-only"},"5. Install WinUtils (Windows Only)"),(0,o.kt)("p",null,".NET for Apache Spark requires WinUtils to be installed alongside Apache Spark.\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/steveloughran/winutils/blob/master/hadoop-3.0.0/bin/winutils.exe"},"Download winutils.exe"),".\nThen, copy WinUtils into C:\\bin\\spark-3.2.0-bin-hadoop3.2\\bin."),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"If you're using a different version of Hadoop, select the version of WinUtils that's compatible with your version of Hadoop. You can see the Hadoop version at the end of your Spark install folder name.")),(0,o.kt)("h3",{id:"6-set-dotnet_worker_dir-and-check-dependencies"},"6. Set DOTNET_WORKER_DIR and check dependencies"),(0,o.kt)("p",null,"Run one of the following commands to set the DOTNET_WORKER_DIR environment variable, which is used by .NET apps to locate .NET for Apache Spark\nworker binaries. Make sure to replace with the directory where you downloaded and extracted the Microsoft.Spark.Worker.\nOn Windows, make sure to run the command prompt in administrator mode."),(0,o.kt)(l.Z,{groupId:"operating-systems",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"win",label:"Windows",default:!0,mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," setx /M DOTNET_WORKER_DIR \n"))),(0,o.kt)(i.Z,{value:"linux",label:"Mac/Linux",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," export DOTNET_WORKER_DIR=\n")))),(0,o.kt)("p",null,"Finally, double-check that you can run ",(0,o.kt)("inlineCode",{parentName:"p"},"dotnet, java, spark-shell")," from your command line before you move to the next section."),(0,o.kt)("h2",{id:"write-a-net-for-synapseml-app"},"Write a .NET for SynapseML App"),(0,o.kt)("h3",{id:"1-create-a-console-app"},"1. Create a console app"),(0,o.kt)("p",null,"In your command prompt or terminal, run the following commands to create a new console application:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-powershell"},"dotnet new console -o SynapseMLApp\ncd SynapseMLApp\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"dotnet")," command creates a new application of type console for you. The -o parameter creates a directory\nnamed ",(0,o.kt)("inlineCode",{parentName:"p"},"SynapseMLApp")," where your app is stored and populates it with the required files.\nThe ",(0,o.kt)("inlineCode",{parentName:"p"},"cd SynapseMLApp")," command changes the directory to the app directory you created."),(0,o.kt)("h3",{id:"2-install-nuget-package"},"2. Install NuGet package"),(0,o.kt)("p",null,"To use .NET for Apache Spark in an app, install the Microsoft.Spark package.\nIn your command prompt or terminal, run the following command:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-powershell"},"dotnet add package Microsoft.Spark --version 2.1.1\n")),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"This tutorial uses Microsoft.Spark version 2.1.1 as SynapseML 0.11.2 depends on it.\nChange to corresponding version if necessary.")),(0,o.kt)("p",null,"To use SynapseML features in the app, install SynapseML.X package.\nIn this tutorial, we use SynapseML.Cognitive as an example.\nIn your command prompt or terminal, run the following command:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-powershell"},"# Update Nuget Config to include SynapseML Feed\ndotnet nuget add source https://mmlspark.blob.core.windows.net/synapsemlnuget/index.json -n SynapseMLFeed\ndotnet add package SynapseML.Cognitive --version 0.11.2\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"dotnet nuget add")," command adds SynapseML's resolver to the source, so that our package can be found."),(0,o.kt)("h3",{id:"3-write-your-app"},"3. Write your app"),(0,o.kt)("p",null,"Open Program.cs in Visual Studio Code, or any text editor. Replace its contents with this code:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-csharp"},'using System;\nusing System.Collections.Generic;\nusing Synapse.ML.Cognitive;\nusing Microsoft.Spark.Sql;\nusing Microsoft.Spark.Sql.Types;\n\nnamespace SynapseMLApp\n{\n class Program\n { static void Main(string[] args)\n {\n // Create Spark session\n SparkSession spark =\n SparkSession\n .Builder()\n .AppName("TextSentimentExample")\n .GetOrCreate();\n\n // Create DataFrame\n DataFrame df = spark.CreateDataFrame(\n new List\n {\n new GenericRow(new object[] {"I am so happy today, its sunny!", "en-US"}),\n new GenericRow(new object[] {"I am frustrated by this rush hour traffic", "en-US"}),\n new GenericRow(new object[] {"The cognitive services on spark aint bad", "en-US"})\n },\n new StructType(new List\n {\n new StructField("text", new StringType()),\n new StructField("language", new StringType())\n })\n );\n\n // Create TextSentiment\n var model = new TextSentiment()\n .SetSubscriptionKey("YOUR_SUBSCRIPTION_KEY")\n .SetLocation("eastus")\n .SetTextCol("text")\n .SetOutputCol("sentiment")\n .SetErrorCol("error")\n .SetLanguageCol("language");\n\n // Transform\n var outputDF = model.Transform(df);\n\n // Display results\n outputDF.Show();\n\n // Stop Spark session\n spark.Stop();\n }\n }\n}\n')),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://docs.microsoft.com/en-us/dotnet/api/microsoft.spark.sql.sparksession?view=spark-dotnet"},"SparkSession")," is the entrypoint\nof Apache Spark applications, which manages the context and information of your application. A DataFrame is a way of organizing\ndata into a set of named columns."),(0,o.kt)("p",null,"Create a ",(0,o.kt)("a",{parentName:"p",href:"https://mmlspark.blob.core.windows.net/docs/0.11.2/dotnet/classSynapse_1_1ML_1_1Cognitive_1_1TextSentiment.html"},"TextSentiment"),"\ninstance, set corresponding subscription key and other configurations. Then, apply transformation to the dataframe,\nwhich analyzes the sentiment based on each row, and stores result into output column."),(0,o.kt)("p",null,"The result of the transformation is stored in another DataFrame. At this point, no operations have taken place because\n.NET for Apache Spark lazily evaluates the data. The operation defined by the call to model.Transform doesn't execute until the Show method is called to display the contents of the transformed DataFrame to the console. Once you no longer need the Spark\nsession, use the Stop method to stop your session."),(0,o.kt)("h3",{id:"4-run-your-net-app"},"4. Run your .NET App"),(0,o.kt)("p",null,"Run the following command to build your application:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-powershell"},"dotnet build\n")),(0,o.kt)("p",null,"Navigate to your build output directory. For example, in Windows you could run ",(0,o.kt)("inlineCode",{parentName:"p"},"cd bin\\Debug\\net5.0"),".\nUse the spark-submit command to submit your application to run on Apache Spark."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-powershell"},"spark-submit --class org.apache.spark.deploy.dotnet.DotnetRunner --packages com.microsoft.azure:synapseml_2.12:0.11.2 --master local microsoft-spark-3-2_2.12-2.1.1.jar dotnet SynapseMLApp.dll\n")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"--packages com.microsoft.azure:synapseml_2.12:0.11.2")," specifies the dependency on synapseml_2.12 version 0.11.2;\n",(0,o.kt)("inlineCode",{parentName:"p"},"microsoft-spark-3-2_2.12-2.1.1.jar")," specifies Microsoft.Spark version 2.1.1 and Spark version 3.2"),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"This command assumes you have downloaded Apache Spark and added it to your PATH environment variable so that you can use spark-submit.\nOtherwise, you'd have to use the full path (for example, C:\\bin\\apache-spark\\bin\\spark-submit or ~/spark/bin/spark-submit).")),(0,o.kt)("p",null,"When your app runs, the sentiment analysis result is written to the console."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"+-----------------------------------------+--------+-----+--------------------------------------------------+\n| text|language|error| sentiment|\n+-----------------------------------------+--------+-----+--------------------------------------------------+\n| I am so happy today, its sunny!| en-US| null|[{positive, null, {0.99, 0.0, 0.0}, [{I am so h...|\n|I am frustrated by this rush hour traffic| en-US| null|[{negative, null, {0.0, 0.0, 0.99}, [{I am frus...|\n| The cognitive services on spark aint bad| en-US| null|[{negative, null, {0.0, 0.01, 0.99}, [{The cogn...|\n+-----------------------------------------+--------+-----+--------------------------------------------------+\n")),(0,o.kt)("p",null,"Congratulations! You successfully authored and ran a .NET for SynapseML app.\nRefer to the ",(0,o.kt)("a",{parentName:"p",href:"https://mmlspark.blob.core.windows.net/docs/0.11.2/dotnet/index.html"},"developer docs")," for API guidance."),(0,o.kt)("h2",{id:"next"},"Next"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Refer to this ",(0,o.kt)("a",{parentName:"li",href:"https://docs.microsoft.com/en-us/dotnet/spark/tutorials/databricks-deployment"},"tutorial")," for deploying a .NET app to Databricks."),(0,o.kt)("li",{parentName:"ul"},"You could download compatible ",(0,o.kt)("a",{parentName:"li",href:"https://mmlspark.blob.core.windows.net/publicwasb/dotnet/install-worker.sh"},"install-worker.sh"),"\nand ",(0,o.kt)("a",{parentName:"li",href:"https://mmlspark.blob.core.windows.net/publicwasb/dotnet/db-init.sh"},"db-init.sh")," files needed for deployment on Databricks.")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f85db098.89def151.js b/assets/js/f85db098.89def151.js deleted file mode 100644 index 5b4a3042fa..0000000000 --- a/assets/js/f85db098.89def151.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[5049],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return m}});var a=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},u=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=p(t),m=o,h=d["".concat(s,".").concat(m)]||d[m]||c[m]||r;return t?a.createElement(h,l(l({ref:n},u),{},{components:t})):a.createElement(h,l({ref:n},u))}));function m(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var r=t.length,l=new Array(r);l[0]=d;var i={};for(var s in n)hasOwnProperty.call(n,s)&&(i[s]=n[s]);i.originalType=e,i.mdxType="string"==typeof e?e:o,l[1]=i;for(var p=2;p child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),v=null!=h?h:y.map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes}})),b=(0,i.l)(v,(function(e,n){return e.value===n.value}));if(b.length>0)throw new Error('Docusaurus error: Duplicate values "'+b.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var w=null===m?m:null!=(n=null!=m?m:null==(t=y.find((function(e){return e.props.default})))?void 0:t.props.value)?n:y[0].props.value;if(null!==w&&!v.some((function(e){return e.value===w})))throw new Error('Docusaurus error: The has a defaultValue "'+w+'" but none of its children has the corresponding value. Available values are: '+v.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var g=(0,s.U)(),S=g.tabGroupChoices,T=g.setTabGroupChoices,N=(0,o.useState)(w),E=N[0],x=N[1],O=[],D=(0,p.o5)().blockElementScrollPositionUntilNextRender;if(null!=k){var I=S[k];null!=I&&I!==E&&v.some((function(e){return e.value===I}))&&x(I)}var R=function(e){var n=e.currentTarget,t=O.indexOf(n),a=v[t].value;a!==E&&(D(n),x(a),null!=k&&T(k,String(a)))},M=function(e){var n,t=null;switch(e.key){case"Enter":R(e);break;case"ArrowRight":var a,o=O.indexOf(e.currentTarget)+1;t=null!=(a=O[o])?a:O[0];break;case"ArrowLeft":var r,l=O.indexOf(e.currentTarget)-1;t=null!=(r=O[l])?r:O[O.length-1]}null==(n=t)||n.focus()};return o.createElement("div",{className:(0,r.Z)("tabs-container",u)},o.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":d},f)},v.map((function(e){var n=e.value,t=e.label,l=e.attributes;return o.createElement("li",(0,a.Z)({role:"tab",tabIndex:E===n?0:-1,"aria-selected":E===n,key:n,ref:function(e){return O.push(e)},onKeyDown:M,onClick:R},l,{className:(0,r.Z)("tabs__item",c,null==l?void 0:l.className,{"tabs__item--active":E===n})}),null!=t?t:n)}))),l?(0,o.cloneElement)(y.filter((function(e){return e.props.value===E}))[0],{className:"margin-top--md"}):o.createElement("div",{className:"margin-top--md"},y.map((function(e,n){return(0,o.cloneElement)(e,{key:n,hidden:e.props.value!==E})}))))}function m(e){var n=(0,l.Z)();return o.createElement(d,(0,a.Z)({key:String(n)},e))}},5102:function(e,n,t){t.r(n),t.d(n,{assets:function(){return d},contentTitle:function(){return u},default:function(){return k},frontMatter:function(){return p},metadata:function(){return c},toc:function(){return m}});var a=t(3117),o=t(102),r=(t(7294),t(3905)),l=t(5488),i=t(5162),s=["components"],p={title:".NET setup",hide_title:!0,sidebar_label:".NET setup",description:".NET setup"},u=".NET setup and example for SynapseML",c={unversionedId:"Reference/Dotnet Setup",id:"Reference/Dotnet Setup",title:".NET setup",description:".NET setup",source:"@site/docs/Reference/Dotnet Setup.md",sourceDirName:"Reference",slug:"/Reference/Dotnet Setup",permalink:"/SynapseML/docs/Reference/Dotnet Setup",draft:!1,tags:[],version:"current",frontMatter:{title:".NET setup",hide_title:!0,sidebar_label:".NET setup",description:".NET setup"},sidebar:"docs",previous:{title:"R setup",permalink:"/SynapseML/docs/Reference/R Setup"},next:{title:"Quickstart - LightGBM in Dotnet",permalink:"/SynapseML/docs/Reference/Quickstart - LightGBM in Dotnet"}},d={},m=[{value:"Installation",id:"installation",level:2},{value:"1. Install .NET",id:"1-install-net",level:3},{value:"2. Install Java",id:"2-install-java",level:3},{value:"3. Install Apache Spark",id:"3-install-apache-spark",level:3},{value:"4. Install .NET for Apache Spark",id:"4-install-net-for-apache-spark",level:3},{value:"5. Install WinUtils (Windows Only)",id:"5-install-winutils-windows-only",level:3},{value:"6. Set DOTNET_WORKER_DIR and check dependencies",id:"6-set-dotnet_worker_dir-and-check-dependencies",level:3},{value:"Write a .NET for SynapseML App",id:"write-a-net-for-synapseml-app",level:2},{value:"1. Create a console app",id:"1-create-a-console-app",level:3},{value:"2. Install NuGet package",id:"2-install-nuget-package",level:3},{value:"3. Write your app",id:"3-write-your-app",level:3},{value:"4. Run your .NET App",id:"4-run-your-net-app",level:3},{value:"Next",id:"next",level:2}],h={toc:m};function k(e){var n=e.components,t=(0,o.Z)(e,s);return(0,r.kt)("wrapper",(0,a.Z)({},h,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"net-setup-and-example-for-synapseml"},".NET setup and example for SynapseML"),(0,r.kt)("h2",{id:"installation"},"Installation"),(0,r.kt)("h3",{id:"1-install-net"},"1. Install .NET"),(0,r.kt)("p",null,"To start building .NET apps, you need to download and install the .NET SDK (Software Development Kit)."),(0,r.kt)("p",null,"Download and install the ",(0,r.kt)("a",{parentName:"p",href:"https://dotnet.microsoft.com/en-us/download/dotnet/3.1"},".NET Core SDK"),".\nInstalling the SDK adds the dotnet toolchain to your PATH."),(0,r.kt)("p",null,"Once you've installed the .NET Core SDK, open a new command prompt or terminal. Then run ",(0,r.kt)("inlineCode",{parentName:"p"},"dotnet"),"."),(0,r.kt)("p",null,"If the command runs and prints information about how to use dotnet, you can move to the next step.\nIf you receive a ",(0,r.kt)("inlineCode",{parentName:"p"},"'dotnet' is not recognized as an internal or external command")," error, make sure\nyou opened a new command prompt or terminal before running the command."),(0,r.kt)("h3",{id:"2-install-java"},"2. Install Java"),(0,r.kt)("p",null,"Install ",(0,r.kt)("a",{parentName:"p",href:"https://www.oracle.com/java/technologies/downloads/#java8"},"Java 8.1")," for Windows and macOS,\nor ",(0,r.kt)("a",{parentName:"p",href:"https://openjdk.org/install/"},"OpenJDK 8")," for Ubuntu."),(0,r.kt)("p",null,"Select the appropriate version for your operating system. For example, select jdk-8u201-windows-x64.exe\nfor a Windows x64 machine or jdk-8u231-macosx-x64.dmg for macOS. Then, use the command java to verify the installation."),(0,r.kt)("h3",{id:"3-install-apache-spark"},"3. Install Apache Spark"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://spark.apache.org/downloads.html"},"Download and install Apache Spark")," with version >= 3.2.0.\n(SynapseML v0.11.2 only supports spark version >= 3.2.0)"),(0,r.kt)("p",null,"Extract downloaded zipped files (with 7-Zip app on Windows or ",(0,r.kt)("inlineCode",{parentName:"p"},"tar")," on linux) and remember the location of\nextracted files, we take ",(0,r.kt)("inlineCode",{parentName:"p"},"~/bin/spark-3.2.0-bin-hadoop3.2/")," as an example here."),(0,r.kt)("p",null,"Run the following commands to set the environment variables used to locate Apache Spark.\nOn Windows, make sure to run the command prompt in administrator mode."),(0,r.kt)(l.Z,{groupId:"operating-systems",mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"win",label:"Windows",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},' setx /M HADOOP_HOME C:\\bin\\spark-3.2.0-bin-hadoop3.2\\\n setx /M SPARK_HOME C:\\bin\\spark-3.2.0-bin-hadoop3.2\\\n setx /M PATH "%PATH%;%HADOOP_HOME%;%SPARK_HOME%bin" # Warning: Don\'t run this if your path is already long as it will truncate your path to 1024 characters and potentially remove entries!\n'))),(0,r.kt)(i.Z,{value:"linux",label:"Mac/Linux",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},' export SPARK_HOME=~/bin/spark-3.2.0-bin-hadoop3.2/\n export PATH="$SPARK_HOME/bin:$PATH"\n source ~/.bashrc\n')))),(0,r.kt)("p",null,"Once you've installed everything and set your environment variables, open a ",(0,r.kt)("strong",{parentName:"p"},"new")," command prompt or terminal and run the following command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"spark-submit --version\n")),(0,r.kt)("p",null,"If the command runs and prints version information, you can move to the next step."),(0,r.kt)("p",null,"If you receive a ",(0,r.kt)("inlineCode",{parentName:"p"},"'spark-submit' is not recognized as an internal or external command")," error, make sure you opened a ",(0,r.kt)("strong",{parentName:"p"},"new")," command prompt."),(0,r.kt)("h3",{id:"4-install-net-for-apache-spark"},"4. Install .NET for Apache Spark"),(0,r.kt)("p",null,"Download the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/dotnet/spark/releases"},"Microsoft.Spark.Worker")," ",(0,r.kt)("strong",{parentName:"p"},"v2.1.1")," release from the .NET for Apache Spark GitHub.\nFor example if you're on a Windows machine and plan to use .NET Core, download the Windows x64 netcoreapp3.1 release."),(0,r.kt)("p",null,"Extract Microsoft.Spark.Worker and remember the location."),(0,r.kt)("h3",{id:"5-install-winutils-windows-only"},"5. Install WinUtils (Windows Only)"),(0,r.kt)("p",null,".NET for Apache Spark requires WinUtils to be installed alongside Apache Spark.\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/steveloughran/winutils/blob/master/hadoop-3.0.0/bin/winutils.exe"},"Download winutils.exe"),".\nThen, copy WinUtils into C:\\bin\\spark-3.2.0-bin-hadoop3.2\\bin."),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"If you're using a different version of Hadoop, select the version of WinUtils that's compatible with your version of Hadoop. You can see the Hadoop version at the end of your Spark install folder name.")),(0,r.kt)("h3",{id:"6-set-dotnet_worker_dir-and-check-dependencies"},"6. Set DOTNET_WORKER_DIR and check dependencies"),(0,r.kt)("p",null,"Run one of the following commands to set the DOTNET_WORKER_DIR environment variable, which is used by .NET apps to locate .NET for Apache Spark\nworker binaries. Make sure to replace with the directory where you downloaded and extracted the Microsoft.Spark.Worker.\nOn Windows, make sure to run the command prompt in administrator mode."),(0,r.kt)(l.Z,{groupId:"operating-systems",mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"win",label:"Windows",default:!0,mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"}," setx /M DOTNET_WORKER_DIR \n"))),(0,r.kt)(i.Z,{value:"linux",label:"Mac/Linux",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"}," export DOTNET_WORKER_DIR=\n")))),(0,r.kt)("p",null,"Finally, double-check that you can run ",(0,r.kt)("inlineCode",{parentName:"p"},"dotnet, java, spark-shell")," from your command line before you move to the next section."),(0,r.kt)("h2",{id:"write-a-net-for-synapseml-app"},"Write a .NET for SynapseML App"),(0,r.kt)("h3",{id:"1-create-a-console-app"},"1. Create a console app"),(0,r.kt)("p",null,"In your command prompt or terminal, run the following commands to create a new console application:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-powershell"},"dotnet new console -o SynapseMLApp\ncd SynapseMLApp\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"dotnet")," command creates a new application of type console for you. The -o parameter creates a directory\nnamed ",(0,r.kt)("inlineCode",{parentName:"p"},"SynapseMLApp")," where your app is stored and populates it with the required files.\nThe ",(0,r.kt)("inlineCode",{parentName:"p"},"cd SynapseMLApp")," command changes the directory to the app directory you created."),(0,r.kt)("h3",{id:"2-install-nuget-package"},"2. Install NuGet package"),(0,r.kt)("p",null,"To use .NET for Apache Spark in an app, install the Microsoft.Spark package.\nIn your command prompt or terminal, run the following command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-powershell"},"dotnet add package Microsoft.Spark --version 2.1.1\n")),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"This tutorial uses Microsoft.Spark version 2.1.1 as SynapseML 0.11.2 depends on it.\nChange to corresponding version if necessary.")),(0,r.kt)("p",null,"To use SynapseML features in the app, install SynapseML.X package.\nIn this tutorial, we use SynapseML.Cognitive as an example.\nIn your command prompt or terminal, run the following command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-powershell"},"# Update Nuget Config to include SynapseML Feed\ndotnet nuget add source https://mmlspark.blob.core.windows.net/synapsemlnuget/index.json -n SynapseMLFeed\ndotnet add package SynapseML.Cognitive --version 0.11.2\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"dotnet nuget add")," command adds SynapseML's resolver to the source, so that our package can be found."),(0,r.kt)("h3",{id:"3-write-your-app"},"3. Write your app"),(0,r.kt)("p",null,"Open Program.cs in Visual Studio Code, or any text editor. Replace its contents with this code:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},'using System;\nusing System.Collections.Generic;\nusing Synapse.ML.Cognitive;\nusing Microsoft.Spark.Sql;\nusing Microsoft.Spark.Sql.Types;\n\nnamespace SynapseMLApp\n{\n class Program\n { static void Main(string[] args)\n {\n // Create Spark session\n SparkSession spark =\n SparkSession\n .Builder()\n .AppName("TextSentimentExample")\n .GetOrCreate();\n\n // Create DataFrame\n DataFrame df = spark.CreateDataFrame(\n new List\n {\n new GenericRow(new object[] {"I am so happy today, its sunny!", "en-US"}),\n new GenericRow(new object[] {"I am frustrated by this rush hour traffic", "en-US"}),\n new GenericRow(new object[] {"The cognitive services on spark aint bad", "en-US"})\n },\n new StructType(new List\n {\n new StructField("text", new StringType()),\n new StructField("language", new StringType())\n })\n );\n\n // Create TextSentiment\n var model = new TextSentiment()\n .SetSubscriptionKey("YOUR_SUBSCRIPTION_KEY")\n .SetLocation("eastus")\n .SetTextCol("text")\n .SetOutputCol("sentiment")\n .SetErrorCol("error")\n .SetLanguageCol("language");\n\n // Transform\n var outputDF = model.Transform(df);\n\n // Display results\n outputDF.Show();\n\n // Stop Spark session\n spark.Stop();\n }\n }\n}\n')),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://docs.microsoft.com/en-us/dotnet/api/microsoft.spark.sql.sparksession?view=spark-dotnet"},"SparkSession")," is the entrypoint\nof Apache Spark applications, which manages the context and information of your application. A DataFrame is a way of organizing\ndata into a set of named columns."),(0,r.kt)("p",null,"Create a ",(0,r.kt)("a",{parentName:"p",href:"https://mmlspark.blob.core.windows.net/docs/0.11.2/dotnet/classSynapse_1_1ML_1_1Cognitive_1_1TextSentiment.html"},"TextSentiment"),"\ninstance, set corresponding subscription key and other configurations. Then, apply transformation to the dataframe,\nwhich analyzes the sentiment based on each row, and stores result into output column."),(0,r.kt)("p",null,"The result of the transformation is stored in another DataFrame. At this point, no operations have taken place because\n.NET for Apache Spark lazily evaluates the data. The operation defined by the call to model.Transform doesn't execute until the Show method is called to display the contents of the transformed DataFrame to the console. Once you no longer need the Spark\nsession, use the Stop method to stop your session."),(0,r.kt)("h3",{id:"4-run-your-net-app"},"4. Run your .NET App"),(0,r.kt)("p",null,"Run the following command to build your application:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-powershell"},"dotnet build\n")),(0,r.kt)("p",null,"Navigate to your build output directory. For example, in Windows you could run ",(0,r.kt)("inlineCode",{parentName:"p"},"cd bin\\Debug\\net5.0"),".\nUse the spark-submit command to submit your application to run on Apache Spark."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-powershell"},"spark-submit --class org.apache.spark.deploy.dotnet.DotnetRunner --packages com.microsoft.azure:synapseml_2.12:0.11.2 --master local microsoft-spark-3-2_2.12-2.1.1.jar dotnet SynapseMLApp.dll\n")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"--packages com.microsoft.azure:synapseml_2.12:0.11.2")," specifies the dependency on synapseml_2.12 version 0.11.2;\n",(0,r.kt)("inlineCode",{parentName:"p"},"microsoft-spark-3-2_2.12-2.1.1.jar")," specifies Microsoft.Spark version 2.1.1 and Spark version 3.2"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"This command assumes you have downloaded Apache Spark and added it to your PATH environment variable so that you can use spark-submit.\nOtherwise, you'd have to use the full path (for example, C:\\bin\\apache-spark\\bin\\spark-submit or ~/spark/bin/spark-submit).")),(0,r.kt)("p",null,"When your app runs, the sentiment analysis result is written to the console."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"+-----------------------------------------+--------+-----+--------------------------------------------------+\n| text|language|error| sentiment|\n+-----------------------------------------+--------+-----+--------------------------------------------------+\n| I am so happy today, its sunny!| en-US| null|[{positive, null, {0.99, 0.0, 0.0}, [{I am so h...|\n|I am frustrated by this rush hour traffic| en-US| null|[{negative, null, {0.0, 0.0, 0.99}, [{I am frus...|\n| The cognitive services on spark aint bad| en-US| null|[{negative, null, {0.0, 0.01, 0.99}, [{The cogn...|\n+-----------------------------------------+--------+-----+--------------------------------------------------+\n")),(0,r.kt)("p",null,"Congratulations! You successfully authored and ran a .NET for SynapseML app.\nRefer to the ",(0,r.kt)("a",{parentName:"p",href:"https://mmlspark.blob.core.windows.net/docs/0.11.2/dotnet/index.html"},"developer docs")," for API guidance."),(0,r.kt)("h2",{id:"next"},"Next"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Refer to this ",(0,r.kt)("a",{parentName:"li",href:"https://docs.microsoft.com/en-us/dotnet/spark/tutorials/databricks-deployment"},"tutorial")," for deploying a .NET app to Databricks."),(0,r.kt)("li",{parentName:"ul"},"You could download compatible ",(0,r.kt)("a",{parentName:"li",href:"https://mmlspark.blob.core.windows.net/publicwasb/dotnet/install-worker.sh"},"install-worker.sh"),"\nand ",(0,r.kt)("a",{parentName:"li",href:"https://mmlspark.blob.core.windows.net/publicwasb/dotnet/db-init.sh"},"db-init.sh")," files needed for deployment on Databricks.")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.2e72ba3c.js b/assets/js/main.2e72ba3c.js new file mode 100644 index 0000000000..8f0a6dfe95 --- /dev/null +++ b/assets/js/main.2e72ba3c.js @@ -0,0 +1,2 @@ +/*! For license information please see main.2e72ba3c.js.LICENSE.txt */ +(self.webpackChunksynapseml=self.webpackChunksynapseml||[]).push([[179],{830:function(e,t,n){"use strict";n.d(t,{W:function(){return a}});var r=n(7294);function a(){return r.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},r.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}},723:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(7294),a=n(3117),o=n(8356),i=n.n(o),s=n(6887),l={"0349e4f0":[function(){return n.e(8524).then(n.bind(n,4930))},"@site/docs/Explore Algorithms/AI Services/Advanced Usage - Async, Batching, and Multi-Key.md",4930],"0a954229":[function(){return n.e(9088).then(n.bind(n,4489))},"@site/docs/Explore Algorithms/AI Services/Quickstart - Predictive Maintenance.md",4489],"0e3f998d":[function(){return n.e(4482).then(n.bind(n,7479))},"@site/docs/Explore Algorithms/AI Services/Quickstart - Analyze Celebrity Quotes.md",7479],"0fb98d33":[function(){return n.e(6338).then(n.bind(n,3159))},"@site/docs/Explore Algorithms/Causal Inference/Quickstart - Measure Heterogeneous Effects.md",3159],"104bf0a6":[function(){return n.e(8314).then(n.bind(n,5734))},"@site/docs/Reference/Contributor Guide.md",5734],"120352d6":[function(){return n.e(9262).then(n.bind(n,7608))},"@site/docs/Explore Algorithms/OpenAI/Quickstart - Understand and Search Forms.md",7608],17896441:[function(){return Promise.all([n.e(532),n.e(2220),n.e(7918)]).then(n.bind(n,8945))},"@theme/DocItem",8945],"1a4e3797":[function(){return Promise.all([n.e(532),n.e(7920)]).then(n.bind(n,9172))},"@theme/SearchPage",9172],"1abf1e18":[function(){return n.e(5343).then(n.bind(n,7819))},"@site/blog/2019-08-24-Welcome to Azure Cognitive Services.md",7819],"1b3ab3b8":[function(){return Promise.all([n.e(532),n.e(3431)]).then(n.bind(n,3630))},"@site/docs/Quick Examples/transformers/transformers_cognitive.md",3630],"1b7af47d":[function(){return n.e(4273).then(n.bind(n,1611))},"@site/docs/Explore Algorithms/AI Services/Quickstart - Create Audiobooks.md",1611],"1be78505":[function(){return Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,9963))},"@theme/DocPage",9963],"1d820955":[function(){return n.e(1913).then(n.bind(n,8442))},"@site/docs/Explore Algorithms/LightGBM/Overview.md",8442],"1db1f785":[function(){return n.e(950).then(n.bind(n,6420))},"@site/docs/Reference/Developer Setup.md",6420],"1e14124f":[function(){return n.e(6350).then(n.bind(n,5821))},"@site/docs/Explore Algorithms/Classification/Quickstart - Vowpal Wabbit on Text Data.md",5821],"2137a7cd":[function(){return n.e(1391).then(n.bind(n,3295))},"@site/docs/Explore Algorithms/Responsible AI/Interpreting Model Predictions.md",3295],"2406587d":[function(){return n.e(9119).then(n.bind(n,4519))},"@site/docs/Explore Algorithms/Responsible AI/Quickstart - Data Balance Analysis.md",4519],"283b8f99":[function(){return n.e(5521).then(n.bind(n,1404))},"@site/docs/Get Started/Quickstart - Your First Models.md",1404],"2b30bc14":[function(){return n.e(9603).then(n.bind(n,2876))},"@site/blog/2019-08-24-Welcome to Azure Cognitive Services.md?truncated=true",2876],"2bcda99e":[function(){return n.e(3941).then(n.bind(n,1368))},"@site/docs/Explore Algorithms/Classification/Quickstart - Vowpal Wabbit on Tabular Data.md",1368],"2c98ca3e":[function(){return n.e(2106).then(n.bind(n,6036))},"@site/docs/Deploy Models/Quickstart - Deploying a Classifier.md",6036],"2d527871":[function(){return n.e(8749).then(n.bind(n,527))},"@site/docs/Explore Algorithms/Vowpal Wabbit/Multi-class classification.md",527],"2d5b0e6a":[function(){return n.e(8957).then(n.bind(n,3468))},"@site/blog/2018-04-01-Flexible and Scalable Deep Learning with MMLSpark.md?truncated=true",3468],"2e5f4263":[function(){return n.e(2447).then(n.bind(n,8126))},"@site/docs/Explore Algorithms/Regression/Quickstart - Data Cleaning.md",8126],"318ccb43":[function(){return n.e(3377).then(n.bind(n,2979))},"@site/docs/Explore Algorithms/AI Services/Geospatial Services.md",2979],"31bb7274":[function(){return n.e(7394).then(n.bind(n,2024))},"@site/docs/Explore Algorithms/Regression/Quickstart - Train Regressor.md",2024],"33b3776b":[function(){return n.e(5254).then(n.bind(n,7046))},"@site/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification using SparkML Vectors.md",7046],"34f00221":[function(){return Promise.all([n.e(532),n.e(7853),n.e(6454)]).then(n.bind(n,3785))},"@site/src/pages/videos.js",3785],"34ff21b6":[function(){return Promise.all([n.e(532),n.e(9362)]).then(n.bind(n,3488))},"@site/docs/Quick Examples/estimators/estimators_cognitive.md",3488],"3bed3e2f":[function(){return n.e(8846).then(n.bind(n,8189))},"@site/docs/Explore Algorithms/Classification/Quickstart - SparkML vs SynapseML.md",8189],"3fb29942":[function(){return n.e(9559).then(n.t.bind(n,4469,19))},"/home/vsts/work/1/s/website/.docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json",4469],"40b49758":[function(){return n.e(7069).then(n.bind(n,3548))},"@site/docs/Explore Algorithms/Hyperparameter Tuning/HyperOpt.md",3548],"41ee0cff":[function(){return n.e(5702).then(n.bind(n,5380))},"@site/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification using VW-native Format.md",5380],"41f327fc":[function(){return n.e(8966).then(n.bind(n,1631))},"@site/docs/Explore Algorithms/Classification/Quickstart - Train Classifier.md",1631],"42736d5f":[function(){return n.e(2947).then(n.bind(n,5348))},"@site/docs/Explore Algorithms/Deep Learning/Getting Started.md",5348],"44ff0d07":[function(){return n.e(5437).then(n.bind(n,2634))},"@site/docs/Reference/R Setup.md",2634],"48cf7354":[function(){return n.e(2994).then(n.bind(n,2516))},"@site/docs/Explore Algorithms/Responsible AI/Tabular Explainers.md",2516],"51dbb02f":[function(){return n.e(6975).then(n.bind(n,1091))},"@site/docs/Explore Algorithms/Responsible AI/Explanation Dashboard.md",1091],"521f9727":[function(){return Promise.all([n.e(532),n.e(1333)]).then(n.bind(n,6202))},"@site/docs/Quick Examples/estimators/estimators_causal.md",6202],"5225b7e0":[function(){return n.e(3249).then(n.bind(n,5101))},"@site/docs/Explore Algorithms/LightGBM/Quickstart - Classification, Ranking, and Regression.md",5101],52311380:[function(){return n.e(9901).then(n.bind(n,8517))},"@site/docs/Explore Algorithms/AI Services/Quickstart - Creare a Visual Search Engine.md",8517],"52880d18":[function(){return n.e(2750).then(n.bind(n,8124))},"@site/docs/Explore Algorithms/OpenAI/Quickstart - OpenAI Embedding.md",8124],"561bd03d":[function(){return n.e(2185).then(n.bind(n,7308))},"@site/blog/2020-12-01-Large-Scale Intelligent Microservices.md",7308],"57ef17c5":[function(){return n.e(5602).then(n.bind(n,2569))},"@site/docs/Explore Algorithms/AI Services/Quickstart - Analyze Text.md",2569],"5b779334":[function(){return n.e(6833).then(n.bind(n,8864))},"@site/docs/Reference/Quickstart - LightGBM in Dotnet.md",8864],"5e7c3303":[function(){return n.e(8781).then(n.bind(n,2613))},"@site/docs/Explore Algorithms/Deep Learning/Distributed Training.md",2613],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,6809))},"@generated/docusaurus.config",6809],"5eddefdd":[function(){return n.e(13).then(n.bind(n,1820))},"@site/docs/Explore Algorithms/Deep Learning/Quickstart - ONNX Model Inference.md",1820],"610d430a":[function(){return n.e(659).then(n.bind(n,3728))},"@site/docs/Explore Algorithms/Vowpal Wabbit/Overview.md",3728],"627aefca":[function(){return n.e(301).then(n.t.bind(n,5745,19))},"/home/vsts/work/1/s/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],"645abc7d":[function(){return n.e(1836).then(n.bind(n,2321))},"@site/docs/Reference/Docker Setup.md",2321],"66fcb786":[function(){return n.e(7597).then(n.bind(n,9554))},"@site/docs/Explore Algorithms/Regression/Quickstart - Vowpal Wabbit and LightGBM.md",9554],"69bb4b11":[function(){return Promise.all([n.e(532),n.e(288)]).then(n.bind(n,4233))},"@site/docs/Quick Examples/transformers/transformers_opencv.md",4233],"69dc6d0a":[function(){return n.e(9161).then(n.bind(n,4325))},"@site/docs/Explore Algorithms/Responsible AI/Data Balance Analysis.md",4325],"6a07b55e":[function(){return n.e(406).then(n.bind(n,4243))},"@site/docs/Explore Algorithms/Deep Learning/Quickstart - Fine-tune a Text Classifier.md",4243],"6a95f87e":[function(){return n.e(3796).then(n.t.bind(n,6800,19))},"~blog/default/synapse-ml-blog-963.json",6800],"73c2022c":[function(){return n.e(847).then(n.bind(n,2422))},"@site/docs/Get Started/Install SynapseML.md",2422],"792eae7e":[function(){return Promise.all([n.e(532),n.e(4275)]).then(n.bind(n,8117))},"@site/docs/Quick Examples/estimators/estimators_lightgbm.md",8117],"814f3328":[function(){return n.e(2535).then(n.t.bind(n,5641,19))},"~blog/default/blog-post-list-prop-default.json",5641],"83586bff":[function(){return n.e(7001).then(n.bind(n,2760))},"@site/docs/Explore Algorithms/OpenCV/Image Transformations.md",2760],"8590feaa":[function(){return Promise.all([n.e(532),n.e(1871)]).then(n.bind(n,3505))},"@site/docs/Quick Examples/transformers/transformers_vw.md",3505],"88e44e99":[function(){return Promise.all([n.e(532),n.e(8817)]).then(n.bind(n,4859))},"@site/docs/Quick Examples/estimators/estimators_vw.md",4859],"8cb11643":[function(){return n.e(5974).then(n.bind(n,8169))},"@site/blog/2019-10-02-MMLSpark empowering AI for Good with Mark Hamilton.md?truncated=true",8169],"8eb438b4":[function(){return n.e(5043).then(n.bind(n,4540))},"@site/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification, Quantile Regression, and Regression.md",4540],"905ce8b5":[function(){return n.e(9535).then(n.bind(n,4527))},"@site/docs/Explore Algorithms/Hyperparameter Tuning/Quickstart - Random Search.md",4527],"90e4432b":[function(){return n.e(5095).then(n.bind(n,814))},"@site/docs/Explore Algorithms/Deep Learning/Quickstart - Fine-tune a Vision Classifier.md",814],"91e9cb67":[function(){return n.e(3443).then(n.bind(n,1766))},"@site/docs/Explore Algorithms/Other Algorithms/Smart Adaptive Recommendations.md",1766],"935f2afb":[function(){return n.e(53).then(n.t.bind(n,1109,19))},"~docs/default/version-current-metadata-prop-751.json",1109],"94d743d6":[function(){return n.e(4579).then(n.bind(n,2815))},"@site/docs/Deploy Models/Overview.md",2815],"96cf5ff0":[function(){return n.e(6135).then(n.bind(n,5761))},"@site/docs/Explore Algorithms/OpenAI/OpenAI.md",5761],"97592aac":[function(){return n.e(653).then(n.bind(n,6490))},"@site/docs/Explore Algorithms/AI Services/Quickstart - Flooding Risk.md",6490],"9783ff24":[function(){return Promise.all([n.e(532),n.e(9006)]).then(n.bind(n,9448))},"@site/docs/Quick Examples/estimators/estimators_core.md",9448],"9c279ae7":[function(){return n.e(196).then(n.bind(n,1257))},"@site/docs/Explore Algorithms/Other Algorithms/Quickstart - Anomalous Access Detection.md",1257],"9da9112f":[function(){return n.e(8006).then(n.bind(n,1363))},"@site/docs/Explore Algorithms/Other Algorithms/Quickstart - Exploring Art Across Cultures.md",1363],"9e4087bc":[function(){return n.e(3608).then(n.bind(n,3169))},"@theme/BlogArchivePage",3169],a19ce767:[function(){return n.e(9463).then(n.bind(n,2152))},"@site/docs/Get Started/Create a Spark Cluster.md",2152],a6191053:[function(){return n.e(927).then(n.bind(n,4736))},"@site/docs/Use with MLFlow/Overview.md",4736],a6aa9e1f:[function(){return Promise.all([n.e(532),n.e(2220),n.e(6048),n.e(3089)]).then(n.bind(n,3269))},"@theme/BlogListPage",3269],a81cf8b0:[function(){return n.e(40).then(n.bind(n,8943))},"@site/docs/Explore Algorithms/Vowpal Wabbit/Contextual Bandits.md",8943],ab9a8589:[function(){return n.e(707).then(n.bind(n,1167))},"@site/blog/2019-06-01-MMLSpark Unifying Machine Learning Ecosystems at Massive Scales.md?truncated=true",1167],b2be3901:[function(){return n.e(9775).then(n.bind(n,3907))},"@site/docs/Get Started/Set up Cognitive Services.md",3907],b4a95996:[function(){return n.e(1478).then(n.bind(n,1973))},"@site/docs/Explore Algorithms/Anomaly Detection/Quickstart - Isolation Forests.md",1973],b5375b6f:[function(){return n.e(1428).then(n.bind(n,7902))},"@site/docs/Explore Algorithms/Responsible AI/PDP and ICE Explainers.md",7902],b72abe57:[function(){return n.e(2195).then(n.bind(n,3847))},"@site/blog/2020-12-01-Large-Scale Intelligent Microservices.md?truncated=true",3847],b83021be:[function(){return n.e(587).then(n.bind(n,6283))},"@site/docs/Explore Algorithms/Causal Inference/Overview.md",6283],b962e007:[function(){return n.e(4594).then(n.bind(n,6495))},"@site/blog/2019-10-02-MMLSpark empowering AI for Good with Mark Hamilton.md",6495],bb7a48da:[function(){return Promise.all([n.e(532),n.e(9242)]).then(n.bind(n,2528))},"@site/docs/Quick Examples/transformers/transformers_core.md",2528],bc6a9944:[function(){return n.e(8462).then(n.bind(n,8334))},"@site/docs/Explore Algorithms/Responsible AI/Quickstart - Snow Leopard Detection.md",8334],bd1bcb2c:[function(){return n.e(5584).then(n.bind(n,6193))},"@site/docs/Explore Algorithms/Deep Learning/Quickstart - Transfer Learn for Image Classification.md",6193],c0391845:[function(){return n.e(3234).then(n.bind(n,6422))},"@site/docs/Explore Algorithms/AI Services/Quickstart - Document Question and Answering with PDFs.md",6422],c3c516ff:[function(){return n.e(5752).then(n.bind(n,8928))},"@site/blog/overview.md?truncated=true",8928],c4f5d8e4:[function(){return Promise.all([n.e(532),n.e(7780),n.e(4195)]).then(n.bind(n,5567))},"@site/src/pages/index.js",5567],c5c95e45:[function(){return n.e(4422).then(n.bind(n,3290))},"@site/docs/Explore Algorithms/Responsible AI/Image Explainers.md",3290],c95882d3:[function(){return n.e(1153).then(n.bind(n,9210))},"@site/docs/Use with MLFlow/Autologging.md",9210],cb5f1a06:[function(){return n.e(4528).then(n.bind(n,5346))},"@site/blog/overview.md",5346],cbc3190d:[function(){return n.e(5488).then(n.bind(n,5418))},"@site/docs/Overview.md",5418],ccc49370:[function(){return Promise.all([n.e(532),n.e(2220),n.e(6048),n.e(6103)]).then(n.bind(n,5203))},"@theme/BlogPostPage",5203],d13e532e:[function(){return n.e(8146).then(n.bind(n,398))},"@site/docs/Explore Algorithms/Responsible AI/Text Explainers.md",398],d175df5e:[function(){return n.e(2805).then(n.t.bind(n,7812,19))},"~blog/default/synapse-ml-blog-archive-c02.json",7812],d707d2ed:[function(){return n.e(3669).then(n.bind(n,5018))},"@site/docs/Explore Algorithms/Causal Inference/Quickstart - Measure Causal Effects.md",5018],d8b3ac6a:[function(){return n.e(4330).then(n.bind(n,7627))},"@site/docs/Explore Algorithms/Other Algorithms/Cyber ML.md",7627],d8d6ba90:[function(){return n.e(1842).then(n.t.bind(n,3769,19))},"/home/vsts/work/1/s/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],e1b2b5f3:[function(){return n.e(1340).then(n.bind(n,269))},"@site/blog/2018-04-01-Flexible and Scalable Deep Learning with MMLSpark.md",269],e2ce57ed:[function(){return n.e(1210).then(n.bind(n,6852))},"@site/blog/2019-06-01-MMLSpark Unifying Machine Learning Ecosystems at Massive Scales.md",6852],e464d112:[function(){return n.e(4508).then(n.bind(n,791))},"@site/docs/Explore Algorithms/AI Services/Multivariate Anomaly Detection.md",791],ea2d2bcc:[function(){return n.e(4204).then(n.bind(n,3800))},"@site/docs/Explore Algorithms/Deep Learning/ONNX.md",3800],ed6d544d:[function(){return n.e(3448).then(n.bind(n,9176))},"@site/docs/Explore Algorithms/OpenAI/Langchain.md",9176],f7a32432:[function(){return Promise.all([n.e(532),n.e(4954)]).then(n.bind(n,9193))},"@site/docs/Quick Examples/transformers/transformers_deep_learning.md",9193],f85db098:[function(){return Promise.all([n.e(532),n.e(5049)]).then(n.bind(n,5102))},"@site/docs/Reference/Dotnet Setup.md",5102],fa2e2688:[function(){return n.e(4927).then(n.bind(n,8030))},"@site/docs/Explore Algorithms/AI Services/Overview.md",8030],fbb011bb:[function(){return n.e(3378).then(n.bind(n,693))},"@site/docs/Use with MLFlow/Install.md",693],fc338b02:[function(){return n.e(5378).then(n.t.bind(n,7085,19))},"/home/vsts/work/1/s/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json",7085]};function c(e){var t=e.error,n=e.retry,a=e.pastDelay;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var u=n(9670),d=n(226);function p(e,t){if("*"===e)return i()({loading:c,loader:function(){return Promise.all([n.e(532),n.e(3140)]).then(n.bind(n,3140))},modules:["@theme/NotFound"],webpack:function(){return[3140]},render:function(e,t){var n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});var o=s[e+"-"+t],p={},f=[],m=[],h=(0,u.Z)(o);return Object.entries(h).forEach((function(e){var t=e[0],n=e[1],r=l[n];r&&(p[t]=r[0],f.push(r[1]),m.push(r[2]))})),i().Map({loading:c,loader:p,modules:f,webpack:function(){return m},render:function(t,n){var i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],a=r.default;if(!a)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){a[e]=r[e]}));var o=i,s=n.split(".");s.slice(0,-1).forEach((function(e){o=o[e]})),o[s[s.length-1]]=a}));var s=i.__comp;delete i.__comp;var l=i.__context;return delete i.__context,r.createElement(d.z,{value:l},r.createElement(s,(0,a.Z)({},i,n)))}})}var f=[{path:"/SynapseML/blog/",component:p("/SynapseML/blog/","32c"),exact:!0},{path:"/SynapseML/blog/2018/04/01/Flexible and Scalable Deep Learning with MMLSpark/",component:p("/SynapseML/blog/2018/04/01/Flexible and Scalable Deep Learning with MMLSpark/","ecd"),exact:!0},{path:"/SynapseML/blog/2019/06/01/MMLSpark Unifying Machine Learning Ecosystems at Massive Scales/",component:p("/SynapseML/blog/2019/06/01/MMLSpark Unifying Machine Learning Ecosystems at Massive Scales/","870"),exact:!0},{path:"/SynapseML/blog/2019/08/24/Welcome to Azure Cognitive Services/",component:p("/SynapseML/blog/2019/08/24/Welcome to Azure Cognitive Services/","83d"),exact:!0},{path:"/SynapseML/blog/2019/10/02/MMLSpark empowering AI for Good with Mark Hamilton/",component:p("/SynapseML/blog/2019/10/02/MMLSpark empowering AI for Good with Mark Hamilton/","347"),exact:!0},{path:"/SynapseML/blog/2020/12/01/Large-Scale Intelligent Microservices/",component:p("/SynapseML/blog/2020/12/01/Large-Scale Intelligent Microservices/","546"),exact:!0},{path:"/SynapseML/blog/archive/",component:p("/SynapseML/blog/archive/","140"),exact:!0},{path:"/SynapseML/blog/overview/",component:p("/SynapseML/blog/overview/","32f"),exact:!0},{path:"/SynapseML/search/",component:p("/SynapseML/search/","a70"),exact:!0},{path:"/SynapseML/videos/",component:p("/SynapseML/videos/","9fc"),exact:!0},{path:"/SynapseML/docs/",component:p("/SynapseML/docs/","da1"),routes:[{path:"/SynapseML/docs/Deploy Models/Overview/",component:p("/SynapseML/docs/Deploy Models/Overview/","6d5"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Deploy Models/Quickstart - Deploying a Classifier/",component:p("/SynapseML/docs/Deploy Models/Quickstart - Deploying a Classifier/","bfd"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Advanced Usage - Async, Batching, and Multi-Key/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Advanced Usage - Async, Batching, and Multi-Key/","277"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Geospatial Services/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Geospatial Services/","d45"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Multivariate Anomaly Detection/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Multivariate Anomaly Detection/","6a9"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Overview/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Overview/","b94"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Analyze Celebrity Quotes/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Analyze Celebrity Quotes/","d46"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Analyze Text/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Analyze Text/","43b"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Creare a Visual Search Engine/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Creare a Visual Search Engine/","e5b"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Create Audiobooks/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Create Audiobooks/","742"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Document Question and Answering with PDFs/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Document Question and Answering with PDFs/","e24"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Flooding Risk/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Flooding Risk/","779"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Predictive Maintenance/",component:p("/SynapseML/docs/Explore Algorithms/AI Services/Quickstart - Predictive Maintenance/","c6c"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Anomaly Detection/Quickstart - Isolation Forests/",component:p("/SynapseML/docs/Explore Algorithms/Anomaly Detection/Quickstart - Isolation Forests/","38c"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Causal Inference/Overview/",component:p("/SynapseML/docs/Explore Algorithms/Causal Inference/Overview/","2e4"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Causal Inference/Quickstart - Measure Causal Effects/",component:p("/SynapseML/docs/Explore Algorithms/Causal Inference/Quickstart - Measure Causal Effects/","d90"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Causal Inference/Quickstart - Measure Heterogeneous Effects/",component:p("/SynapseML/docs/Explore Algorithms/Causal Inference/Quickstart - Measure Heterogeneous Effects/","f11"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Classification/Quickstart - SparkML vs SynapseML/",component:p("/SynapseML/docs/Explore Algorithms/Classification/Quickstart - SparkML vs SynapseML/","399"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Classification/Quickstart - Train Classifier/",component:p("/SynapseML/docs/Explore Algorithms/Classification/Quickstart - Train Classifier/","b7d"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Classification/Quickstart - Vowpal Wabbit on Tabular Data/",component:p("/SynapseML/docs/Explore Algorithms/Classification/Quickstart - Vowpal Wabbit on Tabular Data/","013"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Classification/Quickstart - Vowpal Wabbit on Text Data/",component:p("/SynapseML/docs/Explore Algorithms/Classification/Quickstart - Vowpal Wabbit on Text Data/","fdf"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Deep Learning/Distributed Training/",component:p("/SynapseML/docs/Explore Algorithms/Deep Learning/Distributed Training/","3e6"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Deep Learning/Getting Started/",component:p("/SynapseML/docs/Explore Algorithms/Deep Learning/Getting Started/","b75"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Deep Learning/ONNX/",component:p("/SynapseML/docs/Explore Algorithms/Deep Learning/ONNX/","2b4"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Deep Learning/Quickstart - Fine-tune a Text Classifier/",component:p("/SynapseML/docs/Explore Algorithms/Deep Learning/Quickstart - Fine-tune a Text Classifier/","38f"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Deep Learning/Quickstart - Fine-tune a Vision Classifier/",component:p("/SynapseML/docs/Explore Algorithms/Deep Learning/Quickstart - Fine-tune a Vision Classifier/","b88"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Deep Learning/Quickstart - ONNX Model Inference/",component:p("/SynapseML/docs/Explore Algorithms/Deep Learning/Quickstart - ONNX Model Inference/","86b"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Deep Learning/Quickstart - Transfer Learn for Image Classification/",component:p("/SynapseML/docs/Explore Algorithms/Deep Learning/Quickstart - Transfer Learn for Image Classification/","13b"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Hyperparameter Tuning/HyperOpt/",component:p("/SynapseML/docs/Explore Algorithms/Hyperparameter Tuning/HyperOpt/","811"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Hyperparameter Tuning/Quickstart - Random Search/",component:p("/SynapseML/docs/Explore Algorithms/Hyperparameter Tuning/Quickstart - Random Search/","476"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/LightGBM/Overview/",component:p("/SynapseML/docs/Explore Algorithms/LightGBM/Overview/","64a"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/LightGBM/Quickstart - Classification, Ranking, and Regression/",component:p("/SynapseML/docs/Explore Algorithms/LightGBM/Quickstart - Classification, Ranking, and Regression/","138"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/OpenAI/",component:p("/SynapseML/docs/Explore Algorithms/OpenAI/","3ba"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/OpenAI/Langchain/",component:p("/SynapseML/docs/Explore Algorithms/OpenAI/Langchain/","bb9"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/OpenAI/Quickstart - OpenAI Embedding/",component:p("/SynapseML/docs/Explore Algorithms/OpenAI/Quickstart - OpenAI Embedding/","e4e"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/OpenAI/Quickstart - Understand and Search Forms/",component:p("/SynapseML/docs/Explore Algorithms/OpenAI/Quickstart - Understand and Search Forms/","7cc"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/OpenCV/Image Transformations/",component:p("/SynapseML/docs/Explore Algorithms/OpenCV/Image Transformations/","69c"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Other Algorithms/Cyber ML/",component:p("/SynapseML/docs/Explore Algorithms/Other Algorithms/Cyber ML/","560"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Other Algorithms/Quickstart - Anomalous Access Detection/",component:p("/SynapseML/docs/Explore Algorithms/Other Algorithms/Quickstart - Anomalous Access Detection/","8ab"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Other Algorithms/Quickstart - Exploring Art Across Cultures/",component:p("/SynapseML/docs/Explore Algorithms/Other Algorithms/Quickstart - Exploring Art Across Cultures/","937"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Other Algorithms/Smart Adaptive Recommendations/",component:p("/SynapseML/docs/Explore Algorithms/Other Algorithms/Smart Adaptive Recommendations/","5d6"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Regression/Quickstart - Data Cleaning/",component:p("/SynapseML/docs/Explore Algorithms/Regression/Quickstart - Data Cleaning/","700"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Regression/Quickstart - Train Regressor/",component:p("/SynapseML/docs/Explore Algorithms/Regression/Quickstart - Train Regressor/","5a4"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Regression/Quickstart - Vowpal Wabbit and LightGBM/",component:p("/SynapseML/docs/Explore Algorithms/Regression/Quickstart - Vowpal Wabbit and LightGBM/","0ed"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/Data Balance Analysis/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/Data Balance Analysis/","03a"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/Explanation Dashboard/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/Explanation Dashboard/","4fd"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/Image Explainers/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/Image Explainers/","f41"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/Interpreting Model Predictions/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/Interpreting Model Predictions/","9c8"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/PDP and ICE Explainers/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/PDP and ICE Explainers/","ab6"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/Quickstart - Data Balance Analysis/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/Quickstart - Data Balance Analysis/","c63"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/Quickstart - Snow Leopard Detection/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/Quickstart - Snow Leopard Detection/","e94"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/Tabular Explainers/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/Tabular Explainers/","d09"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Responsible AI/Text Explainers/",component:p("/SynapseML/docs/Explore Algorithms/Responsible AI/Text Explainers/","967"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Contextual Bandits/",component:p("/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Contextual Bandits/","183"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Multi-class classification/",component:p("/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Multi-class classification/","000"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Overview/",component:p("/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Overview/","939"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification using SparkML Vectors/",component:p("/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification using SparkML Vectors/","e0c"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification using VW-native Format/",component:p("/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification using VW-native Format/","714"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification, Quantile Regression, and Regression/",component:p("/SynapseML/docs/Explore Algorithms/Vowpal Wabbit/Quickstart - Classification, Quantile Regression, and Regression/","911"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Get Started/Create a Spark Cluster/",component:p("/SynapseML/docs/Get Started/Create a Spark Cluster/","949"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Get Started/Install SynapseML/",component:p("/SynapseML/docs/Get Started/Install SynapseML/","44d"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Get Started/Quickstart - Your First Models/",component:p("/SynapseML/docs/Get Started/Quickstart - Your First Models/","fa6"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Get Started/Set up Cognitive Services/",component:p("/SynapseML/docs/Get Started/Set up Cognitive Services/","590"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Overview/",component:p("/SynapseML/docs/Overview/","fd4"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Quick Examples/estimators/estimators_causal/",component:p("/SynapseML/docs/Quick Examples/estimators/estimators_causal/","550"),exact:!0},{path:"/SynapseML/docs/Quick Examples/estimators/estimators_cognitive/",component:p("/SynapseML/docs/Quick Examples/estimators/estimators_cognitive/","f5a"),exact:!0},{path:"/SynapseML/docs/Quick Examples/estimators/estimators_core/",component:p("/SynapseML/docs/Quick Examples/estimators/estimators_core/","605"),exact:!0},{path:"/SynapseML/docs/Quick Examples/estimators/estimators_lightgbm/",component:p("/SynapseML/docs/Quick Examples/estimators/estimators_lightgbm/","315"),exact:!0},{path:"/SynapseML/docs/Quick Examples/estimators/estimators_vw/",component:p("/SynapseML/docs/Quick Examples/estimators/estimators_vw/","d39"),exact:!0},{path:"/SynapseML/docs/Quick Examples/transformers/transformers_cognitive/",component:p("/SynapseML/docs/Quick Examples/transformers/transformers_cognitive/","f12"),exact:!0},{path:"/SynapseML/docs/Quick Examples/transformers/transformers_core/",component:p("/SynapseML/docs/Quick Examples/transformers/transformers_core/","505"),exact:!0},{path:"/SynapseML/docs/Quick Examples/transformers/transformers_deep_learning/",component:p("/SynapseML/docs/Quick Examples/transformers/transformers_deep_learning/","dec"),exact:!0},{path:"/SynapseML/docs/Quick Examples/transformers/transformers_opencv/",component:p("/SynapseML/docs/Quick Examples/transformers/transformers_opencv/","e11"),exact:!0},{path:"/SynapseML/docs/Quick Examples/transformers/transformers_vw/",component:p("/SynapseML/docs/Quick Examples/transformers/transformers_vw/","dc6"),exact:!0},{path:"/SynapseML/docs/Reference/Contributor Guide/",component:p("/SynapseML/docs/Reference/Contributor Guide/","e81"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Reference/Developer Setup/",component:p("/SynapseML/docs/Reference/Developer Setup/","bcf"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Reference/Docker Setup/",component:p("/SynapseML/docs/Reference/Docker Setup/","748"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Reference/Dotnet Setup/",component:p("/SynapseML/docs/Reference/Dotnet Setup/","8f0"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Reference/Quickstart - LightGBM in Dotnet/",component:p("/SynapseML/docs/Reference/Quickstart - LightGBM in Dotnet/","263"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Reference/R Setup/",component:p("/SynapseML/docs/Reference/R Setup/","c8a"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Use with MLFlow/Autologging/",component:p("/SynapseML/docs/Use with MLFlow/Autologging/","292"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Use with MLFlow/Install/",component:p("/SynapseML/docs/Use with MLFlow/Install/","ff0"),exact:!0,sidebar:"docs"},{path:"/SynapseML/docs/Use with MLFlow/Overview/",component:p("/SynapseML/docs/Use with MLFlow/Overview/","8ae"),exact:!0,sidebar:"docs"}]},{path:"/SynapseML/",component:p("/SynapseML/","6e1"),exact:!0},{path:"*",component:p("*")}]},8934:function(e,t,n){"use strict";n.d(t,{_:function(){return a},t:function(){return o}});var r=n(7294),a=r.createContext(!1);function o(e){var t=e.children,n=(0,r.useState)(!1),o=n[0],i=n[1];return(0,r.useEffect)((function(){i(!0)}),[]),r.createElement(a.Provider,{value:o},t)}},9383:function(e,t,n){"use strict";var r=n(7294),a=n(3935),o=n(3727),i=n(405),s=n(412),l=[n(6657),n(2497),n(3310),n(8320),n(2295)],c=n(723),u=n(6550),d=n(8790);function p(e){var t=e.children;return r.createElement(r.Fragment,null,t)}var f=n(3117),m=n(5742),h=n(2263),g=n(4996),b=n(6668),v=n(833),y=n(4711),E=n(9727),S=n(3320),w=n(197);function k(){var e=(0,h.Z)().i18n,t=e.defaultLocale,n=e.localeConfigs,a=(0,y.l)();return r.createElement(m.Z,null,Object.entries(n).map((function(e){var t=e[0],n=e[1].htmlLang;return r.createElement("link",{key:t,rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n})})),r.createElement("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}))}function x(e){var t=e.permalink,n=(0,h.Z)().siteConfig.url,a=function(){var e=(0,h.Z)().siteConfig.url,t=(0,u.TH)().pathname;return e+(0,g.Z)(t)}(),o=t?""+n+t:a;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function A(){var e=(0,h.Z)().i18n.currentLocale,t=(0,b.L)(),n=t.metadata,a=t.image;return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:E.h})),a&&r.createElement(v.d,{image:a}),r.createElement(x,null),r.createElement(k,null),r.createElement(w.Z,{tag:S.HX,locale:e}),r.createElement(m.Z,null,n.map((function(e,t){return r.createElement("meta",(0,f.Z)({key:t},e))}))))}var T=new Map;function L(e){if(T.has(e.pathname))return Object.assign({},e,{pathname:T.get(e.pathname)});if((0,d.f)(c.Z,e.pathname).some((function(e){return!0===e.route.exact})))return T.set(e.pathname,e.pathname),e;var t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return T.set(e.pathname,t),Object.assign({},e,{pathname:t})}var _=n(8934),C=n(8940),M=n(1073);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/0)&&(B.current.unobserve(e),B.current.disconnect(),null!=P&&window.docusaurus.prefetch(P))}))})),B.current.observe(e))},to:P},h&&{isActive:y,activeClassName:v}))}var h=o.forwardRef(m)},5999:function(e,t,n){"use strict";n.d(t,{Z:function(){return l},I:function(){return s}});var r=n(7294);function a(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var o=n(7529);function i(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=o[null!=r?r:a])?n:a)?t:r}function s(e,t){return a(i({message:e.message,id:e.id}),t)}function l(e){var t=e.children,n=e.id,o=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var s=i({message:t,id:n});return r.createElement(r.Fragment,null,a(s,o))}},9935:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r="default"},3919:function(e,t,n){"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:function(){return a},b:function(){return r}})},4996:function(e,t,n){"use strict";n.d(t,{C:function(){return i},Z:function(){return s}});var r=n(7294),a=n(2263),o=n(3919);function i(){var e=(0,a.Z)().siteConfig,t=e.baseUrl,n=e.url,i=(0,r.useCallback)((function(e,r){return function(e,t,n,r){var a=void 0===r?{}:r,i=a.forcePrependBaseUrl,s=void 0!==i&&i,l=a.absolute,c=void 0!==l&&l;if(!n||n.startsWith("#")||(0,o.b)(n))return n;if(s)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var u=n.startsWith(t)?n:t+n.replace(/^\//,"");return c?e+u:u}(n,t,e,r)}),[n,t]);return{withBaseUrl:i}}function s(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},2263:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(8940);function o(){return(0,r.useContext)(a._)}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(8934);function o(){return(0,r.useContext)(a._)}},9670:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){var t={};return function e(n,r){Object.entries(n).forEach((function(n){var a,o=n[0],i=n[1],s=r?r+"."+o:o;"object"==typeof(a=i)&&a&&Object.keys(a).length>0?e(i,s):t[s]=i}))}(e),t}},226:function(e,t,n){"use strict";n.d(t,{_:function(){return a},z:function(){return o}});var r=n(7294),a=r.createContext(null);function o(e){var t=e.children,n=e.value,o=r.useContext(a),i=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:o,value:n})}),[o,n]);return r.createElement(a.Provider,{value:i},t)}},143:function(e,t,n){"use strict";n.d(t,{Iw:function(){return b},gA:function(){return f},WS:function(){return m},_r:function(){return d},Jo:function(){return v},zh:function(){return p},yW:function(){return g},gB:function(){return h}});var r=n(6550),a=n(2263),o=n(9935);function i(e,t){void 0===t&&(t={});var n=(0,a.Z)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var s=function(e){return e.versions.find((function(e){return e.isLast}))};function l(e,t){var n=s(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})}))}function c(e,t){var n,a,o=l(e,t),i=null==o?void 0:o.docs.find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(a[e.name]=t)}))})),a):{}}}var u={},d=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},p=function(e){return function(e,t,n){void 0===t&&(t=o.m),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return o}(d(),(0,r.TH)().pathname,e)}function m(e){void 0===e&&(e={});var t=f(e),n=(0,r.TH)().pathname;if(t)return{activePlugin:t,activeVersion:l(t.pluginData,n)}}function h(e){return p(e).versions}function g(e){var t=p(e);return s(t)}function b(e){return c(p(e),(0,r.TH)().pathname)}function v(e){return function(e,t){var n=s(e);return{latestDocSuggestion:c(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(p(e),(0,r.TH)().pathname)}},6657:function(e,t,n){"use strict";n.r(t);var r={onRouteDidUpdate:function(e){var t=e.location,n=e.previousLocation;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||setTimeout((function(){window.gtag("event","page_view",{page_title:document.title,page_location:window.location.href,page_path:t.pathname+t.search+t.hash})}))}};t.default=r},8320:function(e,t,n){"use strict";n.r(t);var r=n(4865),a=n.n(r);a().configure({showSpinner:!1});var o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){a().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}};t.default=o},3310:function(e,t,n){"use strict";n.r(t);var r,a,o=n(7410),i=n(6809);r=o.Z,a=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,a.forEach((function(e){n(5979)("./prism-"+e)})),delete globalThis.Prism},9471:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a="iconExternalLink_nPIU";function o(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,i=void 0===o?13.5:o;return r.createElement("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:a},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},7452:function(e,t,n){"use strict";n.d(t,{Z:function(){return Jt}});var r=n(7294),a=n(6010),o=n(4763),i=n(833),s=n(3117),l=n(6550),c=n(5999),u=n(5936),d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){var e=(0,r.useRef)(null),t=(0,l.k6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&p(n)}),[]);return(0,u.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}var m=(0,c.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){var t,n=null!=(t=e.children)?t:m,a=f(),o=a.containerRef,i=a.onClick;return r.createElement("div",{ref:o,role:"region","aria-label":m},r.createElement("a",(0,s.Z)({},e,{href:"#"+d,onClick:i}),n))}var g=n(5281),b=n(9727),v="skipToContent_fXgn";function y(){return r.createElement(h,{className:v})}var E=n(6668),S=n(9689),w=n(102),k=["width","height","color","strokeWidth","className"];function x(e){var t=e.width,n=void 0===t?21:t,a=e.height,o=void 0===a?21:a,i=e.color,l=void 0===i?"currentColor":i,c=e.strokeWidth,u=void 0===c?1.2:c,d=(e.className,(0,w.Z)(e,k));return r.createElement("svg",(0,s.Z)({viewBox:"0 0 15 15",width:n,height:o},d),r.createElement("g",{stroke:l,strokeWidth:u},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}var A="closeButton_CVFx";function T(e){return r.createElement("button",(0,s.Z)({type:"button","aria-label":(0,c.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.Z)("clean-btn close",A,e.className)}),r.createElement(x,{width:14,height:14,strokeWidth:3.1}))}var L="content_knG7";function _(e){var t=(0,E.L)().announcementBar.content;return r.createElement("div",(0,s.Z)({},e,{className:(0,a.Z)(L,e.className),dangerouslySetInnerHTML:{__html:t}}))}var C="announcementBar_mb4j",M="announcementBarPlaceholder_vyr4",I="announcementBarClose_gvF7",O="announcementBarContent_xLdY";function R(){var e=(0,E.L)().announcementBar,t=(0,S.nT)(),n=t.isActive,a=t.close;if(!n)return null;var o=e.backgroundColor,i=e.textColor,s=e.isCloseable;return r.createElement("div",{className:C,style:{backgroundColor:o,color:i},role:"banner"},s&&r.createElement("div",{className:M}),r.createElement(_,{className:O}),s&&r.createElement(T,{onClick:a,className:I}))}var P=n(3163),N=n(2466);var D=n(4700),F=n(3102),B=r.createContext(null);function U(e){var t,n,a,o,i,s,l,c=e.children,u=(t=(0,P.e)(),n=(0,F.HY)(),a=(0,r.useState)(!1),o=a[0],i=a[1],s=null!==n.component,l=(0,D.D9)(s),(0,r.useEffect)((function(){s&&!l&&i(!0)}),[s,l]),(0,r.useEffect)((function(){s?t.shown||i(!0):i(!1)}),[t.shown,s]),(0,r.useMemo)((function(){return[o,i]}),[o]));return r.createElement(B.Provider,{value:u},c)}function Q(e){if(e.component){var t=e.component;return r.createElement(t,e.props)}}function z(){var e=(0,r.useContext)(B);if(!e)throw new D.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)((function(){return n(!1)}),[n]),o=(0,F.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:a,content:Q(o)}}),[a,o,t])}function j(e){var t=e.header,n=e.primaryMenu,o=e.secondaryMenu,i=z().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var Z=n(2949),$=n(2389);function V(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function H(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}var W={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function G(e){var t=e.className,n=e.buttonClassName,o=e.value,i=e.onChange,s=(0,$.Z)(),l=(0,c.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===o?(0,c.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,c.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)(W.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",W.toggleButton,!s&&W.toggleButtonDisabled,n),type:"button",onClick:function(){return i("dark"===o?"light":"dark")},disabled:!s,title:l,"aria-label":l,"aria-live":"polite"},r.createElement(V,{className:(0,a.Z)(W.toggleIcon,W.lightToggleIcon)}),r.createElement(H,{className:(0,a.Z)(W.toggleIcon,W.darkToggleIcon)})))}var q=r.memo(G),K="darkNavbarColorModeToggle_X3D1";function Y(e){var t=e.className,n=(0,E.L)().navbar.style,a=(0,E.L)().colorMode.disableSwitch,o=(0,Z.I)(),i=o.colorMode,s=o.setColorMode;return a?null:r.createElement(q,{className:t,buttonClassName:"dark"===n?K:void 0,value:i,onChange:s})}var X=n(1327);function J(){return r.createElement(X.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function ee(){var e=(0,P.e)();return r.createElement("button",{type:"button","aria-label":(0,c.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},r.createElement(x,{color:"var(--ifm-color-emphasis-600)"}))}function te(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(J,null),r.createElement(Y,{className:"margin-right--md"}),r.createElement(ee,null))}var ne=n(9960),re=n(4996),ae=n(3919),oe=n(8022),ie=n(9471),se=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function le(e){var t=e.activeBasePath,n=e.activeBaseRegex,a=e.to,o=e.href,i=e.label,l=e.html,c=e.isDropdownLink,u=e.prependBaseUrlToHref,d=(0,w.Z)(e,se),p=(0,re.Z)(a),f=(0,re.Z)(t),m=(0,re.Z)(o,{forcePrependBaseUrl:!0}),h=i&&o&&!(0,ae.Z)(o),g=l?{dangerouslySetInnerHTML:{__html:l}}:{children:r.createElement(r.Fragment,null,i,h&&r.createElement(ie.Z,c&&{width:12,height:12}))};return o?r.createElement(ne.Z,(0,s.Z)({href:u?m:o},d,g)):r.createElement(ne.Z,(0,s.Z)({to:p,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,oe.F)(n,t.pathname):t.pathname.startsWith(f)}},d,g))}var ce=["className","isDropdownItem"],ue=["className","isDropdownItem"],de=["mobile","position"];function pe(e){var t=e.className,n=e.isDropdownItem,o=void 0!==n&&n,i=(0,w.Z)(e,ce),l=r.createElement(le,(0,s.Z)({className:(0,a.Z)(o?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:o},i));return o?r.createElement("li",null,l):l}function fe(e){var t=e.className,n=(e.isDropdownItem,(0,w.Z)(e,ue));return r.createElement("li",{className:"menu__list-item"},r.createElement(le,(0,s.Z)({className:(0,a.Z)("menu__link",t)},n)))}function me(e){var t,n=e.mobile,a=void 0!==n&&n,o=(e.position,(0,w.Z)(e,de)),i=a?fe:pe;return r.createElement(i,(0,s.Z)({},o,{activeClassName:null!=(t=o.activeClassName)?t:a?"menu__link--active":"navbar__link--active"}))}var he=n(6043),ge=n(8596),be=n(2263);var ve=["items","position","className","onClick"],ye=["items","className","position","onClick"],Ee=["mobile"];function Se(e,t){return e.some((function(e){return function(e,t){return!!(0,ge.Mg)(e.to,t)||!!(0,oe.F)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function we(e){var t,n=e.items,o=e.position,i=e.className,l=(e.onClick,(0,w.Z)(e,ve)),c=(0,r.useRef)(null),u=(0,r.useState)(!1),d=u[0],p=u[1];return(0,r.useEffect)((function(){var e=function(e){c.current&&!c.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[c]),r.createElement("div",{ref:c,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d})},r.createElement(le,(0,s.Z)({"aria-haspopup":"true","aria-expanded":d,role:"button",href:l.to?void 0:"#",className:(0,a.Z)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),p(!d))}}),null!=(t=l.children)?t:l.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement(ct,(0,s.Z)({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function ke(e){var t,n,o=e.items,i=e.className,c=(e.position,e.onClick),u=(0,w.Z)(e,ye),d=(n=(0,be.Z)().siteConfig.baseUrl,(0,l.TH)().pathname.replace(n,"/")),p=Se(o,d),f=(0,he.u)({initialState:function(){return!p}}),m=f.collapsed,h=f.toggleCollapsed,g=f.setCollapsed;return(0,r.useEffect)((function(){p&&g(!p)}),[d,p,g]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":m})},r.createElement(le,(0,s.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",i)},u,{onClick:function(e){e.preventDefault(),h()}}),null!=(t=u.children)?t:u.label),r.createElement(he.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:m},o.map((function(e,t){return r.createElement(ct,(0,s.Z)({mobile:!0,isDropdownItem:!0,onClick:c,activeClassName:"menu__link--active"},e,{key:t}))}))))}function xe(e){var t=e.mobile,n=void 0!==t&&t,a=(0,w.Z)(e,Ee),o=n?ke:we;return r.createElement(o,a)}var Ae=n(4711),Te=["width","height"];function Le(e){var t=e.width,n=void 0===t?20:t,a=e.height,o=void 0===a?20:a,i=(0,w.Z)(e,Te);return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:n,height:o,"aria-hidden":!0},i),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}var _e="iconLanguage_nlXk",Ce=["mobile","dropdownItemsBefore","dropdownItemsAfter"];function Me(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var Ie=n(830),Oe=["translations"];function Re(){return Re=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Fe="Ctrl";var Be=r.forwardRef((function(e,t){var n=e.translations,a=void 0===n?{}:n,o=De(e,Oe),i=a.buttonText,s=void 0===i?"Search":i,l=a.buttonAriaLabel,c=void 0===l?"Search":l,u=Pe((0,r.useState)(null),2),d=u[0],p=u[1];return(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("\u2318"):p(Fe))}),[]),r.createElement("button",Re({type:"button",className:"DocSearch DocSearch-Button","aria-label":c},o,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(Ie.W,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},s)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&r.createElement(r.Fragment,null,r.createElement("kbd",{className:"DocSearch-Button-Key"},d===Fe?r.createElement(Me,null):d),r.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),Ue=n(5742),Qe=n(6177),ze=n(239),je=n(3320);var Ze=n(3935),$e={button:{buttonText:(0,c.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,c.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,c.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,c.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,c.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,c.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,c.I)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,c.I)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,c.I)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,c.I)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,c.I)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,c.I)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,c.I)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,c.I)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,c.I)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,c.I)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,c.I)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,c.I)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,c.I)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,c.I)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,c.I)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,c.I)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,c.I)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,c.I)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,c.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,c.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,c.I)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})},Ve=["contextualSearch","externalUrlRegex"],He=null;function We(e){var t=e.hit,n=e.children;return r.createElement(ne.Z,{to:t.url},n)}function Ge(e){var t=e.state,n=e.onClose,a=(0,Qe.M)();return r.createElement(ne.Z,{to:a(t.query),onClick:n},r.createElement(c.Z,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits}},"See all {count} results"))}function qe(e){var t,a,o,i,c,u=e.contextualSearch,d=e.externalUrlRegex,p=(0,w.Z)(e,Ve),f=(0,be.Z)().siteMetadata,m=(0,ze.l)(),h=["language:"+(o=(0,je._q)()).locale,o.tags.map((function(e){return"docusaurus_tag:"+e}))],g=null!=(t=null==(a=p.searchParameters)?void 0:a.facetFilters)?t:[],b=u?(i=g,[].concat((c=function(e){return"string"==typeof e?[e]:e})(h),c(i))):g,v=Object.assign({},p.searchParameters,{facetFilters:b}),y=(0,l.k6)(),E=(0,r.useRef)(null),S=(0,r.useRef)(null),k=(0,r.useState)(!1),x=k[0],A=k[1],T=(0,r.useState)(void 0),L=T[0],_=T[1],C=(0,r.useCallback)((function(){return He?Promise.resolve():Promise.all([n.e(6780).then(n.bind(n,6780)),Promise.all([n.e(532),n.e(6945)]).then(n.bind(n,6945)),Promise.all([n.e(532),n.e(8894)]).then(n.bind(n,8894))]).then((function(e){var t=e[0].DocSearchModal;He=t}))}),[]),M=(0,r.useCallback)((function(){C().then((function(){E.current=document.createElement("div"),document.body.insertBefore(E.current,document.body.firstChild),A(!0)}))}),[C,A]),I=(0,r.useCallback)((function(){var e;A(!1),null==(e=E.current)||e.remove()}),[A]),O=(0,r.useCallback)((function(e){C().then((function(){A(!0),_(e.key)}))}),[C,A,_]),R=(0,r.useRef)({navigate:function(e){var t=e.itemUrl;(0,oe.F)(d,t)?window.location.href=t:y.push(t)}}).current,P=(0,r.useRef)((function(e){return p.transformItems?p.transformItems(e):e.map((function(e){return Object.assign({},e,{url:m(e.url)})}))})).current,N=(0,r.useMemo)((function(){return function(e){return r.createElement(Ge,(0,s.Z)({},e,{onClose:I}))}}),[I]),D=(0,r.useCallback)((function(e){return e.addAlgoliaAgent("docusaurus",f.docusaurusVersion),e}),[f.docusaurusVersion]);return function(e){var t=e.isOpen,n=e.onOpen,a=e.onClose,o=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){(27===e.keyCode&&t||"k"===e.key.toLowerCase()&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?a():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,a,o,i])}({isOpen:x,onOpen:M,onClose:I,onInput:O,searchButtonRef:S}),r.createElement(r.Fragment,null,r.createElement(Ue.Z,null,r.createElement("link",{rel:"preconnect",href:"https://"+p.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})),r.createElement(Be,{onTouchStart:C,onFocus:C,onMouseOver:C,onClick:M,ref:S,translations:$e.button}),x&&He&&E.current&&(0,Ze.createPortal)(r.createElement(He,(0,s.Z)({onClose:I,initialScrollY:window.scrollY,initialQuery:L,navigator:R,transformItems:P,hitComponent:We,transformSearchClient:D},p.searchPagePath&&{resultsFooterComponent:N},p,{searchParameters:v,placeholder:$e.placeholder,translations:$e.modal})),E.current))}function Ke(){var e=(0,be.Z)().siteConfig;return r.createElement(qe,e.themeConfig.algolia)}var Ye="searchBox_ZlJk";function Xe(e){var t=e.children,n=e.className;return r.createElement("div",{className:(0,a.Z)(n,Ye)},t)}var Je=n(143),et=n(4575),tt=["docId","label","docsPluginId"];var nt=["sidebarId","label","docsPluginId"];var rt=["label","to","docsPluginId"];var at=n(373),ot=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],it=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};var st={default:me,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,a=e.dropdownItemsAfter,o=(0,w.Z)(e,Ce),i=(0,be.Z)().i18n,u=i.currentLocale,d=i.locales,p=i.localeConfigs,f=(0,Ae.l)(),m=(0,l.TH)(),h=m.search,g=m.hash,b=d.map((function(e){var n=""+("pathname://"+f.createUrl({locale:e,fullyQualified:!1}))+h+g;return{label:p[e].label,lang:p[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===u?t?"menu__link--active":"dropdown__link--active":""}})),v=[].concat(n,b,a),y=t?(0,c.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):p[u].label;return r.createElement(xe,(0,s.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(Le,{className:_e}),y),items:v}))},search:function(e){var t=e.mobile,n=e.className;return t?null:r.createElement(Xe,{className:n},r.createElement(Ke,null))},dropdown:xe,html:function(e){var t=e.value,n=e.className,o=e.mobile,i=void 0!==o&&o,s=e.isDropdownItem,l=void 0!==s&&s,c=l?"li":"div";return r.createElement(c,{className:(0,a.Z)({navbar__item:!i&&!l,"menu__list-item":i},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,a=e.docsPluginId,o=(0,w.Z)(e,tt),i=(0,Je.Iw)(a).activeDoc,l=(0,et.vY)(t,a);return null===l?null:r.createElement(me,(0,s.Z)({exact:!0},o,{isActive:function(){return(null==i?void 0:i.path)===l.path||!(null==i||!i.sidebar)&&i.sidebar===l.sidebar},label:null!=n?n:l.id,to:l.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,a=e.docsPluginId,o=(0,w.Z)(e,nt),i=(0,Je.Iw)(a).activeDoc,l=(0,et.oz)(t,a).link;if(!l)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return r.createElement(me,(0,s.Z)({exact:!0},o,{isActive:function(){return(null==i?void 0:i.sidebar)===t},label:null!=n?n:l.label,to:l.path}))},docsVersion:function(e){var t=e.label,n=e.to,a=e.docsPluginId,o=(0,w.Z)(e,rt),i=(0,et.lO)(a)[0],l=null!=t?t:i.label,c=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(i).path;return r.createElement(me,(0,s.Z)({},o,{label:l,to:c}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,a=e.dropdownActiveClassDisabled,o=e.dropdownItemsBefore,i=e.dropdownItemsAfter,u=(0,w.Z)(e,ot),d=(0,l.TH)(),p=d.search,f=d.hash,m=(0,Je.Iw)(n),h=(0,Je.gB)(n),g=(0,at.J)(n).savePreferredVersionName,b=h.map((function(e){var t,n=null!=(t=m.alternateDocVersions[e.name])?t:it(e);return{label:e.label,to:""+n.path+p+f,isActive:function(){return e===m.activeVersion},onClick:function(){return g(e.name)}}})),v=[].concat(o,b,i),y=(0,et.lO)(n)[0],E=t&&v.length>1?(0,c.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):y.label,S=t&&v.length>1?void 0:it(y).path;return v.length<=1?r.createElement(me,(0,s.Z)({},u,{mobile:t,label:E,to:S,isActive:a?function(){return!1}:void 0})):r.createElement(xe,(0,s.Z)({},u,{mobile:t,label:E,to:S,items:v,isActive:a?function(){return!1}:void 0}))}},lt=["type"];function ct(e){var t=e.type,n=(0,w.Z)(e,lt),a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=st[a];if(!o)throw new Error('No NavbarItem component found for type "'+t+'".');return r.createElement(o,n)}function ut(){var e=(0,P.e)(),t=(0,E.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement(ct,(0,s.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function dt(e){return r.createElement("button",(0,s.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(c.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function pt(){var e=0===(0,E.L)().navbar.items.length,t=z();return r.createElement(r.Fragment,null,!e&&r.createElement(dt,{onClick:function(){return t.hide()}}),t.content)}function ft(){var e,t=(0,P.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(j,{header:r.createElement(te,null),primaryMenu:r.createElement(ut,null),secondaryMenu:r.createElement(pt,null)}):null}var mt="navbarHideable_m1mJ",ht="navbarHidden_jGov";function gt(e){return r.createElement("div",(0,s.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function bt(e){var t=e.children,n=(0,E.L)().navbar,o=n.hideOnScroll,i=n.style,s=(0,P.e)(),l=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),s=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,N.RF)((function(t,n){var r=t.scrollY;if(e)if(r=s?a(!1):r+c0&&r.createElement(Qt,{links:n}),logo:a&&r.createElement($t,{logo:a}),copyright:t&&r.createElement(Vt,{copyright:t})})}var Gt=r.memo(Wt),qt=(0,D.Qc)([Z.S,S.pl,N.OC,at.L5,i.VC,function(e){var t=e.children;return r.createElement(F.n2,null,r.createElement(P.M,null,r.createElement(U,null,t)))}]);function Kt(e){var t=e.children;return r.createElement(qt,null,t)}function Yt(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(c.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("div",{className:"margin-vert--lg"},r.createElement(St,{onClick:n,className:"button button--primary shadow--lw"})),r.createElement("hr",null),r.createElement("div",{className:"margin-vert--md"},r.createElement(wt,{error:t})))))}var Xt="mainWrapper_z2l0";function Jt(e){var t=e.children,n=e.noFooter,s=e.wrapperClassName,l=e.title,c=e.description;return(0,b.t)(),r.createElement(Kt,null,r.createElement(i.d,{title:l,description:c}),r.createElement(y,null),r.createElement(R,null),r.createElement(It,null),r.createElement("div",{id:d,className:(0,a.Z)(g.k.wrapper.main,Xt,s)},r.createElement(o.Z,{fallback:function(e){return r.createElement(Yt,e)}},t)),!n&&r.createElement(Gt,null))}},1327:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(3117),a=n(102),o=n(7294),i=n(9960),s=n(4996),l=n(2263),c=n(6668),u=n(941),d=["imageClassName","titleClassName"];function p(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,s.Z)(t.src),dark:(0,s.Z)(t.srcDark||t.src)},i=o.createElement(u.Z,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?o.createElement("div",{className:r},i):i}function f(e){var t,n=(0,l.Z)().siteConfig.title,u=(0,c.L)().navbar,f=u.title,m=u.logo,h=e.imageClassName,g=e.titleClassName,b=(0,a.Z)(e,d),v=(0,s.Z)((null==m?void 0:m.href)||"/"),y=f?"":n,E=null!=(t=null==m?void 0:m.alt)?t:y;return o.createElement(i.Z,(0,r.Z)({to:v},b,(null==m?void 0:m.target)&&{target:m.target}),m&&o.createElement(p,{logo:m,alt:E,imageClassName:h}),null!=f&&o.createElement("b",{className:g},f))}},197:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(5742);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},941:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(3117),a=n(102),o=n(7294),i=n(6010),s=n(2389),l=n(2949),c={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"},u=["sources","className","alt"];function d(e){var t=(0,s.Z)(),n=(0,l.I)().colorMode,d=e.sources,p=e.className,f=e.alt,m=(0,a.Z)(e,u),h=t?"dark"===n?["dark"]:["light"]:["light","dark"];return o.createElement(o.Fragment,null,h.map((function(e){return o.createElement("img",(0,r.Z)({key:e,src:d[e],alt:f,className:(0,i.Z)(c.themedImage,c["themedImage--"+e],p)},m))})))}},6043:function(e,t,n){"use strict";n.d(t,{u:function(){return u},z:function(){return v}});var r=n(3117),a=n(102),o=n(7294),i=n(412),s=n(1442),l=["collapsed"],c=["lazy"];function u(e){var t=e.initialState,n=(0,o.useState)(null!=t&&t),r=n[0],a=n[1],i=(0,o.useCallback)((function(){a((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:a,toggleCollapsed:i}}var d={display:"none",overflow:"hidden",height:"0px"},p={display:"block",overflow:"visible",height:"auto"};function f(e,t){var n=t?d:p;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function m(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,a=(0,o.useRef)(!1);(0,o.useEffect)((function(){var e,o=t.current;function i(){var e,t,n=o.scrollHeight,a=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,s.n)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+a+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function l(){var e=i();o.style.transition=e.transition,o.style.height=e.height}if(!a.current)return f(o,n),void(a.current=!0);return o.style.willChange="height",e=requestAnimationFrame((function(){n?(l(),requestAnimationFrame((function(){o.style.height=d.height,o.style.overflow=d.overflow}))):(o.style.display="block",requestAnimationFrame((function(){l()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function h(e){if(!i.Z.canUseDOM)return e?d:p}function g(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,a=e.children,i=e.animation,s=e.onCollapseTransitionEnd,l=e.className,c=e.disableSSRStyle,u=(0,o.useRef)(null);return m({collapsibleRef:u,collapsed:r,animation:i}),o.createElement(n,{ref:u,style:c?void 0:h(r),onTransitionEnd:function(e){"height"===e.propertyName&&(f(u.current,r),null==s||s(r))},className:l},a)}function b(e){var t=e.collapsed,n=(0,a.Z)(e,l),i=(0,o.useState)(!t),s=i[0],c=i[1],u=(0,o.useState)(t),d=u[0],p=u[1];return(0,o.useLayoutEffect)((function(){t||c(!0)}),[t]),(0,o.useLayoutEffect)((function(){s&&p(t)}),[s,t]),s?o.createElement(g,(0,r.Z)({},n,{collapsed:d})):null}function v(e){var t=e.lazy,n=(0,a.Z)(e,c),r=t?b:g;return o.createElement(r,n)}},9689:function(e,t,n){"use strict";n.d(t,{nT:function(){return m},pl:function(){return f}});var r=n(7294),a=n(2389),o=n(12),i=n(4700),s=n(6668),l=(0,o.WA)("docusaurus.announcement.dismiss"),c=(0,o.WA)("docusaurus.announcement.id"),u=function(){return"true"===l.get()},d=function(e){return l.set(String(e))},p=r.createContext(null);function f(e){var t=e.children,n=function(){var e=(0,s.L)().announcementBar,t=(0,a.Z)(),n=(0,r.useState)((function(){return!!t&&u()})),o=n[0],i=n[1];(0,r.useEffect)((function(){i(u())}),[]);var l=(0,r.useCallback)((function(){d(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=c.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;c.set(t),r&&d(!1),!r&&u()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!o,close:l}}),[e,o,l])}();return r.createElement(p.Provider,{value:n},t)}function m(){var e=(0,r.useContext)(p);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:function(e,t,n){"use strict";n.d(t,{I:function(){return g},S:function(){return h}});var r=n(7294),a=n(412),o=n(4700),i=n(12),s=n(6668),l=r.createContext(void 0),c="theme",u=(0,i.WA)(c),d="light",p="dark",f=function(e){return e===p?p:d};function m(){var e=(0,s.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,o=e.respectPrefersColorScheme,i=(0,r.useState)(function(e){return a.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)}(t)),l=i[0],m=i[1];(0,r.useEffect)((function(){n&&u.del()}),[n]);var h=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,a=void 0===r||r;e?(m(e),a&&function(e){u.set(f(e))}(e)):(m(o?window.matchMedia("(prefers-color-scheme: dark)").matches?p:d:t),u.del())}),[o,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(l))}),[l]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===c){var t=u.get();null!==t&&h(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,h]);var g=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||o){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||g.current?g.current=window.matchMedia("print").matches:h(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[h,n,o]),(0,r.useMemo)((function(){return{colorMode:l,setColorMode:h,get isDarkTheme(){return l===p},setLightTheme:function(){h(d)},setDarkTheme:function(){h(p)}}}),[l,h])}function h(e){var t=e.children,n=m();return r.createElement(l.Provider,{value:n},t)}function g(){var e=(0,r.useContext)(l);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:function(e,t,n){"use strict";n.d(t,{J:function(){return y},L5:function(){return b},Oh:function(){return E}});var r=n(7294),a=n(143),o=n(9935),i=n(6668),s=n(4575),l=n(4700),c=n(12),u=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,c.WA)(u(e),{persistence:t}).set(n)},p=function(e,t){return(0,c.WA)(u(e),{persistence:t}).get()},f=function(e,t){(0,c.WA)(u(e),{persistence:t}).del()};var m=r.createContext(null);function h(){var e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),o=(0,r.useState)((function(){return function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))}(n)})),s=o[0],l=o[1];return(0,r.useEffect)((function(){l(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,a=p(t,n),r[t].versions.some((function(e){return e.name===a}))?{preferredVersionName:a}:(f(t,n),{preferredVersionName:null}))];var t,a})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[s,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d(e,t,n),l((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function g(e){var t=e.children,n=h();return r.createElement(m.Provider,{value:n},t)}function b(e){var t=e.children;return s.cE?r.createElement(g,null,t):r.createElement(r.Fragment,null,t)}function v(){var e=(0,r.useContext)(m);if(!e)throw new l.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=o.m);var n=(0,a.zh)(e),i=v(),s=i[0],l=i[1],c=s[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===c})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){l.savePreferredVersion(e,t)}),[l,e])}}function E(){var e=(0,a._r)(),t=v()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(r=n,o=e[r],i=t[r].preferredVersionName,null!=(a=o.versions.find((function(e){return e.name===i})))?a:null)];var r,a,o,i})))}},1116:function(e,t,n){"use strict";n.d(t,{V:function(){return l},b:function(){return s}});var r=n(7294),a=n(4700),o=Symbol("EmptyContext"),i=r.createContext(o);function s(e){var t=e.children,n=e.name,a=e.items,o=(0,r.useMemo)((function(){return n&&a?{name:n,items:a}:null}),[n,a]);return r.createElement(i.Provider,{value:o},t)}function l(){var e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},3163:function(e,t,n){"use strict";n.d(t,{M:function(){return d},e:function(){return p}});var r=n(7294),a=n(3102),o=n(7524),i=n(1980),s=n(6668),l=n(4700),c=r.createContext(void 0);function u(){var e,t=(e=(0,a.HY)(),0===(0,s.L)().navbar.items.length&&!e.component),n=(0,o.i)(),l=!t&&"mobile"===n,c=(0,r.useState)(!1),u=c[0],d=c[1];(0,i.Rb)((function(){if(u)return d(!1),!1}));var p=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:l,toggle:p,shown:u}}),[t,l,p,u])}function d(e){var t=e.children,n=u();return r.createElement(c.Provider,{value:n},t)}function p(){var e=r.useContext(c);if(void 0===e)throw new l.i6("NavbarMobileSidebarProvider");return e}},3102:function(e,t,n){"use strict";n.d(t,{HY:function(){return s},Zo:function(){return l},n2:function(){return i}});var r=n(7294),a=n(4700),o=r.createContext(null);function i(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function s(){var e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function l(e){var t=e.component,n=e.props,i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");var s=i[1],l=(0,a.Ql)(n);return(0,r.useEffect)((function(){s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((function(){return function(){return s({component:null,props:null})}}),[s]),null}},9727:function(e,t,n){"use strict";n.d(t,{h:function(){return a},t:function(){return o}});var r=n(7294),a="navigation-with-keyboard";function o(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},6177:function(e,t,n){"use strict";n.d(t,{K:function(){return i},M:function(){return s}});var r=n(7294),a=n(2263),o=n(1980);function i(){return(0,o.Nc)("q")}function s(){var e=(0,a.Z)().siteConfig,t=e.baseUrl,n=e.themeConfig.algolia.searchPagePath;return(0,r.useCallback)((function(e){return""+t+n+"?q="+encodeURIComponent(e)}),[t,n])}},7524:function(e,t,n){"use strict";n.d(t,{i:function(){return c}});var r=n(7294),a=n(412),o="desktop",i="mobile",s="ssr";function l(){return a.Z.canUseDOM?window.innerWidth>996?o:i:s}function c(){var e=(0,r.useState)((function(){return l()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(l())}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),t}},5281:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},1442:function(e,t,n){"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:function(){return r}})},4575:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Wl:function(){return m},_F:function(){return g},cE:function(){return f},hI:function(){return w},lO:function(){return y},vY:function(){return S},oz:function(){return E},s1:function(){return v}});var o=n(7294),i=n(6550),s=n(8790),l=n(143),c=n(373),u=n(1116),d=n(7392),p=n(8596),f=!!l._r;function m(e){if(e.href)return e.href;for(var t,n=a(e.items);!(t=n()).done;){var r=t.value;if("link"===r.type)return r.href;if("category"===r.type){var o=m(r);if(o)return o}}}var h=function(e,t){return void 0!==e&&(0,p.Mg)(e,t)};function g(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||function(e,t){return e.some((function(e){return g(e,t)}))}(e.items,t))}function b(e){var t=e.sidebarItems,n=e.pathname,r=e.onlyCategories,o=void 0!==r&&r,i=[];return function e(t){for(var r,s=a(t);!(r=s()).done;){var l=r.value;if("category"===l.type&&((0,p.Mg)(l.href,n)||e(l.items))||"link"===l.type&&(0,p.Mg)(l.href,n))return o&&"category"!==l.type||i.unshift(l),!0}return!1}(t),i}function v(){var e,t=(0,u.V)(),n=(0,i.TH)().pathname;return!1!==(null==(e=(0,l.gA)())?void 0:e.pluginData.breadcrumbs)&&t?b({sidebarItems:t.items,pathname:n}):null}function y(e){var t=(0,l.Iw)(e).activeVersion,n=(0,c.J)(e).preferredVersion,r=(0,l.yW)(e);return(0,o.useMemo)((function(){return(0,d.j)([t,n,r].filter(Boolean))}),[t,n,r])}function E(e,t){var n=y(t);return(0,o.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map((function(e){return e[0]})).join("\n- "));return r[1]}),[e,n])}function S(e,t){var n=y(t);return(0,o.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+(0,d.j)(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function w(e){var t=e.route,n=e.versionMetadata,r=(0,i.TH)(),a=t.routes,o=a.find((function(e){return(0,i.LX)(r.pathname,e)}));if(!o)return null;var l=o.sidebar,c=l?n.docsSidebars[l]:void 0;return{docElement:(0,s.H)(a),sidebarName:l,sidebarItems:c}}},2128:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(2263);function a(e){var t=(0,r.Z)().siteConfig,n=t.title,a=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+a+" "+n:n}},1980:function(e,t,n){"use strict";n.d(t,{Nc:function(){return c},Rb:function(){return s},_X:function(){return l}});var r=n(7294),a=n(6550),o=n(1688),i=n(4700);function s(e){!function(e){var t=(0,a.k6)(),n=(0,i.zX)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}function l(e){return t=function(t){return null===e?null:new URLSearchParams(t.location.search).get(e)},n=(0,a.k6)(),(0,o.useSyncExternalStore)(n.listen,(function(){return t(n)}),(function(){return t(n)}));var t,n}function c(e){var t,n,o=null!=(t=l(e))?t:"",i=(n=(0,a.k6)(),(0,r.useCallback)((function(e,t,r){var a=new URLSearchParams(n.location.search);t?a.set(e,t):a.delete(e),(null!=r&&r.push?n.push:n.replace)({search:a.toString()})}),[n]));return[o,(0,r.useCallback)((function(t,n){i(e,t,n)}),[i,e])]}},7392:function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=function(e,t){return e===t}),e.filter((function(n,r){return e.findIndex((function(e){return t(e,n)}))!==r}))}function a(e){return Array.from(new Set(e))}n.d(t,{j:function(){return a},l:function(){return r}})},833:function(e,t,n){"use strict";n.d(t,{FG:function(){return p},d:function(){return u},VC:function(){return f}});var r=n(7294),a=n(6010),o=n(5742),i=n(226);function s(){var e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(4996),c=n(2128);function u(e){var t=e.title,n=e.description,a=e.keywords,i=e.image,s=e.children,u=(0,c.p)(t),d=(0,l.C)().withBaseUrl,p=i?d(i,{absolute:!0}):void 0;return r.createElement(o.Z,null,t&&r.createElement("title",null,u),t&&r.createElement("meta",{property:"og:title",content:u}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),p&&r.createElement("meta",{property:"og:image",content:p}),p&&r.createElement("meta",{name:"twitter:image",content:p}),s)}var d=r.createContext(void 0);function p(e){var t=e.className,n=e.children,i=r.useContext(d),s=(0,a.Z)(i,t);return r.createElement(d.Provider,{value:s},r.createElement(o.Z,null,r.createElement("html",{className:s})),n)}function f(e){var t=e.children,n=s(),o="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),i="plugin-id-"+n.plugin.id;return r.createElement(p,{className:(0,a.Z)(o,i)},t)}},4700:function(e,t,n){"use strict";n.d(t,{i6:function(){return m},Qc:function(){return g},zX:function(){return p},D9:function(){return f},Ql:function(){return h}});var r=n(8900),a=n(1073);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(9817);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t,n){return l=s()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&(0,i.Z)(a,n.prototype),a},l.apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(r,e)},c(e)}var u=n(7294),d=n(412).Z.canUseDOM?u.useLayoutEffect:u.useEffect;function p(e){var t=(0,u.useRef)(e);return d((function(){t.current=e}),[e]),(0,u.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,u.useRef)();return d((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var a,o,i,s,l;return(l=e.call(this)||this).name="ReactContextError",l.message="Hook "+(null!=(a=null==(o=l.stack)||null==(i=o.split("\n")[1])||null==(s=i.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:s.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),l}return(0,a.Z)(t,e),t}(c(Error));function h(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,u.useMemo)((function(){return e}),t.flat())}function g(e){return function(t){var n=t.children;return u.createElement(u.Fragment,null,e.reduceRight((function(e,t){return u.createElement(t,null,e)}),n))}}},8022:function(e,t,n){"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{F:function(){return r}})},8596:function(e,t,n){"use strict";n.d(t,{Mg:function(){return i},Ns:function(){return s}});var r=n(7294),a=n(723),o=n(2263);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function s(){var e=(0,o.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:a.Z,baseUrl:e})}),[e])}},2466:function(e,t,n){"use strict";n.d(t,{Ct:function(){return f},OC:function(){return l},RF:function(){return d},o5:function(){return p}});var r=n(7294),a=n(412),o=n(2389),i=n(4700);var s=r.createContext(void 0);function l(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(s.Provider,{value:a},n)}function c(){var e=(0,r.useContext)(s);if(null==e)throw new i.i6("ScrollControllerProvider");return e}var u=function(){return a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=c().scrollEventsEnabledRef,a=(0,r.useRef)(u()),o=(0,i.zX)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=u();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[o,n].concat(t))}function p(){var e,t,n,a=c(),o=(e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((function(t){e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((function(){var t=e.current,n=t.elem,r=t.top;if(!n)return{restored:!1};var a=n.getBoundingClientRect().top-r;return a&&window.scrollBy({left:0,top:a}),e.current={elem:null,top:0},{restored:0!==a}}),[]),(0,r.useMemo)((function(){return{save:t,restore:n}}),[n,t])),i=(0,r.useRef)(void 0),s=(0,r.useCallback)((function(e){o.save(e),a.disableScrollEvents(),i.current=function(){var e=o.restore().restored;if(i.current=void 0,e){window.addEventListener("scroll",(function e(){a.enableScrollEvents(),window.removeEventListener("scroll",e)}))}else a.enableScrollEvents()}}),[a,o]);return(0,r.useLayoutEffect)((function(){queueMicrotask((function(){return null==i.current?void 0:i.current()}))})),{blockElementScrollPositionUntilNextRender:s}}function f(){var e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&a=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m},s=n(2177);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function f(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,h(),E.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(E.entries[E.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=E.index+e;return t>=0&&t
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),c=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){l(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c=d.reach);k+=w.value.length,w=w.next){var x=w.value;if(t.length>e.length)return;if(!(x instanceof a)){var A,T=1;if(v){if(!(A=o(S,k,e,b))||A.index>=e.length)break;var L=A.index,_=A.index+A[0].length,C=k;for(C+=w.value.length;L>=C;)C+=(w=w.next).value.length;if(k=C-=w.value.length,w.value instanceof a)continue;for(var M=w;M!==t.tail&&(C<_||"string"==typeof M.value);M=M.next)T++,C+=M.value.length;T--,x=e.slice(k,C),A.index-=k}else if(!(A=o(S,0,x,b)))continue;L=A.index;var I=A[0],O=x.slice(0,L),R=x.slice(L+I.length),P=k+x.length;d&&P>d.reach&&(d.reach=P);var N=w.prev;if(O&&(N=l(t,N,O),k+=O.length),c(t,N,T),w=l(t,N,new a(p,g?r.tokenize(I,g):I,y,I)),R&&l(t,w,R),T>1){var D={cause:p+","+m,reach:P};i(e,t,n,w.prev,k,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}(),r=n;n.default=n,r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:n}};a["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:a},r.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.c=r.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),r.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),r.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},r.languages.c.string],char:r.languages.c.char,comment:r.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:r.languages.c}}}}),r.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete r.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(r),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(r),r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(r),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(r),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(r),r.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:r.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},r.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var s=p(/^\{$/,/^\}$/);if(-1===s)continue;for(var l=n;l=0&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function l(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function c(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,l(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function u(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,u={},d=l(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=s(i++,r)););return u[n]=a,n})).join(""),n,r),p=Object.keys(u);return i=0,function e(t){for(var n=0;n=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=p[i],o="string"==typeof r?r:r.content,s=o.indexOf(a);if(-1!==s){++i;var l=o.substring(0,s),d=c(u[a]),f=o.substring(s+a.length),m=[];if(l&&m.push(l),m.push(d),f){var h=[f];e(h),m.push.apply(m,h)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(r),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},s=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var l=i(a);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=i(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}a.content&&"string"!=typeof a.content&&s(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(r),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(r),r.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},r.languages.go=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),r.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete r.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var l=0;l=o.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[a],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++a;var h=p.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(m+f.length),v=[];h&&v.push.apply(v,i([h])),v.push(g),b&&v.push.apply(v,i([b])),"string"==typeof c?s.splice.apply(s,[l,1].concat(v)):c.content=v}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(r),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(r),r.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},r.languages.webmanifest=r.languages.json,r.languages.less=r.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),r.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),r.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},r.languages.objectivec=r.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete r.languages.objectivec["class-name"],r.languages.objc=r.languages.objectivec,r.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},r.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},r.languages.python["string-interpolation"].inside.interpolation.inside.rest=r.languages.python,r.languages.py=r.languages.python,r.languages.reason=r.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),r.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete r.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(r),r.languages.scss=r.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),r.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),r.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),r.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),r.languages.scss.atrule.inside.rest=r.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(r),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(r),r.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},t.Z=r},9016:function(){!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var a="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",o="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(o),u=RegExp(l(a+" "+o+" "+i+" "+s)),d=l(o+" "+i+" "+s),p=l(a+" "+o+" "+s),f=r(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),m=r(/\((?:[^()]|<>)*\)/.source,2),h=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[h,f]),b=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,g]),v=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[b,v]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,m,v]),S=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),w=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[S,b,v]),k={keyword:u,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[b]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[h,w]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[h]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,g]),lookbehind:!0,inside:k},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[b]),lookbehind:!0,inside:k},{pattern:n(/(\bwhere\s+)<<0>>/.source,[h]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:k},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[w,p,h]),inside:k}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:k},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[w,b]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[w]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[h,f]),inside:{function:n(/^<<0>>/.source,[h]),generic:{pattern:RegExp(f),alias:"class-name",inside:k}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,g,h,w,u.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,m]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(w),greedy:!0,inside:k},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var L=A+"|"+x,_=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[L]),C=r(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[_]),2),M=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[b,C]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[M,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[M]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[C]),inside:e.languages.csharp},"class-name":{pattern:RegExp(b),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var O=/:[^}\r\n]+/.source,R=r(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[_]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,O]),N=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[L]),2),D=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,O]);function F(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,O]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:F(P,R)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[D]),lookbehind:!0,greedy:!0,inside:F(D,N)}],char:{pattern:RegExp(x),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)},6862:function(){!function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism)},5979:function(e,t,n){var r={"./prism-csharp":9016,"./prism-powershell":6862};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=5979},2703:function(e,t,n){"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:function(e,t,n){"use strict";var r=n(7294),a=n(7418),o=n(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n