import{S as Mt,i as Vt,s as Dt,e as n,k as s,w as f,t as c,M as Gt,c as r,d as t,m as p,a as i,x as v,h,b as u,G as a,g as o,y as m,L as Yt,q as $,o as d,B as y,v as Jt}from"../chunks/vendor-hf-doc-builder.js";import{I as Ve}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as I}from"../chunks/CodeBlock-hf-doc-builder.js";function Ut($t){let w,fe,g,P,te,T,De,ae,Ge,ve,j,Ye,le,Je,Ue,me,E,A,ne,q,ze,re,Fe,$e,x,Ke,L,Qe,We,de,_,B,ie,Xe,Ze,C,et,O,oe,tt,at,H,lt,R,se,nt,rt,M,ye,F,it,_e,b,S,pe,V,ot,ue,st,we,K,pt,ge,D,Ee,Q,ut,be,G,ke,W,ct,Pe,Y,je,k,N,ce,J,ht,he,ft,Ae,X,vt,xe,U,Se,Z,mt,Ne,z,Ie;return T=new Ve({}),q=new Ve({}),C=new I({props:{code:`mkdir ~/my-project
cd ~/my-project`,highlighted:`<span class="hljs-built_in">mkdir</span> ~/my-project
<span class="hljs-built_in">cd</span> ~/my-project`}}),H=new I({props:{code:"python -m venv .env",highlighted:'python -m venv .<span class="hljs-built_in">env</span>'}}),M=new I({props:{code:`# Activate the virtual environment
source .env/bin/activate

# Deactivate the virtual environment
source .env/bin/deactivate`,highlighted:`<span class="hljs-comment"># Activate the virtual environment</span>
<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/activate

<span class="hljs-comment"># Deactivate the virtual environment</span>
<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/deactivate`}}),V=new Ve({}),D=new I({props:{code:"pip install evaluate",highlighted:"pip install evaluate"}}),G=new I({props:{code:`python -c "import evaluate; print(evaluate.load('accuracy').compute(references=[1], predictions=[1]))"`,highlighted:'python -c <span class="hljs-string">&quot;import evaluate; print(evaluate.load(&#x27;accuracy&#x27;).compute(references=[1], predictions=[1]))&quot;</span>'}}),Y=new I({props:{code:"{'accuracy': 1.0}",highlighted:'{<span class="hljs-string">&#x27;accuracy&#x27;</span>: 1.0}'}}),J=new Ve({}),U=new I({props:{code:`git clone https://github.com/huggingface/evaluate.git
cd evaluate
pip install -e .`,highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/evaluate.git
<span class="hljs-built_in">cd</span> evaluate
pip install -e .`}}),z=new I({props:{code:`python -c "import evaluate; print(evaluate.load('accuracy').compute(references=[1], predictions=[1]))"`,highlighted:'python -c <span class="hljs-string">&quot;import evaluate; print(evaluate.load(&#x27;accuracy&#x27;).compute(references=[1], predictions=[1]))&quot;</span>'}}),{c(){w=n("meta"),fe=s(),g=n("h1"),P=n("a"),te=n("span"),f(T.$$.fragment),De=s(),ae=n("span"),Ge=c("Installation"),ve=s(),j=n("p"),Ye=c("Before you start, you will need to setup your environment and install the appropriate packages. \u{1F917} Evaluate is tested on "),le=n("strong"),Je=c("Python 3.7+"),Ue=c("."),me=s(),E=n("h2"),A=n("a"),ne=n("span"),f(q.$$.fragment),ze=s(),re=n("span"),Fe=c("Virtual environment"),$e=s(),x=n("p"),Ke=c("You should install \u{1F917} Evaluate in a "),L=n("a"),Qe=c("virtual environment"),We=c(" to keep everything neat and tidy."),de=s(),_=n("ol"),B=n("li"),ie=n("p"),Xe=c("Create and navigate to your project directory:"),Ze=s(),f(C.$$.fragment),et=s(),O=n("li"),oe=n("p"),tt=c("Start a virtual environment inside the directory:"),at=s(),f(H.$$.fragment),lt=s(),R=n("li"),se=n("p"),nt=c("Activate and deactivate the virtual environment with the following commands:"),rt=s(),f(M.$$.fragment),ye=s(),F=n("p"),it=c("Once you have created your virtual environment, you can install \u{1F917} Evaluate in it."),_e=s(),b=n("h2"),S=n("a"),pe=n("span"),f(V.$$.fragment),ot=s(),ue=n("span"),st=c("pip"),we=s(),K=n("p"),pt=c("The most straightforward way to install \u{1F917} Evaluate is with pip:"),ge=s(),f(D.$$.fragment),Ee=s(),Q=n("p"),ut=c("Run the following command to check if \u{1F917} Evaluate has been properly installed:"),be=s(),f(G.$$.fragment),ke=s(),W=n("p"),ct=c("This should return:"),Pe=s(),f(Y.$$.fragment),je=s(),k=n("h2"),N=n("a"),ce=n("span"),f(J.$$.fragment),ht=s(),he=n("span"),ft=c("source"),Ae=s(),X=n("p"),vt=c("Building \u{1F917} Evaluate from source lets you make changes to the code base. To install from source, clone the repository and install with the following commands:"),xe=s(),f(U.$$.fragment),Se=s(),Z=n("p"),mt=c("Again, you can check if \u{1F917} Evaluate has been properly installed with:"),Ne=s(),f(z.$$.fragment),this.h()},l(e){const l=Gt('[data-svelte="svelte-1phssyn"]',document.head);w=r(l,"META",{name:!0,content:!0}),l.forEach(t),fe=p(e),g=r(e,"H1",{class:!0});var Te=i(g);P=r(Te,"A",{id:!0,class:!0,href:!0});var dt=i(P);te=r(dt,"SPAN",{});var yt=i(te);v(T.$$.fragment,yt),yt.forEach(t),dt.forEach(t),De=p(Te),ae=r(Te,"SPAN",{});var _t=i(ae);Ge=h(_t,"Installation"),_t.forEach(t),Te.forEach(t),ve=p(e),j=r(e,"P",{});var qe=i(j);Ye=h(qe,"Before you start, you will need to setup your environment and install the appropriate packages. \u{1F917} Evaluate is tested on "),le=r(qe,"STRONG",{});var wt=i(le);Je=h(wt,"Python 3.7+"),wt.forEach(t),Ue=h(qe,"."),qe.forEach(t),me=p(e),E=r(e,"H2",{class:!0});var Le=i(E);A=r(Le,"A",{id:!0,class:!0,href:!0});var gt=i(A);ne=r(gt,"SPAN",{});var Et=i(ne);v(q.$$.fragment,Et),Et.forEach(t),gt.forEach(t),ze=p(Le),re=r(Le,"SPAN",{});var bt=i(re);Fe=h(bt,"Virtual environment"),bt.forEach(t),Le.forEach(t),$e=p(e),x=r(e,"P",{});var Be=i(x);Ke=h(Be,"You should install \u{1F917} Evaluate in a "),L=r(Be,"A",{href:!0,rel:!0});var kt=i(L);Qe=h(kt,"virtual environment"),kt.forEach(t),We=h(Be," to keep everything neat and tidy."),Be.forEach(t),de=p(e),_=r(e,"OL",{});var ee=i(_);B=r(ee,"LI",{});var Ce=i(B);ie=r(Ce,"P",{});var Pt=i(ie);Xe=h(Pt,"Create and navigate to your project directory:"),Pt.forEach(t),Ze=p(Ce),v(C.$$.fragment,Ce),Ce.forEach(t),et=p(ee),O=r(ee,"LI",{});var Oe=i(O);oe=r(Oe,"P",{});var jt=i(oe);tt=h(jt,"Start a virtual environment inside the directory:"),jt.forEach(t),at=p(Oe),v(H.$$.fragment,Oe),Oe.forEach(t),lt=p(ee),R=r(ee,"LI",{});var He=i(R);se=r(He,"P",{});var At=i(se);nt=h(At,"Activate and deactivate the virtual environment with the following commands:"),At.forEach(t),rt=p(He),v(M.$$.fragment,He),He.forEach(t),ee.forEach(t),ye=p(e),F=r(e,"P",{});var xt=i(F);it=h(xt,"Once you have created your virtual environment, you can install \u{1F917} Evaluate in it."),xt.forEach(t),_e=p(e),b=r(e,"H2",{class:!0});var Re=i(b);S=r(Re,"A",{id:!0,class:!0,href:!0});var St=i(S);pe=r(St,"SPAN",{});var Nt=i(pe);v(V.$$.fragment,Nt),Nt.forEach(t),St.forEach(t),ot=p(Re),ue=r(Re,"SPAN",{});var It=i(ue);st=h(It,"pip"),It.forEach(t),Re.forEach(t),we=p(e),K=r(e,"P",{});var Tt=i(K);pt=h(Tt,"The most straightforward way to install \u{1F917} Evaluate is with pip:"),Tt.forEach(t),ge=p(e),v(D.$$.fragment,e),Ee=p(e),Q=r(e,"P",{});var qt=i(Q);ut=h(qt,"Run the following command to check if \u{1F917} Evaluate has been properly installed:"),qt.forEach(t),be=p(e),v(G.$$.fragment,e),ke=p(e),W=r(e,"P",{});var Lt=i(W);ct=h(Lt,"This should return:"),Lt.forEach(t),Pe=p(e),v(Y.$$.fragment,e),je=p(e),k=r(e,"H2",{class:!0});var Me=i(k);N=r(Me,"A",{id:!0,class:!0,href:!0});var Bt=i(N);ce=r(Bt,"SPAN",{});var Ct=i(ce);v(J.$$.fragment,Ct),Ct.forEach(t),Bt.forEach(t),ht=p(Me),he=r(Me,"SPAN",{});var Ot=i(he);ft=h(Ot,"source"),Ot.forEach(t),Me.forEach(t),Ae=p(e),X=r(e,"P",{});var Ht=i(X);vt=h(Ht,"Building \u{1F917} Evaluate from source lets you make changes to the code base. To install from source, clone the repository and install with the following commands:"),Ht.forEach(t),xe=p(e),v(U.$$.fragment,e),Se=p(e),Z=r(e,"P",{});var Rt=i(Z);mt=h(Rt,"Again, you can check if \u{1F917} Evaluate has been properly installed with:"),Rt.forEach(t),Ne=p(e),v(z.$$.fragment,e),this.h()},h(){u(w,"name","hf:doc:metadata"),u(w,"content",JSON.stringify(zt)),u(P,"id","installation"),u(P,"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"),u(P,"href","#installation"),u(g,"class","relative group"),u(A,"id","virtual-environment"),u(A,"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"),u(A,"href","#virtual-environment"),u(E,"class","relative group"),u(L,"href","https://docs.python.org/3/library/venv.html"),u(L,"rel","nofollow"),u(S,"id","pip"),u(S,"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"),u(S,"href","#pip"),u(b,"class","relative group"),u(N,"id","source"),u(N,"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"),u(N,"href","#source"),u(k,"class","relative group")},m(e,l){a(document.head,w),o(e,fe,l),o(e,g,l),a(g,P),a(P,te),m(T,te,null),a(g,De),a(g,ae),a(ae,Ge),o(e,ve,l),o(e,j,l),a(j,Ye),a(j,le),a(le,Je),a(j,Ue),o(e,me,l),o(e,E,l),a(E,A),a(A,ne),m(q,ne,null),a(E,ze),a(E,re),a(re,Fe),o(e,$e,l),o(e,x,l),a(x,Ke),a(x,L),a(L,Qe),a(x,We),o(e,de,l),o(e,_,l),a(_,B),a(B,ie),a(ie,Xe),a(B,Ze),m(C,B,null),a(_,et),a(_,O),a(O,oe),a(oe,tt),a(O,at),m(H,O,null),a(_,lt),a(_,R),a(R,se),a(se,nt),a(R,rt),m(M,R,null),o(e,ye,l),o(e,F,l),a(F,it),o(e,_e,l),o(e,b,l),a(b,S),a(S,pe),m(V,pe,null),a(b,ot),a(b,ue),a(ue,st),o(e,we,l),o(e,K,l),a(K,pt),o(e,ge,l),m(D,e,l),o(e,Ee,l),o(e,Q,l),a(Q,ut),o(e,be,l),m(G,e,l),o(e,ke,l),o(e,W,l),a(W,ct),o(e,Pe,l),m(Y,e,l),o(e,je,l),o(e,k,l),a(k,N),a(N,ce),m(J,ce,null),a(k,ht),a(k,he),a(he,ft),o(e,Ae,l),o(e,X,l),a(X,vt),o(e,xe,l),m(U,e,l),o(e,Se,l),o(e,Z,l),a(Z,mt),o(e,Ne,l),m(z,e,l),Ie=!0},p:Yt,i(e){Ie||($(T.$$.fragment,e),$(q.$$.fragment,e),$(C.$$.fragment,e),$(H.$$.fragment,e),$(M.$$.fragment,e),$(V.$$.fragment,e),$(D.$$.fragment,e),$(G.$$.fragment,e),$(Y.$$.fragment,e),$(J.$$.fragment,e),$(U.$$.fragment,e),$(z.$$.fragment,e),Ie=!0)},o(e){d(T.$$.fragment,e),d(q.$$.fragment,e),d(C.$$.fragment,e),d(H.$$.fragment,e),d(M.$$.fragment,e),d(V.$$.fragment,e),d(D.$$.fragment,e),d(G.$$.fragment,e),d(Y.$$.fragment,e),d(J.$$.fragment,e),d(U.$$.fragment,e),d(z.$$.fragment,e),Ie=!1},d(e){t(w),e&&t(fe),e&&t(g),y(T),e&&t(ve),e&&t(j),e&&t(me),e&&t(E),y(q),e&&t($e),e&&t(x),e&&t(de),e&&t(_),y(C),y(H),y(M),e&&t(ye),e&&t(F),e&&t(_e),e&&t(b),y(V),e&&t(we),e&&t(K),e&&t(ge),y(D,e),e&&t(Ee),e&&t(Q),e&&t(be),y(G,e),e&&t(ke),e&&t(W),e&&t(Pe),y(Y,e),e&&t(je),e&&t(k),y(J),e&&t(Ae),e&&t(X),e&&t(xe),y(U,e),e&&t(Se),e&&t(Z),e&&t(Ne),y(z,e)}}}const zt={local:"installation",sections:[{local:"virtual-environment",title:"Virtual environment"},{local:"pip",title:"pip"},{local:"source",title:"source"}],title:"Installation"};function Ft($t){return Jt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xt extends Mt{constructor(w){super();Vt(this,w,Ft,Ut,Dt,{})}}export{Xt as default,zt as metadata};
