import{S as or,i as lr,s as rr,e as o,k as p,w as c,t as s,M as sr,c as l,d as t,m as d,a as r,x as f,h as n,b as h,G as a,g as u,y as m,L as nr,q as v,o as w,B as _,v as ir}from"../chunks/vendor-hf-doc-builder.js";import{I as N}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as Ie}from"../chunks/CodeBlock-hf-doc-builder.js";function ur(Qo){let A,yt,x,H,je,ee,va,qe,wa,$t,$,_a,te,Ea,ya,ae,$a,ba,bt,oe,gt,Ee,ga,kt,D,ka,le,Pa,Aa,Pt,S,L,Oe,re,xa,Me,Sa,At,R,Ta,Ne,Ca,Ia,xt,T,B,He,se,ja,De,qa,St,U,Oa,Le,Ma,Na,Tt,y,Re,ye,Be,Ha,Da,La,Ue,$e,Fe,Ra,Ba,Ua,Ke,be,Ye,Fa,Ka,Ya,ze,b,We,za,Wa,Ge,Ga,Ja,Je,Qa,Va,Ct,ge,Xa,It,C,F,Qe,ne,Za,Ve,eo,jt,g,to,Xe,ao,oo,Ze,lo,ro,qt,ie,Ot,K,so,et,no,io,Mt,ue,Nt,ke,uo,Ht,I,Y,tt,pe,po,at,ho,Dt,k,co,ot,fo,mo,lt,vo,wo,Lt,de,Rt,z,_o,rt,Eo,yo,Bt,j,W,st,he,$o,nt,bo,Ut,G,go,it,ko,Po,Ft,q,J,ut,ce,Ao,pt,xo,Kt,E,So,dt,To,Co,ht,Io,jo,ct,qo,Oo,ft,Mo,No,Yt,O,Q,mt,fe,Ho,vt,Do,zt,V,Lo,wt,Ro,Bo,Wt,me,Gt,Pe,Uo,Jt,M,X,_t,ve,Fo,Et,Ko,Qt,Ae,Yo,Vt,we,Xt,xe,zo,Zt;return ee=new N({}),oe=new Ie({props:{code:'evaluate-cli create "My Metric" module_type="metric"',highlighted:'evaluate-cli create <span class="hljs-string">&quot;My Metric&quot;</span> module_type=<span class="hljs-string">&quot;metric&quot;</span>'}}),re=new N({}),se=new N({}),ne=new N({}),ie=new Ie({props:{code:`def _download_and_prepare(self, dl_manager):
    model_path = dl_manager.download_and_extract(CHECKPOINT_URLS[self.config_name])
    self.scorer = score.BleurtScorer(os.path.join(model_path, self.config_name))`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">_download_and_prepare</span>(<span class="hljs-params">self, dl_manager</span>):
    model_path = dl_manager.download_and_extract(CHECKPOINT_URLS[self.config_name])
    self.scorer = score.BleurtScorer(os.path.join(model_path, self.config_name))`}}),ue=new Ie({props:{code:`def _download_and_prepare(self, dl_manager):
    import nltk
    nltk.download("punkt")`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">_download_and_prepare</span>(<span class="hljs-params">self, dl_manager</span>):
    <span class="hljs-keyword">import</span> nltk
    nltk.download(<span class="hljs-string">&quot;punkt&quot;</span>)`}}),pe=new N({}),de=new Ie({props:{code:`def _compute(self, references, predictions):
    em = sum([r==p for r, p in zip(references, predictions)])/len(references)
    return {"exact_match": em}`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">_compute</span>(<span class="hljs-params">self, references, predictions</span>):
    em = <span class="hljs-built_in">sum</span>([r==p <span class="hljs-keyword">for</span> r, p <span class="hljs-keyword">in</span> <span class="hljs-built_in">zip</span>(references, predictions)])/<span class="hljs-built_in">len</span>(references)
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;exact_match&quot;</span>: em}`}}),he=new N({}),ce=new N({}),fe=new N({}),me=new Ie({props:{code:`import evaluate
from evaluate.utils import launch_gradio_widget


module = evaluate.load("lvwerra/element_count")
launch_gradio_widget(module)`,highlighted:`<span class="hljs-keyword">import</span> evaluate
<span class="hljs-keyword">from</span> evaluate.utils <span class="hljs-keyword">import</span> launch_gradio_widget


module = evaluate.load(<span class="hljs-string">&quot;lvwerra/element_count&quot;</span>)
launch_gradio_widget(module)`}}),ve=new N({}),we=new Ie({props:{code:`cd PATH_TO_MODULE
git add .
git commit -m "Add my new, shiny module."
git push`,highlighted:`cd PATH_TO_MODULE
git <span class="hljs-keyword">add</span> .
git commit -m <span class="hljs-string">&quot;Add my new, shiny module.&quot;</span>
git <span class="hljs-keyword">push</span>`}}),{c(){A=o("meta"),yt=p(),x=o("h1"),H=o("a"),je=o("span"),c(ee.$$.fragment),va=p(),qe=o("span"),wa=s("Creating and sharing a new evaluation"),$t=p(),$=o("p"),_a=s("All evaluation modules, be it metrics, comparisons, or measurements live on the \u{1F917} Hub in a "),te=o("a"),Ea=s("Space"),ya=s(" (see for example "),ae=o("a"),$a=s("Accuracy"),ba=s("). In principle, you could setup a new Space and add a new module following the same structure. However, we added a CLI that makes creating a new evaluation module much easier:"),bt=p(),c(oe.$$.fragment),gt=p(),Ee=o("p"),ga=s("This will create a new Space on the \u{1F917} Hub, clone it locally, and populate it with a template. Instructions on how to fill the template will be displayed in the terminal, but are also explained here in more detail."),kt=p(),D=o("p"),ka=s("For more information about Spaces, see the "),le=o("a"),Pa=s("Spaces documentation"),Aa=s("."),Pt=p(),S=o("h2"),L=o("a"),Oe=o("span"),c(re.$$.fragment),xa=p(),Me=o("span"),Sa=s("Module script"),At=p(),R=o("p"),Ta=s("The evaluation module script (the file with suffix "),Ne=o("code"),Ca=s("*.py"),Ia=s(") is the core of the new module and includes all the code for computing the evaluation."),xt=p(),T=o("h3"),B=o("a"),He=o("span"),c(se.$$.fragment),ja=p(),De=o("span"),qa=s("Attributes"),St=p(),U=o("p"),Oa=s("Start by adding some information about your evalution module in "),Le=o("code"),Ma=s("EvaluationModule._info()"),Na=s(". The most important attributes you should specify are:"),Tt=p(),y=o("ol"),Re=o("li"),ye=o("p"),Be=o("code"),Ha=s("EvaluationModuleInfo.description"),Da=s(" provides a brief description about your evalution module."),La=p(),Ue=o("li"),$e=o("p"),Fe=o("code"),Ra=s("EvaluationModuleInfo.citation"),Ba=s(" contains a BibTex citation for the evalution module."),Ua=p(),Ke=o("li"),be=o("p"),Ye=o("code"),Fa=s("EvaluationModuleInfo.inputs_description"),Ka=s(" describes the expected inputs and outputs. It may also provide an example usage of the evalution module."),Ya=p(),ze=o("li"),b=o("p"),We=o("code"),za=s("EvaluationModuleInfo.features"),Wa=s(" defines the name and type of the predictions and references. This has to be either a single "),Ge=o("code"),Ga=s("datasets.Features"),Ja=s(" object or a list of "),Je=o("code"),Qa=s("datasets.Features"),Va=s(" objects if multiple input types are allowed."),Ct=p(),ge=o("p"),Xa=s("Then, we can move on to prepare everything before the actual computation."),It=p(),C=o("h3"),F=o("a"),Qe=o("span"),c(ne.$$.fragment),Za=p(),Ve=o("span"),eo=s("Download"),jt=p(),g=o("p"),to=s("Some evaluation modules require some external data such as NLTK that requires resources or the BLEURT metric that requires checkpoints. You can implement these downloads in "),Xe=o("code"),ao=s("EvaluationModule._download_and_prepare()"),oo=s(", which downloads and caches the resources via the "),Ze=o("code"),lo=s("dlmanager"),ro=s(". A simplified example on how BLEURT downloads and loads a checkpoint:"),qt=p(),c(ie.$$.fragment),Ot=p(),K=o("p"),so=s("Or if you need to download the NLTK "),et=o("code"),no=s('"punkt"'),io=s(" resources:"),Mt=p(),c(ue.$$.fragment),Nt=p(),ke=o("p"),uo=s("Next, we need to define how the computation of the evaluation module works."),Ht=p(),I=o("h3"),Y=o("a"),tt=o("span"),c(pe.$$.fragment),po=p(),at=o("span"),ho=s("Compute"),Dt=p(),k=o("p"),co=s("The computation is performed in the "),ot=o("code"),fo=s("EvaluationModule._compute()"),mo=s(" method. It takes the same arguments as "),lt=o("code"),vo=s("EvaluationModuleInfo.features"),wo=s(" and should then return the result as a dictionary. Here an example of an exact match metric:"),Lt=p(),c(de.$$.fragment),Rt=p(),z=o("p"),_o=s("This method is used when you call "),rt=o("code"),Eo=s(".compute()"),yo=s(" later on."),Bt=p(),j=o("h2"),W=o("a"),st=o("span"),c(he.$$.fragment),$o=p(),nt=o("span"),bo=s("Readme"),Ut=p(),G=o("p"),go=s("When you use the "),it=o("code"),ko=s("evalute-cli"),Po=s(" to setup the evaluation module the Readme structure and instructions are automatically created. It should include a general description of the metric, information about its input/output format, examples as well as information about its limiations or biases and references."),Ft=p(),q=o("h2"),J=o("a"),ut=o("span"),c(ce.$$.fragment),Ao=p(),pt=o("span"),xo=s("Requirements"),Kt=p(),E=o("p"),So=s("If your evaluation modules has additional dependencies (e.g. "),dt=o("code"),To=s("sklearn"),Co=s(" or "),ht=o("code"),Io=s("nltk"),jo=s(") the "),ct=o("code"),qo=s("requirements.txt"),Oo=s(" files is the place to put them. The file follows the "),ft=o("code"),Mo=s("pip"),No=s(" format and you can list all dependencies there."),Yt=p(),O=o("h2"),Q=o("a"),mt=o("span"),c(fe.$$.fragment),Ho=p(),vt=o("span"),Do=s("App"),zt=p(),V=o("p"),Lo=s("The "),wt=o("code"),Ro=s("app.py"),Bo=s(" is where the Spaces widget lives. In general it looks like the following and does not require any changes:"),Wt=p(),c(me.$$.fragment),Gt=p(),Pe=o("p"),Uo=s("If you want a custom widget you could add your gradio app here."),Jt=p(),M=o("h2"),X=o("a"),_t=o("span"),c(ve.$$.fragment),Fo=p(),Et=o("span"),Ko=s("Push to Hub"),Qt=p(),Ae=o("p"),Yo=s("Finally, when you are done with all the above changes it is time to push your evaluation module to the hub. To do so navigate to the folder of your module and git add/commit/push the changes to the hub:"),Vt=p(),c(we.$$.fragment),Xt=p(),xe=o("p"),zo=s("Tada \u{1F389}! Your evaluation module is now on the \u{1F917} Hub and ready to be used by everybody!"),this.h()},l(e){const i=sr('[data-svelte="svelte-1phssyn"]',document.head);A=l(i,"META",{name:!0,content:!0}),i.forEach(t),yt=d(e),x=l(e,"H1",{class:!0});var ea=r(x);H=l(ea,"A",{id:!0,class:!0,href:!0});var Vo=r(H);je=l(Vo,"SPAN",{});var Xo=r(je);f(ee.$$.fragment,Xo),Xo.forEach(t),Vo.forEach(t),va=d(ea),qe=l(ea,"SPAN",{});var Zo=r(qe);wa=n(Zo,"Creating and sharing a new evaluation"),Zo.forEach(t),ea.forEach(t),$t=d(e),$=l(e,"P",{});var Se=r($);_a=n(Se,"All evaluation modules, be it metrics, comparisons, or measurements live on the \u{1F917} Hub in a "),te=l(Se,"A",{href:!0,rel:!0});var el=r(te);Ea=n(el,"Space"),el.forEach(t),ya=n(Se," (see for example "),ae=l(Se,"A",{href:!0,rel:!0});var tl=r(ae);$a=n(tl,"Accuracy"),tl.forEach(t),ba=n(Se,"). In principle, you could setup a new Space and add a new module following the same structure. However, we added a CLI that makes creating a new evaluation module much easier:"),Se.forEach(t),bt=d(e),f(oe.$$.fragment,e),gt=d(e),Ee=l(e,"P",{});var al=r(Ee);ga=n(al,"This will create a new Space on the \u{1F917} Hub, clone it locally, and populate it with a template. Instructions on how to fill the template will be displayed in the terminal, but are also explained here in more detail."),al.forEach(t),kt=d(e),D=l(e,"P",{});var ta=r(D);ka=n(ta,"For more information about Spaces, see the "),le=l(ta,"A",{href:!0,rel:!0});var ol=r(le);Pa=n(ol,"Spaces documentation"),ol.forEach(t),Aa=n(ta,"."),ta.forEach(t),Pt=d(e),S=l(e,"H2",{class:!0});var aa=r(S);L=l(aa,"A",{id:!0,class:!0,href:!0});var ll=r(L);Oe=l(ll,"SPAN",{});var rl=r(Oe);f(re.$$.fragment,rl),rl.forEach(t),ll.forEach(t),xa=d(aa),Me=l(aa,"SPAN",{});var sl=r(Me);Sa=n(sl,"Module script"),sl.forEach(t),aa.forEach(t),At=d(e),R=l(e,"P",{});var oa=r(R);Ta=n(oa,"The evaluation module script (the file with suffix "),Ne=l(oa,"CODE",{});var nl=r(Ne);Ca=n(nl,"*.py"),nl.forEach(t),Ia=n(oa,") is the core of the new module and includes all the code for computing the evaluation."),oa.forEach(t),xt=d(e),T=l(e,"H3",{class:!0});var la=r(T);B=l(la,"A",{id:!0,class:!0,href:!0});var il=r(B);He=l(il,"SPAN",{});var ul=r(He);f(se.$$.fragment,ul),ul.forEach(t),il.forEach(t),ja=d(la),De=l(la,"SPAN",{});var pl=r(De);qa=n(pl,"Attributes"),pl.forEach(t),la.forEach(t),St=d(e),U=l(e,"P",{});var ra=r(U);Oa=n(ra,"Start by adding some information about your evalution module in "),Le=l(ra,"CODE",{});var dl=r(Le);Ma=n(dl,"EvaluationModule._info()"),dl.forEach(t),Na=n(ra,". The most important attributes you should specify are:"),ra.forEach(t),Tt=d(e),y=l(e,"OL",{});var Z=r(y);Re=l(Z,"LI",{});var hl=r(Re);ye=l(hl,"P",{});var Wo=r(ye);Be=l(Wo,"CODE",{});var cl=r(Be);Ha=n(cl,"EvaluationModuleInfo.description"),cl.forEach(t),Da=n(Wo," provides a brief description about your evalution module."),Wo.forEach(t),hl.forEach(t),La=d(Z),Ue=l(Z,"LI",{});var fl=r(Ue);$e=l(fl,"P",{});var Go=r($e);Fe=l(Go,"CODE",{});var ml=r(Fe);Ra=n(ml,"EvaluationModuleInfo.citation"),ml.forEach(t),Ba=n(Go," contains a BibTex citation for the evalution module."),Go.forEach(t),fl.forEach(t),Ua=d(Z),Ke=l(Z,"LI",{});var vl=r(Ke);be=l(vl,"P",{});var Jo=r(be);Ye=l(Jo,"CODE",{});var wl=r(Ye);Fa=n(wl,"EvaluationModuleInfo.inputs_description"),wl.forEach(t),Ka=n(Jo," describes the expected inputs and outputs. It may also provide an example usage of the evalution module."),Jo.forEach(t),vl.forEach(t),Ya=d(Z),ze=l(Z,"LI",{});var _l=r(ze);b=l(_l,"P",{});var _e=r(b);We=l(_e,"CODE",{});var El=r(We);za=n(El,"EvaluationModuleInfo.features"),El.forEach(t),Wa=n(_e," defines the name and type of the predictions and references. This has to be either a single "),Ge=l(_e,"CODE",{});var yl=r(Ge);Ga=n(yl,"datasets.Features"),yl.forEach(t),Ja=n(_e," object or a list of "),Je=l(_e,"CODE",{});var $l=r(Je);Qa=n($l,"datasets.Features"),$l.forEach(t),Va=n(_e," objects if multiple input types are allowed."),_e.forEach(t),_l.forEach(t),Z.forEach(t),Ct=d(e),ge=l(e,"P",{});var bl=r(ge);Xa=n(bl,"Then, we can move on to prepare everything before the actual computation."),bl.forEach(t),It=d(e),C=l(e,"H3",{class:!0});var sa=r(C);F=l(sa,"A",{id:!0,class:!0,href:!0});var gl=r(F);Qe=l(gl,"SPAN",{});var kl=r(Qe);f(ne.$$.fragment,kl),kl.forEach(t),gl.forEach(t),Za=d(sa),Ve=l(sa,"SPAN",{});var Pl=r(Ve);eo=n(Pl,"Download"),Pl.forEach(t),sa.forEach(t),jt=d(e),g=l(e,"P",{});var Te=r(g);to=n(Te,"Some evaluation modules require some external data such as NLTK that requires resources or the BLEURT metric that requires checkpoints. You can implement these downloads in "),Xe=l(Te,"CODE",{});var Al=r(Xe);ao=n(Al,"EvaluationModule._download_and_prepare()"),Al.forEach(t),oo=n(Te,", which downloads and caches the resources via the "),Ze=l(Te,"CODE",{});var xl=r(Ze);lo=n(xl,"dlmanager"),xl.forEach(t),ro=n(Te,". A simplified example on how BLEURT downloads and loads a checkpoint:"),Te.forEach(t),qt=d(e),f(ie.$$.fragment,e),Ot=d(e),K=l(e,"P",{});var na=r(K);so=n(na,"Or if you need to download the NLTK "),et=l(na,"CODE",{});var Sl=r(et);no=n(Sl,'"punkt"'),Sl.forEach(t),io=n(na," resources:"),na.forEach(t),Mt=d(e),f(ue.$$.fragment,e),Nt=d(e),ke=l(e,"P",{});var Tl=r(ke);uo=n(Tl,"Next, we need to define how the computation of the evaluation module works."),Tl.forEach(t),Ht=d(e),I=l(e,"H3",{class:!0});var ia=r(I);Y=l(ia,"A",{id:!0,class:!0,href:!0});var Cl=r(Y);tt=l(Cl,"SPAN",{});var Il=r(tt);f(pe.$$.fragment,Il),Il.forEach(t),Cl.forEach(t),po=d(ia),at=l(ia,"SPAN",{});var jl=r(at);ho=n(jl,"Compute"),jl.forEach(t),ia.forEach(t),Dt=d(e),k=l(e,"P",{});var Ce=r(k);co=n(Ce,"The computation is performed in the "),ot=l(Ce,"CODE",{});var ql=r(ot);fo=n(ql,"EvaluationModule._compute()"),ql.forEach(t),mo=n(Ce," method. It takes the same arguments as "),lt=l(Ce,"CODE",{});var Ol=r(lt);vo=n(Ol,"EvaluationModuleInfo.features"),Ol.forEach(t),wo=n(Ce," and should then return the result as a dictionary. Here an example of an exact match metric:"),Ce.forEach(t),Lt=d(e),f(de.$$.fragment,e),Rt=d(e),z=l(e,"P",{});var ua=r(z);_o=n(ua,"This method is used when you call "),rt=l(ua,"CODE",{});var Ml=r(rt);Eo=n(Ml,".compute()"),Ml.forEach(t),yo=n(ua," later on."),ua.forEach(t),Bt=d(e),j=l(e,"H2",{class:!0});var pa=r(j);W=l(pa,"A",{id:!0,class:!0,href:!0});var Nl=r(W);st=l(Nl,"SPAN",{});var Hl=r(st);f(he.$$.fragment,Hl),Hl.forEach(t),Nl.forEach(t),$o=d(pa),nt=l(pa,"SPAN",{});var Dl=r(nt);bo=n(Dl,"Readme"),Dl.forEach(t),pa.forEach(t),Ut=d(e),G=l(e,"P",{});var da=r(G);go=n(da,"When you use the "),it=l(da,"CODE",{});var Ll=r(it);ko=n(Ll,"evalute-cli"),Ll.forEach(t),Po=n(da," to setup the evaluation module the Readme structure and instructions are automatically created. It should include a general description of the metric, information about its input/output format, examples as well as information about its limiations or biases and references."),da.forEach(t),Ft=d(e),q=l(e,"H2",{class:!0});var ha=r(q);J=l(ha,"A",{id:!0,class:!0,href:!0});var Rl=r(J);ut=l(Rl,"SPAN",{});var Bl=r(ut);f(ce.$$.fragment,Bl),Bl.forEach(t),Rl.forEach(t),Ao=d(ha),pt=l(ha,"SPAN",{});var Ul=r(pt);xo=n(Ul,"Requirements"),Ul.forEach(t),ha.forEach(t),Kt=d(e),E=l(e,"P",{});var P=r(E);So=n(P,"If your evaluation modules has additional dependencies (e.g. "),dt=l(P,"CODE",{});var Fl=r(dt);To=n(Fl,"sklearn"),Fl.forEach(t),Co=n(P," or "),ht=l(P,"CODE",{});var Kl=r(ht);Io=n(Kl,"nltk"),Kl.forEach(t),jo=n(P,") the "),ct=l(P,"CODE",{});var Yl=r(ct);qo=n(Yl,"requirements.txt"),Yl.forEach(t),Oo=n(P," files is the place to put them. The file follows the "),ft=l(P,"CODE",{});var zl=r(ft);Mo=n(zl,"pip"),zl.forEach(t),No=n(P," format and you can list all dependencies there."),P.forEach(t),Yt=d(e),O=l(e,"H2",{class:!0});var ca=r(O);Q=l(ca,"A",{id:!0,class:!0,href:!0});var Wl=r(Q);mt=l(Wl,"SPAN",{});var Gl=r(mt);f(fe.$$.fragment,Gl),Gl.forEach(t),Wl.forEach(t),Ho=d(ca),vt=l(ca,"SPAN",{});var Jl=r(vt);Do=n(Jl,"App"),Jl.forEach(t),ca.forEach(t),zt=d(e),V=l(e,"P",{});var fa=r(V);Lo=n(fa,"The "),wt=l(fa,"CODE",{});var Ql=r(wt);Ro=n(Ql,"app.py"),Ql.forEach(t),Bo=n(fa," is where the Spaces widget lives. In general it looks like the following and does not require any changes:"),fa.forEach(t),Wt=d(e),f(me.$$.fragment,e),Gt=d(e),Pe=l(e,"P",{});var Vl=r(Pe);Uo=n(Vl,"If you want a custom widget you could add your gradio app here."),Vl.forEach(t),Jt=d(e),M=l(e,"H2",{class:!0});var ma=r(M);X=l(ma,"A",{id:!0,class:!0,href:!0});var Xl=r(X);_t=l(Xl,"SPAN",{});var Zl=r(_t);f(ve.$$.fragment,Zl),Zl.forEach(t),Xl.forEach(t),Fo=d(ma),Et=l(ma,"SPAN",{});var er=r(Et);Ko=n(er,"Push to Hub"),er.forEach(t),ma.forEach(t),Qt=d(e),Ae=l(e,"P",{});var tr=r(Ae);Yo=n(tr,"Finally, when you are done with all the above changes it is time to push your evaluation module to the hub. To do so navigate to the folder of your module and git add/commit/push the changes to the hub:"),tr.forEach(t),Vt=d(e),f(we.$$.fragment,e),Xt=d(e),xe=l(e,"P",{});var ar=r(xe);zo=n(ar,"Tada \u{1F389}! Your evaluation module is now on the \u{1F917} Hub and ready to be used by everybody!"),ar.forEach(t),this.h()},h(){h(A,"name","hf:doc:metadata"),h(A,"content",JSON.stringify(pr)),h(H,"id","creating-and-sharing-a-new-evaluation"),h(H,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(H,"href","#creating-and-sharing-a-new-evaluation"),h(x,"class","relative group"),h(te,"href","https://huggingface.co/docs/hub/spaces"),h(te,"rel","nofollow"),h(ae,"href","https://huggingface.co/spaces/evaluate-metric/accuracy"),h(ae,"rel","nofollow"),h(le,"href","https://huggingface.co/docs/hub/spaces"),h(le,"rel","nofollow"),h(L,"id","module-script"),h(L,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(L,"href","#module-script"),h(S,"class","relative group"),h(B,"id","attributes"),h(B,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(B,"href","#attributes"),h(T,"class","relative group"),h(F,"id","download"),h(F,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(F,"href","#download"),h(C,"class","relative group"),h(Y,"id","compute"),h(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Y,"href","#compute"),h(I,"class","relative group"),h(W,"id","readme"),h(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(W,"href","#readme"),h(j,"class","relative group"),h(J,"id","requirements"),h(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(J,"href","#requirements"),h(q,"class","relative group"),h(Q,"id","app"),h(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Q,"href","#app"),h(O,"class","relative group"),h(X,"id","push-to-hub"),h(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(X,"href","#push-to-hub"),h(M,"class","relative group")},m(e,i){a(document.head,A),u(e,yt,i),u(e,x,i),a(x,H),a(H,je),m(ee,je,null),a(x,va),a(x,qe),a(qe,wa),u(e,$t,i),u(e,$,i),a($,_a),a($,te),a(te,Ea),a($,ya),a($,ae),a(ae,$a),a($,ba),u(e,bt,i),m(oe,e,i),u(e,gt,i),u(e,Ee,i),a(Ee,ga),u(e,kt,i),u(e,D,i),a(D,ka),a(D,le),a(le,Pa),a(D,Aa),u(e,Pt,i),u(e,S,i),a(S,L),a(L,Oe),m(re,Oe,null),a(S,xa),a(S,Me),a(Me,Sa),u(e,At,i),u(e,R,i),a(R,Ta),a(R,Ne),a(Ne,Ca),a(R,Ia),u(e,xt,i),u(e,T,i),a(T,B),a(B,He),m(se,He,null),a(T,ja),a(T,De),a(De,qa),u(e,St,i),u(e,U,i),a(U,Oa),a(U,Le),a(Le,Ma),a(U,Na),u(e,Tt,i),u(e,y,i),a(y,Re),a(Re,ye),a(ye,Be),a(Be,Ha),a(ye,Da),a(y,La),a(y,Ue),a(Ue,$e),a($e,Fe),a(Fe,Ra),a($e,Ba),a(y,Ua),a(y,Ke),a(Ke,be),a(be,Ye),a(Ye,Fa),a(be,Ka),a(y,Ya),a(y,ze),a(ze,b),a(b,We),a(We,za),a(b,Wa),a(b,Ge),a(Ge,Ga),a(b,Ja),a(b,Je),a(Je,Qa),a(b,Va),u(e,Ct,i),u(e,ge,i),a(ge,Xa),u(e,It,i),u(e,C,i),a(C,F),a(F,Qe),m(ne,Qe,null),a(C,Za),a(C,Ve),a(Ve,eo),u(e,jt,i),u(e,g,i),a(g,to),a(g,Xe),a(Xe,ao),a(g,oo),a(g,Ze),a(Ze,lo),a(g,ro),u(e,qt,i),m(ie,e,i),u(e,Ot,i),u(e,K,i),a(K,so),a(K,et),a(et,no),a(K,io),u(e,Mt,i),m(ue,e,i),u(e,Nt,i),u(e,ke,i),a(ke,uo),u(e,Ht,i),u(e,I,i),a(I,Y),a(Y,tt),m(pe,tt,null),a(I,po),a(I,at),a(at,ho),u(e,Dt,i),u(e,k,i),a(k,co),a(k,ot),a(ot,fo),a(k,mo),a(k,lt),a(lt,vo),a(k,wo),u(e,Lt,i),m(de,e,i),u(e,Rt,i),u(e,z,i),a(z,_o),a(z,rt),a(rt,Eo),a(z,yo),u(e,Bt,i),u(e,j,i),a(j,W),a(W,st),m(he,st,null),a(j,$o),a(j,nt),a(nt,bo),u(e,Ut,i),u(e,G,i),a(G,go),a(G,it),a(it,ko),a(G,Po),u(e,Ft,i),u(e,q,i),a(q,J),a(J,ut),m(ce,ut,null),a(q,Ao),a(q,pt),a(pt,xo),u(e,Kt,i),u(e,E,i),a(E,So),a(E,dt),a(dt,To),a(E,Co),a(E,ht),a(ht,Io),a(E,jo),a(E,ct),a(ct,qo),a(E,Oo),a(E,ft),a(ft,Mo),a(E,No),u(e,Yt,i),u(e,O,i),a(O,Q),a(Q,mt),m(fe,mt,null),a(O,Ho),a(O,vt),a(vt,Do),u(e,zt,i),u(e,V,i),a(V,Lo),a(V,wt),a(wt,Ro),a(V,Bo),u(e,Wt,i),m(me,e,i),u(e,Gt,i),u(e,Pe,i),a(Pe,Uo),u(e,Jt,i),u(e,M,i),a(M,X),a(X,_t),m(ve,_t,null),a(M,Fo),a(M,Et),a(Et,Ko),u(e,Qt,i),u(e,Ae,i),a(Ae,Yo),u(e,Vt,i),m(we,e,i),u(e,Xt,i),u(e,xe,i),a(xe,zo),Zt=!0},p:nr,i(e){Zt||(v(ee.$$.fragment,e),v(oe.$$.fragment,e),v(re.$$.fragment,e),v(se.$$.fragment,e),v(ne.$$.fragment,e),v(ie.$$.fragment,e),v(ue.$$.fragment,e),v(pe.$$.fragment,e),v(de.$$.fragment,e),v(he.$$.fragment,e),v(ce.$$.fragment,e),v(fe.$$.fragment,e),v(me.$$.fragment,e),v(ve.$$.fragment,e),v(we.$$.fragment,e),Zt=!0)},o(e){w(ee.$$.fragment,e),w(oe.$$.fragment,e),w(re.$$.fragment,e),w(se.$$.fragment,e),w(ne.$$.fragment,e),w(ie.$$.fragment,e),w(ue.$$.fragment,e),w(pe.$$.fragment,e),w(de.$$.fragment,e),w(he.$$.fragment,e),w(ce.$$.fragment,e),w(fe.$$.fragment,e),w(me.$$.fragment,e),w(ve.$$.fragment,e),w(we.$$.fragment,e),Zt=!1},d(e){t(A),e&&t(yt),e&&t(x),_(ee),e&&t($t),e&&t($),e&&t(bt),_(oe,e),e&&t(gt),e&&t(Ee),e&&t(kt),e&&t(D),e&&t(Pt),e&&t(S),_(re),e&&t(At),e&&t(R),e&&t(xt),e&&t(T),_(se),e&&t(St),e&&t(U),e&&t(Tt),e&&t(y),e&&t(Ct),e&&t(ge),e&&t(It),e&&t(C),_(ne),e&&t(jt),e&&t(g),e&&t(qt),_(ie,e),e&&t(Ot),e&&t(K),e&&t(Mt),_(ue,e),e&&t(Nt),e&&t(ke),e&&t(Ht),e&&t(I),_(pe),e&&t(Dt),e&&t(k),e&&t(Lt),_(de,e),e&&t(Rt),e&&t(z),e&&t(Bt),e&&t(j),_(he),e&&t(Ut),e&&t(G),e&&t(Ft),e&&t(q),_(ce),e&&t(Kt),e&&t(E),e&&t(Yt),e&&t(O),_(fe),e&&t(zt),e&&t(V),e&&t(Wt),_(me,e),e&&t(Gt),e&&t(Pe),e&&t(Jt),e&&t(M),_(ve),e&&t(Qt),e&&t(Ae),e&&t(Vt),_(we,e),e&&t(Xt),e&&t(xe)}}}const pr={local:"creating-and-sharing-a-new-evaluation",sections:[{local:"module-script",sections:[{local:"attributes",title:"Attributes"},{local:"download",title:"Download"},{local:"compute",title:"Compute"}],title:"Module script"},{local:"readme",title:"Readme"},{local:"requirements",title:"Requirements"},{local:"app",title:"App"},{local:"push-to-hub",title:"Push to Hub"}],title:"Creating and sharing a new evaluation"};function dr(Qo){return ir(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mr extends or{constructor(A){super();lr(this,A,dr,ur,rr,{})}}export{mr as default,pr as metadata};
