import{s as et,o as nt,n as tt}from"../chunks/scheduler.d627b047.js";import{S as lt,i as at,g as v,s as f,r as u,A as st,h as y,f as i,c as $,j as D,u as c,x as L,k as K,y as it,a as o,v as g,d as h,t as d,w}from"../chunks/index.73c51727.js";import{C as W}from"../chunks/CodeBlock.5f78c87f.js";import{H as Q,E as ot}from"../chunks/index.8df1db42.js";import{H as pt,a as V}from"../chunks/HfOption.d6c7dc54.js";function rt(_){let e,r='uv is a fast Rust-based Python package and project manager. Refer to <a href="https://docs.astral.sh/uv/getting-started/installation/" rel="nofollow">Installation</a> for installation instructions), .',a,p,n;return p=new W({props:{code:"dXYlMjBwaXAlMjBpbnN0YWxsJTIwdHJs",highlighted:"uv pip install trl",wrap:!1}}),{c(){e=v("p"),e.innerHTML=r,a=f(),u(p.$$.fragment)},l(s){e=y(s,"P",{"data-svelte-h":!0}),L(e)!=="svelte-1bdgd0l"&&(e.innerHTML=r),a=$(s),c(p.$$.fragment,s)},m(s,m){o(s,e,m),o(s,a,m),g(p,s,m),n=!0},p:tt,i(s){n||(h(p.$$.fragment,s),n=!0)},o(s){d(p.$$.fragment,s),n=!1},d(s){s&&(i(e),i(a)),w(p,s)}}}function ft(_){let e,r;return e=new W({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRybA==",highlighted:"pip install trl",wrap:!1}}),{c(){u(e.$$.fragment)},l(a){c(e.$$.fragment,a)},m(a,p){g(e,a,p),r=!0},p:tt,i(a){r||(h(e.$$.fragment,a),r=!0)},o(a){d(e.$$.fragment,a),r=!1},d(a){w(e,a)}}}function $t(_){let e,r,a,p;return e=new V({props:{id:"install",option:"uv",$$slots:{default:[rt]},$$scope:{ctx:_}}}),a=new V({props:{id:"install",option:"pip",$$slots:{default:[ft]},$$scope:{ctx:_}}}),{c(){u(e.$$.fragment),r=f(),u(a.$$.fragment)},l(n){c(e.$$.fragment,n),r=$(n),c(a.$$.fragment,n)},m(n,s){g(e,n,s),o(n,r,s),g(a,n,s),p=!0},p(n,s){const m={};s&2&&(m.$$scope={dirty:s,ctx:n}),e.$set(m);const I={};s&2&&(I.$$scope={dirty:s,ctx:n}),a.$set(I)},i(n){p||(h(e.$$.fragment,n),h(a.$$.fragment,n),p=!0)},o(n){d(e.$$.fragment,n),d(a.$$.fragment,n),p=!1},d(n){n&&i(r),w(e,n),w(a,n)}}}function mt(_){let e,r,a,p,n,s,m,I="You can install TRL either from PyPI or from source:",k,C,G,M,X='Install the library with pip or <a href="https://docs.astral.sh/uv/" rel="nofollow">uv</a>:',S,b,E,P,J,T,q="You can also install the latest version from source. First clone the repo and then run the installation with <code>pip</code>:",Y,x,Z,U,O="If you want the development install you can replace the pip install with the following:",z,H,A,R,B,j,F;return n=new Q({props:{title:"Installation",local:"installation",headingTag:"h1"}}),C=new Q({props:{title:"PyPI",local:"pypi",headingTag:"h2"}}),b=new pt({props:{id:"install",options:["uv","pip"],$$slots:{default:[$t]},$$scope:{ctx:_}}}),P=new Q({props:{title:"Source",local:"source",headingTag:"h2"}}),x=new W({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRnRybC5naXQlMEFjZCUyMHRybCUyRiUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/trl.git
<span class="hljs-built_in">cd</span> trl/
pip install -e .`,wrap:!1}}),H=new W({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QmRldiU1RCUyMg==",highlighted:'pip install -e <span class="hljs-string">&quot;.[dev]&quot;</span>',wrap:!1}}),R=new ot({props:{source:"https://github.com/huggingface/trl/blob/main/docs/source/installation.md"}}),{c(){e=v("meta"),r=f(),a=v("p"),p=f(),u(n.$$.fragment),s=f(),m=v("p"),m.textContent=I,k=f(),u(C.$$.fragment),G=f(),M=v("p"),M.innerHTML=X,S=f(),u(b.$$.fragment),E=f(),u(P.$$.fragment),J=f(),T=v("p"),T.innerHTML=q,Y=f(),u(x.$$.fragment),Z=f(),U=v("p"),U.textContent=O,z=f(),u(H.$$.fragment),A=f(),u(R.$$.fragment),B=f(),j=v("p"),this.h()},l(t){const l=st("svelte-u9bgzb",document.head);e=y(l,"META",{name:!0,content:!0}),l.forEach(i),r=$(t),a=y(t,"P",{}),D(a).forEach(i),p=$(t),c(n.$$.fragment,t),s=$(t),m=y(t,"P",{"data-svelte-h":!0}),L(m)!=="svelte-1jugt3x"&&(m.textContent=I),k=$(t),c(C.$$.fragment,t),G=$(t),M=y(t,"P",{"data-svelte-h":!0}),L(M)!=="svelte-1vol8zm"&&(M.innerHTML=X),S=$(t),c(b.$$.fragment,t),E=$(t),c(P.$$.fragment,t),J=$(t),T=y(t,"P",{"data-svelte-h":!0}),L(T)!=="svelte-10g068c"&&(T.innerHTML=q),Y=$(t),c(x.$$.fragment,t),Z=$(t),U=y(t,"P",{"data-svelte-h":!0}),L(U)!=="svelte-13d0x05"&&(U.textContent=O),z=$(t),c(H.$$.fragment,t),A=$(t),c(R.$$.fragment,t),B=$(t),j=y(t,"P",{}),D(j).forEach(i),this.h()},h(){K(e,"name","hf:doc:metadata"),K(e,"content",ut)},m(t,l){it(document.head,e),o(t,r,l),o(t,a,l),o(t,p,l),g(n,t,l),o(t,s,l),o(t,m,l),o(t,k,l),g(C,t,l),o(t,G,l),o(t,M,l),o(t,S,l),g(b,t,l),o(t,E,l),g(P,t,l),o(t,J,l),o(t,T,l),o(t,Y,l),g(x,t,l),o(t,Z,l),o(t,U,l),o(t,z,l),g(H,t,l),o(t,A,l),g(R,t,l),o(t,B,l),o(t,j,l),F=!0},p(t,[l]){const N={};l&2&&(N.$$scope={dirty:l,ctx:t}),b.$set(N)},i(t){F||(h(n.$$.fragment,t),h(C.$$.fragment,t),h(b.$$.fragment,t),h(P.$$.fragment,t),h(x.$$.fragment,t),h(H.$$.fragment,t),h(R.$$.fragment,t),F=!0)},o(t){d(n.$$.fragment,t),d(C.$$.fragment,t),d(b.$$.fragment,t),d(P.$$.fragment,t),d(x.$$.fragment,t),d(H.$$.fragment,t),d(R.$$.fragment,t),F=!1},d(t){t&&(i(r),i(a),i(p),i(s),i(m),i(k),i(G),i(M),i(S),i(E),i(J),i(T),i(Y),i(Z),i(U),i(z),i(A),i(B),i(j)),i(e),w(n,t),w(C,t),w(b,t),w(P,t),w(x,t),w(H,t),w(R,t)}}}const ut='{"title":"Installation","local":"installation","sections":[{"title":"PyPI","local":"pypi","sections":[],"depth":2},{"title":"Source","local":"source","sections":[],"depth":2}],"depth":1}';function ct(_){return nt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bt extends lt{constructor(e){super(),at(this,e,ct,mt,et,{})}}export{bt as component};
