import{s as Me,n as we,o as ye}from"../chunks/scheduler.d6170356.js";import{S as Le,i as _e,g as i,s as n,r as C,A as He,h as o,f as l,c as a,j as Te,u as F,x as r,k as je,y as xe,a as s,v as J,d as B,t as Z,w as U}from"../chunks/index.fcd4cc08.js";import{C as ve}from"../chunks/CodeBlock.7b16bdef.js";import{H as W}from"../chunks/Heading.8660bd0e.js";function Ce(ie){let p,z,G,R,m,k,c,oe="<code>rl-baselines3-zoo</code> is a training framework for Reinforcement Learning using Stable Baselines3.",A,u,S,d,re='You can find RL-Baselines3-Zoo models by filtering at the left of the <a href="https://huggingface.co/models?library=stable-baselines3" rel="nofollow">models page</a>.',N,f,pe='The Stable-Baselines3 team is hosting a collection of +150 trained Reinforcement Learning agents with tuned hyperparameters that you can find <a href="https://huggingface.co/sb3" rel="nofollow">here</a>.',Y,h,me="All models on the Hub come up with useful features:",P,g,ce="<li>An automatically generated model card with a description, a training configuration, and more.</li> <li>Metadata tags that help for discoverability.</li> <li>Evaluation results to compare with other models.</li> <li>A video widget where you can watch your agent performing.</li>",X,b,q,$,ue="You can simply download a model from the Hub using <code>load_from_hub</code>:",E,T,V,j,de="You can define three parameters:",Q,v,fe="<li><code>--repo-name</code>: The name of the repo.</li> <li><code>-orga</code>: A Hugging Face username or organization.</li> <li><code>-f</code>: The destination folder.</li>",O,M,D,w,he="You can easily upload your models with <code>push_to_hub</code>. 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.",K,y,ee,L,ge="You can define three parameters:",te,_,be="<li><code>--repo-name</code>: The name of the repo.</li> <li><code>-orga</code>: Your Hugging Face username.</li> <li><code>-f</code>: The folder where the model is saved.</li>",le,H,se,x,$e='<li>RL-Baselines3-Zoo <a href="https://huggingface.co/sb3" rel="nofollow">official trained models</a></li> <li>RL-Baselines3-Zoo <a href="https://github.com/DLR-RM/rl-baselines3-zoo" rel="nofollow">documentation</a></li>',ne,I,ae;return m=new W({props:{title:"Using RL-Baselines3-Zoo at Hugging Face",local:"using-rl-baselines3-zoo-at-hugging-face",headingTag:"h1"}}),u=new W({props:{title:"Exploring RL-Baselines3-Zoo in the Hub",local:"exploring-rl-baselines3-zoo-in-the-hub",headingTag:"h2"}}),b=new W({props:{title:"Using existing models",local:"using-existing-models",headingTag:"h2"}}),T=new ve({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>/`,wrap:!1}}),M=new W({props:{title:"Sharing your models",local:"sharing-your-models",headingTag:"h2"}}),y=new ve({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/',wrap:!1}}),H=new W({props:{title:"Additional resources",local:"additional-resources",headingTag:"h2"}}),{c(){p=i("meta"),z=n(),G=i("p"),R=n(),C(m.$$.fragment),k=n(),c=i("p"),c.innerHTML=oe,A=n(),C(u.$$.fragment),S=n(),d=i("p"),d.innerHTML=re,N=n(),f=i("p"),f.innerHTML=pe,Y=n(),h=i("p"),h.textContent=me,P=n(),g=i("ol"),g.innerHTML=ce,X=n(),C(b.$$.fragment),q=n(),$=i("p"),$.innerHTML=ue,E=n(),C(T.$$.fragment),V=n(),j=i("p"),j.textContent=de,Q=n(),v=i("ul"),v.innerHTML=fe,O=n(),C(M.$$.fragment),D=n(),w=i("p"),w.innerHTML=he,K=n(),C(y.$$.fragment),ee=n(),L=i("p"),L.textContent=ge,te=n(),_=i("ul"),_.innerHTML=be,le=n(),C(H.$$.fragment),se=n(),x=i("ul"),x.innerHTML=$e,ne=n(),I=i("p"),this.h()},l(e){const t=He("svelte-u9bgzb",document.head);p=o(t,"META",{name:!0,content:!0}),t.forEach(l),z=a(e),G=o(e,"P",{}),Te(G).forEach(l),R=a(e),F(m.$$.fragment,e),k=a(e),c=o(e,"P",{"data-svelte-h":!0}),r(c)!=="svelte-13vc6fz"&&(c.innerHTML=oe),A=a(e),F(u.$$.fragment,e),S=a(e),d=o(e,"P",{"data-svelte-h":!0}),r(d)!=="svelte-1lfjghp"&&(d.innerHTML=re),N=a(e),f=o(e,"P",{"data-svelte-h":!0}),r(f)!=="svelte-141t09m"&&(f.innerHTML=pe),Y=a(e),h=o(e,"P",{"data-svelte-h":!0}),r(h)!=="svelte-1krwbts"&&(h.textContent=me),P=a(e),g=o(e,"OL",{"data-svelte-h":!0}),r(g)!=="svelte-117jq8g"&&(g.innerHTML=ce),X=a(e),F(b.$$.fragment,e),q=a(e),$=o(e,"P",{"data-svelte-h":!0}),r($)!=="svelte-1gr4tk3"&&($.innerHTML=ue),E=a(e),F(T.$$.fragment,e),V=a(e),j=o(e,"P",{"data-svelte-h":!0}),r(j)!=="svelte-1b398m"&&(j.textContent=de),Q=a(e),v=o(e,"UL",{"data-svelte-h":!0}),r(v)!=="svelte-t87f59"&&(v.innerHTML=fe),O=a(e),F(M.$$.fragment,e),D=a(e),w=o(e,"P",{"data-svelte-h":!0}),r(w)!=="svelte-11phago"&&(w.innerHTML=he),K=a(e),F(y.$$.fragment,e),ee=a(e),L=o(e,"P",{"data-svelte-h":!0}),r(L)!=="svelte-1b398m"&&(L.textContent=ge),te=a(e),_=o(e,"UL",{"data-svelte-h":!0}),r(_)!=="svelte-l7081z"&&(_.innerHTML=be),le=a(e),F(H.$$.fragment,e),se=a(e),x=o(e,"UL",{"data-svelte-h":!0}),r(x)!=="svelte-yv0pxq"&&(x.innerHTML=$e),ne=a(e),I=o(e,"P",{}),Te(I).forEach(l),this.h()},h(){je(p,"name","hf:doc:metadata"),je(p,"content",Fe)},m(e,t){xe(document.head,p),s(e,z,t),s(e,G,t),s(e,R,t),J(m,e,t),s(e,k,t),s(e,c,t),s(e,A,t),J(u,e,t),s(e,S,t),s(e,d,t),s(e,N,t),s(e,f,t),s(e,Y,t),s(e,h,t),s(e,P,t),s(e,g,t),s(e,X,t),J(b,e,t),s(e,q,t),s(e,$,t),s(e,E,t),J(T,e,t),s(e,V,t),s(e,j,t),s(e,Q,t),s(e,v,t),s(e,O,t),J(M,e,t),s(e,D,t),s(e,w,t),s(e,K,t),J(y,e,t),s(e,ee,t),s(e,L,t),s(e,te,t),s(e,_,t),s(e,le,t),J(H,e,t),s(e,se,t),s(e,x,t),s(e,ne,t),s(e,I,t),ae=!0},p:we,i(e){ae||(B(m.$$.fragment,e),B(u.$$.fragment,e),B(b.$$.fragment,e),B(T.$$.fragment,e),B(M.$$.fragment,e),B(y.$$.fragment,e),B(H.$$.fragment,e),ae=!0)},o(e){Z(m.$$.fragment,e),Z(u.$$.fragment,e),Z(b.$$.fragment,e),Z(T.$$.fragment,e),Z(M.$$.fragment,e),Z(y.$$.fragment,e),Z(H.$$.fragment,e),ae=!1},d(e){e&&(l(z),l(G),l(R),l(k),l(c),l(A),l(S),l(d),l(N),l(f),l(Y),l(h),l(P),l(g),l(X),l(q),l($),l(E),l(V),l(j),l(Q),l(v),l(O),l(D),l(w),l(K),l(ee),l(L),l(te),l(_),l(le),l(se),l(x),l(ne),l(I)),l(p),U(m,e),U(u,e),U(b,e),U(T,e),U(M,e),U(y,e),U(H,e)}}}const Fe='{"title":"Using RL-Baselines3-Zoo at Hugging Face","local":"using-rl-baselines3-zoo-at-hugging-face","sections":[{"title":"Exploring RL-Baselines3-Zoo in the Hub","local":"exploring-rl-baselines3-zoo-in-the-hub","sections":[],"depth":2},{"title":"Using existing models","local":"using-existing-models","sections":[],"depth":2},{"title":"Sharing your models","local":"sharing-your-models","sections":[],"depth":2},{"title":"Additional resources","local":"additional-resources","sections":[],"depth":2}],"depth":1}';function Je(ie){return ye(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ie extends Le{constructor(p){super(),_e(this,p,Je,Ce,Me,{})}}export{Ie as component};
