diff --git a/frontend/server/modelsmith-build/browser/chunk-T2OORL2C.js b/frontend/server/modelsmith-build/browser/chunk-4VZREDSA.js similarity index 94% rename from frontend/server/modelsmith-build/browser/chunk-T2OORL2C.js rename to frontend/server/modelsmith-build/browser/chunk-4VZREDSA.js index 08f8126..14ac260 100644 --- a/frontend/server/modelsmith-build/browser/chunk-T2OORL2C.js +++ b/frontend/server/modelsmith-build/browser/chunk-4VZREDSA.js @@ -1 +1 @@ -import{a as d}from"./chunk-XSACZZU3.js";import{a as u}from"./chunk-VEEXI746.js";import"./chunk-DSSER6OZ.js";import"./chunk-OWJBZ7BL.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import"./chunk-NAEQPCWM.js";import{a as f}from"./chunk-FMRIWR6H.js";import"./chunk-PGXHYGLR.js";import"./chunk-DBDNSQWV.js";import"./chunk-HOFUFSNV.js";import{b as A,c as K,h as T}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as q,b as X}from"./chunk-3IJULEGV.js";import{a as j,b as G}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as s,Da as m,Ea as y,Ra as a,Zb as R,_ as p,a as g,ab as c,b as v,bb as C,be as z,cb as w,db as I,fb as N,ga as Q,ha as l,ib as E,ie as D,ne as O,oa as F,oc as M,oe as _,p as b,pa as P,pb as V,pe as U,qb as W,qe as k,rb as L,tb as S,te as B}from"./chunk-DL2LTWBU.js";var $=["panelParameters"],r,h=(r=class{constructor(t,i){this.fb=t,this.scriptFacadeService=i,this.AlgorithmType=K,this.AWQAlgorithmsEnum=T,this.isScriptActive=!1}ngOnInit(){this.initForm(),this.listenToScriptStateChanges()}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(G(this)).subscribe(t=>{this.isScriptActive=A(t),A(t)?this.form.disable():this.form.enable()})}initForm(){this.form=this.fb.group({algorithm:this.fb.group({alg:[]})}),setTimeout(()=>{this.form.get("algorithm.alg")?.setValue(T.AWQ_QUANTIZATION)},0)}submit(){if(this.isScriptActive)return;let{algorithm:t,model:i}=this.form.getRawValue(),{model:e}=i,o=v(g({},t),{params:v(g({},this.panelParametersComponent.parametersFormatted),{model:e})});this.scriptFacadeService.dispatch(q.callScript({configs:o}))}},r.\u0275fac=function(i){return new(i||r)(y(O),y(X))},r.\u0275cmp=Q({type:r,selectors:[["ms-llm-quantization"]],viewQuery:function(i,e){if(i&1&&V($,5),i&2){let o;W(o=L())&&(e.panelParametersComponent=o.first)}},decls:13,vars:6,consts:[["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper",3,"formGroup"],[1,"left"],[3,"formGroup"],["controlKey","model",3,"algorithmType","isTrainModelsPageRouteVisible"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"right"]],template:function(i,e){if(i&1){let o=N();s(0,"p",1),S(1,"LLM Quantization"),c(),s(2,"div",2)(3,"div",3),w(4,4),C(5,"ms-panel-model",5)(6,"ms-panel-parameters",6,0),I(),s(8,"div")(9,"button",7),E("click",function(){return F(o),P(e.submit())}),S(10," Run "),c()()(),s(11,"div",8),C(12,"ms-terminal-xterm-with-toolbar"),c()()}i&2&&(m(2),a("formGroup",e.form),m(2),a("formGroup",e.form),m(),a("algorithmType",e.AlgorithmType.AWQ)("isTrainModelsPageRouteVisible",!1),m(),a("algorithm",e.AWQAlgorithmsEnum.AWQ_QUANTIZATION),m(3),a("disabled",e.isScriptActive||e.form.invalid))},dependencies:[d,u,f,z,D,k],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),r);h=b([j()],h);var H=[{path:"",component:h}],x=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=l({type:t}),t.\u0275inj=p({imports:[M.forChild(H),M]});let n=t;return n})();var bt=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=l({type:t}),t.\u0275inj=p({imports:[R,x,d,u,f,U,_,B]});let n=t;return n})();export{bt as LlmQuantizationModule}; +import{a as d}from"./chunk-XSACZZU3.js";import{a as u}from"./chunk-OAX72PXK.js";import"./chunk-DSSER6OZ.js";import"./chunk-OWJBZ7BL.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import"./chunk-NAEQPCWM.js";import{a as f}from"./chunk-ZNSBC7FI.js";import"./chunk-PGXHYGLR.js";import"./chunk-RQYYT6OA.js";import"./chunk-HOFUFSNV.js";import{b as A,c as K,h as T}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as q,b as X}from"./chunk-3IJULEGV.js";import{a as j,b as G}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as s,Da as m,Ea as y,Ra as a,Zb as R,_ as p,a as g,ab as c,b as v,bb as C,be as z,cb as w,db as I,fb as N,ga as Q,ha as l,ib as E,ie as D,ne as O,oa as F,oc as M,oe as _,p as b,pa as P,pb as V,pe as U,qb as W,qe as k,rb as L,tb as S,te as B}from"./chunk-DL2LTWBU.js";var $=["panelParameters"],r,h=(r=class{constructor(t,i){this.fb=t,this.scriptFacadeService=i,this.AlgorithmType=K,this.AWQAlgorithmsEnum=T,this.isScriptActive=!1}ngOnInit(){this.initForm(),this.listenToScriptStateChanges()}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(G(this)).subscribe(t=>{this.isScriptActive=A(t),A(t)?this.form.disable():this.form.enable()})}initForm(){this.form=this.fb.group({algorithm:this.fb.group({alg:[]})}),setTimeout(()=>{this.form.get("algorithm.alg")?.setValue(T.AWQ_QUANTIZATION)},0)}submit(){if(this.isScriptActive)return;let{algorithm:t,model:i}=this.form.getRawValue(),{model:e}=i,o=v(g({},t),{params:v(g({},this.panelParametersComponent.parametersFormatted),{model:e})});this.scriptFacadeService.dispatch(q.callScript({configs:o}))}},r.\u0275fac=function(i){return new(i||r)(y(O),y(X))},r.\u0275cmp=Q({type:r,selectors:[["ms-llm-quantization"]],viewQuery:function(i,e){if(i&1&&V($,5),i&2){let o;W(o=L())&&(e.panelParametersComponent=o.first)}},decls:13,vars:6,consts:[["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper",3,"formGroup"],[1,"left"],[3,"formGroup"],["controlKey","model",3,"algorithmType","isTrainModelsPageRouteVisible"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"right"]],template:function(i,e){if(i&1){let o=N();s(0,"p",1),S(1,"LLM Quantization"),c(),s(2,"div",2)(3,"div",3),w(4,4),C(5,"ms-panel-model",5)(6,"ms-panel-parameters",6,0),I(),s(8,"div")(9,"button",7),E("click",function(){return F(o),P(e.submit())}),S(10," Run "),c()()(),s(11,"div",8),C(12,"ms-terminal-xterm-with-toolbar"),c()()}i&2&&(m(2),a("formGroup",e.form),m(2),a("formGroup",e.form),m(),a("algorithmType",e.AlgorithmType.AWQ)("isTrainModelsPageRouteVisible",!1),m(),a("algorithm",e.AWQAlgorithmsEnum.AWQ_QUANTIZATION),m(3),a("disabled",e.isScriptActive||e.form.invalid))},dependencies:[d,u,f,z,D,k],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),r);h=b([j()],h);var H=[{path:"",component:h}],x=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=l({type:t}),t.\u0275inj=p({imports:[M.forChild(H),M]});let n=t;return n})();var bt=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=l({type:t}),t.\u0275inj=p({imports:[R,x,d,u,f,U,_,B]});let n=t;return n})();export{bt as LlmQuantizationModule}; diff --git a/frontend/server/modelsmith-build/browser/chunk-ZDK3ESBQ.js b/frontend/server/modelsmith-build/browser/chunk-AL6JG5AI.js similarity index 97% rename from frontend/server/modelsmith-build/browser/chunk-ZDK3ESBQ.js rename to frontend/server/modelsmith-build/browser/chunk-AL6JG5AI.js index 480fdfb..38118ff 100644 --- a/frontend/server/modelsmith-build/browser/chunk-ZDK3ESBQ.js +++ b/frontend/server/modelsmith-build/browser/chunk-AL6JG5AI.js @@ -1 +1 @@ -import{a as O}from"./chunk-XSACZZU3.js";import{a as b}from"./chunk-VEEXI746.js";import"./chunk-DSSER6OZ.js";import"./chunk-OWJBZ7BL.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import{a as Ot,b as bt}from"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import"./chunk-NAEQPCWM.js";import{a as _,b as Et,c as Rt,d as x}from"./chunk-FMRIWR6H.js";import{a as Nt,b as _t}from"./chunk-PGXHYGLR.js";import"./chunk-DBDNSQWV.js";import"./chunk-HOFUFSNV.js";import{b as g,c as d,f as Ft,k as Pt}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import{b as z,c as Mt}from"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as P,b as N,c as It,j as Gt}from"./chunk-3IJULEGV.js";import{a as T,b as f}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import{h as At,i as Tt}from"./chunk-HULQWYRR.js";import{$a as a,$c as st,D as C,Da as n,Ea as c,H as B,I as Z,K as W,P as X,Pd as lt,Qd as pt,Ra as m,Za as D,Zb as at,Zd as ct,_ as v,_a as k,_d as u,a as R,ab as s,ae as ht,b as L,bb as U,be as M,ca as J,cb as Y,ce as F,db as tt,ee as dt,fb as et,ga as y,ha as A,ib as K,ie as ft,je as ut,kc as mt,le as gt,oa as w,oc as Q,oe as St,p as S,pa as j,pb as it,pe as Ct,qb as rt,qe as vt,rb as ot,tb as h,te as yt,vb as V,w as q,zb as nt}from"./chunk-DL2LTWBU.js";var Lt=(r,t)=>t.key;function Ut(r,t){if(r&1&&(a(0,"mat-option",6),h(1),s()),r&2){let e=t.$implicit;m("value",e.key),n(),V(" ",e.value," ")}}function Kt(r,t){if(r&1&&(a(0,"mat-option",6),h(1),s()),r&2){let e=t.$implicit;m("value",e.key),n(),V(" ",e.value," ")}}var l,I=(l=class{get parentFormGroup(){return this.controlContainer.control}get algorithmFormGroup(){return this.parentFormGroup.get(this.controlKey)}get algorithmFormControl(){return this.algorithmFormGroup?.get(this.ALGORITHM_CONTROL_NAME)}constructor(t,e){this.controlContainer=t,this.scriptFacadeService=e,this.controlKey="",this.pruningAlgorithmsList=Et,this.quantAlgorithmsList=Rt,this.ALGORITHM_CONTROL_NAME="alg"}ngOnInit(){this.initForm(),this.listenToScriptStateChanges(),this.loadInitialData()}loadInitialData(){this.scriptFacadeService.scriptDetails$.pipe(X(1),Z(1),C(t=>!Mt(t?.algKey))).subscribe(t=>{let e=t.type,o=e===d.PRUNING||e===d.QUANTIZATION?t.algKey:x;this.algorithmFormControl?.setValue(o)}),this.scriptFacadeService.dispatch(P.getCurrentOrLastActiveScriptDetails())}initForm(){this.parentFormGroup.addControl(this.controlKey,new F({[this.ALGORITHM_CONTROL_NAME]:new dt(x,ct.required)}))}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(f(this)).subscribe(t=>{g(t)?this.algorithmFormGroup.disable():this.algorithmFormGroup.enable()})}ngOnDestroy(){this.parentFormGroup.removeControl(this.controlKey)}},l.\u0275fac=function(e){return new(e||l)(c(u),c(N))},l.\u0275cmp=y({type:l,selectors:[["ms-panel-algorithm"]],inputs:{controlKey:"controlKey"},features:[nt([],[{provide:u,useFactory:()=>J(u,{skipSelf:!0})}])],decls:12,vars:2,consts:[[1,"ms-card","algorithm-card"],[1,"heading-sub-section-title"],[1,"form-field-container",3,"formGroupName"],["appearance","outline","subscriptSizing","dynamic"],[3,"formControlName"],["label","Pruning"],[3,"value"],["label","Quantization"]],template:function(e,i){e&1&&(a(0,"mat-card",0)(1,"p",1),h(2,"Algorithm"),s(),a(3,"div",2)(4,"mat-form-field",3)(5,"mat-select",4)(6,"mat-optgroup",5),D(7,Ut,2,2,"mat-option",6,Lt),s(),a(9,"mat-optgroup",7),D(10,Kt,2,2,"mat-option",6,Lt),s()()()()()),e&2&&(n(3),m("formGroupName",i.controlKey),n(2),m("formControlName",i.ALGORITHM_CONTROL_NAME),n(2),k(i.pruningAlgorithmsList),n(3),k(i.quantAlgorithmsList))},dependencies:[Nt,At,Ot,pt,lt,ht,M,gt,ut]}),l);I=S([T()],I);var $="custommodel";function wt(r){let t=r.replace(/[^a-zA-Z0-9_]/g,"_");return/^[0-9_]/.test(t)&&(t="file_"+t),/.py$/.test(t)||(t+=".py"),t}var Qt=["panelParameters"],p,G=(p=class{constructor(t,e,i,o){this.scriptFacadeService=t,this.fileService=e,this.snackbarService=i,this.router=o,this.form=new F({}),this.AlgorithmType=d,this.isScriptActive=!1,this.isQuantAlgorithmSelected=!1,this.selectedAlgorithm=Ft.IMP,this.selectedAlgorithmType=d.PRUNING}ngOnInit(){this.listenToAlgorithmPanelChanges(),this.listenToScriptStateChanges()}listenToAlgorithmPanelChanges(){this.form.valueChanges.pipe(B(50),q(()=>{let t=this.form.getRawValue();return t.algorithm&&t.algorithm.alg}),W(),C(t=>!z(t)),f(this)).subscribe(t=>{this.selectedAlgorithm=t,this.selectedAlgorithmType=Pt(t)})}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(f(this)).subscribe(t=>{this.isScriptActive=g(t),g(t)?this.form.disable():this.form.enable()})}submit(){if(z(this.selectedAlgorithm)){this.snackbarService.showError("Select an algorithm before running a script.");return}let{algorithm:t,model:e}=this.form.getRawValue(),{model:i}=e;if(i===$&&!this.fileService.isFileLoaded){this.snackbarService.showError("Please select a predefined model or upload a custom file.");return}let o=i===$?wt(this.fileService?.file.name):i,E=L(R({},t),{params:L(R({},this.panelParametersComponent.parametersFormatted),{arch:o})});this.scriptFacadeService.dispatch(P.callScript({configs:E}))}goToChartPage(){this.router.navigate([st.RUNNING.ROOT])}},p.\u0275fac=function(e){return new(e||p)(c(N),c(Gt),c(It),c(mt))},p.\u0275cmp=y({type:p,selectors:[["ms-machine-unlearning"]],viewQuery:function(e,i){if(e&1&&it(Qt,5),e&2){let o;rt(o=ot())&&(i.panelParametersComponent=o.first)}},decls:17,vars:5,consts:[["panelAlgorithm",""],["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper",3,"formGroup"],[1,"left"],[3,"formGroup"],["controlKey","algorithm"],["controlKey","model",3,"algorithmType"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","primary",1,"ml-2",3,"click"],[1,"right"]],template:function(e,i){if(e&1){let o=et();a(0,"p",2),h(1,"Model Compression"),s(),a(2,"div",3)(3,"div",4),Y(4,5),U(5,"ms-panel-algorithm",6,0)(7,"ms-panel-model",7)(8,"ms-panel-parameters",8,1),tt(),a(10,"div")(11,"button",9),K("click",function(){return w(o),j(i.submit())}),h(12," Run "),s(),a(13,"button",10),K("click",function(){return w(o),j(i.goToChartPage())}),h(14,"View Chart"),s()()(),a(15,"div",11),U(16,"ms-terminal-xterm-with-toolbar"),s()()}e&2&&(n(2),m("formGroup",i.form),n(2),m("formGroup",i.form),n(3),m("algorithmType",i.selectedAlgorithmType),n(),m("algorithm",i.selectedAlgorithm),n(3),m("disabled",i.isScriptActive||i.form.invalid))},dependencies:[_,O,b,M,ft,vt,I],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),p);G=S([T()],G);var zt=[{path:"",component:G}],jt=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=A({type:t}),t.\u0275inj=v({imports:[Q.forChild(zt),Q]});let r=t;return r})();var He=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=A({type:t}),t.\u0275inj=v({imports:[at,jt,_,O,b,_t,Tt,bt,St,Ct,yt]});let r=t;return r})();export{He as ModelCompressionModule}; +import{a as O}from"./chunk-XSACZZU3.js";import{a as b}from"./chunk-OAX72PXK.js";import"./chunk-DSSER6OZ.js";import"./chunk-OWJBZ7BL.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import{a as Ot,b as bt}from"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import"./chunk-NAEQPCWM.js";import{a as _,b as Et,c as Rt,d as x}from"./chunk-ZNSBC7FI.js";import{a as Nt,b as _t}from"./chunk-PGXHYGLR.js";import"./chunk-RQYYT6OA.js";import"./chunk-HOFUFSNV.js";import{b as g,c as d,f as Ft,k as Pt}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import{b as z,c as Mt}from"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as P,b as N,c as It,j as Gt}from"./chunk-3IJULEGV.js";import{a as T,b as f}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import{h as At,i as Tt}from"./chunk-HULQWYRR.js";import{$a as a,$c as st,D as C,Da as n,Ea as c,H as B,I as Z,K as W,P as X,Pd as lt,Qd as pt,Ra as m,Za as D,Zb as at,Zd as ct,_ as v,_a as k,_d as u,a as R,ab as s,ae as ht,b as L,bb as U,be as M,ca as J,cb as Y,ce as F,db as tt,ee as dt,fb as et,ga as y,ha as A,ib as K,ie as ft,je as ut,kc as mt,le as gt,oa as w,oc as Q,oe as St,p as S,pa as j,pb as it,pe as Ct,qb as rt,qe as vt,rb as ot,tb as h,te as yt,vb as V,w as q,zb as nt}from"./chunk-DL2LTWBU.js";var Lt=(r,t)=>t.key;function Ut(r,t){if(r&1&&(a(0,"mat-option",6),h(1),s()),r&2){let e=t.$implicit;m("value",e.key),n(),V(" ",e.value," ")}}function Kt(r,t){if(r&1&&(a(0,"mat-option",6),h(1),s()),r&2){let e=t.$implicit;m("value",e.key),n(),V(" ",e.value," ")}}var l,I=(l=class{get parentFormGroup(){return this.controlContainer.control}get algorithmFormGroup(){return this.parentFormGroup.get(this.controlKey)}get algorithmFormControl(){return this.algorithmFormGroup?.get(this.ALGORITHM_CONTROL_NAME)}constructor(t,e){this.controlContainer=t,this.scriptFacadeService=e,this.controlKey="",this.pruningAlgorithmsList=Et,this.quantAlgorithmsList=Rt,this.ALGORITHM_CONTROL_NAME="alg"}ngOnInit(){this.initForm(),this.listenToScriptStateChanges(),this.loadInitialData()}loadInitialData(){this.scriptFacadeService.scriptDetails$.pipe(X(1),Z(1),C(t=>!Mt(t?.algKey))).subscribe(t=>{let e=t.type,o=e===d.PRUNING||e===d.QUANTIZATION?t.algKey:x;this.algorithmFormControl?.setValue(o)}),this.scriptFacadeService.dispatch(P.getCurrentOrLastActiveScriptDetails())}initForm(){this.parentFormGroup.addControl(this.controlKey,new F({[this.ALGORITHM_CONTROL_NAME]:new dt(x,ct.required)}))}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(f(this)).subscribe(t=>{g(t)?this.algorithmFormGroup.disable():this.algorithmFormGroup.enable()})}ngOnDestroy(){this.parentFormGroup.removeControl(this.controlKey)}},l.\u0275fac=function(e){return new(e||l)(c(u),c(N))},l.\u0275cmp=y({type:l,selectors:[["ms-panel-algorithm"]],inputs:{controlKey:"controlKey"},features:[nt([],[{provide:u,useFactory:()=>J(u,{skipSelf:!0})}])],decls:12,vars:2,consts:[[1,"ms-card","algorithm-card"],[1,"heading-sub-section-title"],[1,"form-field-container",3,"formGroupName"],["appearance","outline","subscriptSizing","dynamic"],[3,"formControlName"],["label","Pruning"],[3,"value"],["label","Quantization"]],template:function(e,i){e&1&&(a(0,"mat-card",0)(1,"p",1),h(2,"Algorithm"),s(),a(3,"div",2)(4,"mat-form-field",3)(5,"mat-select",4)(6,"mat-optgroup",5),D(7,Ut,2,2,"mat-option",6,Lt),s(),a(9,"mat-optgroup",7),D(10,Kt,2,2,"mat-option",6,Lt),s()()()()()),e&2&&(n(3),m("formGroupName",i.controlKey),n(2),m("formControlName",i.ALGORITHM_CONTROL_NAME),n(2),k(i.pruningAlgorithmsList),n(3),k(i.quantAlgorithmsList))},dependencies:[Nt,At,Ot,pt,lt,ht,M,gt,ut]}),l);I=S([T()],I);var $="custommodel";function wt(r){let t=r.replace(/[^a-zA-Z0-9_]/g,"_");return/^[0-9_]/.test(t)&&(t="file_"+t),/.py$/.test(t)||(t+=".py"),t}var Qt=["panelParameters"],p,G=(p=class{constructor(t,e,i,o){this.scriptFacadeService=t,this.fileService=e,this.snackbarService=i,this.router=o,this.form=new F({}),this.AlgorithmType=d,this.isScriptActive=!1,this.isQuantAlgorithmSelected=!1,this.selectedAlgorithm=Ft.IMP,this.selectedAlgorithmType=d.PRUNING}ngOnInit(){this.listenToAlgorithmPanelChanges(),this.listenToScriptStateChanges()}listenToAlgorithmPanelChanges(){this.form.valueChanges.pipe(B(50),q(()=>{let t=this.form.getRawValue();return t.algorithm&&t.algorithm.alg}),W(),C(t=>!z(t)),f(this)).subscribe(t=>{this.selectedAlgorithm=t,this.selectedAlgorithmType=Pt(t)})}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(f(this)).subscribe(t=>{this.isScriptActive=g(t),g(t)?this.form.disable():this.form.enable()})}submit(){if(z(this.selectedAlgorithm)){this.snackbarService.showError("Select an algorithm before running a script.");return}let{algorithm:t,model:e}=this.form.getRawValue(),{model:i}=e;if(i===$&&!this.fileService.isFileLoaded){this.snackbarService.showError("Please select a predefined model or upload a custom file.");return}let o=i===$?wt(this.fileService?.file.name):i,E=L(R({},t),{params:L(R({},this.panelParametersComponent.parametersFormatted),{arch:o})});this.scriptFacadeService.dispatch(P.callScript({configs:E}))}goToChartPage(){this.router.navigate([st.RUNNING.ROOT])}},p.\u0275fac=function(e){return new(e||p)(c(N),c(Gt),c(It),c(mt))},p.\u0275cmp=y({type:p,selectors:[["ms-machine-unlearning"]],viewQuery:function(e,i){if(e&1&&it(Qt,5),e&2){let o;rt(o=ot())&&(i.panelParametersComponent=o.first)}},decls:17,vars:5,consts:[["panelAlgorithm",""],["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper",3,"formGroup"],[1,"left"],[3,"formGroup"],["controlKey","algorithm"],["controlKey","model",3,"algorithmType"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","primary",1,"ml-2",3,"click"],[1,"right"]],template:function(e,i){if(e&1){let o=et();a(0,"p",2),h(1,"Model Compression"),s(),a(2,"div",3)(3,"div",4),Y(4,5),U(5,"ms-panel-algorithm",6,0)(7,"ms-panel-model",7)(8,"ms-panel-parameters",8,1),tt(),a(10,"div")(11,"button",9),K("click",function(){return w(o),j(i.submit())}),h(12," Run "),s(),a(13,"button",10),K("click",function(){return w(o),j(i.goToChartPage())}),h(14,"View Chart"),s()()(),a(15,"div",11),U(16,"ms-terminal-xterm-with-toolbar"),s()()}e&2&&(n(2),m("formGroup",i.form),n(2),m("formGroup",i.form),n(3),m("algorithmType",i.selectedAlgorithmType),n(),m("algorithm",i.selectedAlgorithm),n(3),m("disabled",i.isScriptActive||i.form.invalid))},dependencies:[_,O,b,M,ft,vt,I],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),p);G=S([T()],G);var zt=[{path:"",component:G}],jt=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=A({type:t}),t.\u0275inj=v({imports:[Q.forChild(zt),Q]});let r=t;return r})();var He=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=A({type:t}),t.\u0275inj=v({imports:[at,jt,_,O,b,_t,Tt,bt,St,Ct,yt]});let r=t;return r})();export{He as ModelCompressionModule}; diff --git a/frontend/server/modelsmith-build/browser/chunk-W3J5KK53.js b/frontend/server/modelsmith-build/browser/chunk-BHHJCA7V.js similarity index 99% rename from frontend/server/modelsmith-build/browser/chunk-W3J5KK53.js rename to frontend/server/modelsmith-build/browser/chunk-BHHJCA7V.js index 0107f51..f84cfb5 100644 --- a/frontend/server/modelsmith-build/browser/chunk-W3J5KK53.js +++ b/frontend/server/modelsmith-build/browser/chunk-BHHJCA7V.js @@ -1,4 +1,4 @@ -import{a as E,b as P,c as te,d as _}from"./chunk-VVXFBAG6.js";import{a as x,e as I,f as ie}from"./chunk-FMRIWR6H.js";import"./chunk-PGXHYGLR.js";import"./chunk-DBDNSQWV.js";import"./chunk-HOFUFSNV.js";import{b as J,d as z,f as N}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as K,b as ee}from"./chunk-3IJULEGV.js";import{a as V,b as Z}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as i,$c as O,Bb as y,Da as d,Ea as p,Ra as u,Z as F,Zb as W,_ as j,ab as o,ba as H,bb as f,ga as h,ha as q,ib as c,ic as S,jc as Y,kc as g,oc as G,p as Q,qe as v,tb as r,te as $,ve as C,we as X}from"./chunk-DL2LTWBU.js";var s={PRETRAINED_MODEL:"pretrained-model",PRUNING_TIME:"pruning-time",PTQ_TIME:"ptq-time",SIMILAR_ACCURACY:"similar-accuracy",HIGHER_ACCURACY:"higher-accuracy",RECOMMENDED_BASIC_PTQ:"recommended-basic-ptq",RECOMMENDED_BRECQ:"recommended-brecq",RECOMMENDED_GRASP:"recommended-grasp",RECOMMENDED_ITERATIVE:"recommended-iterative",RECOMMENDED_ITERATIVE_ONE_SHOT:"recommended-iterative-one-shot",RECOMMENDED_MINMAX:"recommended-minmax"};var fe=()=>["Yes","No"],oe=(()=>{let e=class e{constructor(a,n){this.router=a,this.route=n,this.selectedOption=""}trackSelection(a){this.selectedOption=a}handleSelection(){this.selectedOption==="Yes"?this.router.navigate([s.RECOMMENDED_BASIC_PTQ],{relativeTo:this.route.parent}):this.selectedOption==="No"&&this.router.navigate([s.RECOMMENDED_BRECQ],{relativeTo:this.route.parent})}goToPreviousPage(){this.router.navigate([s.PTQ_TIME],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S))},e.\u0275cmp=h({type:e,selectors:[["ms-step-higher-accuracy"]],decls:14,vars:3,consts:[[1,"heading-primary-title"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Do you need relatively higher accuracy?"),o(),i(2,"mat-chip-set",1)(3,"mat-chip",2),c("click",function(){return t.goToPretrainedPage()}),r(4," Post-training quantization "),o(),i(5,"mat-chip",2),c("click",function(){return t.goToPreviousPage()}),r(6," Short PTQ time "),o()(),i(7,"ms-card-selector",3),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(8,"div",4)(9,"button",5),c("click",function(){return t.goToPreviousPage()}),f(10,"mat-icon",6),r(11," Previous "),o(),i(12,"button",7),c("click",function(){return t.handleSelection()}),r(13,"Next"),o()()),n&2&&(d(7),u("options",y(2,fe)),d(5),u("disabled",!t.selectedOption))},dependencies:[_,C,E,P,v]});let l=e;return l})();var Se=()=>["Yes","No"],ne=(()=>{let e=class e{constructor(a,n){this.router=a,this.route=n,this.selectedOption=""}trackSelection(a){this.selectedOption=a}handleSelection(){this.selectedOption==="Yes"?this.router.navigate([s.PTQ_TIME],{relativeTo:this.route.parent}):this.selectedOption==="No"&&this.router.navigate([s.PRUNING_TIME],{relativeTo:this.route.parent})}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S))},e.\u0275cmp=h({type:e,selectors:[["ms-step-pretrained-model"]],decls:6,vars:3,consts:[[1,"heading-primary-title"],[3,"selectedOption","options"],[1,"mt-4"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Do you have a pre-trained model?"),o(),i(2,"ms-card-selector",1),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(3,"div",2)(4,"button",3),c("click",function(){return t.handleSelection()}),r(5,"Next"),o()()),n&2&&(d(2),u("options",y(2,Se)),d(2),u("disabled",!t.selectedOption))},dependencies:[_,v]});let l=e;return l})();var ge=()=>["Yes","No"],re=(()=>{let e=class e{constructor(a,n){this.router=a,this.route=n,this.wizardSteps=s,this.selectedOption=""}trackSelection(a){this.selectedOption=a}handleSelection(){this.selectedOption==="Yes"?this.router.navigate([s.RECOMMENDED_ITERATIVE],{relativeTo:this.route.parent}):this.selectedOption==="No"&&this.router.navigate([s.SIMILAR_ACCURACY],{relativeTo:this.route.parent})}goToPreviousPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S))},e.\u0275cmp=h({type:e,selectors:[["ms-step-pruning-time"]],decls:14,vars:3,consts:[[1,"heading-primary-title"],[1,"paragraph-regular-p3-default","text-hint"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Do you tolerate long pruning time?"),o(),i(2,"p",1),r(3,` The model pruning phase may require a similar or even longer duration compared to the model training period. +import{a as E,b as P,c as te,d as _}from"./chunk-VVXFBAG6.js";import{a as x,e as I,f as ie}from"./chunk-ZNSBC7FI.js";import"./chunk-PGXHYGLR.js";import"./chunk-RQYYT6OA.js";import"./chunk-HOFUFSNV.js";import{b as J,d as z,f as N}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as K,b as ee}from"./chunk-3IJULEGV.js";import{a as V,b as Z}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as i,$c as O,Bb as y,Da as d,Ea as p,Ra as u,Z as F,Zb as W,_ as j,ab as o,ba as H,bb as f,ga as h,ha as q,ib as c,ic as S,jc as Y,kc as g,oc as G,p as Q,qe as v,tb as r,te as $,ve as C,we as X}from"./chunk-DL2LTWBU.js";var s={PRETRAINED_MODEL:"pretrained-model",PRUNING_TIME:"pruning-time",PTQ_TIME:"ptq-time",SIMILAR_ACCURACY:"similar-accuracy",HIGHER_ACCURACY:"higher-accuracy",RECOMMENDED_BASIC_PTQ:"recommended-basic-ptq",RECOMMENDED_BRECQ:"recommended-brecq",RECOMMENDED_GRASP:"recommended-grasp",RECOMMENDED_ITERATIVE:"recommended-iterative",RECOMMENDED_ITERATIVE_ONE_SHOT:"recommended-iterative-one-shot",RECOMMENDED_MINMAX:"recommended-minmax"};var fe=()=>["Yes","No"],oe=(()=>{let e=class e{constructor(a,n){this.router=a,this.route=n,this.selectedOption=""}trackSelection(a){this.selectedOption=a}handleSelection(){this.selectedOption==="Yes"?this.router.navigate([s.RECOMMENDED_BASIC_PTQ],{relativeTo:this.route.parent}):this.selectedOption==="No"&&this.router.navigate([s.RECOMMENDED_BRECQ],{relativeTo:this.route.parent})}goToPreviousPage(){this.router.navigate([s.PTQ_TIME],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S))},e.\u0275cmp=h({type:e,selectors:[["ms-step-higher-accuracy"]],decls:14,vars:3,consts:[[1,"heading-primary-title"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Do you need relatively higher accuracy?"),o(),i(2,"mat-chip-set",1)(3,"mat-chip",2),c("click",function(){return t.goToPretrainedPage()}),r(4," Post-training quantization "),o(),i(5,"mat-chip",2),c("click",function(){return t.goToPreviousPage()}),r(6," Short PTQ time "),o()(),i(7,"ms-card-selector",3),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(8,"div",4)(9,"button",5),c("click",function(){return t.goToPreviousPage()}),f(10,"mat-icon",6),r(11," Previous "),o(),i(12,"button",7),c("click",function(){return t.handleSelection()}),r(13,"Next"),o()()),n&2&&(d(7),u("options",y(2,fe)),d(5),u("disabled",!t.selectedOption))},dependencies:[_,C,E,P,v]});let l=e;return l})();var Se=()=>["Yes","No"],ne=(()=>{let e=class e{constructor(a,n){this.router=a,this.route=n,this.selectedOption=""}trackSelection(a){this.selectedOption=a}handleSelection(){this.selectedOption==="Yes"?this.router.navigate([s.PTQ_TIME],{relativeTo:this.route.parent}):this.selectedOption==="No"&&this.router.navigate([s.PRUNING_TIME],{relativeTo:this.route.parent})}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S))},e.\u0275cmp=h({type:e,selectors:[["ms-step-pretrained-model"]],decls:6,vars:3,consts:[[1,"heading-primary-title"],[3,"selectedOption","options"],[1,"mt-4"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Do you have a pre-trained model?"),o(),i(2,"ms-card-selector",1),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(3,"div",2)(4,"button",3),c("click",function(){return t.handleSelection()}),r(5,"Next"),o()()),n&2&&(d(2),u("options",y(2,Se)),d(2),u("disabled",!t.selectedOption))},dependencies:[_,v]});let l=e;return l})();var ge=()=>["Yes","No"],re=(()=>{let e=class e{constructor(a,n){this.router=a,this.route=n,this.wizardSteps=s,this.selectedOption=""}trackSelection(a){this.selectedOption=a}handleSelection(){this.selectedOption==="Yes"?this.router.navigate([s.RECOMMENDED_ITERATIVE],{relativeTo:this.route.parent}):this.selectedOption==="No"&&this.router.navigate([s.SIMILAR_ACCURACY],{relativeTo:this.route.parent})}goToPreviousPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S))},e.\u0275cmp=h({type:e,selectors:[["ms-step-pruning-time"]],decls:14,vars:3,consts:[[1,"heading-primary-title"],[1,"paragraph-regular-p3-default","text-hint"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Do you tolerate long pruning time?"),o(),i(2,"p",1),r(3,` The model pruning phase may require a similar or even longer duration compared to the model training period. `),o(),i(4,"mat-chip-set",2)(5,"mat-chip",3),c("click",function(){return t.goToPreviousPage()}),r(6," Pruning "),o()(),i(7,"ms-card-selector",4),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(8,"div",5)(9,"button",6),c("click",function(){return t.goToPreviousPage()}),f(10,"mat-icon",7),r(11," Previous "),o(),i(12,"button",8),c("click",function(){return t.handleSelection()}),r(13,"Next"),o()()),n&2&&(d(7),u("options",y(2,ge)),d(5),u("disabled",!t.selectedOption))},dependencies:[_,C,E,P,v]});let l=e;return l})();var ve=()=>["Yes","No"],ce=(()=>{let e=class e{constructor(a,n){this.router=a,this.route=n,this.selectedOption=""}trackSelection(a){this.selectedOption=a}handleSelection(){this.selectedOption==="Yes"?this.router.navigate([s.RECOMMENDED_MINMAX],{relativeTo:this.route.parent}):this.selectedOption==="No"&&this.router.navigate([s.HIGHER_ACCURACY],{relativeTo:this.route.parent})}goToPreviousPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S))},e.\u0275cmp=h({type:e,selectors:[["ms-step-ptq-time"]],decls:14,vars:3,consts:[[1,"heading-primary-title"],[1,"paragraph-regular-p3-default","text-hint"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Do you tolerate long PTQ time?"),o(),i(2,"p",1),r(3,` Our system supports processing times ranging from minutes (short) to several hours (long), ensuring consistent efficiency and reliability for tasks of any duration. `),o(),i(4,"mat-chip-set",2)(5,"mat-chip",3),c("click",function(){return t.goToPreviousPage()}),r(6," Post-training quantization "),o()(),i(7,"ms-card-selector",4),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(8,"div",5)(9,"button",6),c("click",function(){return t.goToPreviousPage()}),f(10,"mat-icon",7),r(11," Previous "),o(),i(12,"button",8),c("click",function(){return t.handleSelection()}),r(13,"Next"),o()()),n&2&&(d(7),u("options",y(2,ve)),d(5),u("disabled",!t.selectedOption))},dependencies:[_,C,E,P,v]});let l=e;return l})();var D,R=(D=class{constructor(e){this.scriptFacadeService=e,this.isScriptActive=!1,this.listenToScriptStateChanges()}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(Z(this)).subscribe(e=>{this.isScriptActive=J(e)})}ctaCallScript(e){if(!e)return;let L=ie(e);L&&this.scriptFacadeService.dispatch(K.callScript({configs:{alg:L}}))}},D.\u0275fac=function(L){return new(L||D)(H(ee))},D.\u0275prov=F({token:D,factory:D.\u0275fac}),D);R=Q([V()],R);var ae=(()=>{let e=class e{constructor(a,n,t){this.router=a,this.route=n,this.wizardUtilsService=t,this.selectedOption="",this.algorithms=[],this.algorithms=I([z.BPTQ])}trackSelection(a){this.selectedOption=a}handleSelection(){this.wizardUtilsService.ctaCallScript(this.selectedOption)}goToPreviousPage(){this.router.navigate([s.HIGHER_ACCURACY],{relativeTo:this.route.parent})}goToPTQPage(){this.router.navigate([s.PTQ_TIME],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}goToChartPage(){this.router.navigate([`${O.RUNNING.ROOT}`])}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S),p(R))},e.\u0275cmp=h({type:e,selectors:[["ms-step-recommend-basic-ptq"]],decls:18,vars:2,consts:[[1,"heading-primary-title"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",1,"mr-3",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Recommended Algorithm:"),o(),i(2,"mat-chip-set",1)(3,"mat-chip",2),c("click",function(){return t.goToPretrainedPage()}),r(4," Post-training quantization "),o(),i(5,"mat-chip",2),c("click",function(){return t.goToPTQPage()}),r(6," Short PTQ time "),o(),i(7,"mat-chip",2),c("click",function(){return t.goToPreviousPage()}),r(8," High Accuracy "),o()(),i(9,"ms-card-selector",3),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(10,"div",4)(11,"button",5),c("click",function(){return t.goToPreviousPage()}),f(12,"mat-icon",6),r(13," Previous "),o(),i(14,"button",7),c("click",function(){return t.handleSelection()}),r(15," Run "),o(),i(16,"button",8),c("click",function(){return t.goToChartPage()}),r(17,"View Chart"),o()()),n&2&&(d(9),u("options",t.algorithms),d(5),u("disabled",!t.selectedOption||t.wizardUtilsService.isScriptActive))},dependencies:[_,C,E,P,v]});let l=e;return l})();var me=(()=>{let e=class e{constructor(a,n,t){this.router=a,this.route=n,this.wizardUtilsService=t,this.selectedOption="",this.algorithms=[],this.algorithms=I([z.BRECQ])}trackSelection(a){this.selectedOption=a}handleSelection(){this.wizardUtilsService.ctaCallScript(this.selectedOption)}goToPreviousPage(){this.router.navigate([s.HIGHER_ACCURACY],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}goToPTQPage(){this.router.navigate([s.PTQ_TIME],{relativeTo:this.route.parent})}goToChartPage(){this.router.navigate([`${O.RUNNING.ROOT}`])}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S),p(R))},e.\u0275cmp=h({type:e,selectors:[["ms-step-recommend-brecq"]],decls:18,vars:2,consts:[[1,"heading-primary-title"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",1,"mr-3",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Recommended Algorithm:"),o(),i(2,"mat-chip-set",1)(3,"mat-chip",2),c("click",function(){return t.goToPretrainedPage()}),r(4," Post-training quantization "),o(),i(5,"mat-chip",2),c("click",function(){return t.goToPTQPage()}),r(6," Short PTQ time "),o(),i(7,"mat-chip",2),c("click",function(){return t.goToPreviousPage()}),r(8," Low Accuracy "),o()(),i(9,"ms-card-selector",3),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(10,"div",4)(11,"button",5),c("click",function(){return t.goToPreviousPage()}),f(12,"mat-icon",6),r(13," Previous "),o(),i(14,"button",7),c("click",function(){return t.handleSelection()}),r(15," Run "),o(),i(16,"button",8),c("click",function(){return t.goToChartPage()}),r(17,"View Chart"),o()()),n&2&&(d(9),u("options",t.algorithms),d(5),u("disabled",!t.selectedOption||t.wizardUtilsService.isScriptActive))},dependencies:[_,C,E,P,v]});let l=e;return l})();var se=(()=>{let e=class e{constructor(a,n,t){this.router=a,this.route=n,this.wizardUtilsService=t,this.selectedOption="",this.algorithms=[],this.algorithms=I([N.IPG,N.IPR,N.IPM])}trackSelection(a){this.selectedOption=a}handleSelection(){this.wizardUtilsService.ctaCallScript(this.selectedOption)}goToPreviousPage(){this.router.navigate([s.SIMILAR_ACCURACY],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}goToPruningTimePage(){this.router.navigate([s.PRUNING_TIME],{relativeTo:this.route.parent})}goToChartPage(){this.router.navigate([`${O.RUNNING.ROOT}`])}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S),p(R))},e.\u0275cmp=h({type:e,selectors:[["ms-step-recommend-grasp"]],decls:18,vars:2,consts:[[1,"heading-primary-title"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",1,"mr-3",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Recommended Algorithm:"),o(),i(2,"mat-chip-set",1)(3,"mat-chip",2),c("click",function(){return t.goToPretrainedPage()}),r(4," Pruning "),o(),i(5,"mat-chip",2),c("click",function(){return t.goToPruningTimePage()}),r(6," Short pruning time "),o(),i(7,"mat-chip",2),c("click",function(){return t.goToPreviousPage()}),r(8," Init pruning "),o()(),i(9,"ms-card-selector",3),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(10,"div",4)(11,"button",5),c("click",function(){return t.goToPreviousPage()}),f(12,"mat-icon",6),r(13," Previous "),o(),i(14,"button",7),c("click",function(){return t.handleSelection()}),r(15," Run "),o(),i(16,"button",8),c("click",function(){return t.goToChartPage()}),r(17,"View Chart"),o()()),n&2&&(d(9),u("options",t.algorithms),d(5),u("disabled",!t.selectedOption||t.wizardUtilsService.isScriptActive))},dependencies:[_,C,E,P,v]});let l=e;return l})();var le=(()=>{let e=class e{constructor(a,n,t){this.router=a,this.route=n,this.wizardUtilsService=t,this.selectedOption="",this.algorithms=[],this.algorithms=I([N.IMP,N.OMP])}trackSelection(a){this.selectedOption=a}handleSelection(){this.wizardUtilsService.ctaCallScript(this.selectedOption)}goToPreviousPage(){this.router.navigate([s.SIMILAR_ACCURACY],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}goToPruningTimePage(){this.router.navigate([s.PRUNING_TIME],{relativeTo:this.route.parent})}goToChartPage(){this.router.navigate([`${O.RUNNING.ROOT}`])}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S),p(R))},e.\u0275cmp=h({type:e,selectors:[["ms-step-recommend-iterative-one-shot"]],decls:18,vars:2,consts:[[1,"heading-primary-title"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",1,"mr-3",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Recommended Algorithm:"),o(),i(2,"mat-chip-set",1)(3,"mat-chip",2),c("click",function(){return t.goToPretrainedPage()}),r(4," Pruning "),o(),i(5,"mat-chip",2),c("click",function(){return t.goToPruningTimePage()}),r(6," Long pruning time "),o(),i(7,"mat-chip",2),c("click",function(){return t.goToPreviousPage()}),r(8," Higher accuracy "),o()(),i(9,"ms-card-selector",3),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(10,"div",4)(11,"button",5),c("click",function(){return t.goToPreviousPage()}),f(12,"mat-icon",6),r(13," Previous "),o(),i(14,"button",7),c("click",function(){return t.handleSelection()}),r(15," Run "),o(),i(16,"button",8),c("click",function(){return t.goToChartPage()}),r(17,"View Chart"),o()()),n&2&&(d(9),u("options",t.algorithms),d(5),u("disabled",!t.selectedOption||t.wizardUtilsService.isScriptActive))},dependencies:[_,C,E,P,v]});let l=e;return l})();var pe=(()=>{let e=class e{constructor(a,n,t){this.router=a,this.route=n,this.wizardUtilsService=t,this.selectedOption="",this.algorithms=[],this.algorithms=I([N.IMP])}trackSelection(a){this.selectedOption=a}handleSelection(){this.wizardUtilsService.ctaCallScript(this.selectedOption)}goToPreviousPage(){this.router.navigate([s.PRUNING_TIME],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}goToChartPage(){this.router.navigate([`${O.RUNNING.ROOT}`])}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S),p(R))},e.\u0275cmp=h({type:e,selectors:[["ms-step-recommend-iterative"]],decls:16,vars:2,consts:[[1,"heading-primary-title"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",1,"mr-3",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Recommended Algorithm:"),o(),i(2,"mat-chip-set",1)(3,"mat-chip",2),c("click",function(){return t.goToPretrainedPage()}),r(4," Pruning "),o(),i(5,"mat-chip",2),c("click",function(){return t.goToPreviousPage()}),r(6," Long pruning time "),o()(),i(7,"ms-card-selector",3),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(8,"div",4)(9,"button",5),c("click",function(){return t.goToPreviousPage()}),f(10,"mat-icon",6),r(11," Previous "),o(),i(12,"button",7),c("click",function(){return t.handleSelection()}),r(13," Run "),o(),i(14,"button",8),c("click",function(){return t.goToChartPage()}),r(15,"View Chart"),o()()),n&2&&(d(7),u("options",t.algorithms),d(5),u("disabled",!t.selectedOption||t.wizardUtilsService.isScriptActive))},dependencies:[_,C,E,P,v]});let l=e;return l})();var de=(()=>{let e=class e{constructor(a,n,t){this.router=a,this.route=n,this.wizardUtilsService=t,this.selectedOption="",this.algorithms=[],this.algorithms=I([z.MINMAXPTQ])}trackSelection(a){this.selectedOption=a}handleSelection(){this.wizardUtilsService.ctaCallScript(this.selectedOption)}goToPreviousPage(){this.router.navigate([s.PTQ_TIME],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}goToChartPage(){this.router.navigate([`${O.RUNNING.ROOT}`])}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S),p(R))},e.\u0275cmp=h({type:e,selectors:[["ms-step-recommend-minmax"]],decls:16,vars:2,consts:[[1,"heading-primary-title"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",1,"mr-3",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Recommended Algorithm:"),o(),i(2,"mat-chip-set",1)(3,"mat-chip",2),c("click",function(){return t.goToPretrainedPage()}),r(4," Post-training quantization "),o(),i(5,"mat-chip",2),c("click",function(){return t.goToPreviousPage()}),r(6," Long PTQ time "),o()(),i(7,"ms-card-selector",3),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(8,"div",4)(9,"button",5),c("click",function(){return t.goToPreviousPage()}),f(10,"mat-icon",6),r(11," Previous "),o(),i(12,"button",7),c("click",function(){return t.handleSelection()}),r(13," Run "),o(),i(14,"button",8),c("click",function(){return t.goToChartPage()}),r(15,"View Chart"),o()()),n&2&&(d(7),u("options",t.algorithms),d(5),u("disabled",!t.selectedOption||t.wizardUtilsService.isScriptActive))},dependencies:[_,C,E,P,v]});let l=e;return l})();var Te=()=>["Yes","No"],ue=(()=>{let e=class e{constructor(a,n){this.router=a,this.route=n,this.selectedOption=""}trackSelection(a){this.selectedOption=a}handleSelection(){this.selectedOption==="Yes"?this.router.navigate([s.RECOMMENDED_ITERATIVE_ONE_SHOT],{relativeTo:this.route.parent}):this.selectedOption==="No"&&this.router.navigate([s.RECOMMENDED_GRASP],{relativeTo:this.route.parent})}goToPreviousPage(){this.router.navigate([s.PRUNING_TIME],{relativeTo:this.route.parent})}goToPretrainedPage(){this.router.navigate([s.PRETRAINED_MODEL],{relativeTo:this.route.parent})}};e.\u0275fac=function(n){return new(n||e)(p(g),p(S))},e.\u0275cmp=h({type:e,selectors:[["ms-step-similar-accuracy"]],decls:16,vars:3,consts:[[1,"heading-primary-title"],[1,"paragraph-regular-p3-default","text-hint"],[1,"mt-2","mb-2"],["color","accent",1,"ms-chip",3,"click"],[3,"selectedOption","options"],[1,"mt-4"],["mat-button","",1,"mr-3",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,t){n&1&&(i(0,"p",0),r(1,"Do you want to have a similar or higher accuracy?\xA0"),o(),i(2,"p",1),r(3,` Expectations for compressed model performance: Anticipate achieving comparable or enhanced accuracy relative to the original model. `),o(),i(4,"mat-chip-set",2)(5,"mat-chip",3),c("click",function(){return t.goToPretrainedPage()}),r(6," Pruning "),o(),i(7,"mat-chip",3),c("click",function(){return t.goToPreviousPage()}),r(8," Short pruning time "),o()(),i(9,"ms-card-selector",4),c("selectedOption",function(T){return t.trackSelection(T)}),o(),i(10,"div",5)(11,"button",6),c("click",function(){return t.goToPreviousPage()}),f(12,"mat-icon",7),r(13," Previous "),o(),i(14,"button",8),c("click",function(){return t.handleSelection()}),r(15,"Next"),o()()),n&2&&(d(9),u("options",y(2,Te)),d(5),u("disabled",!t.selectedOption))},dependencies:[_,C,E,P,v]});let l=e;return l})();var he=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=h({type:e,selectors:[["ms-wizard"]],decls:5,vars:0,consts:[[1,"wizard-layout"],[1,"left"],[1,"right"]],template:function(n,t){n&1&&(i(0,"div",0)(1,"div",1),f(2,"router-outlet"),o(),i(3,"div",2),f(4,"ms-terminal-xterm-with-toolbar"),o()())},dependencies:[Y,x],styles:[".wizard-layout[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:20px;height:100%}.wizard-layout[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{width:45%;gap:20px}.wizard-layout[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{width:55%}"]});let l=e;return l})();var Ce=[{path:"",component:he,children:[{path:"",redirectTo:s.PRETRAINED_MODEL,pathMatch:"full"},{path:s.PRETRAINED_MODEL,component:ne},{path:s.PRUNING_TIME,component:re},{path:s.PTQ_TIME,component:ce},{path:s.SIMILAR_ACCURACY,component:ue},{path:s.HIGHER_ACCURACY,component:oe},{path:s.RECOMMENDED_BASIC_PTQ,component:ae},{path:s.RECOMMENDED_BRECQ,component:me},{path:s.RECOMMENDED_GRASP,component:se},{path:s.RECOMMENDED_ITERATIVE,component:pe},{path:s.RECOMMENDED_MINMAX,component:de},{path:s.RECOMMENDED_ITERATIVE_ONE_SHOT,component:le}]}],_e=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=q({type:e}),e.\u0275inj=j({imports:[G.forChild(Ce),G]});let l=e;return l})();var li=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=q({type:e}),e.\u0275inj=j({providers:[R],imports:[W,_e,x,_,X,te,$]});let l=e;return l})();export{li as WizardModule}; diff --git a/frontend/server/modelsmith-build/browser/chunk-CPWG5WGB.js b/frontend/server/modelsmith-build/browser/chunk-BYKCD3I3.js similarity index 98% rename from frontend/server/modelsmith-build/browser/chunk-CPWG5WGB.js rename to frontend/server/modelsmith-build/browser/chunk-BYKCD3I3.js index 1bb1085..9c716ce 100644 --- a/frontend/server/modelsmith-build/browser/chunk-CPWG5WGB.js +++ b/frontend/server/modelsmith-build/browser/chunk-BYKCD3I3.js @@ -1 +1 @@ -import{a as nt,b as at,c as mt}from"./chunk-7PEG3RXI.js";import{a as rt}from"./chunk-XK5WXYJA.js";import{a as de}from"./chunk-VEEXI746.js";import{b as Xe,c as Je,e as it,f as ot,g as O}from"./chunk-DSSER6OZ.js";import{b as Ze}from"./chunk-OWJBZ7BL.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import{a as se,b as pe}from"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import{a as Ve,b as je}from"./chunk-NAEQPCWM.js";import{a as ce}from"./chunk-FMRIWR6H.js";import{a as U,b as le}from"./chunk-PGXHYGLR.js";import"./chunk-DBDNSQWV.js";import{a as K}from"./chunk-HOFUFSNV.js";import{b as E,c as p,i as g,j as We}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import{b as Ye,c as G,d as qe}from"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as me,b as D,c as et,k as tt}from"./chunk-3IJULEGV.js";import{a as A,b as d}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import{h as oe,i as re}from"./chunk-HULQWYRR.js";import{$a as m,$c as Ue,Ab as Re,D as P,Da as n,Ea as s,Eb as I,Fb as b,Gb as we,H as ge,I as Ne,K as Ce,P as Q,Pa as C,Pd as Ke,Q as Fe,Qd as W,Ra as c,Wb as ke,Xa as M,Xb as Le,Ya as Ae,Yb as De,Za as x,Zb as q,Zd as X,_ as z,_a as R,_d as h,a as Te,ab as r,ae as J,b as Se,bb as u,be as k,ca as H,cb as Pe,ce as L,db as be,ee as $,fb as Ee,ga as F,ha as Z,he as $e,ib as _e,ie as Be,je as ee,kb as w,le as te,na as Ie,oa as Me,oc as ve,oe as Qe,p as S,pa as ye,pb as Ge,pe as ie,qb as Oe,qe as ze,rb as xe,tb as l,te as He,vb as f,ve as ne,w as N,we as ae,zb as Y}from"./chunk-DL2LTWBU.js";var Ct=(i,e)=>e.name;function Mt(i,e){i&1&&u(0,"mat-icon",10)}function yt(i,e){if(i&1&&(m(0,"mat-option",8),l(1),C(2,Mt,1,0,"mat-icon",10),r()),i&2){let t=e.$implicit;c("value",t.name),n(),f(" ",t.name," "),n(),M(t.isTrained?-1:2)}}function _t(i,e){i&1&&(m(0,"mat-option",9),l(1,"No results found"),r())}function vt(i,e){if(i&1&&(x(0,yt,3,3,"mat-option",8,Ct),C(2,_t,2,0,"mat-option",9)),i&2){let t=e;R(t),n(2),M(t.length===0?2:-1)}}var y,V=(y=class{ngOnChanges(e){e.algorithmType&&e.algorithmType.currentValue&&this.configureModels(e.algorithmType.currentValue)}get parentFormGroup(){return this.controlContainer.control}get modelFormGroup(){return this.parentFormGroup.get(this.controlKey)}get modelControl(){return this.modelFormGroup?.get(this.MODEL_CONTROL_NAME)}constructor(e,t,o,a){this.controlContainer=e,this.modelsFacadeService=t,this.scriptFacadeService=o,this.pageRunningScriptSpiningIndicatorService=a,this.controlKey="",this.PageKey=Xe,this.RoutesList=Ue,this.searchModel=new $,this.models=[],this.MODEL_CONTROL_NAME="model"}ngOnInit(){this.initializeForm(),this.listenToScriptStateChanges(),this.listenToSearchModelValueChanges(),this.configureModels(this.algorithmType)}configureModels(e){if(e)switch(this.getModelsByTypeSubscription?.unsubscribe(),this.getModelsByTypeSubscription=this.subscribeToModelsListChanges(e),this.modelsFacadeService.dispatch(O.getModelsList({algorithmType:e})),e){case p.PRUNING:{this.modelsFacadeService.dispatch(O.getCurrentOrPreviousSelectedModel({algorithmType:g.PRUNING_TRAIN}));break}case p.QUANTIZATION:{this.modelsFacadeService.dispatch(O.getCurrentOrPreviousSelectedModel({algorithmType:g.QUANTIZATION_TRAIN}));break}case p.MACHINE_UNLEARNING:{this.modelsFacadeService.dispatch(O.getCurrentOrPreviousSelectedModel({algorithmType:g.MACHINE_UNLEARNING_TRAIN}));break}}}listenToCurrentModelChanges(){this.modelsFacadeService.currentModel$.pipe(d(this)).subscribe(e=>{if(G(e))return;this.models.find(o=>o.name===e)&&this.modelControl?.patchValue(e)})}subscribeToModelsListChanges(e){let t=!1;return this.modelsFacadeService.getModelsByType(e).pipe(P(o=>!qe(o)),N(o=>[...o].sort((a,j)=>Number(j.isTrained)-Number(a.isTrained)))).subscribe(o=>{this.models=o,this.searchModel.setValue(""),t||(this.listenToCurrentModelChanges(),t=!0)})}initializeForm(){this.parentFormGroup.addControl(this.controlKey,new L({[this.MODEL_CONTROL_NAME]:new $("",X.required)}))}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(d(this)).subscribe(e=>{E(e)?this.modelFormGroup.disable():this.modelFormGroup.enable()})}listenToSearchModelValueChanges(){this.filteredModels=this.searchModel.valueChanges.pipe(d(this),Fe(""),N(e=>this.filterModels(e)))}filterModels(e){let t=e.toLowerCase();return this.models.filter(o=>o.name.toLowerCase().includes(t))}ngOnDestroy(){this.parentFormGroup.removeControl(this.controlKey)}},y.\u0275fac=function(t){return new(t||y)(s(h),s(K),s(D),s(Je))},y.\u0275cmp=F({type:y,selectors:[["ms-panel-model-training"]],inputs:{controlKey:"controlKey",algorithmType:"algorithmType"},standalone:!0,features:[Y([],[{provide:h,useFactory:()=>H(h,{skipSelf:!0})}]),Ie,Re],decls:12,vars:5,consts:[[1,"ms-card","model-card"],[1,"panel-title-wrapper"],[1,"heading-sub-section-title"],[1,"form-field-container",3,"formGroupName"],["appearance","outline","subscriptSizing","dynamic"],["formControlName","model","placeholder","Select a model..."],[3,"formControl"],["label","Predefined Models"],[3,"value"],["disabled",""],["fontSet","ms","fontIcon","icon-X",1,"mat-error"]],template:function(t,o){if(t&1&&(m(0,"mat-card",0)(1,"div",1)(2,"div",2),l(3,"Model"),r()(),m(4,"div",3)(5,"mat-form-field",4)(6,"mat-select",5)(7,"mat-option"),u(8,"ngx-mat-select-search",6),r(),m(9,"mat-optgroup",7),C(10,vt,3,1),I(11,"async"),r()()()()()),t&2){let a;n(4),c("formGroupName",o.controlKey),n(4),c("formControl",o.searchModel),n(2),M((a=b(11,3,o.filteredModels))?10:-1,a)}},dependencies:[ie,J,k,$e,te,ee,le,U,re,oe,pe,se,W,Ke,ae,ne,q,ke,ot,it,Ze],styles:[".panel-title-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:12px}.panel-title-wrapper[_ngcontent-%COMP%] .train-models[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}"]}),y);V=S([A()],V);var Nt=(i,e)=>e.key;function Ft(i,e){if(i&1&&(m(0,"mat-option",6),l(1),r()),i&2){let t=e.$implicit;c("value",t.key),n(),f(" ",t.value," ")}}var _,ue=(_=class{get parentFormGroup(){return this.controlContainer.control}get algorithmTypeFormGroup(){return this.parentFormGroup.get(this.controlKey)}get algorithmTypeFormControl(){return this.algorithmTypeFormGroup.get(this.ALGORITHM_TYPE_CONTROL_NAME)}constructor(e,t){this.controlContainer=e,this.scriptFacadeService=t,this.controlKey="",this.algorithmTypesOptions=[{key:p.QUANTIZATION,value:"Quantization"},{key:p.PRUNING,value:"Pruning"},{key:p.MACHINE_UNLEARNING,value:"Machine Unlearning"}],this.ALGORITHM_TYPE_CONTROL_NAME="algorithmType"}ngOnInit(){this.initForm(),this.loadInitialData(),this.listenToScriptStateChanges()}loadInitialData(){this.scriptFacadeService.scriptDetails$.pipe(Q(1),Ne(1),P(e=>!G(e?.algKey)),N(e=>e.algKey)).subscribe(e=>{switch(e){case g.PRUNING_TRAIN:{this.algorithmTypeFormControl.patchValue(p.PRUNING);break}case g.MACHINE_UNLEARNING_TRAIN:{this.algorithmTypeFormControl.patchValue(p.MACHINE_UNLEARNING);break}case g.QUANTIZATION_TRAIN:{this.algorithmTypeFormControl.patchValue(p.QUANTIZATION);break}default:this.algorithmTypeFormControl.patchValue(p.PRUNING)}}),this.scriptFacadeService.dispatch(me.getCurrentOrLastActiveScriptDetails())}initForm(){this.parentFormGroup.addControl(this.controlKey,new L({[this.ALGORITHM_TYPE_CONTROL_NAME]:new $(p.PRUNING,X.required)}))}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(d(this)).subscribe(e=>{E(e)?this.algorithmTypeFormGroup.disable():this.algorithmTypeFormGroup.enable()})}},_.\u0275fac=function(t){return new(t||_)(s(h),s(D))},_.\u0275cmp=F({type:_,selectors:[["ms-panel-algorithm-type-for-training"]],inputs:{controlKey:"controlKey"},features:[Y([],[{provide:h,useFactory:()=>H(h,{skipSelf:!0})}])],decls:9,vars:2,consts:[[1,"ms-card","parameters-card"],[1,"heading-sub-section-title"],[3,"formGroupName"],[1,"form-field-container"],["appearance","outline","subscriptSizing","dynamic"],[3,"formControlName"],[3,"value"]],template:function(t,o){t&1&&(m(0,"mat-card",0)(1,"p",1),l(2,"Algorithm Type"),r(),Pe(3,2),m(4,"div",3)(5,"mat-form-field",4)(6,"mat-select",5),x(7,Ft,2,2,"mat-option",6,Nt),r()()(),be(),r()),t&2&&(n(3),c("formGroupName",o.controlKey),n(3),c("formControlName",o.ALGORITHM_TYPE_CONTROL_NAME),n(),R(o.algorithmTypesOptions))},dependencies:[U,oe,se,W,J,k,te,ee]}),_);ue=S([A()],ue);function At(i,e){if(i&1&&(l(0),I(1,"adaptiveFileSize")),i&2){let t=w().$implicit;f(" ",b(1,1,t.value)," ")}}function Pt(i,e){if(i&1&&(l(0),I(1,"date")),i&2){let t=w().$implicit;f(" ",we(1,1,t.value,"medium")," ")}}function bt(i,e){if(i&1&&(l(0),I(1,"readableDuration")),i&2){let t=w().$implicit;f(" ",b(1,1,t.value)," ")}}function Et(i,e){if(i&1&&l(0),i&2){let t=w().$implicit;f(" ",t.value," ")}}function Gt(i,e){i&1&&(m(0,"div",8),u(1,"mat-divider"),r())}function Ot(i,e){if(i&1&&(m(0,"div")(1,"div",5)(2,"div",6),l(3),I(4,"parametersLabel"),r(),m(5,"div",7),C(6,At,2,3)(7,Pt,2,4)(8,bt,2,3)(9,Et,1,1),r()(),C(10,Gt,2,0,"div",8),r()),i&2){let t,o=e.$implicit,a=e.$index,j=e.$count;n(3),f("",b(4,3,o.key),":"),n(3),M((t=o.key)==="file_size_bytes"?6:t==="creation_date"?7:t==="training_duration_seconds"?8:9),n(4),M(a!==j-1?10:-1)}}function xt(i,e){if(i&1&&(m(0,"div",3),x(1,Ot,11,5,"div",null,Ae),r()),i&2){let t=w();n(),R(t)}}function Rt(i,e){i&1&&u(0,"ms-empty-state",4)}function wt(i,e){i&1&&(m(0,"div",2),C(1,xt,3,0,"div",3)(2,Rt,1,0,"ms-empty-state",4),r()),i&2&&(n(),M(e.length>0?1:2))}var v,fe=(v=class{constructor(e){this.modelsFacadeService=e,this.metadata={}}ngOnInit(){this.modelsFacadeService.modelMetadata$.pipe(Q(1),d(this)).subscribe(e=>{this.metadata=e})}},v.\u0275fac=function(t){return new(t||v)(s(K))},v.\u0275cmp=F({type:v,selectors:[["ms-panel-model-metadata"]],decls:5,vars:3,consts:[[1,"ms-card","metadata-card"],[1,"heading-sub-section-title"],[1,"metadata-wrapper"],[1,"key-value-container","single"],["title","No metadata available"],[1,"key-value-pair","space-between"],[1,"key-value-key"],[1,"key-value-value"],[1,"pt-2"]],template:function(t,o){if(t&1&&(m(0,"mat-card",0)(1,"p",1),l(2,"Model Training Information"),r(),C(3,wt,3,1,"div",2),I(4,"keyvalue"),r()),t&2){let a;n(3),M((a=b(4,1,o.metadata))?3:-1,a)}},dependencies:[rt,U,Ve,Le,De,nt,mt,at],styles:[".metadata-wrapper[_ngcontent-%COMP%]{max-height:300px;overflow:auto;padding-right:20px}"]}),v);fe=S([A()],fe);var Lt=["panelParameters"],T,he=(T=class{constructor(e,t,o,a){this.navigationService=e,this.scriptFacadeService=t,this.snackbarService=o,this.modelsFacadeService=a,this.form=new L({}),this.isScriptActive=!1,this.selectedAlgorithmType=p.PRUNING,this.selectedAlgorithmKey=g.PRUNING_TRAIN}ngOnInit(){this.listenToAlgorithmPanelChanges(),this.listenToScriptStateChanges(),this.listenToFormChangesToLoadModelMetadata()}listenToAlgorithmPanelChanges(){this.form.valueChanges.pipe(ge(50),N(()=>{let e=this.form.getRawValue();return e.algorithmTypeGroup&&e.algorithmTypeGroup.algorithmType}),Ce(),P(e=>!!e),d(this)).subscribe(e=>{this.selectedAlgorithmType=e,this.selectedAlgorithmKey=We[e]})}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(d(this)).subscribe(e=>{this.isScriptActive=E(e),E(e)?this.form.disable():this.form.enable()})}listenToFormChangesToLoadModelMetadata(){this.form.valueChanges.pipe(ge(50),N(e=>{let t=e.algorithmTypeGroup?.algorithmType,o=e.model?.model;return{algorithmType:t,model:o}}),Ce((e,t)=>JSON.stringify(e)===JSON.stringify(t)),P(({algorithmType:e,model:t})=>!G(e)&&!G(t)),d(this)).subscribe(({algorithmType:e,model:t})=>{this.modelsFacadeService.dispatch(O.getModelMetadata({algorithmType:e,modelName:t}))})}submit(){if(Ye(this.selectedAlgorithmType)){this.snackbarService.showError("Select an algorithm before running a script.");return}let{model:e}=this.form.getRawValue(),{model:t}=e,o={alg:this.selectedAlgorithmKey,params:Se(Te({},this.panelParametersComponent.parametersFormatted),{arch:t})};this.scriptFacadeService.dispatch(me.callScript({configs:o}))}},T.\u0275fac=function(t){return new(t||T)(s(tt),s(D),s(et),s(K))},T.\u0275cmp=F({type:T,selectors:[["ms-model-training"]],viewQuery:function(t,o){if(t&1&&Ge(Lt,5),t&2){let a;Oe(a=xe())&&(o.panelParametersComponent=a.first)}},decls:17,vars:4,consts:[["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper"],[1,"left",3,"formGroup"],["controlKey","algorithmTypeGroup"],["controlKey","model",3,"algorithmType"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-stroked-button","","color","primary",1,"ml-2",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],[1,"right"]],template:function(t,o){if(t&1){let a=Ee();m(0,"p",1),l(1,"Model Training"),r(),m(2,"div",2)(3,"div",3),u(4,"ms-panel-algorithm-type-for-training",4)(5,"ms-panel-model-training",5)(6,"ms-panel-model-metadata")(7,"ms-panel-parameters",6,0),m(9,"div")(10,"button",7),_e("click",function(){return Me(a),ye(o.submit())}),l(11," Run "),r(),m(12,"button",8),_e("click",function(){return Me(a),ye(o.navigationService.goToPreviousPage())}),u(13,"mat-icon",9),l(14," Go back "),r()()(),m(15,"div",10),u(16,"ms-terminal-xterm-with-toolbar"),r()()}t&2&&(n(3),c("formGroup",o.form),n(2),c("algorithmType",o.selectedAlgorithmType),n(2),c("algorithm",o.selectedAlgorithmKey),n(3),c("disabled",o.isScriptActive||o.form.invalid))},dependencies:[ce,V,de,k,Be,ne,ze,ue,fe],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),T);he=S([A()],he);var Dt=[{path:"",component:he}],ct=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=Z({type:e}),e.\u0275inj=z({imports:[ve.forChild(Dt),ve]});let i=e;return i})();var yo=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=Z({type:e}),e.\u0275inj=z({imports:[q,ct,ce,V,de,le,je,pe,re,Qe,ie,ae,He]});let i=e;return i})();export{yo as ModelTrainingModule}; +import{a as nt,b as at,c as mt}from"./chunk-7PEG3RXI.js";import{a as rt}from"./chunk-XK5WXYJA.js";import{a as de}from"./chunk-OAX72PXK.js";import{b as Xe,c as Je,e as it,f as ot,g as O}from"./chunk-DSSER6OZ.js";import{b as Ze}from"./chunk-OWJBZ7BL.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import{a as se,b as pe}from"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import{a as Ve,b as je}from"./chunk-NAEQPCWM.js";import{a as ce}from"./chunk-ZNSBC7FI.js";import{a as U,b as le}from"./chunk-PGXHYGLR.js";import"./chunk-RQYYT6OA.js";import{a as K}from"./chunk-HOFUFSNV.js";import{b as E,c as p,i as g,j as We}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import{b as Ye,c as G,d as qe}from"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as me,b as D,c as et,k as tt}from"./chunk-3IJULEGV.js";import{a as A,b as d}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import{h as oe,i as re}from"./chunk-HULQWYRR.js";import{$a as m,$c as Ue,Ab as Re,D as P,Da as n,Ea as s,Eb as I,Fb as b,Gb as we,H as ge,I as Ne,K as Ce,P as Q,Pa as C,Pd as Ke,Q as Fe,Qd as W,Ra as c,Wb as ke,Xa as M,Xb as Le,Ya as Ae,Yb as De,Za as x,Zb as q,Zd as X,_ as z,_a as R,_d as h,a as Te,ab as r,ae as J,b as Se,bb as u,be as k,ca as H,cb as Pe,ce as L,db as be,ee as $,fb as Ee,ga as F,ha as Z,he as $e,ib as _e,ie as Be,je as ee,kb as w,le as te,na as Ie,oa as Me,oc as ve,oe as Qe,p as S,pa as ye,pb as Ge,pe as ie,qb as Oe,qe as ze,rb as xe,tb as l,te as He,vb as f,ve as ne,w as N,we as ae,zb as Y}from"./chunk-DL2LTWBU.js";var Ct=(i,e)=>e.name;function Mt(i,e){i&1&&u(0,"mat-icon",10)}function yt(i,e){if(i&1&&(m(0,"mat-option",8),l(1),C(2,Mt,1,0,"mat-icon",10),r()),i&2){let t=e.$implicit;c("value",t.name),n(),f(" ",t.name," "),n(),M(t.isTrained?-1:2)}}function _t(i,e){i&1&&(m(0,"mat-option",9),l(1,"No results found"),r())}function vt(i,e){if(i&1&&(x(0,yt,3,3,"mat-option",8,Ct),C(2,_t,2,0,"mat-option",9)),i&2){let t=e;R(t),n(2),M(t.length===0?2:-1)}}var y,V=(y=class{ngOnChanges(e){e.algorithmType&&e.algorithmType.currentValue&&this.configureModels(e.algorithmType.currentValue)}get parentFormGroup(){return this.controlContainer.control}get modelFormGroup(){return this.parentFormGroup.get(this.controlKey)}get modelControl(){return this.modelFormGroup?.get(this.MODEL_CONTROL_NAME)}constructor(e,t,o,a){this.controlContainer=e,this.modelsFacadeService=t,this.scriptFacadeService=o,this.pageRunningScriptSpiningIndicatorService=a,this.controlKey="",this.PageKey=Xe,this.RoutesList=Ue,this.searchModel=new $,this.models=[],this.MODEL_CONTROL_NAME="model"}ngOnInit(){this.initializeForm(),this.listenToScriptStateChanges(),this.listenToSearchModelValueChanges(),this.configureModels(this.algorithmType)}configureModels(e){if(e)switch(this.getModelsByTypeSubscription?.unsubscribe(),this.getModelsByTypeSubscription=this.subscribeToModelsListChanges(e),this.modelsFacadeService.dispatch(O.getModelsList({algorithmType:e})),e){case p.PRUNING:{this.modelsFacadeService.dispatch(O.getCurrentOrPreviousSelectedModel({algorithmType:g.PRUNING_TRAIN}));break}case p.QUANTIZATION:{this.modelsFacadeService.dispatch(O.getCurrentOrPreviousSelectedModel({algorithmType:g.QUANTIZATION_TRAIN}));break}case p.MACHINE_UNLEARNING:{this.modelsFacadeService.dispatch(O.getCurrentOrPreviousSelectedModel({algorithmType:g.MACHINE_UNLEARNING_TRAIN}));break}}}listenToCurrentModelChanges(){this.modelsFacadeService.currentModel$.pipe(d(this)).subscribe(e=>{if(G(e))return;this.models.find(o=>o.name===e)&&this.modelControl?.patchValue(e)})}subscribeToModelsListChanges(e){let t=!1;return this.modelsFacadeService.getModelsByType(e).pipe(P(o=>!qe(o)),N(o=>[...o].sort((a,j)=>Number(j.isTrained)-Number(a.isTrained)))).subscribe(o=>{this.models=o,this.searchModel.setValue(""),t||(this.listenToCurrentModelChanges(),t=!0)})}initializeForm(){this.parentFormGroup.addControl(this.controlKey,new L({[this.MODEL_CONTROL_NAME]:new $("",X.required)}))}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(d(this)).subscribe(e=>{E(e)?this.modelFormGroup.disable():this.modelFormGroup.enable()})}listenToSearchModelValueChanges(){this.filteredModels=this.searchModel.valueChanges.pipe(d(this),Fe(""),N(e=>this.filterModels(e)))}filterModels(e){let t=e.toLowerCase();return this.models.filter(o=>o.name.toLowerCase().includes(t))}ngOnDestroy(){this.parentFormGroup.removeControl(this.controlKey)}},y.\u0275fac=function(t){return new(t||y)(s(h),s(K),s(D),s(Je))},y.\u0275cmp=F({type:y,selectors:[["ms-panel-model-training"]],inputs:{controlKey:"controlKey",algorithmType:"algorithmType"},standalone:!0,features:[Y([],[{provide:h,useFactory:()=>H(h,{skipSelf:!0})}]),Ie,Re],decls:12,vars:5,consts:[[1,"ms-card","model-card"],[1,"panel-title-wrapper"],[1,"heading-sub-section-title"],[1,"form-field-container",3,"formGroupName"],["appearance","outline","subscriptSizing","dynamic"],["formControlName","model","placeholder","Select a model..."],[3,"formControl"],["label","Predefined Models"],[3,"value"],["disabled",""],["fontSet","ms","fontIcon","icon-X",1,"mat-error"]],template:function(t,o){if(t&1&&(m(0,"mat-card",0)(1,"div",1)(2,"div",2),l(3,"Model"),r()(),m(4,"div",3)(5,"mat-form-field",4)(6,"mat-select",5)(7,"mat-option"),u(8,"ngx-mat-select-search",6),r(),m(9,"mat-optgroup",7),C(10,vt,3,1),I(11,"async"),r()()()()()),t&2){let a;n(4),c("formGroupName",o.controlKey),n(4),c("formControl",o.searchModel),n(2),M((a=b(11,3,o.filteredModels))?10:-1,a)}},dependencies:[ie,J,k,$e,te,ee,le,U,re,oe,pe,se,W,Ke,ae,ne,q,ke,ot,it,Ze],styles:[".panel-title-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:12px}.panel-title-wrapper[_ngcontent-%COMP%] .train-models[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}"]}),y);V=S([A()],V);var Nt=(i,e)=>e.key;function Ft(i,e){if(i&1&&(m(0,"mat-option",6),l(1),r()),i&2){let t=e.$implicit;c("value",t.key),n(),f(" ",t.value," ")}}var _,ue=(_=class{get parentFormGroup(){return this.controlContainer.control}get algorithmTypeFormGroup(){return this.parentFormGroup.get(this.controlKey)}get algorithmTypeFormControl(){return this.algorithmTypeFormGroup.get(this.ALGORITHM_TYPE_CONTROL_NAME)}constructor(e,t){this.controlContainer=e,this.scriptFacadeService=t,this.controlKey="",this.algorithmTypesOptions=[{key:p.QUANTIZATION,value:"Quantization"},{key:p.PRUNING,value:"Pruning"},{key:p.MACHINE_UNLEARNING,value:"Machine Unlearning"}],this.ALGORITHM_TYPE_CONTROL_NAME="algorithmType"}ngOnInit(){this.initForm(),this.loadInitialData(),this.listenToScriptStateChanges()}loadInitialData(){this.scriptFacadeService.scriptDetails$.pipe(Q(1),Ne(1),P(e=>!G(e?.algKey)),N(e=>e.algKey)).subscribe(e=>{switch(e){case g.PRUNING_TRAIN:{this.algorithmTypeFormControl.patchValue(p.PRUNING);break}case g.MACHINE_UNLEARNING_TRAIN:{this.algorithmTypeFormControl.patchValue(p.MACHINE_UNLEARNING);break}case g.QUANTIZATION_TRAIN:{this.algorithmTypeFormControl.patchValue(p.QUANTIZATION);break}default:this.algorithmTypeFormControl.patchValue(p.PRUNING)}}),this.scriptFacadeService.dispatch(me.getCurrentOrLastActiveScriptDetails())}initForm(){this.parentFormGroup.addControl(this.controlKey,new L({[this.ALGORITHM_TYPE_CONTROL_NAME]:new $(p.PRUNING,X.required)}))}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(d(this)).subscribe(e=>{E(e)?this.algorithmTypeFormGroup.disable():this.algorithmTypeFormGroup.enable()})}},_.\u0275fac=function(t){return new(t||_)(s(h),s(D))},_.\u0275cmp=F({type:_,selectors:[["ms-panel-algorithm-type-for-training"]],inputs:{controlKey:"controlKey"},features:[Y([],[{provide:h,useFactory:()=>H(h,{skipSelf:!0})}])],decls:9,vars:2,consts:[[1,"ms-card","parameters-card"],[1,"heading-sub-section-title"],[3,"formGroupName"],[1,"form-field-container"],["appearance","outline","subscriptSizing","dynamic"],[3,"formControlName"],[3,"value"]],template:function(t,o){t&1&&(m(0,"mat-card",0)(1,"p",1),l(2,"Algorithm Type"),r(),Pe(3,2),m(4,"div",3)(5,"mat-form-field",4)(6,"mat-select",5),x(7,Ft,2,2,"mat-option",6,Nt),r()()(),be(),r()),t&2&&(n(3),c("formGroupName",o.controlKey),n(3),c("formControlName",o.ALGORITHM_TYPE_CONTROL_NAME),n(),R(o.algorithmTypesOptions))},dependencies:[U,oe,se,W,J,k,te,ee]}),_);ue=S([A()],ue);function At(i,e){if(i&1&&(l(0),I(1,"adaptiveFileSize")),i&2){let t=w().$implicit;f(" ",b(1,1,t.value)," ")}}function Pt(i,e){if(i&1&&(l(0),I(1,"date")),i&2){let t=w().$implicit;f(" ",we(1,1,t.value,"medium")," ")}}function bt(i,e){if(i&1&&(l(0),I(1,"readableDuration")),i&2){let t=w().$implicit;f(" ",b(1,1,t.value)," ")}}function Et(i,e){if(i&1&&l(0),i&2){let t=w().$implicit;f(" ",t.value," ")}}function Gt(i,e){i&1&&(m(0,"div",8),u(1,"mat-divider"),r())}function Ot(i,e){if(i&1&&(m(0,"div")(1,"div",5)(2,"div",6),l(3),I(4,"parametersLabel"),r(),m(5,"div",7),C(6,At,2,3)(7,Pt,2,4)(8,bt,2,3)(9,Et,1,1),r()(),C(10,Gt,2,0,"div",8),r()),i&2){let t,o=e.$implicit,a=e.$index,j=e.$count;n(3),f("",b(4,3,o.key),":"),n(3),M((t=o.key)==="file_size_bytes"?6:t==="creation_date"?7:t==="training_duration_seconds"?8:9),n(4),M(a!==j-1?10:-1)}}function xt(i,e){if(i&1&&(m(0,"div",3),x(1,Ot,11,5,"div",null,Ae),r()),i&2){let t=w();n(),R(t)}}function Rt(i,e){i&1&&u(0,"ms-empty-state",4)}function wt(i,e){i&1&&(m(0,"div",2),C(1,xt,3,0,"div",3)(2,Rt,1,0,"ms-empty-state",4),r()),i&2&&(n(),M(e.length>0?1:2))}var v,fe=(v=class{constructor(e){this.modelsFacadeService=e,this.metadata={}}ngOnInit(){this.modelsFacadeService.modelMetadata$.pipe(Q(1),d(this)).subscribe(e=>{this.metadata=e})}},v.\u0275fac=function(t){return new(t||v)(s(K))},v.\u0275cmp=F({type:v,selectors:[["ms-panel-model-metadata"]],decls:5,vars:3,consts:[[1,"ms-card","metadata-card"],[1,"heading-sub-section-title"],[1,"metadata-wrapper"],[1,"key-value-container","single"],["title","No metadata available"],[1,"key-value-pair","space-between"],[1,"key-value-key"],[1,"key-value-value"],[1,"pt-2"]],template:function(t,o){if(t&1&&(m(0,"mat-card",0)(1,"p",1),l(2,"Model Training Information"),r(),C(3,wt,3,1,"div",2),I(4,"keyvalue"),r()),t&2){let a;n(3),M((a=b(4,1,o.metadata))?3:-1,a)}},dependencies:[rt,U,Ve,Le,De,nt,mt,at],styles:[".metadata-wrapper[_ngcontent-%COMP%]{max-height:300px;overflow:auto;padding-right:20px}"]}),v);fe=S([A()],fe);var Lt=["panelParameters"],T,he=(T=class{constructor(e,t,o,a){this.navigationService=e,this.scriptFacadeService=t,this.snackbarService=o,this.modelsFacadeService=a,this.form=new L({}),this.isScriptActive=!1,this.selectedAlgorithmType=p.PRUNING,this.selectedAlgorithmKey=g.PRUNING_TRAIN}ngOnInit(){this.listenToAlgorithmPanelChanges(),this.listenToScriptStateChanges(),this.listenToFormChangesToLoadModelMetadata()}listenToAlgorithmPanelChanges(){this.form.valueChanges.pipe(ge(50),N(()=>{let e=this.form.getRawValue();return e.algorithmTypeGroup&&e.algorithmTypeGroup.algorithmType}),Ce(),P(e=>!!e),d(this)).subscribe(e=>{this.selectedAlgorithmType=e,this.selectedAlgorithmKey=We[e]})}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(d(this)).subscribe(e=>{this.isScriptActive=E(e),E(e)?this.form.disable():this.form.enable()})}listenToFormChangesToLoadModelMetadata(){this.form.valueChanges.pipe(ge(50),N(e=>{let t=e.algorithmTypeGroup?.algorithmType,o=e.model?.model;return{algorithmType:t,model:o}}),Ce((e,t)=>JSON.stringify(e)===JSON.stringify(t)),P(({algorithmType:e,model:t})=>!G(e)&&!G(t)),d(this)).subscribe(({algorithmType:e,model:t})=>{this.modelsFacadeService.dispatch(O.getModelMetadata({algorithmType:e,modelName:t}))})}submit(){if(Ye(this.selectedAlgorithmType)){this.snackbarService.showError("Select an algorithm before running a script.");return}let{model:e}=this.form.getRawValue(),{model:t}=e,o={alg:this.selectedAlgorithmKey,params:Se(Te({},this.panelParametersComponent.parametersFormatted),{arch:t})};this.scriptFacadeService.dispatch(me.callScript({configs:o}))}},T.\u0275fac=function(t){return new(t||T)(s(tt),s(D),s(et),s(K))},T.\u0275cmp=F({type:T,selectors:[["ms-model-training"]],viewQuery:function(t,o){if(t&1&&Ge(Lt,5),t&2){let a;Oe(a=xe())&&(o.panelParametersComponent=a.first)}},decls:17,vars:4,consts:[["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper"],[1,"left",3,"formGroup"],["controlKey","algorithmTypeGroup"],["controlKey","model",3,"algorithmType"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-stroked-button","","color","primary",1,"ml-2",3,"click"],["fontSet","ms","fontIcon","icon-ArrowLeft"],[1,"right"]],template:function(t,o){if(t&1){let a=Ee();m(0,"p",1),l(1,"Model Training"),r(),m(2,"div",2)(3,"div",3),u(4,"ms-panel-algorithm-type-for-training",4)(5,"ms-panel-model-training",5)(6,"ms-panel-model-metadata")(7,"ms-panel-parameters",6,0),m(9,"div")(10,"button",7),_e("click",function(){return Me(a),ye(o.submit())}),l(11," Run "),r(),m(12,"button",8),_e("click",function(){return Me(a),ye(o.navigationService.goToPreviousPage())}),u(13,"mat-icon",9),l(14," Go back "),r()()(),m(15,"div",10),u(16,"ms-terminal-xterm-with-toolbar"),r()()}t&2&&(n(3),c("formGroup",o.form),n(2),c("algorithmType",o.selectedAlgorithmType),n(2),c("algorithm",o.selectedAlgorithmKey),n(3),c("disabled",o.isScriptActive||o.form.invalid))},dependencies:[ce,V,de,k,Be,ne,ze,ue,fe],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),T);he=S([A()],he);var Dt=[{path:"",component:he}],ct=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=Z({type:e}),e.\u0275inj=z({imports:[ve.forChild(Dt),ve]});let i=e;return i})();var yo=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=Z({type:e}),e.\u0275inj=z({imports:[q,ct,ce,V,de,le,je,pe,re,Qe,ie,ae,He]});let i=e;return i})();export{yo as ModelTrainingModule}; diff --git a/frontend/server/modelsmith-build/browser/chunk-DBDNSQWV.js b/frontend/server/modelsmith-build/browser/chunk-DBDNSQWV.js deleted file mode 100644 index 729be89..0000000 --- a/frontend/server/modelsmith-build/browser/chunk-DBDNSQWV.js +++ /dev/null @@ -1 +0,0 @@ -import{a as Qe,b as Q}from"./chunk-HOFUFSNV.js";import{b as We}from"./chunk-LRK34XDC.js";import{i as Ge}from"./chunk-2CKK74GJ.js";import{a as mt,b as pt,c as ft}from"./chunk-VLO6NL53.js";import{a as Xe,b as Le}from"./chunk-GWFXRHCV.js";import{c as $e}from"./chunk-XX6ZYDLH.js";import{d as Ke}from"./chunk-GYTTCMYG.js";import{a as Ye,b as K}from"./chunk-3IJULEGV.js";import{a as M,b as p}from"./chunk-QJ55TOIV.js";import{b as He,s as ze}from"./chunk-CYUWMGXJ.js";import{a as Ve,d as Be,h as Ue,i as Y,j as Ne,k as G}from"./chunk-HULQWYRR.js";import{$ as pe,$a as n,Ab as C,Ba as de,D as ce,Da as D,Ea as s,Eb as Ce,Gb as Me,I as me,J as j,Ra as F,Rb as we,Ub as De,Xd as Oe,Z as V,Zb as E,a as I,ab as l,ae as Ee,ba as A,bb as c,be as Pe,ce as Ie,e as oe,ee as Ae,f as ie,fb as he,ga as b,ia as fe,ib as m,ie as ke,j as re,ja as ue,lb as ve,le as xe,mb as Se,ne as Re,oa as g,oe as je,p as T,pa as y,pb as Te,pe as z,qb as be,rb as ge,rc as _e,sb as ye,sc as ne,se as X,tb as O,te as L,ua as B,ub as Fe,vc as k,ve as W,wa as U,wc as H,we as $,xa as f,yc as se,zb as N}from"./chunk-DL2LTWBU.js";var Je=oe(mt()),Ze=oe(pt()),et=oe(ft());var dt=["terminal"],u,qe=(u=class{constructor(e){this.terminalWebSocketService=e,this.fitAddon=new Je.FitAddon,this.searchAddon=new Ze.SearchAddon}ngOnInit(){this.initializeTerminal(),this.subscribeToWebSocketMessages()}ngAfterViewInit(){requestAnimationFrame(()=>{this.adjustTerminalContainer()})}initializeTerminal(){this.terminal=new et.Terminal(I({cursorBlink:!0,theme:{background:"#D0D4D9",foreground:"#000000",cursor:"#000000",selectionBackground:"#FFDD00",selectionForeground:"#000000"},allowProposedApi:!0},this.options)),this.terminal.loadAddon(this.fitAddon),this.terminal.loadAddon(this.searchAddon),this.terminal.open(this.terminalDiv.nativeElement),this.setupResizeObserver(),this.terminal.onData(e=>{this.terminalWebSocketService.sendMessage(e)})}subscribeToWebSocketMessages(){this.terminalWebSocketService.messages$.pipe(p(this)).subscribe(e=>{this.terminal.write(e)})}setupResizeObserver(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=new ResizeObserver(()=>{this.adjustTerminalContainer()}),this.resizeObserver.observe(this.terminalDiv.nativeElement)}adjustTerminalContainer(){this.adjustHeightToParent(),this.fitAddon.fit()}adjustHeightToParent(){let e=this.terminalDiv.nativeElement.parentElement.parentElement.parentElement.parentElement;if(e){this.terminalDiv.nativeElement.style.height="auto";let i=e.offsetHeight-100;this.terminalDiv.nativeElement.style.height=`${i}px`}}ngOnDestroy(){this.resizeObserver?.disconnect(),this.terminal.dispose()}search(e){this.searchAddon.findNext(e,{decorations:{matchBackground:"#FFFF00",matchBorder:"#FFFF00",matchOverviewRuler:"#FFFF00",activeMatchBackground:"#FFFF00",activeMatchBorder:"#FFFF00",activeMatchColorOverviewRuler:"#FFFF00"}})}clearSearch(){this.searchAddon.clearDecorations()}clearTerminal(){this.terminal.clear()}scrollToTop(){this.terminal.scrollToTop()}scrollToBottom(){this.terminal.scrollToBottom()}},u.\u0275fac=function(o){return new(o||u)(s(Q))},u.\u0275cmp=b({type:u,selectors:[["ms-terminal-xterm"]],viewQuery:function(o,t){if(o&1&&Te(dt,7),o&2){let i;be(i=ge())&&(t.terminalDiv=i.first)}},inputs:{options:"options"},standalone:!0,features:[N([K,Qe]),C],decls:2,vars:0,consts:[["terminal",""],[1,"terminal-wrapper"]],template:function(o,t){o&1&&c(0,"div",1,0)}}),u);qe=T([M({})],qe);var tt="200px",ot="80px",ae="top";var d=class{constructor(e){this.overlayRef=e,this.afterClosedSubject=new re,this.dataSubject=new re,this.data$=this.dataSubject.asObservable()}emitData(e){this.dataSubject.next(e)}backdropClick(){return this.overlayRef.backdropClick()}close(e){this.afterClosedSubject.next(e),this.afterClosedSubject.complete(),this.dataSubject.complete(),setTimeout(()=>{this.overlayRef.dispose()},150)}afterClosed(){return this.afterClosedSubject.asObservable()}};var P=new pe("POPOVER");var J=(()=>{let e=class e{constructor(t,i){this.overlay=t,this.injector=i}open(t,i,a){let x=this.getPositionStrategy(i,a?.position??ae),R=this.overlay.create(I({positionStrategy:x},a||{})),le=new d(R),lt=B.create({parent:this.injector,providers:[{provide:d,useValue:le},{provide:P,useValue:I({position:ae,closePopoverOnBackdropClick:!1,closePopoverOnEscKeyUp:!0,width:a?.width||tt,height:a?.height||ot},a)}]}),ct=new He(t,null,lt);return R.attach(ct),le}getPositionStrategy(t,i){let a=t instanceof U?t.nativeElement:t,R={top:{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom",offsetY:-24,offsetX:-9},bottom:{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetY:4,offsetX:-7},left:{originX:"start",originY:"center",overlayX:"end",overlayY:"center",offsetX:-22,offsetY:-12},right:{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:8,offsetY:-10}}[i];return this.overlay.position().flexibleConnectedTo(a).withFlexibleDimensions(!1).withPush(!1).withPositions([R])}};e.\u0275fac=function(i){return new(i||e)(A(ze),A(B))},e.\u0275prov=V({token:e,factory:e.\u0275fac});let r=e;return r})();var it=(()=>{let e=class e{constructor(t){this.el=t}ngAfterViewInit(){setTimeout(()=>{this.el.nativeElement.focus()},0)}};e.\u0275fac=function(i){return new(i||e)(s(U))},e.\u0275dir=fe({type:e,selectors:[["","msAutofocus",""]],standalone:!0});let r=e;return r})();var Z=(()=>{let e=class e{constructor(t){this.dialogService=t}openFullScreenDialog(t){return ie(this,null,function*(){if(t)return;let{MsTerminalFullscreenDialogComponent:i}=yield import("./chunk-QAKX23JR.js");document.body.classList.add("no-scroll"),this.dialogService.open(i,{showHeader:!1,showFooter:!1,showSaveButton:!1,width:"100vw",height:"100vh"}).afterClosed().pipe(me(1)).subscribe(()=>{document.body.classList.remove("no-scroll")})})}openMessagesHistoryDialog(){return ie(this,null,function*(){let{MsTerminalMessagesHistoryDialogComponent:t}=yield import("./chunk-GU6QGHQ6.js");this.dialogService.open(t,{title:"Terminal history",showSaveButton:!1,width:"60vw",height:"75vh"})})}};e.\u0275fac=function(i){return new(i||e)(A(Ke))},e.\u0275prov=V({token:e,factory:e.\u0275fac});let r=e;return r})();var w=function(r){return r.OPEN="open",r.DISMISS="dismiss",r.SAVE="save",r.CLOSE="close",r}(w||{});function nt(r,e){let o={};return r&&rt(o,r,"width"),e&&rt(o,e,"height"),o}function rt(r,e,o){let t=bt(e);t==="px"||t==="rem"||t==="em"?r[`${o}.${t}`]=parseFloat(e):r[o]=e}function bt(r){let o=(typeof r=="string"?r:"").match(/(px|rem|em|vw|vh|%)$/);return o?o[0]:"px"}var st=(()=>{let e=class e{transform(t,i){return nt(t,i)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=ue({name:"iconPanelSizeStyles",type:e,pure:!0,standalone:!0});let r=e;return r})();var Ft=["*"],h,ee=(h=class{constructor(e,o){this.popoverRef=e,this.data=o,this.actionEvent=new f,this.isClosing=!1,this.closeDrawerOnBackdropClick()}onClose(){this.actionEvent.emit(w.CLOSE),this.popoverRef.close({status:w.CLOSE}),this.isClosing=!0}onSave(){this.actionEvent.emit(w.SAVE),this.popoverRef.close({status:w.SAVE}),this.isClosing=!1}onDismiss(){this.actionEvent.emit(w.DISMISS),this.popoverRef.close({status:w.DISMISS}),this.isClosing=!1}closeDrawerOnBackdropClick(){this.data.closePopoverOnBackdropClick&&this.popoverRef.backdropClick().pipe(p(this)).subscribe(()=>{this.onDismiss()})}onEscKeyDown(){this.data.closePopoverOnEscKeyUp&&this.onDismiss()}},h.\u0275fac=function(o){return new(o||h)(s(d),s(P))},h.\u0275cmp=b({type:h,selectors:[["ms-popover"]],hostBindings:function(o,t){o&1&&m("keyup.esc",function(){return t.onEscKeyDown()},!1,de)},inputs:{contentTemplate:"contentTemplate"},outputs:{actionEvent:"actionEvent"},standalone:!0,features:[C],ngContentSelectors:Ft,decls:8,vars:6,consts:[[1,"tooltip-container",3,"ngClass","ngStyle"],[1,"tooltip-arrow"],[1,"popover-content"],[1,"close-button"],["mat-icon-button","",3,"click"],["fontSet","ms","fontIcon","icon-X",1,"mat-error","size-20"]],template:function(o,t){o&1&&(ve(),n(0,"div",0),Ce(1,"iconPanelSizeStyles"),c(2,"div",1),n(3,"div",2),Se(4),l(),n(5,"div",3)(6,"button",4),m("click",function(){return t.onClose()}),c(7,"mat-icon",5),l()()()),o&2&&F("ngClass",t.data.position)("ngStyle",Me(1,3,t.data.width,t.data.height))("@fadeInOut",t.isClosing)},dependencies:[E,we,De,$,W,L,X,st],styles:[".tooltip-container[_ngcontent-%COMP%]{position:relative;background-color:var(--tooltip);color:var(--terminal-color);border-radius:6px;box-shadow:0 4px 8px #0000001a;padding:10px 8px}.tooltip-arrow[_ngcontent-%COMP%]{position:absolute;width:0;height:0;border-style:solid}.tooltip-content[_ngcontent-%COMP%]{padding:12px}.tooltip-container.top[_ngcontent-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{bottom:-10px;left:50%;transform:translate(-50%);border-width:10px 10px 0 10px;border-color:var(--tooltip) transparent transparent transparent}.tooltip-container.bottom[_ngcontent-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{top:-10px;left:50%;transform:translate(-50%);border-width:0 10px 10px 10px;border-color:transparent transparent var(--tooltip) transparent}.tooltip-container.left[_ngcontent-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{right:-10px;top:50%;transform:translateY(-50%);border-width:10px 0 10px 10px;border-color:transparent transparent transparent var(--tooltip)}.tooltip-container.right[_ngcontent-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{left:-10px;top:50%;transform:translateY(-50%);border-width:10px 10px 10px 0;border-color:transparent var(--tooltip) transparent transparent}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;top:0}"],data:{animation:[_e("fadeInOut",[H("void",k({opacity:0})),H("true",k({opacity:0})),H("false",k({opacity:1})),se(":enter",[ne(`${150}ms ease-in`,k({opacity:1}))]),se("false => true",[ne(`${150}ms ease-out`)])])]}}),h);ee=T([M()],ee);var v,te=(v=class{get searchFormControl(){return this.searchForm.get("search")}constructor(e,o,t){this.popoverRef=e,this.iconPanelConfig=o,this.fb=t,this.searchForm=new Ie({})}ngOnInit(){this.initForm(),this.listenToSearchFormControlValueChanges()}initForm(){this.searchForm=this.fb.group({search:[""]})}listenToSearchFormControlValueChanges(){this.searchFormControl.valueChanges.pipe(p(this),j(200)).subscribe(e=>{this.popoverRef.emitData(e)})}},v.\u0275fac=function(o){return new(o||v)(s(d),s(P),s(Re))},v.\u0275cmp=b({type:v,selectors:[["ms-terminal-toolbar-search-popover"]],standalone:!0,features:[C],decls:7,vars:1,consts:[[1,"form-field-container","dark",3,"formGroup"],["subscriptSizing","dynamic"],["msErrorDisplay","","matInput","","msAutofocus","","formControlName","search"],["fontSet","ms","fontIcon","icon-MagnifyingGlass","matSuffix",""]],template:function(o,t){o&1&&(n(0,"ms-popover")(1,"div",0)(2,"mat-label"),O(3," Search... "),l(),n(4,"mat-form-field",1),c(5,"input",2)(6,"mat-icon",3),l()()()),o&2&&(D(),F("formGroup",t.searchForm))},dependencies:[E,G,Ne,Ue,Ve,Be,Y,z,Oe,Ee,Pe,ke,xe,ee,Ge,it]}),v);te=T([M({})],te);var S,at=(S=class{constructor(e,o,t,i){this.scriptFacadeService=e,this.terminalWebSocketService=o,this.terminalDialogService=t,this.popoverService=i,this.isFullscreen=!1,this.isScriptActive=!1,this.clearTerminal=new f,this.scrollToTopTerminal=new f,this.scrollToBottomTerminal=new f,this.searchTerminal=new f,this.disposeSearch=new f,this.exitFullscreen=new f,this.searchFormControl=new Ae("")}ngOnInit(){this.listenToScriptStateChanges(),this.listenToSearchFormControlChanges()}clearTerminalScreen(){this.terminalWebSocketService.clearScreen()}openPanel(e){this.popoverService.open(te,e._elementRef,{position:this.isFullscreen?"bottom":"top",width:"200px",height:"60px"}).data$.pipe(p(this)).subscribe(t=>{this.searchTerminal.emit(t)})}listenToSearchFormControlChanges(){this.searchFormControl.valueChanges.pipe(p(this),j(300),ce(e=>!$e(e))).subscribe(e=>{this.searchTerminal.emit(e)})}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(p(this)).subscribe(e=>{this.isScriptActive=We(e)})}ctaStopScript(){this.scriptFacadeService.dispatch(Ye.stopScript())}openTerminalMessagesHistoryDialog(){this.terminalDialogService.openMessagesHistoryDialog()}openFullScreenMode(){if(this.isFullscreen){this.exitFullscreen.emit();return}this.terminalDialogService.openFullScreenDialog(this.isFullscreen)}},S.\u0275fac=function(o){return new(o||S)(s(K),s(Q),s(Z),s(J))},S.\u0275cmp=b({type:S,selectors:[["ms-terminal-toolbar"]],inputs:{isFullscreen:"isFullscreen",isScriptActive:"isScriptActive"},outputs:{clearTerminal:"clearTerminal",scrollToTopTerminal:"scrollToTopTerminal",scrollToBottomTerminal:"scrollToBottomTerminal",searchTerminal:"searchTerminal",disposeSearch:"disposeSearch",exitFullscreen:"exitFullscreen"},standalone:!0,features:[N([Z,J]),C],decls:19,vars:4,consts:[["searchTooltip",""],[1,"buttons-wrapper"],["mat-icon-button","","color","primary","matTooltip","Search terminal",3,"click"],["fontSet","ms","fontIcon","icon-MagnifyingGlass"],["mat-icon-button","","color","primary","matTooltip","Terminal history",3,"click"],["mat-icon-button","","color","primary","matTooltip","Scroll to top",3,"click"],["fontSet","ms","fontIcon","icon-ArrowUp"],["mat-icon-button","","color","primary","matTooltip","Scroll to bottom",3,"click"],["fontSet","ms","fontIcon","icon-ArrowDown"],["mat-icon-button","","color","primary","matTooltip","Clear terminal",3,"click","disabled"],["mat-icon-button","","color","primary",3,"click","matTooltip"],["mat-icon-button","","color","warn","matTooltip","Stop current process",3,"click","disabled"],["fontSet","ms","fontIcon","icon-X",1,"mat-error"]],template:function(o,t){if(o&1){let i=he();n(0,"div",1)(1,"button",2,0),m("click",function(){g(i);let x=ye(2);return y(t.openPanel(x))}),c(3,"mat-icon",3),l(),n(4,"button",4),m("click",function(){return g(i),y(t.openTerminalMessagesHistoryDialog())}),n(5,"mat-icon"),O(6,"history"),l()(),n(7,"button",5),m("click",function(){return g(i),y(t.scrollToTopTerminal.emit())}),c(8,"mat-icon",6),l(),n(9,"button",7),m("click",function(){return g(i),y(t.scrollToBottomTerminal.emit())}),c(10,"mat-icon",8),l(),n(11,"button",9),m("click",function(){return g(i),y(t.clearTerminalScreen())}),n(12,"mat-icon"),O(13," clear_all"),l()(),n(14,"button",10),m("click",function(){return g(i),y(t.openFullScreenMode())}),n(15,"mat-icon"),O(16),l()(),n(17,"button",11),m("click",function(){return g(i),y(t.ctaStopScript())}),c(18,"mat-icon",12),l()()}o&2&&(D(11),F("disabled",t.isScriptActive),D(3),F("matTooltip",t.isFullscreen?"Exit fullscreen":"Enter fullscreen"),D(2),Fe(t.isFullscreen?"fullscreen_exit":"fullscreen"),D(),F("disabled",!t.isScriptActive))},dependencies:[E,L,X,$,W,Le,Xe,je,z,Y,G]}),S);at=T([M({})],at);export{qe as a,at as b}; diff --git a/frontend/server/modelsmith-build/browser/chunk-QAKX23JR.js b/frontend/server/modelsmith-build/browser/chunk-FAHE4JRI.js similarity index 97% rename from frontend/server/modelsmith-build/browser/chunk-QAKX23JR.js rename to frontend/server/modelsmith-build/browser/chunk-FAHE4JRI.js index 812b319..ad3a3bf 100644 --- a/frontend/server/modelsmith-build/browser/chunk-QAKX23JR.js +++ b/frontend/server/modelsmith-build/browser/chunk-FAHE4JRI.js @@ -1 +1 @@ -import{a as h,b as V}from"./chunk-DBDNSQWV.js";import"./chunk-HOFUFSNV.js";import"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import{b as v,c as b}from"./chunk-GYTTCMYG.js";import"./chunk-3IJULEGV.js";import{a as F}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as c,Ab as M,Da as T,Ea as u,Ra as f,Zb as D,ab as m,bb as d,fb as g,ga as _,ib as w,oa as t,p,pa as n,sb as i,tb as C}from"./chunk-DL2LTWBU.js";var r,x=(r=class{constructor(s){this.dialogRef=s}closeDialog(){this.dialogRef.close()}},r.\u0275fac=function(a){return new(a||r)(u(v))},r.\u0275cmp=_({type:r,selectors:[["ms-terminal-fullscreen-dialog"]],standalone:!0,features:[M],decls:8,vars:1,consts:[["terminal",""],[1,"ms-terminal-wrapper"],[1,"top-terminal-section"],[1,"heading-section-title","mb-1","flex","items-center"],[3,"clearTerminal","scrollToTopTerminal","scrollToBottomTerminal","searchTerminal","disposeSearch","exitFullscreen","isFullscreen"]],template:function(a,y){if(a&1){let o=g();c(0,"ms-dialog")(1,"div",1)(2,"div",2)(3,"div",3),C(4,"Terminal"),m(),c(5,"ms-terminal-toolbar",4),w("clearTerminal",function(){t(o);let e=i(7);return n(e.clearTerminal())})("scrollToTopTerminal",function(){t(o);let e=i(7);return n(e.scrollToTop())})("scrollToBottomTerminal",function(){t(o);let e=i(7);return n(e.scrollToBottom())})("searchTerminal",function(e){t(o);let O=i(7);return n(O.search(e))})("disposeSearch",function(){t(o);let e=i(7);return n(e.clearSearch())})("exitFullscreen",function(){return t(o),n(y.closeDialog())}),m()(),d(6,"ms-terminal-xterm",null,0),m()()}a&2&&(T(5),f("isFullscreen",!0))},dependencies:[D,b,V,h],styles:[".ms-terminal-wrapper[_ngcontent-%COMP%]{overflow-x:auto}.ms-terminal-wrapper[_ngcontent-%COMP%] .terminal-wrapper[_ngcontent-%COMP%]{border:10px solid var(--terminal-color);background-color:var(--terminal-color);border-radius:10px}.ms-terminal-wrapper[_ngcontent-%COMP%] .xterm-viewport[_ngcontent-%COMP%]{overflow-y:auto!important}.ms-terminal-wrapper[_ngcontent-%COMP%] .top-terminal-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]}),r);x=p([F({})],x);export{x as MsTerminalFullscreenDialogComponent}; +import{a as h,b as V}from"./chunk-RQYYT6OA.js";import"./chunk-HOFUFSNV.js";import"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import{b as v,c as b}from"./chunk-GYTTCMYG.js";import"./chunk-3IJULEGV.js";import{a as F}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as c,Ab as M,Da as T,Ea as u,Ra as f,Zb as D,ab as m,bb as d,fb as g,ga as _,ib as w,oa as t,p,pa as n,sb as i,tb as C}from"./chunk-DL2LTWBU.js";var r,x=(r=class{constructor(s){this.dialogRef=s}closeDialog(){this.dialogRef.close()}},r.\u0275fac=function(a){return new(a||r)(u(v))},r.\u0275cmp=_({type:r,selectors:[["ms-terminal-fullscreen-dialog"]],standalone:!0,features:[M],decls:8,vars:1,consts:[["terminal",""],[1,"ms-terminal-wrapper"],[1,"top-terminal-section"],[1,"heading-section-title","mb-1","flex","items-center"],[3,"clearTerminal","scrollToTopTerminal","scrollToBottomTerminal","searchTerminal","disposeSearch","exitFullscreen","isFullscreen"]],template:function(a,y){if(a&1){let o=g();c(0,"ms-dialog")(1,"div",1)(2,"div",2)(3,"div",3),C(4,"Terminal"),m(),c(5,"ms-terminal-toolbar",4),w("clearTerminal",function(){t(o);let e=i(7);return n(e.clearTerminal())})("scrollToTopTerminal",function(){t(o);let e=i(7);return n(e.scrollToTop())})("scrollToBottomTerminal",function(){t(o);let e=i(7);return n(e.scrollToBottom())})("searchTerminal",function(e){t(o);let O=i(7);return n(O.search(e))})("disposeSearch",function(){t(o);let e=i(7);return n(e.clearSearch())})("exitFullscreen",function(){return t(o),n(y.closeDialog())}),m()(),d(6,"ms-terminal-xterm",null,0),m()()}a&2&&(T(5),f("isFullscreen",!0))},dependencies:[D,b,V,h],styles:[".ms-terminal-wrapper[_ngcontent-%COMP%]{overflow-x:auto}.ms-terminal-wrapper[_ngcontent-%COMP%] .terminal-wrapper[_ngcontent-%COMP%]{border:10px solid var(--terminal-color);background-color:var(--terminal-color);border-radius:10px}.ms-terminal-wrapper[_ngcontent-%COMP%] .xterm-viewport[_ngcontent-%COMP%]{overflow-y:auto!important}.ms-terminal-wrapper[_ngcontent-%COMP%] .top-terminal-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]}),r);x=p([F({})],x);export{x as MsTerminalFullscreenDialogComponent}; diff --git a/frontend/server/modelsmith-build/browser/chunk-MVIV4HZ6.js b/frontend/server/modelsmith-build/browser/chunk-H6V2S4PD.js similarity index 93% rename from frontend/server/modelsmith-build/browser/chunk-MVIV4HZ6.js rename to frontend/server/modelsmith-build/browser/chunk-H6V2S4PD.js index 98fd510..8cc9a68 100644 --- a/frontend/server/modelsmith-build/browser/chunk-MVIV4HZ6.js +++ b/frontend/server/modelsmith-build/browser/chunk-H6V2S4PD.js @@ -1 +1 @@ -import{a as u}from"./chunk-VEEXI746.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import{a as f}from"./chunk-FMRIWR6H.js";import"./chunk-PGXHYGLR.js";import"./chunk-DBDNSQWV.js";import"./chunk-HOFUFSNV.js";import{b as S,c as X,e as y}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as x,b as q}from"./chunk-3IJULEGV.js";import{a as G,b as L}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as s,Da as n,Ea as g,Ra as a,Zb as D,_ as p,a as h,ab as c,b,bb as v,be as U,cb as E,db as P,fb as I,ga as w,ha as l,ib as N,ie as V,ne as _,oa as T,oc as C,oe as Q,p as F,pa as A,pb as O,pe as W,qb as R,qe as k,rb as j,tb as M,te as B}from"./chunk-DL2LTWBU.js";var $=["panelParameters"],r,d=(r=class{constructor(t,i){this.fb=t,this.scriptFacadeService=i,this.AlgorithmType=X,this.MultiflowAlgorithmsEnum=y,this.isScriptActive=!1}ngOnInit(){this.initForm(),this.listenToScriptStateChanges()}initForm(){this.form=this.fb.group({algorithm:this.fb.group({alg:[]})}),setTimeout(()=>{this.form.get("algorithm.alg")?.setValue(y.MULTIFLOW_PRUNE)},0)}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(L(this)).subscribe(t=>{this.isScriptActive=S(t),S(t)?this.form.disable():this.form.enable()})}submit(){if(this.isScriptActive)return;let{algorithm:t}=this.form.getRawValue(),i=b(h({},t),{params:h({},this.panelParametersComponent.parametersFormatted)});this.scriptFacadeService.dispatch(x.callScript({configs:i}))}},r.\u0275fac=function(i){return new(i||r)(g(_),g(q))},r.\u0275cmp=w({type:r,selectors:[["ms-multi-modal"]],viewQuery:function(i,e){if(i&1&&O($,5),i&2){let o;R(o=j())&&(e.panelParametersComponent=o.first)}},decls:12,vars:4,consts:[["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper",3,"formGroup"],[1,"left"],[3,"formGroup"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"right"]],template:function(i,e){if(i&1){let o=I();s(0,"p",1),M(1,"Multi-modal"),c(),s(2,"div",2)(3,"div",3),E(4,4),v(5,"ms-panel-parameters",5,0),P(),s(7,"div")(8,"button",6),N("click",function(){return T(o),A(e.submit())}),M(9," Run "),c()()(),s(10,"div",7),v(11,"ms-terminal-xterm-with-toolbar"),c()()}i&2&&(n(2),a("formGroup",e.form),n(2),a("formGroup",e.form),n(),a("algorithm",e.MultiflowAlgorithmsEnum.MULTIFLOW_PRUNE),n(3),a("disabled",e.isScriptActive||e.form.invalid))},dependencies:[u,f,U,V,k],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),r);d=F([G()],d);var z=[{path:"",component:d}],Z=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=l({type:t}),t.\u0275inj=p({imports:[C.forChild(z),C]});let m=t;return m})();var yt=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=l({type:t}),t.\u0275inj=p({imports:[D,u,f,Z,Q,W,B]});let m=t;return m})();export{yt as MultiModalModule}; +import{a as u}from"./chunk-OAX72PXK.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import{a as f}from"./chunk-ZNSBC7FI.js";import"./chunk-PGXHYGLR.js";import"./chunk-RQYYT6OA.js";import"./chunk-HOFUFSNV.js";import{b as S,c as X,e as y}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as x,b as q}from"./chunk-3IJULEGV.js";import{a as G,b as L}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as s,Da as n,Ea as g,Ra as a,Zb as D,_ as p,a as h,ab as c,b,bb as v,be as U,cb as E,db as P,fb as I,ga as w,ha as l,ib as N,ie as V,ne as _,oa as T,oc as C,oe as Q,p as F,pa as A,pb as O,pe as W,qb as R,qe as k,rb as j,tb as M,te as B}from"./chunk-DL2LTWBU.js";var $=["panelParameters"],r,d=(r=class{constructor(t,i){this.fb=t,this.scriptFacadeService=i,this.AlgorithmType=X,this.MultiflowAlgorithmsEnum=y,this.isScriptActive=!1}ngOnInit(){this.initForm(),this.listenToScriptStateChanges()}initForm(){this.form=this.fb.group({algorithm:this.fb.group({alg:[]})}),setTimeout(()=>{this.form.get("algorithm.alg")?.setValue(y.MULTIFLOW_PRUNE)},0)}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(L(this)).subscribe(t=>{this.isScriptActive=S(t),S(t)?this.form.disable():this.form.enable()})}submit(){if(this.isScriptActive)return;let{algorithm:t}=this.form.getRawValue(),i=b(h({},t),{params:h({},this.panelParametersComponent.parametersFormatted)});this.scriptFacadeService.dispatch(x.callScript({configs:i}))}},r.\u0275fac=function(i){return new(i||r)(g(_),g(q))},r.\u0275cmp=w({type:r,selectors:[["ms-multi-modal"]],viewQuery:function(i,e){if(i&1&&O($,5),i&2){let o;R(o=j())&&(e.panelParametersComponent=o.first)}},decls:12,vars:4,consts:[["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper",3,"formGroup"],[1,"left"],[3,"formGroup"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"right"]],template:function(i,e){if(i&1){let o=I();s(0,"p",1),M(1,"Multi-modal"),c(),s(2,"div",2)(3,"div",3),E(4,4),v(5,"ms-panel-parameters",5,0),P(),s(7,"div")(8,"button",6),N("click",function(){return T(o),A(e.submit())}),M(9," Run "),c()()(),s(10,"div",7),v(11,"ms-terminal-xterm-with-toolbar"),c()()}i&2&&(n(2),a("formGroup",e.form),n(2),a("formGroup",e.form),n(),a("algorithm",e.MultiflowAlgorithmsEnum.MULTIFLOW_PRUNE),n(3),a("disabled",e.isScriptActive||e.form.invalid))},dependencies:[u,f,U,V,k],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),r);d=F([G()],d);var z=[{path:"",component:d}],Z=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=l({type:t}),t.\u0275inj=p({imports:[C.forChild(z),C]});let m=t;return m})();var yt=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=l({type:t}),t.\u0275inj=p({imports:[D,u,f,Z,Q,W,B]});let m=t;return m})();export{yt as MultiModalModule}; diff --git a/frontend/server/modelsmith-build/browser/chunk-VEEXI746.js b/frontend/server/modelsmith-build/browser/chunk-OAX72PXK.js similarity index 98% rename from frontend/server/modelsmith-build/browser/chunk-VEEXI746.js rename to frontend/server/modelsmith-build/browser/chunk-OAX72PXK.js index 981bda4..4b12345 100644 --- a/frontend/server/modelsmith-build/browser/chunk-VEEXI746.js +++ b/frontend/server/modelsmith-build/browser/chunk-OAX72PXK.js @@ -1 +1 @@ -import{a as Me}from"./chunk-BTI2I76F.js";import{a as ye,b as Fe}from"./chunk-GACPU6QS.js";import{a as he,b as _e}from"./chunk-6JSLXF7X.js";import{d as ge}from"./chunk-FMRIWR6H.js";import{a as Ce,b as ve}from"./chunk-PGXHYGLR.js";import{b as ae}from"./chunk-LRK34XDC.js";import{a as ne,b as me,c as pe,d as se,e as le,f as ce,g as de,h as ue,i as fe}from"./chunk-2CKK74GJ.js";import{a as re,b as ie}from"./chunk-GWFXRHCV.js";import{b as oe,l as xe}from"./chunk-3IJULEGV.js";import{a as L,b as M}from"./chunk-QJ55TOIV.js";import{a as Y,d as z,h as J,i as Q,j as ee,k as te}from"./chunk-HULQWYRR.js";import{$a as n,$c as O,Ab as V,Da as a,Ea as d,P as A,Pa as y,Qd as R,Ra as c,Xa as u,Xd as G,Ya as F,Za as x,Zd as p,_a as g,_d as h,ab as o,ae as $,bb as _,be as w,ca as T,cb as P,ce as K,db as D,ga as b,je as j,kb as f,ke as q,le as B,me as U,na as E,nb as C,ne as H,p as S,pe as X,tb as l,ub as v,vb as N,ve as W,w as I,we as Z,zb as k}from"./chunk-DL2LTWBU.js";var Se=i=>{let e=[];if(i.validators)for(let[t,r]of Object.entries(i.validators))switch(t){case"required":r&&e.push(p.required);break;case"min":e.push(p.min(r));break;case"max":e.push(p.max(r));break;case"minLength":e.push(p.minLength(r));break;case"maxLength":e.push(p.maxLength(r));break;case"pattern":e.push(p.pattern(r));break;case"requiredTrue":r&&e.push(p.requiredTrue);break;case"email":r&&e.push(p.email);break;case le:e.push(ce(r));break;case de:e.push(ue());break;case ne:e.push(me());break;case pe:Array.isArray(r)&&r.length===2&&e.push(se(r));break}return e};function Ae(i,e){if(i&1&&(n(0,"div",6)(1,"mat-label"),l(2),o(),n(3,"mat-form-field",8),_(4,"input",9)(5,"mat-icon",10),o()()),i&2){let t=f(),r=t.$implicit,m=t.$index;a(2),v(r.label),a(2),c("formControlName",m)("placeholder",r.placeholder)("type",r.inputType)("step",r.inputArrowsStepRate||1),a(),C("matTooltip",r.help)}}function Te(i,e){if(i&1&&(n(0,"mat-option",12),l(1),o()),i&2){let t=e.$implicit;c("value",t.value),a(),N(" ",t.viewValue," ")}}function be(i,e){if(i&1&&(n(0,"div",6)(1,"mat-label"),l(2),o(),n(3,"mat-form-field",8)(4,"mat-select",11),x(5,Te,2,2,"mat-option",12,F),o(),_(7,"mat-icon",10),o()()),i&2){let t=f(),r=t.$implicit,m=t.$index;a(2),v(r.label),a(2),c("formControlName",m),a(),g(r.options),a(2),C("matTooltip",r.help)}}function Ee(i,e){if(i&1&&(n(0,"div",7)(1,"mat-checkbox",13),l(2),o(),n(3,"div",14),_(4,"mat-icon",15),o()()),i&2){let t=f(),r=t.$implicit,m=t.$index;a(),c("formControlName",m),a(),v(r.label),a(2),C("matTooltip",r.help)}}function Pe(i,e){if(i&1&&y(0,Ae,6,6,"div",6)(1,be,8,3,"div",6)(2,Ee,5,3,"div",7),i&2){let t=e.$implicit;u(t.inputType==="text"||t.inputType==="number"?0:-1),a(),u(t.inputType==="select"?1:-1),a(),u(t.inputType==="checkbox"?2:-1)}}function De(i,e){if(i&1&&(n(0,"div",2),P(1,4),n(2,"div",5),x(3,Pe,3,3,null,null,F),o(),D(),o()),i&2){let t=f();a(),c("formGroupName",t.controlKey),a(2),g(t.parameters)}}function Ne(i,e){i&1&&(n(0,"p",3),l(1,"No parameters configured."),o())}var s,Ie=(s=class{ngOnChanges(e){e.algorithm&&e.algorithm.currentValue&&(this.alg=e.algorithm.currentValue,this.loadParametersForAlgorithm(this.alg))}get parentFormGroup(){return this.controlContainer.control}get paramsFormGroup(){return this.parentFormGroup.get(this.controlKey)}get parametersFormArray(){return this.paramsFormGroup.get("parametersArray")}constructor(e,t,r,m){this.fb=e,this.controlContainer=t,this.parametersFacadeService=r,this.scriptFacadeService=m,this.controlKey="",this.RoutesList=O,this.alg=ge,this.isScriptActive=!1,this.parameters=[]}ngOnInit(){this.initForm(),this.listenToScriptStateChanges()}initForm(){this.parentFormGroup.addControl(this.controlKey,new K({parametersArray:new U([])}))}loadParametersForAlgorithm(e){this.parametersFacadeService.dispatch(Me.loadParameters({arg:e})),this.parametersFacadeService.parameters$.pipe(I(t=>t[e]?.data||[]),A(1),M(this)).subscribe(t=>{this.buildFormArray(t)})}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(M(this)).subscribe(e=>{this.isScriptActive=ae(e)})}buildFormArray(e){this.parametersFormArray.clear(),e.forEach(t=>{let r=this.fb.control(t.defaultValue,Se(t));this.parametersFormArray.push(r)}),this.isScriptActive?this.paramsFormGroup.disable():this.paramsFormGroup.enable(),this.parameters=e}get parametersFormatted(){let e={},t=this.parametersFormArray.getRawValue();return this.parameters.forEach((r,m)=>{e[r.argName]=t[m]}),e}ngOnDestroy(){this.parentFormGroup.removeControl(this.controlKey)}},s.\u0275fac=function(t){return new(t||s)(d(H),d(h),d(xe),d(oe))},s.\u0275cmp=b({type:s,selectors:[["ms-panel-parameters"]],inputs:{controlKey:"controlKey",algorithm:"algorithm"},standalone:!0,features:[k([],[{provide:h,useFactory:()=>T(h,{skipSelf:!0})}]),E,V],decls:5,vars:1,consts:[[1,"ms-card","parameters-card"],[1,"heading-sub-section-title"],[1,"parameters-wrapper"],[1,"no-parameters-message"],[3,"formGroupName"],["formArrayName","parametersArray"],[1,"form-field-container"],[1,"form-field-container","inline-container","mb-[22px]"],["appearance","outline"],["matInput","","msErrorDisplay","",3,"formControlName","placeholder","type","step"],["fontSet","ms","fontIcon","icon-Info","matSuffix","",3,"matTooltip"],["msErrorDisplay","",3,"formControlName"],[3,"value"],[3,"formControlName"],[1,"ml-2"],["fontSet","ms","fontIcon","icon-Info",3,"matTooltip"]],template:function(t,r){t&1&&(n(0,"mat-card",0)(1,"p",1),l(2,"Parameters"),o(),y(3,De,5,1,"div",2)(4,Ne,2,0,"p",3),o()),t&2&&(a(3),u(r.parameters.length?3:4))},dependencies:[te,ee,J,Y,z,X,G,$,w,B,j,q,ve,Ce,Q,Fe,ye,R,ie,re,_e,he,Z,W,fe],styles:[".parameters-card[_ngcontent-%COMP%] .parameters-wrapper[_ngcontent-%COMP%]{max-height:400px;overflow:auto;padding-right:20px}.parameters-card[_ngcontent-%COMP%] .parameters-wrapper[_ngcontent-%COMP%] .parameter-divider[_ngcontent-%COMP%]{margin-bottom:20px}"]}),s);Ie=S([L()],Ie);export{Ie as a}; +import{a as Me}from"./chunk-BTI2I76F.js";import{a as ye,b as Fe}from"./chunk-GACPU6QS.js";import{a as he,b as _e}from"./chunk-6JSLXF7X.js";import{d as ge}from"./chunk-ZNSBC7FI.js";import{a as Ce,b as ve}from"./chunk-PGXHYGLR.js";import{b as ae}from"./chunk-LRK34XDC.js";import{a as ne,b as me,c as pe,d as se,e as le,f as ce,g as de,h as ue,i as fe}from"./chunk-2CKK74GJ.js";import{a as re,b as ie}from"./chunk-GWFXRHCV.js";import{b as oe,l as xe}from"./chunk-3IJULEGV.js";import{a as L,b as M}from"./chunk-QJ55TOIV.js";import{a as Y,d as z,h as J,i as Q,j as ee,k as te}from"./chunk-HULQWYRR.js";import{$a as n,$c as O,Ab as V,Da as a,Ea as d,P as A,Pa as y,Qd as R,Ra as c,Xa as u,Xd as G,Ya as F,Za as x,Zd as p,_a as g,_d as h,ab as o,ae as $,bb as _,be as w,ca as T,cb as P,ce as K,db as D,ga as b,je as j,kb as f,ke as q,le as B,me as U,na as E,nb as C,ne as H,p as S,pe as X,tb as l,ub as v,vb as N,ve as W,w as I,we as Z,zb as k}from"./chunk-DL2LTWBU.js";var Se=i=>{let e=[];if(i.validators)for(let[t,r]of Object.entries(i.validators))switch(t){case"required":r&&e.push(p.required);break;case"min":e.push(p.min(r));break;case"max":e.push(p.max(r));break;case"minLength":e.push(p.minLength(r));break;case"maxLength":e.push(p.maxLength(r));break;case"pattern":e.push(p.pattern(r));break;case"requiredTrue":r&&e.push(p.requiredTrue);break;case"email":r&&e.push(p.email);break;case le:e.push(ce(r));break;case de:e.push(ue());break;case ne:e.push(me());break;case pe:Array.isArray(r)&&r.length===2&&e.push(se(r));break}return e};function Ae(i,e){if(i&1&&(n(0,"div",6)(1,"mat-label"),l(2),o(),n(3,"mat-form-field",8),_(4,"input",9)(5,"mat-icon",10),o()()),i&2){let t=f(),r=t.$implicit,m=t.$index;a(2),v(r.label),a(2),c("formControlName",m)("placeholder",r.placeholder)("type",r.inputType)("step",r.inputArrowsStepRate||1),a(),C("matTooltip",r.help)}}function Te(i,e){if(i&1&&(n(0,"mat-option",12),l(1),o()),i&2){let t=e.$implicit;c("value",t.value),a(),N(" ",t.viewValue," ")}}function be(i,e){if(i&1&&(n(0,"div",6)(1,"mat-label"),l(2),o(),n(3,"mat-form-field",8)(4,"mat-select",11),x(5,Te,2,2,"mat-option",12,F),o(),_(7,"mat-icon",10),o()()),i&2){let t=f(),r=t.$implicit,m=t.$index;a(2),v(r.label),a(2),c("formControlName",m),a(),g(r.options),a(2),C("matTooltip",r.help)}}function Ee(i,e){if(i&1&&(n(0,"div",7)(1,"mat-checkbox",13),l(2),o(),n(3,"div",14),_(4,"mat-icon",15),o()()),i&2){let t=f(),r=t.$implicit,m=t.$index;a(),c("formControlName",m),a(),v(r.label),a(2),C("matTooltip",r.help)}}function Pe(i,e){if(i&1&&y(0,Ae,6,6,"div",6)(1,be,8,3,"div",6)(2,Ee,5,3,"div",7),i&2){let t=e.$implicit;u(t.inputType==="text"||t.inputType==="number"?0:-1),a(),u(t.inputType==="select"?1:-1),a(),u(t.inputType==="checkbox"?2:-1)}}function De(i,e){if(i&1&&(n(0,"div",2),P(1,4),n(2,"div",5),x(3,Pe,3,3,null,null,F),o(),D(),o()),i&2){let t=f();a(),c("formGroupName",t.controlKey),a(2),g(t.parameters)}}function Ne(i,e){i&1&&(n(0,"p",3),l(1,"No parameters configured."),o())}var s,Ie=(s=class{ngOnChanges(e){e.algorithm&&e.algorithm.currentValue&&(this.alg=e.algorithm.currentValue,this.loadParametersForAlgorithm(this.alg))}get parentFormGroup(){return this.controlContainer.control}get paramsFormGroup(){return this.parentFormGroup.get(this.controlKey)}get parametersFormArray(){return this.paramsFormGroup.get("parametersArray")}constructor(e,t,r,m){this.fb=e,this.controlContainer=t,this.parametersFacadeService=r,this.scriptFacadeService=m,this.controlKey="",this.RoutesList=O,this.alg=ge,this.isScriptActive=!1,this.parameters=[]}ngOnInit(){this.initForm(),this.listenToScriptStateChanges()}initForm(){this.parentFormGroup.addControl(this.controlKey,new K({parametersArray:new U([])}))}loadParametersForAlgorithm(e){this.parametersFacadeService.dispatch(Me.loadParameters({arg:e})),this.parametersFacadeService.parameters$.pipe(I(t=>t[e]?.data||[]),A(1),M(this)).subscribe(t=>{this.buildFormArray(t)})}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(M(this)).subscribe(e=>{this.isScriptActive=ae(e)})}buildFormArray(e){this.parametersFormArray.clear(),e.forEach(t=>{let r=this.fb.control(t.defaultValue,Se(t));this.parametersFormArray.push(r)}),this.isScriptActive?this.paramsFormGroup.disable():this.paramsFormGroup.enable(),this.parameters=e}get parametersFormatted(){let e={},t=this.parametersFormArray.getRawValue();return this.parameters.forEach((r,m)=>{e[r.argName]=t[m]}),e}ngOnDestroy(){this.parentFormGroup.removeControl(this.controlKey)}},s.\u0275fac=function(t){return new(t||s)(d(H),d(h),d(xe),d(oe))},s.\u0275cmp=b({type:s,selectors:[["ms-panel-parameters"]],inputs:{controlKey:"controlKey",algorithm:"algorithm"},standalone:!0,features:[k([],[{provide:h,useFactory:()=>T(h,{skipSelf:!0})}]),E,V],decls:5,vars:1,consts:[[1,"ms-card","parameters-card"],[1,"heading-sub-section-title"],[1,"parameters-wrapper"],[1,"no-parameters-message"],[3,"formGroupName"],["formArrayName","parametersArray"],[1,"form-field-container"],[1,"form-field-container","inline-container","mb-[22px]"],["appearance","outline"],["matInput","","msErrorDisplay","",3,"formControlName","placeholder","type","step"],["fontSet","ms","fontIcon","icon-Info","matSuffix","",3,"matTooltip"],["msErrorDisplay","",3,"formControlName"],[3,"value"],[3,"formControlName"],[1,"ml-2"],["fontSet","ms","fontIcon","icon-Info",3,"matTooltip"]],template:function(t,r){t&1&&(n(0,"mat-card",0)(1,"p",1),l(2,"Parameters"),o(),y(3,De,5,1,"div",2)(4,Ne,2,0,"p",3),o()),t&2&&(a(3),u(r.parameters.length?3:4))},dependencies:[te,ee,J,Y,z,X,G,$,w,B,j,q,ve,Ce,Q,Fe,ye,R,ie,re,_e,he,Z,W,fe],styles:[".parameters-card[_ngcontent-%COMP%] .parameters-wrapper[_ngcontent-%COMP%]{max-height:400px;overflow:auto;padding-right:20px}.parameters-card[_ngcontent-%COMP%] .parameters-wrapper[_ngcontent-%COMP%] .parameter-divider[_ngcontent-%COMP%]{margin-bottom:20px}"]}),s);Ie=S([L()],Ie);export{Ie as a}; diff --git a/frontend/server/modelsmith-build/browser/chunk-NNZ4VUYD.js b/frontend/server/modelsmith-build/browser/chunk-QDRY36GI.js similarity index 94% rename from frontend/server/modelsmith-build/browser/chunk-NNZ4VUYD.js rename to frontend/server/modelsmith-build/browser/chunk-QDRY36GI.js index a0766be..cbd9dd1 100644 --- a/frontend/server/modelsmith-build/browser/chunk-NNZ4VUYD.js +++ b/frontend/server/modelsmith-build/browser/chunk-QDRY36GI.js @@ -1 +1 @@ -import{a as u}from"./chunk-XSACZZU3.js";import{a as g}from"./chunk-VEEXI746.js";import"./chunk-DSSER6OZ.js";import"./chunk-OWJBZ7BL.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import"./chunk-NAEQPCWM.js";import{a as d}from"./chunk-FMRIWR6H.js";import"./chunk-PGXHYGLR.js";import"./chunk-DBDNSQWV.js";import"./chunk-HOFUFSNV.js";import{b as N,c as x,g as w}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as q,b as $}from"./chunk-3IJULEGV.js";import{a as k,b as D}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as s,$c as O,Da as m,Ea as f,Ra as a,Zb as V,_ as l,a as v,ab as p,b as M,bb as b,be as Q,cb as P,db as E,fb as I,ga as F,ha as c,ib as T,ie as B,kc as j,ne as L,oa as y,oc as A,oe as H,p as U,pa as S,pb as R,pe as K,qb as _,qe as W,rb as G,tb as h,te as X}from"./chunk-DL2LTWBU.js";var Z=["panelParameters"],o,C=(o=class{constructor(t,i,e){this.fb=t,this.scriptFacadeService=i,this.router=e,this.AlgorithmType=x,this.MachineUnlearningAlgorithmsEnum=w,this.isScriptActive=!1}ngOnInit(){this.initForm(),this.listenToScriptStateChanges()}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(D(this)).subscribe(t=>{this.isScriptActive=N(t),N(t)?this.form.disable():this.form.enable()})}initForm(){this.form=this.fb.group({algorithm:this.fb.group({alg:[]})}),setTimeout(()=>{this.form.get("algorithm.alg")?.setValue(w.MU)},0)}submit(){if(this.isScriptActive)return;let{algorithm:t,model:i}=this.form.getRawValue(),{model:e}=i,r=M(v({},t),{params:M(v({},this.panelParametersComponent.parametersFormatted),{arch:e})});this.scriptFacadeService.dispatch(q.callScript({configs:r}))}goToChartPage(){this.router.navigate([O.RUNNING.ROOT])}},o.\u0275fac=function(i){return new(i||o)(f(L),f($),f(j))},o.\u0275cmp=F({type:o,selectors:[["ms-machine-unlearning"]],viewQuery:function(i,e){if(i&1&&R(Z,5),i&2){let r;_(r=G())&&(e.panelParametersComponent=r.first)}},decls:15,vars:5,consts:[["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper",3,"formGroup"],[1,"left"],[3,"formGroup"],["controlKey","model",3,"algorithmType"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","primary",1,"ml-2",3,"click"],[1,"right"]],template:function(i,e){if(i&1){let r=I();s(0,"p",1),h(1,"Machine Unlearning"),p(),s(2,"div",2)(3,"div",3),P(4,4),b(5,"ms-panel-model",5)(6,"ms-panel-parameters",6,0),E(),s(8,"div")(9,"button",7),T("click",function(){return y(r),S(e.submit())}),h(10," Run "),p(),s(11,"button",8),T("click",function(){return y(r),S(e.goToChartPage())}),h(12,"View Chart"),p()()(),s(13,"div",9),b(14,"ms-terminal-xterm-with-toolbar"),p()()}i&2&&(m(2),a("formGroup",e.form),m(2),a("formGroup",e.form),m(),a("algorithmType",e.AlgorithmType.MACHINE_UNLEARNING),m(),a("algorithm",e.MachineUnlearningAlgorithmsEnum.MU),m(3),a("disabled",e.isScriptActive||e.form.invalid))},dependencies:[d,g,u,W,Q,B],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),o);C=U([k()],C);var tt=[{path:"",component:C}],J=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=c({type:t}),t.\u0275inj=l({imports:[A.forChild(tt),A]});let n=t;return n})();var Ft=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=c({type:t}),t.\u0275inj=l({imports:[V,J,d,g,u,X,H,K]});let n=t;return n})();export{Ft as MachineUnlearningModule}; +import{a as u}from"./chunk-XSACZZU3.js";import{a as g}from"./chunk-OAX72PXK.js";import"./chunk-DSSER6OZ.js";import"./chunk-OWJBZ7BL.js";import"./chunk-BTI2I76F.js";import"./chunk-SLUK3QXN.js";import"./chunk-GACPU6QS.js";import"./chunk-6JSLXF7X.js";import"./chunk-NAEQPCWM.js";import{a as d}from"./chunk-ZNSBC7FI.js";import"./chunk-PGXHYGLR.js";import"./chunk-RQYYT6OA.js";import"./chunk-HOFUFSNV.js";import{b as N,c as x,g as w}from"./chunk-LRK34XDC.js";import"./chunk-2CKK74GJ.js";import"./chunk-VLO6NL53.js";import"./chunk-GWFXRHCV.js";import"./chunk-XX6ZYDLH.js";import"./chunk-GYTTCMYG.js";import{a as q,b as $}from"./chunk-3IJULEGV.js";import{a as k,b as D}from"./chunk-QJ55TOIV.js";import"./chunk-CYUWMGXJ.js";import"./chunk-HULQWYRR.js";import{$a as s,$c as O,Da as m,Ea as f,Ra as a,Zb as V,_ as l,a as v,ab as p,b as M,bb as b,be as Q,cb as P,db as E,fb as I,ga as F,ha as c,ib as T,ie as B,kc as j,ne as L,oa as y,oc as A,oe as H,p as U,pa as S,pb as R,pe as K,qb as _,qe as W,rb as G,tb as h,te as X}from"./chunk-DL2LTWBU.js";var Z=["panelParameters"],o,C=(o=class{constructor(t,i,e){this.fb=t,this.scriptFacadeService=i,this.router=e,this.AlgorithmType=x,this.MachineUnlearningAlgorithmsEnum=w,this.isScriptActive=!1}ngOnInit(){this.initForm(),this.listenToScriptStateChanges()}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(D(this)).subscribe(t=>{this.isScriptActive=N(t),N(t)?this.form.disable():this.form.enable()})}initForm(){this.form=this.fb.group({algorithm:this.fb.group({alg:[]})}),setTimeout(()=>{this.form.get("algorithm.alg")?.setValue(w.MU)},0)}submit(){if(this.isScriptActive)return;let{algorithm:t,model:i}=this.form.getRawValue(),{model:e}=i,r=M(v({},t),{params:M(v({},this.panelParametersComponent.parametersFormatted),{arch:e})});this.scriptFacadeService.dispatch(q.callScript({configs:r}))}goToChartPage(){this.router.navigate([O.RUNNING.ROOT])}},o.\u0275fac=function(i){return new(i||o)(f(L),f($),f(j))},o.\u0275cmp=F({type:o,selectors:[["ms-machine-unlearning"]],viewQuery:function(i,e){if(i&1&&R(Z,5),i&2){let r;_(r=G())&&(e.panelParametersComponent=r.first)}},decls:15,vars:5,consts:[["panelParameters",""],[1,"heading-primary-title","title"],[1,"page-wrapper",3,"formGroup"],[1,"left"],[3,"formGroup"],["controlKey","model",3,"algorithmType"],["controlKey","params",3,"algorithm"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","primary",1,"ml-2",3,"click"],[1,"right"]],template:function(i,e){if(i&1){let r=I();s(0,"p",1),h(1,"Machine Unlearning"),p(),s(2,"div",2)(3,"div",3),P(4,4),b(5,"ms-panel-model",5)(6,"ms-panel-parameters",6,0),E(),s(8,"div")(9,"button",7),T("click",function(){return y(r),S(e.submit())}),h(10," Run "),p(),s(11,"button",8),T("click",function(){return y(r),S(e.goToChartPage())}),h(12,"View Chart"),p()()(),s(13,"div",9),b(14,"ms-terminal-xterm-with-toolbar"),p()()}i&2&&(m(2),a("formGroup",e.form),m(2),a("formGroup",e.form),m(),a("algorithmType",e.AlgorithmType.MACHINE_UNLEARNING),m(),a("algorithm",e.MachineUnlearningAlgorithmsEnum.MU),m(3),a("disabled",e.isScriptActive||e.form.invalid))},dependencies:[d,g,u,W,Q,B],styles:[".title[_ngcontent-%COMP%]{margin-bottom:13px}"]}),o);C=U([k()],C);var tt=[{path:"",component:C}],J=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=c({type:t}),t.\u0275inj=l({imports:[A.forChild(tt),A]});let n=t;return n})();var Ft=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=c({type:t}),t.\u0275inj=l({imports:[V,J,d,g,u,X,H,K]});let n=t;return n})();export{Ft as MachineUnlearningModule}; diff --git a/frontend/server/modelsmith-build/browser/chunk-RQYYT6OA.js b/frontend/server/modelsmith-build/browser/chunk-RQYYT6OA.js new file mode 100644 index 0000000..85c2143 --- /dev/null +++ b/frontend/server/modelsmith-build/browser/chunk-RQYYT6OA.js @@ -0,0 +1 @@ +import{a as qe,b as Q}from"./chunk-HOFUFSNV.js";import{b as $e}from"./chunk-LRK34XDC.js";import{i as Ke}from"./chunk-2CKK74GJ.js";import{a as pt,b as ft,c as ut}from"./chunk-VLO6NL53.js";import{a as Le,b as Ye}from"./chunk-GWFXRHCV.js";import{b as ae,c as Ge}from"./chunk-XX6ZYDLH.js";import{d as Qe}from"./chunk-GYTTCMYG.js";import{a as We,b as K}from"./chunk-3IJULEGV.js";import{a as M,b as p}from"./chunk-QJ55TOIV.js";import{b as ze,s as Xe}from"./chunk-CYUWMGXJ.js";import{a as Be,d as Ue,h as Ne,i as Y,j as He,k as G}from"./chunk-HULQWYRR.js";import{$ as fe,$a as n,Ab as C,Ba as de,D as me,Da as D,Ea as s,Eb as Me,Gb as we,I as pe,J as j,Ra as F,Rb as De,Ub as _e,Xd as Pe,Z as V,Zb as P,a as I,ab as l,ae as Ee,ba as A,bb as c,be as Ie,ce as Ae,e as oe,ee as ke,f as ie,fb as ve,ga as g,ia as ue,ib as m,ie as xe,j as re,ja as he,lb as Se,le as Re,mb as Te,ne as je,oa as b,oe as Ve,p as T,pa as y,pb as ge,pe as z,qb as be,rb as ye,rc as Oe,sb as Fe,sc as ne,se as X,tb as O,te as L,ua as B,ub as Ce,vc as k,ve as W,wa as U,wc as H,we as $,xa as f,yc as se,zb as N}from"./chunk-DL2LTWBU.js";var Ze=oe(pt()),et=oe(ft()),tt=oe(ut());var dt=["terminal"],u,Je=(u=class{constructor(e){this.terminalWebSocketService=e,this.fitAddon=new Ze.FitAddon,this.searchAddon=new et.SearchAddon}ngOnInit(){this.initializeTerminal(),this.subscribeToWebSocketMessages()}ngAfterViewInit(){requestAnimationFrame(()=>{this.adjustTerminalContainer()})}initializeTerminal(){this.terminal=new tt.Terminal(I({cursorBlink:!0,theme:{background:"#D0D4D9",foreground:"#000000",cursor:"#000000",selectionBackground:"#FFDD00",selectionForeground:"#000000"},allowProposedApi:!0},this.options)),this.terminal.loadAddon(this.fitAddon),this.terminal.loadAddon(this.searchAddon),this.terminal.open(this.terminalDiv.nativeElement),this.setupResizeObserver(),this.terminal.onData(e=>{this.terminalWebSocketService.sendMessage(e)})}subscribeToWebSocketMessages(){this.terminalWebSocketService.messages$.pipe(p(this)).subscribe(e=>{this.terminal.write(e)})}setupResizeObserver(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=new ResizeObserver(()=>{this.adjustTerminalContainer()}),this.resizeObserver.observe(this.terminalDiv.nativeElement)}adjustTerminalContainer(){this.adjustHeightToParent(),this.fitAddon.fit()}adjustHeightToParent(){let e=this.terminalDiv.nativeElement.parentElement.parentElement.parentElement.parentElement;if(e){this.terminalDiv.nativeElement.style.height="auto";let i=e.offsetHeight-100;this.terminalDiv.nativeElement.style.height=`${i}px`}}ngOnDestroy(){this.resizeObserver?.disconnect(),this.terminal.dispose()}search(e){this.searchAddon.findNext(e,{decorations:{matchBackground:"#FFFF00",matchBorder:"#FFFF00",matchOverviewRuler:"#FFFF00",activeMatchBackground:"#FFFF00",activeMatchBorder:"#FFFF00",activeMatchColorOverviewRuler:"#FFFF00"}})}clearSearch(){this.searchAddon.clearDecorations()}clearTerminal(){this.terminal.clear()}scrollToTop(){this.terminal.scrollToTop()}scrollToBottom(){this.terminal.scrollToBottom()}},u.\u0275fac=function(o){return new(o||u)(s(Q))},u.\u0275cmp=g({type:u,selectors:[["ms-terminal-xterm"]],viewQuery:function(o,t){if(o&1&&ge(dt,7),o&2){let i;be(i=ye())&&(t.terminalDiv=i.first)}},inputs:{options:"options"},standalone:!0,features:[N([K,qe]),C],decls:2,vars:0,consts:[["terminal",""],[1,"terminal-wrapper"]],template:function(o,t){o&1&&c(0,"div",1,0)}}),u);Je=T([M({})],Je);var ot="200px",it="80px",le="top";var h=class{constructor(e){this.overlayRef=e,this.afterClosedSubject=new re,this.dataSubject=new re,this.data$=this.dataSubject.asObservable()}emitData(e){this.dataSubject.next(e)}backdropClick(){return this.overlayRef.backdropClick()}close(e){this.afterClosedSubject.next(e),this.afterClosedSubject.complete(),this.dataSubject.complete(),setTimeout(()=>{this.overlayRef.dispose()},150)}afterClosed(){return this.afterClosedSubject.asObservable()}};var E=new fe("POPOVER");var J=(()=>{let e=class e{constructor(t,i){this.overlay=t,this.injector=i}open(t,i,a){let x=this.getPositionStrategy(i,a?.position??le),R=this.overlay.create(I({positionStrategy:x},a||{})),ce=new h(R),ct=B.create({parent:this.injector,providers:[{provide:h,useValue:ce},{provide:E,useValue:I({position:le,closePopoverOnBackdropClick:!1,closePopoverOnEscKeyUp:!0,width:a?.width||ot,height:a?.height||it},a)}]}),mt=new ze(t,null,ct);return R.attach(mt),ce}getPositionStrategy(t,i){let a=t instanceof U?t.nativeElement:t,R={top:{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom",offsetY:-24,offsetX:-9},bottom:{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetY:4,offsetX:-7},left:{originX:"start",originY:"center",overlayX:"end",overlayY:"center",offsetX:-22,offsetY:-12},right:{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:8,offsetY:-10}}[i];return this.overlay.position().flexibleConnectedTo(a).withFlexibleDimensions(!1).withPush(!1).withPositions([R])}};e.\u0275fac=function(i){return new(i||e)(A(Xe),A(B))},e.\u0275prov=V({token:e,factory:e.\u0275fac});let r=e;return r})();var rt=(()=>{let e=class e{constructor(t){this.el=t}ngAfterViewInit(){setTimeout(()=>{this.el.nativeElement.focus()},0)}};e.\u0275fac=function(i){return new(i||e)(s(U))},e.\u0275dir=ue({type:e,selectors:[["","msAutofocus",""]],standalone:!0});let r=e;return r})();var Z=(()=>{let e=class e{constructor(t){this.dialogService=t}openFullScreenDialog(t){return ie(this,null,function*(){if(t)return;let{MsTerminalFullscreenDialogComponent:i}=yield import("./chunk-FAHE4JRI.js");document.body.classList.add("no-scroll"),this.dialogService.open(i,{showHeader:!1,showFooter:!1,showSaveButton:!1,width:"100vw",height:"100vh"}).afterClosed().pipe(pe(1)).subscribe(()=>{document.body.classList.remove("no-scroll")})})}openMessagesHistoryDialog(){return ie(this,null,function*(){let{MsTerminalMessagesHistoryDialogComponent:t}=yield import("./chunk-GU6QGHQ6.js");this.dialogService.open(t,{title:"Terminal history",showSaveButton:!1,width:"60vw",height:"75vh"})})}};e.\u0275fac=function(i){return new(i||e)(A(Qe))},e.\u0275prov=V({token:e,factory:e.\u0275fac});let r=e;return r})();var w=function(r){return r.OPEN="open",r.DISMISS="dismiss",r.SAVE="save",r.CLOSE="close",r}(w||{});function st(r,e){let o={};return r&&nt(o,r,"width"),e&&nt(o,e,"height"),o}function nt(r,e,o){let t=bt(e);t==="px"||t==="rem"||t==="em"?r[`${o}.${t}`]=parseFloat(e):r[o]=e}function bt(r){let o=(typeof r=="string"?r:"").match(/(px|rem|em|vw|vh|%)$/);return o?o[0]:"px"}var at=(()=>{let e=class e{transform(t,i){return st(t,i)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=he({name:"iconPanelSizeStyles",type:e,pure:!0,standalone:!0});let r=e;return r})();var Ct=["*"],d,ee=(d=class{constructor(e,o){this.popoverRef=e,this.data=o,this.actionEvent=new f,this.isClosing=!1,this.closeDrawerOnBackdropClick()}onClose(){this.actionEvent.emit(w.CLOSE),this.popoverRef.close({status:w.CLOSE}),this.isClosing=!0}onSave(){this.actionEvent.emit(w.SAVE),this.popoverRef.close({status:w.SAVE}),this.isClosing=!1}onDismiss(){this.actionEvent.emit(w.DISMISS),this.popoverRef.close({status:w.DISMISS}),this.isClosing=!1}closeDrawerOnBackdropClick(){this.data.closePopoverOnBackdropClick&&this.popoverRef.backdropClick().pipe(p(this)).subscribe(()=>{this.onDismiss()})}onEscKeyDown(){this.data.closePopoverOnEscKeyUp&&this.onDismiss()}},d.\u0275fac=function(o){return new(o||d)(s(h),s(E))},d.\u0275cmp=g({type:d,selectors:[["ms-popover"]],hostBindings:function(o,t){o&1&&m("keyup.esc",function(){return t.onEscKeyDown()},!1,de)},inputs:{contentTemplate:"contentTemplate"},outputs:{actionEvent:"actionEvent"},standalone:!0,features:[C],ngContentSelectors:Ct,decls:8,vars:6,consts:[[1,"tooltip-container",3,"ngClass","ngStyle"],[1,"tooltip-arrow"],[1,"popover-content"],[1,"close-button"],["mat-icon-button","",3,"click"],["fontSet","ms","fontIcon","icon-X",1,"mat-error","size-20"]],template:function(o,t){o&1&&(Se(),n(0,"div",0),Me(1,"iconPanelSizeStyles"),c(2,"div",1),n(3,"div",2),Te(4),l(),n(5,"div",3)(6,"button",4),m("click",function(){return t.onClose()}),c(7,"mat-icon",5),l()()()),o&2&&F("ngClass",t.data.position)("ngStyle",we(1,3,t.data.width,t.data.height))("@fadeInOut",t.isClosing)},dependencies:[P,De,_e,$,W,L,X,at],styles:[".tooltip-container[_ngcontent-%COMP%]{position:relative;background-color:var(--tooltip);color:var(--terminal-color);border-radius:6px;box-shadow:0 4px 8px #0000001a;padding:10px 8px}.tooltip-arrow[_ngcontent-%COMP%]{position:absolute;width:0;height:0;border-style:solid}.tooltip-content[_ngcontent-%COMP%]{padding:12px}.tooltip-container.top[_ngcontent-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{bottom:-10px;left:50%;transform:translate(-50%);border-width:10px 10px 0 10px;border-color:var(--tooltip) transparent transparent transparent}.tooltip-container.bottom[_ngcontent-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{top:-10px;left:50%;transform:translate(-50%);border-width:0 10px 10px 10px;border-color:transparent transparent var(--tooltip) transparent}.tooltip-container.left[_ngcontent-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{right:-10px;top:50%;transform:translateY(-50%);border-width:10px 0 10px 10px;border-color:transparent transparent transparent var(--tooltip)}.tooltip-container.right[_ngcontent-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{left:-10px;top:50%;transform:translateY(-50%);border-width:10px 10px 10px 0;border-color:transparent var(--tooltip) transparent transparent}.close-button[_ngcontent-%COMP%]{position:absolute;right:0;top:0}"],data:{animation:[Oe("fadeInOut",[H("void",k({opacity:0})),H("true",k({opacity:0})),H("false",k({opacity:1})),se(":enter",[ne(`${150}ms ease-in`,k({opacity:1}))]),se("false => true",[ne(`${150}ms ease-out`)])])]}}),d);ee=T([M()],ee);var v,te=(v=class{get searchFormControl(){return this.searchForm.get("search")}constructor(e,o,t){this.popoverRef=e,this.iconPanelConfig=o,this.fb=t,this.searchForm=new Ae({})}ngOnInit(){this.initForm(),this.listenToSearchFormControlValueChanges()}initForm(){this.searchForm=this.fb.group({search:[""]})}listenToSearchFormControlValueChanges(){this.searchFormControl.valueChanges.pipe(p(this),j(200)).subscribe(e=>{this.popoverRef.emitData(e)})}},v.\u0275fac=function(o){return new(o||v)(s(h),s(E),s(je))},v.\u0275cmp=g({type:v,selectors:[["ms-terminal-toolbar-search-popover"]],standalone:!0,features:[C],decls:7,vars:1,consts:[[1,"form-field-container","dark",3,"formGroup"],["subscriptSizing","dynamic"],["msErrorDisplay","","matInput","","msAutofocus","","formControlName","search"],["fontSet","ms","fontIcon","icon-MagnifyingGlass","matSuffix",""]],template:function(o,t){o&1&&(n(0,"ms-popover")(1,"div",0)(2,"mat-label"),O(3," Search... "),l(),n(4,"mat-form-field",1),c(5,"input",2)(6,"mat-icon",3),l()()()),o&2&&(D(),F("formGroup",t.searchForm))},dependencies:[P,G,He,Ne,Be,Ue,Y,z,Pe,Ee,Ie,xe,Re,ee,Ke,rt]}),v);te=T([M({})],te);var S,lt=(S=class{constructor(e,o,t,i){this.scriptFacadeService=e,this.terminalWebSocketService=o,this.terminalDialogService=t,this.popoverService=i,this.isFullscreen=!1,this.isScriptActive=!1,this.clearTerminal=new f,this.scrollToTopTerminal=new f,this.scrollToBottomTerminal=new f,this.searchTerminal=new f,this.disposeSearch=new f,this.exitFullscreen=new f,this.searchFormControl=new ke("")}ngOnInit(){this.listenToScriptStateChanges(),this.listenToSearchFormControlChanges()}clearTerminalScreen(){this.terminalWebSocketService.clearScreen()}openPanel(e){ae(this.searchPanelRef)&&(this.searchPanelRef=this.popoverService.open(te,e._elementRef,{position:this.isFullscreen?"bottom":"top",width:"200px",height:"60px"}),this.searchPanelRef.data$.pipe(p(this)).subscribe(o=>{this.searchTerminal.emit(o)}))}listenToSearchFormControlChanges(){this.searchFormControl.valueChanges.pipe(p(this),j(300),me(e=>!Ge(e))).subscribe(e=>{this.searchTerminal.emit(e)})}listenToScriptStateChanges(){this.scriptFacadeService.scriptStatus$.pipe(p(this)).subscribe(e=>{this.isScriptActive=$e(e)})}ctaStopScript(){this.scriptFacadeService.dispatch(We.stopScript())}openTerminalMessagesHistoryDialog(){this.terminalDialogService.openMessagesHistoryDialog()}openFullScreenMode(){if(this.isFullscreen){this.exitFullscreen.emit();return}this.searchPanelRef?.close(),this.terminalDialogService.openFullScreenDialog(this.isFullscreen)}ngOnDestroy(){ae(this.searchPanelRef)||this.searchPanelRef?.close()}},S.\u0275fac=function(o){return new(o||S)(s(K),s(Q),s(Z),s(J))},S.\u0275cmp=g({type:S,selectors:[["ms-terminal-toolbar"]],inputs:{isFullscreen:"isFullscreen",isScriptActive:"isScriptActive"},outputs:{clearTerminal:"clearTerminal",scrollToTopTerminal:"scrollToTopTerminal",scrollToBottomTerminal:"scrollToBottomTerminal",searchTerminal:"searchTerminal",disposeSearch:"disposeSearch",exitFullscreen:"exitFullscreen"},standalone:!0,features:[N([Z,J]),C],decls:19,vars:4,consts:[["searchTooltip",""],[1,"buttons-wrapper"],["mat-icon-button","","color","primary","matTooltip","Search terminal",3,"click"],["fontSet","ms","fontIcon","icon-MagnifyingGlass"],["mat-icon-button","","color","primary","matTooltip","Terminal history",3,"click"],["mat-icon-button","","color","primary","matTooltip","Scroll to top",3,"click"],["fontSet","ms","fontIcon","icon-ArrowUp"],["mat-icon-button","","color","primary","matTooltip","Scroll to bottom",3,"click"],["fontSet","ms","fontIcon","icon-ArrowDown"],["mat-icon-button","","color","primary","matTooltip","Clear terminal",3,"click","disabled"],["mat-icon-button","","color","primary",3,"click","matTooltip"],["mat-icon-button","","color","warn","matTooltip","Stop current process",3,"click","disabled"],["fontSet","ms","fontIcon","icon-X",1,"mat-error"]],template:function(o,t){if(o&1){let i=ve();n(0,"div",1)(1,"button",2,0),m("click",function(){b(i);let x=Fe(2);return y(t.openPanel(x))}),c(3,"mat-icon",3),l(),n(4,"button",4),m("click",function(){return b(i),y(t.openTerminalMessagesHistoryDialog())}),n(5,"mat-icon"),O(6,"history"),l()(),n(7,"button",5),m("click",function(){return b(i),y(t.scrollToTopTerminal.emit())}),c(8,"mat-icon",6),l(),n(9,"button",7),m("click",function(){return b(i),y(t.scrollToBottomTerminal.emit())}),c(10,"mat-icon",8),l(),n(11,"button",9),m("click",function(){return b(i),y(t.clearTerminalScreen())}),n(12,"mat-icon"),O(13," clear_all"),l()(),n(14,"button",10),m("click",function(){return b(i),y(t.openFullScreenMode())}),n(15,"mat-icon"),O(16),l()(),n(17,"button",11),m("click",function(){return b(i),y(t.ctaStopScript())}),c(18,"mat-icon",12),l()()}o&2&&(D(11),F("disabled",t.isScriptActive),D(3),F("matTooltip",t.isFullscreen?"Exit fullscreen":"Enter fullscreen"),D(2),Ce(t.isFullscreen?"fullscreen_exit":"fullscreen"),D(),F("disabled",!t.isScriptActive))},dependencies:[P,L,X,$,W,Ye,Le,Ve,z,Y,G]}),S);lt=T([M({})],lt);export{Je as a,lt as b}; diff --git a/frontend/server/modelsmith-build/browser/chunk-FMRIWR6H.js b/frontend/server/modelsmith-build/browser/chunk-ZNSBC7FI.js similarity index 97% rename from frontend/server/modelsmith-build/browser/chunk-FMRIWR6H.js rename to frontend/server/modelsmith-build/browser/chunk-ZNSBC7FI.js index 93f691a..3de6d78 100644 --- a/frontend/server/modelsmith-build/browser/chunk-FMRIWR6H.js +++ b/frontend/server/modelsmith-build/browser/chunk-ZNSBC7FI.js @@ -1,2 +1,2 @@ -import{a as I,b}from"./chunk-DBDNSQWV.js";import{d as T,f as e}from"./chunk-LRK34XDC.js";import{a as w}from"./chunk-QJ55TOIV.js";import{$a as _,Ab as y,ab as u,bb as h,fb as M,ga as f,ib as g,oa as o,p as d,pa as l,sb as a,tb as v}from"./chunk-DL2LTWBU.js";var t,P=(t=class{},t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=f({type:t,selectors:[["ms-terminal-xterm-with-toolbar"]],standalone:!0,features:[y],decls:8,vars:0,consts:[["terminal",""],[1,"ms-terminal-wrapper"],[1,"top-terminal-section"],[1,"heading-section-title","mb-1","flex","items-center"],[3,"clearTerminal","scrollToTopTerminal","scrollToBottomTerminal","searchTerminal","disposeSearch"]],template:function(i,c){if(i&1){let m=M();_(0,"div",1)(1,"div",2)(2,"div",3),v(3,"Terminal"),u(),_(4,"div")(5,"ms-terminal-toolbar",4),g("clearTerminal",function(){o(m);let r=a(7);return l(r.clearTerminal())})("scrollToTopTerminal",function(){o(m);let r=a(7);return l(r.scrollToTop())})("scrollToBottomTerminal",function(){o(m);let r=a(7);return l(r.scrollToBottom())})("searchTerminal",function(r){o(m);let k=a(7);return l(k.search(r))})("disposeSearch",function(){o(m);let r=a(7);return l(r.clearSearch())}),u()()(),h(6,"ms-terminal-xterm",null,0),u()}},dependencies:[b,I],styles:[`.ms-terminal-wrapper{overflow-x:auto}.ms-terminal-wrapper .terminal-wrapper{border:10px solid var(--terminal-color);background-color:var(--terminal-color);border-radius:10px}.ms-terminal-wrapper .top-terminal-section{display:flex;justify-content:space-between} +import{a as I,b}from"./chunk-RQYYT6OA.js";import{d as T,f as e}from"./chunk-LRK34XDC.js";import{a as w}from"./chunk-QJ55TOIV.js";import{$a as _,Ab as y,ab as u,bb as h,fb as M,ga as f,ib as g,oa as o,p as d,pa as l,sb as a,tb as v}from"./chunk-DL2LTWBU.js";var t,P=(t=class{},t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=f({type:t,selectors:[["ms-terminal-xterm-with-toolbar"]],standalone:!0,features:[y],decls:8,vars:0,consts:[["terminal",""],[1,"ms-terminal-wrapper"],[1,"top-terminal-section"],[1,"heading-section-title","mb-1","flex","items-center"],[3,"clearTerminal","scrollToTopTerminal","scrollToBottomTerminal","searchTerminal","disposeSearch"]],template:function(i,c){if(i&1){let m=M();_(0,"div",1)(1,"div",2)(2,"div",3),v(3,"Terminal"),u(),_(4,"div")(5,"ms-terminal-toolbar",4),g("clearTerminal",function(){o(m);let r=a(7);return l(r.clearTerminal())})("scrollToTopTerminal",function(){o(m);let r=a(7);return l(r.scrollToTop())})("scrollToBottomTerminal",function(){o(m);let r=a(7);return l(r.scrollToBottom())})("searchTerminal",function(r){o(m);let k=a(7);return l(k.search(r))})("disposeSearch",function(){o(m);let r=a(7);return l(r.clearSearch())}),u()()(),h(6,"ms-terminal-xterm",null,0),u()}},dependencies:[b,I],styles:[`.ms-terminal-wrapper{overflow-x:auto}.ms-terminal-wrapper .terminal-wrapper{border:10px solid var(--terminal-color);background-color:var(--terminal-color);border-radius:10px}.ms-terminal-wrapper .top-terminal-section{display:flex;justify-content:space-between} `],encapsulation:2}),t);P=d([w()],P);var S=[{key:e.IPG,value:"GraSP pruning"},{key:e.IPM,value:"Magnitude-based init pruning"},{key:e.IPR,value:"Random init pruning"},{key:e.IMP,value:"Iterative Magnitude Pruning"},{key:e.OMP,value:"One-shot Magnitude Pruning"},{key:e.IPS,value:"Init Pruning Snip"},{key:e.IPSY,value:"Init Pruning Synflow"},{key:e.IPMB,value:"Init Pruning Magnitude Both"}],x=[{key:T.BPTQ,value:"Basic PTQ"},{key:T.BRECQ,value:"Brec-q"},{key:T.MINMAXPTQ,value:"Minmax-ptq"}],A=[...S,...x],R=e.IMP,G=s=>A.filter(n=>s.includes(n.key)).map(n=>n.value),W=s=>{let n=S.find(c=>c.value===s);if(n)return n.key;let i=x.find(c=>c.value===s);return i?i.key:null};export{P as a,S as b,x as c,R as d,G as e,W as f}; diff --git a/frontend/server/modelsmith-build/browser/index.html b/frontend/server/modelsmith-build/browser/index.html index ec6bbfe..6d1c705 100644 --- a/frontend/server/modelsmith-build/browser/index.html +++ b/frontend/server/modelsmith-build/browser/index.html @@ -31,5 +31,5 @@