import{S as Gt,i as zt,s as Wt,e as l,k as f,w as W,t as r,N as Yt,c as s,d as t,m as c,a as o,x as Y,h as n,b as p,G as a,g as h,y as C,L as Ct,q as P,o as O,B as X,v as Pt}from"../chunks/vendor-hf-doc-builder.js";import{I as Me}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as xt}from"../chunks/CodeBlock-hf-doc-builder.js";function Ot(rt){let g,Be,v,E,ie,k,ta,he,la,ke,S,pe,sa,oa,Se,_,$,fe,Z,ra,ce,na,Ze,j,ia,F,ha,pa,Fe,L,fa,N,ca,ua,Ne,D,da,Je,u,ue,ma,ga,de,va,_a,me,ba,wa,ge,ya,Re,b,A,ve,J,Ea,_e,$a,He,R,Ue,q,ja,xe,d,V,be,La,Aa,Ta,Q,we,Ia,Ma,Ba,K,ye,ka,Sa,Ge,w,T,Ee,H,Za,$e,Fa,ze,U,We,ee,Na,Ye,m,ae,je,Ja,Ra,Ha,te,Le,Ua,xa,Ga,le,Ae,za,Wa,Ce,y,I,Te,x,Ya,Ie,Ca,Pe,M,se,Pa,G,Oa,Xa,oe,Da,z,qa,Oe;return k=new Me({}),Z=new Me({}),J=new Me({}),R=new xt({props:{code:"JTIzJTIwRG93bmxvYWQlMjBwcG8lMjBTcGFjZUludmFkZXJzTm9GcmFtZXNraXAtdjQlMjBtb2RlbCUyMGFuZCUyMHNhdmUlMjBpdCUyMGludG8lMjB0aGUlMjBsb2dzJTJGJTIwZm9sZGVyJTBBcHl0aG9uJTIwLW0lMjBybF96b28zLmxvYWRfZnJvbV9odWIlMjAtLWFsZ28lMjBkcW4lMjAtLWVudiUyMFNwYWNlSW52YWRlcnNOb0ZyYW1lc2tpcC12NCUyMC1mJTIwbG9ncyUyRiUyMC1vcmdhJTIwc2IzJTBBcHl0aG9uJTIwZW5qb3kucHklMjAtLWFsZ28lMjBkcW4lMjAtLWVudiUyMFNwYWNlSW52YWRlcnNOb0ZyYW1lc2tpcC12NCUyMCUyMC1mJTIwbG9ncyUyRg==",highlighted:`<span class="hljs-comment"># Download ppo SpaceInvadersNoFrameskip-v4 model and save it into the logs/ folder</span>
<span class="hljs-string">python</span> -<span class="hljs-string">m</span> <span class="hljs-string">rl_zoo3</span>.<span class="hljs-string">load_from_hub</span> <span class="hljs-built_in">--algo</span> <span class="hljs-string">dqn</span> <span class="hljs-built_in">--env</span> <span class="hljs-string">SpaceInvadersNoFrameskip-v4</span> -<span class="hljs-string">f</span> <span class="hljs-string">logs</span>/ -<span class="hljs-string">orga</span> <span class="hljs-string">sb3</span>
<span class="hljs-string">python</span> <span class="hljs-string">enjoy</span>.<span class="hljs-string">py</span> <span class="hljs-built_in">--algo</span> <span class="hljs-string">dqn</span> <span class="hljs-built_in">--env</span> <span class="hljs-string">SpaceInvadersNoFrameskip-v4</span>  -<span class="hljs-string">f</span> <span class="hljs-string">logs</span>/`}}),H=new Me({}),U=new xt({props:{code:"cHl0aG9uJTIwLW0lMjBybF96b28zLnB1c2hfdG9faHViJTIwJTIwLS1hbGdvJTIwZHFuJTIwJTIwLS1lbnYlMjBTcGFjZUludmFkZXJzTm9GcmFtZXNraXAtdjQlMjAlMjAtLXJlcG8tbmFtZSUyMGRxbi1TcGFjZUludmFkZXJzTm9GcmFtZXNraXAtdjQlMjAlMjAtb3JnYSUyMFRob21hc1NpbW9uaW5pJTIwJTIwLWYlMjBsb2dzJTJG",highlighted:'python -m rl_zoo3<span class="hljs-selector-class">.push_to_hub</span>  <span class="hljs-attr">--algo</span> dqn  <span class="hljs-attr">--env</span> SpaceInvadersNoFrameskip-v4  <span class="hljs-attr">--repo-name</span> dqn-SpaceInvadersNoFrameskip-v4  -orga ThomasSimonini  -f logs/'}}),x=new Me({}),{c(){g=l("meta"),Be=f(),v=l("h1"),E=l("a"),ie=l("span"),W(k.$$.fragment),ta=f(),he=l("span"),la=r("Using RL-Baselines3-Zoo at Hugging Face"),ke=f(),S=l("p"),pe=l("code"),sa=r("rl-baselines3-zoo"),oa=r(" is a training framework for Reinforcement Learning using Stable Baselines3."),Se=f(),_=l("h2"),$=l("a"),fe=l("span"),W(Z.$$.fragment),ra=f(),ce=l("span"),na=r("Exploring RL-Baselines3-Zoo in the Hub"),Ze=f(),j=l("p"),ia=r("You can find RL-Baselines3-Zoo models by filtering at the left of the "),F=l("a"),ha=r("models page"),pa=r("."),Fe=f(),L=l("p"),fa=r("The Stable-Baselines3 team is hosting a collection of +150 trained Reinforcement Learning agents with tuned hyperparameters that you can find "),N=l("a"),ca=r("here"),ua=r("."),Ne=f(),D=l("p"),da=r("All models on the Hub come up with useful features:"),Je=f(),u=l("ol"),ue=l("li"),ma=r("An automatically generated model card with a description, a training configuration, and more."),ga=f(),de=l("li"),va=r("Metadata tags that help for discoverability."),_a=f(),me=l("li"),ba=r("Evaluation results to compare with other models."),wa=f(),ge=l("li"),ya=r("A video widget where you can watch your agent performing."),Re=f(),b=l("h2"),A=l("a"),ve=l("span"),W(J.$$.fragment),Ea=f(),_e=l("span"),$a=r("Using existing models"),He=r(`

You can simply download a model from the Hub using \`load_from_hub\`:

	`),W(R.$$.fragment),Ue=f(),q=l("p"),ja=r("You can define three parameters:"),xe=f(),d=l("ul"),V=l("li"),be=l("code"),La=r("--repo-name"),Aa=r(": The name of the repo."),Ta=f(),Q=l("li"),we=l("code"),Ia=r("-orga"),Ma=r(": A Hugging Face username or organization."),Ba=f(),K=l("li"),ye=l("code"),ka=r("-f"),Sa=r(": The destination folder."),Ge=f(),w=l("h2"),T=l("a"),Ee=l("span"),W(H.$$.fragment),Za=f(),$e=l("span"),Fa=r("Sharing your models"),ze=r(`

You can easily upload your models with \`push_to_hub\`. That will save the model, evaluate it, generate a model card and record a replay video of your agent before pushing the complete repo to the Hub.

	`),W(U.$$.fragment),We=f(),ee=l("p"),Na=r("You can define three parameters:"),Ye=f(),m=l("ul"),ae=l("li"),je=l("code"),Ja=r("--repo-name"),Ra=r(": The name of the repo."),Ha=f(),te=l("li"),Le=l("code"),Ua=r("-orga"),xa=r(": Your Hugging Face username."),Ga=f(),le=l("li"),Ae=l("code"),za=r("-f"),Wa=r(": The folder where the model is saved."),Ce=f(),y=l("h2"),I=l("a"),Te=l("span"),W(x.$$.fragment),Ya=f(),Ie=l("span"),Ca=r("Additional resources"),Pe=f(),M=l("ul"),se=l("li"),Pa=r("RL-Baselines3-Zoo "),G=l("a"),Oa=r("official trained models"),Xa=f(),oe=l("li"),Da=r("RL-Baselines3-Zoo "),z=l("a"),qa=r("documentation"),this.h()},l(e){const i=Yt('[data-svelte="svelte-1phssyn"]',document.head);g=s(i,"META",{name:!0,content:!0}),i.forEach(t),Be=c(e),v=s(e,"H1",{class:!0});var Xe=o(v);E=s(Xe,"A",{id:!0,class:!0,href:!0});var nt=o(E);ie=s(nt,"SPAN",{});var it=o(ie);Y(k.$$.fragment,it),it.forEach(t),nt.forEach(t),ta=c(Xe),he=s(Xe,"SPAN",{});var ht=o(he);la=n(ht,"Using RL-Baselines3-Zoo at Hugging Face"),ht.forEach(t),Xe.forEach(t),ke=c(e),S=s(e,"P",{});var Va=o(S);pe=s(Va,"CODE",{});var pt=o(pe);sa=n(pt,"rl-baselines3-zoo"),pt.forEach(t),oa=n(Va," is a training framework for Reinforcement Learning using Stable Baselines3."),Va.forEach(t),Se=c(e),_=s(e,"H2",{class:!0});var De=o(_);$=s(De,"A",{id:!0,class:!0,href:!0});var ft=o($);fe=s(ft,"SPAN",{});var ct=o(fe);Y(Z.$$.fragment,ct),ct.forEach(t),ft.forEach(t),ra=c(De),ce=s(De,"SPAN",{});var ut=o(ce);na=n(ut,"Exploring RL-Baselines3-Zoo in the Hub"),ut.forEach(t),De.forEach(t),Ze=c(e),j=s(e,"P",{});var qe=o(j);ia=n(qe,"You can find RL-Baselines3-Zoo models by filtering at the left of the "),F=s(qe,"A",{href:!0,rel:!0});var dt=o(F);ha=n(dt,"models page"),dt.forEach(t),pa=n(qe,"."),qe.forEach(t),Fe=c(e),L=s(e,"P",{});var Ve=o(L);fa=n(Ve,"The Stable-Baselines3 team is hosting a collection of +150 trained Reinforcement Learning agents with tuned hyperparameters that you can find "),N=s(Ve,"A",{href:!0,rel:!0});var mt=o(N);ca=n(mt,"here"),mt.forEach(t),ua=n(Ve,"."),Ve.forEach(t),Ne=c(e),D=s(e,"P",{});var gt=o(D);da=n(gt,"All models on the Hub come up with useful features:"),gt.forEach(t),Je=c(e),u=s(e,"OL",{});var B=o(u);ue=s(B,"LI",{});var vt=o(ue);ma=n(vt,"An automatically generated model card with a description, a training configuration, and more."),vt.forEach(t),ga=c(B),de=s(B,"LI",{});var _t=o(de);va=n(_t,"Metadata tags that help for discoverability."),_t.forEach(t),_a=c(B),me=s(B,"LI",{});var bt=o(me);ba=n(bt,"Evaluation results to compare with other models."),bt.forEach(t),wa=c(B),ge=s(B,"LI",{});var wt=o(ge);ya=n(wt,"A video widget where you can watch your agent performing."),wt.forEach(t),B.forEach(t),Re=c(e),b=s(e,"H2",{class:!0});var Qe=o(b);A=s(Qe,"A",{id:!0,class:!0,href:!0});var yt=o(A);ve=s(yt,"SPAN",{});var Et=o(ve);Y(J.$$.fragment,Et),Et.forEach(t),yt.forEach(t),Ea=c(Qe),_e=s(Qe,"SPAN",{});var $t=o(_e);$a=n($t,"Using existing models"),$t.forEach(t),Qe.forEach(t),He=n(e,`

You can simply download a model from the Hub using \`load_from_hub\`:

	`),Y(R.$$.fragment,e),Ue=c(e),q=s(e,"P",{});var jt=o(q);ja=n(jt,"You can define three parameters:"),jt.forEach(t),xe=c(e),d=s(e,"UL",{});var re=o(d);V=s(re,"LI",{});var Qa=o(V);be=s(Qa,"CODE",{});var Lt=o(be);La=n(Lt,"--repo-name"),Lt.forEach(t),Aa=n(Qa,": The name of the repo."),Qa.forEach(t),Ta=c(re),Q=s(re,"LI",{});var Ka=o(Q);we=s(Ka,"CODE",{});var At=o(we);Ia=n(At,"-orga"),At.forEach(t),Ma=n(Ka,": A Hugging Face username or organization."),Ka.forEach(t),Ba=c(re),K=s(re,"LI",{});var et=o(K);ye=s(et,"CODE",{});var Tt=o(ye);ka=n(Tt,"-f"),Tt.forEach(t),Sa=n(et,": The destination folder."),et.forEach(t),re.forEach(t),Ge=c(e),w=s(e,"H2",{class:!0});var Ke=o(w);T=s(Ke,"A",{id:!0,class:!0,href:!0});var It=o(T);Ee=s(It,"SPAN",{});var Mt=o(Ee);Y(H.$$.fragment,Mt),Mt.forEach(t),It.forEach(t),Za=c(Ke),$e=s(Ke,"SPAN",{});var Bt=o($e);Fa=n(Bt,"Sharing your models"),Bt.forEach(t),Ke.forEach(t),ze=n(e,`

You can easily upload your models with \`push_to_hub\`. That will save the model, evaluate it, generate a model card and record a replay video of your agent before pushing the complete repo to the Hub.

	`),Y(U.$$.fragment,e),We=c(e),ee=s(e,"P",{});var kt=o(ee);Na=n(kt,"You can define three parameters:"),kt.forEach(t),Ye=c(e),m=s(e,"UL",{});var ne=o(m);ae=s(ne,"LI",{});var at=o(ae);je=s(at,"CODE",{});var St=o(je);Ja=n(St,"--repo-name"),St.forEach(t),Ra=n(at,": The name of the repo."),at.forEach(t),Ha=c(ne),te=s(ne,"LI",{});var tt=o(te);Le=s(tt,"CODE",{});var Zt=o(Le);Ua=n(Zt,"-orga"),Zt.forEach(t),xa=n(tt,": Your Hugging Face username."),tt.forEach(t),Ga=c(ne),le=s(ne,"LI",{});var lt=o(le);Ae=s(lt,"CODE",{});var Ft=o(Ae);za=n(Ft,"-f"),Ft.forEach(t),Wa=n(lt,": The folder where the model is saved."),lt.forEach(t),ne.forEach(t),Ce=c(e),y=s(e,"H2",{class:!0});var ea=o(y);I=s(ea,"A",{id:!0,class:!0,href:!0});var Nt=o(I);Te=s(Nt,"SPAN",{});var Jt=o(Te);Y(x.$$.fragment,Jt),Jt.forEach(t),Nt.forEach(t),Ya=c(ea),Ie=s(ea,"SPAN",{});var Rt=o(Ie);Ca=n(Rt,"Additional resources"),Rt.forEach(t),ea.forEach(t),Pe=c(e),M=s(e,"UL",{});var aa=o(M);se=s(aa,"LI",{});var st=o(se);Pa=n(st,"RL-Baselines3-Zoo "),G=s(st,"A",{href:!0,rel:!0});var Ht=o(G);Oa=n(Ht,"official trained models"),Ht.forEach(t),st.forEach(t),Xa=c(aa),oe=s(aa,"LI",{});var ot=o(oe);Da=n(ot,"RL-Baselines3-Zoo "),z=s(ot,"A",{href:!0,rel:!0});var Ut=o(z);qa=n(Ut,"documentation"),Ut.forEach(t),ot.forEach(t),aa.forEach(t),this.h()},h(){p(g,"name","hf:doc:metadata"),p(g,"content",JSON.stringify(Xt)),p(E,"id","using-rlbaselines3zoo-at-hugging-face"),p(E,"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"),p(E,"href","#using-rlbaselines3zoo-at-hugging-face"),p(v,"class","relative group"),p($,"id","exploring-rlbaselines3zoo-in-the-hub"),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"),p($,"href","#exploring-rlbaselines3zoo-in-the-hub"),p(_,"class","relative group"),p(F,"href","https://huggingface.co/models?library=stable-baselines3"),p(F,"rel","nofollow"),p(N,"href","https://huggingface.co/sb3"),p(N,"rel","nofollow"),p(A,"id","using-existing-models"),p(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"),p(A,"href","#using-existing-models"),p(b,"class","relative group"),p(T,"id","sharing-your-models"),p(T,"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"),p(T,"href","#sharing-your-models"),p(w,"class","relative group"),p(I,"id","additional-resources"),p(I,"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"),p(I,"href","#additional-resources"),p(y,"class","relative group"),p(G,"href","https://huggingface.co/sb3"),p(G,"rel","nofollow"),p(z,"href","https://github.com/DLR-RM/rl-baselines3-zoo"),p(z,"rel","nofollow")},m(e,i){a(document.head,g),h(e,Be,i),h(e,v,i),a(v,E),a(E,ie),C(k,ie,null),a(v,ta),a(v,he),a(he,la),h(e,ke,i),h(e,S,i),a(S,pe),a(pe,sa),a(S,oa),h(e,Se,i),h(e,_,i),a(_,$),a($,fe),C(Z,fe,null),a(_,ra),a(_,ce),a(ce,na),h(e,Ze,i),h(e,j,i),a(j,ia),a(j,F),a(F,ha),a(j,pa),h(e,Fe,i),h(e,L,i),a(L,fa),a(L,N),a(N,ca),a(L,ua),h(e,Ne,i),h(e,D,i),a(D,da),h(e,Je,i),h(e,u,i),a(u,ue),a(ue,ma),a(u,ga),a(u,de),a(de,va),a(u,_a),a(u,me),a(me,ba),a(u,wa),a(u,ge),a(ge,ya),h(e,Re,i),h(e,b,i),a(b,A),a(A,ve),C(J,ve,null),a(b,Ea),a(b,_e),a(_e,$a),h(e,He,i),C(R,e,i),h(e,Ue,i),h(e,q,i),a(q,ja),h(e,xe,i),h(e,d,i),a(d,V),a(V,be),a(be,La),a(V,Aa),a(d,Ta),a(d,Q),a(Q,we),a(we,Ia),a(Q,Ma),a(d,Ba),a(d,K),a(K,ye),a(ye,ka),a(K,Sa),h(e,Ge,i),h(e,w,i),a(w,T),a(T,Ee),C(H,Ee,null),a(w,Za),a(w,$e),a($e,Fa),h(e,ze,i),C(U,e,i),h(e,We,i),h(e,ee,i),a(ee,Na),h(e,Ye,i),h(e,m,i),a(m,ae),a(ae,je),a(je,Ja),a(ae,Ra),a(m,Ha),a(m,te),a(te,Le),a(Le,Ua),a(te,xa),a(m,Ga),a(m,le),a(le,Ae),a(Ae,za),a(le,Wa),h(e,Ce,i),h(e,y,i),a(y,I),a(I,Te),C(x,Te,null),a(y,Ya),a(y,Ie),a(Ie,Ca),h(e,Pe,i),h(e,M,i),a(M,se),a(se,Pa),a(se,G),a(G,Oa),a(M,Xa),a(M,oe),a(oe,Da),a(oe,z),a(z,qa),Oe=!0},p:Ct,i(e){Oe||(P(k.$$.fragment,e),P(Z.$$.fragment,e),P(J.$$.fragment,e),P(R.$$.fragment,e),P(H.$$.fragment,e),P(U.$$.fragment,e),P(x.$$.fragment,e),Oe=!0)},o(e){O(k.$$.fragment,e),O(Z.$$.fragment,e),O(J.$$.fragment,e),O(R.$$.fragment,e),O(H.$$.fragment,e),O(U.$$.fragment,e),O(x.$$.fragment,e),Oe=!1},d(e){t(g),e&&t(Be),e&&t(v),X(k),e&&t(ke),e&&t(S),e&&t(Se),e&&t(_),X(Z),e&&t(Ze),e&&t(j),e&&t(Fe),e&&t(L),e&&t(Ne),e&&t(D),e&&t(Je),e&&t(u),e&&t(Re),e&&t(b),X(J),e&&t(He),X(R,e),e&&t(Ue),e&&t(q),e&&t(xe),e&&t(d),e&&t(Ge),e&&t(w),X(H),e&&t(ze),X(U,e),e&&t(We),e&&t(ee),e&&t(Ye),e&&t(m),e&&t(Ce),e&&t(y),X(x),e&&t(Pe),e&&t(M)}}}const Xt={local:"using-rlbaselines3zoo-at-hugging-face",sections:[{local:"exploring-rlbaselines3zoo-in-the-hub",title:"Exploring RL-Baselines3-Zoo in the Hub"},{local:"using-existing-models",title:"Using existing models"},{local:"sharing-your-models",title:"Sharing your models"},{local:"additional-resources",title:"Additional resources"}],title:"Using RL-Baselines3-Zoo at Hugging Face"};function Dt(rt){return Pt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kt extends Gt{constructor(g){super();zt(this,g,Dt,Ot,Wt,{})}}export{Kt as default,Xt as metadata};
