Buckets:

HuggingFaceDocBuilder's picture
download
raw
10.4 kB
import{s as Pe,n as ke,o as Ne}from"../chunks/scheduler.56725da7.js";import{S as Ze,i as Ge,e as i,s as a,c as m,h as Ye,a as o,d as n,b as s,f as Be,g as r,j as p,k as Ue,l as qe,m as l,n as u,t as c,o as f,p as h}from"../chunks/index.18a26576.js";import{C as Ee}from"../chunks/CopyLLMTxtMenu.a1f2bcd7.js";import{C as z}from"../chunks/CodeBlock.d6d1e300.js";import{H as q}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.9f98faf7.js";function Se(ve){let g,R,E,V,$,F,d,Q,y,be=`You have decided to contribute to <code>optimum-neuron</code>: at this stage you should have an up-to-date copy of the <code>optimum-neuron</code>
repository installed locally (either a clone of the <a href="https://github.com/huggingface/optimum-neuron" rel="nofollow">original repository</a>
if you have write access or a clone from your own fork if you are an external contributor).`,X,v,we="Before contributing and submit your first pull-request, you need to prepare your development environment by installing a few development tools.",A,b,O,w,Te="<p><strong><em>NOTE:</em></strong> ❗If you are using the Hugging Face Deep Learning AMI, you can reuse the virtual environment that is automatically activated when logging to the machine and skip this step.</p>",D,T,K,M,Me="Note: <code>optimum-neuron</code> requires at least python 3.10",ee,J,te,C,Je=`First, you need to install the tools that are used to check that your contribution complies
with the few <code>optimum-neuron</code> styling and coding rules.`,ne,_,le,x,Ce=`Then, and only if you plan to modify the <code>optimum-neuron</code> code itself, you need to
install the test environment.`,ae,I,se,L,ie,H,_e=`You cannot contribute your changes directly to the <code>optimum-neuron</code> <code>main</code> branch, so you need
first to create a development branch containing your changes:`,oe,j,pe,W,me,B,xe=`All contributions are reviewed by the <code>optimum-neuron</code> maintainers: in order to speed up the review,
you are <strong>strongly</strong> encouraged to submit your changes in small,
<a href="https://dev.to/samuelfaure/how-atomic-git-commits-dramatically-increased-my-productivity-and-will-increase-yours-too-4a84" rel="nofollow">atomic</a> changes.`,re,U,Ie="<code>optimum-neuron</code> has a few styling and coding policies that are enforced by the quality tools you previously installed.",ue,P,Le="You can however apply the styling tools manually before committing using explicit commands:",ce,k,He="For any contribution:",fe,N,he,Z,ge,G,je="We have prepared a pull-request template with a few instructions that you should read carefully before submitting.",$e,Y,We="Thank you for contributing to <code>optimum-neuron</code> !",de,S,ye;return $=new Ee({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),d=new q({props:{title:"Setting up your development environment",local:"setting-up-your-development-environment",headingTag:"h1"}}),b=new q({props:{title:"Prepare a python virtual environment",local:"prepare-a-python-virtual-environment",headingTag:"h2"}}),T=new z({props:{code:"JTI0JTIwcHl0aG9uMyUyMC1tJTIwdmVudiUyMC52ZW52JTBBJTI0JTIwc291cmNlJTIwLnZlbnYlMkZiaW4lMkZhY3RpdmF0ZQ==",highlighted:`<span class="hljs-meta prompt_">$ </span><span class="language-bash">python3 -m venv .venv</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">source</span> .venv/bin/activate</span>`,lang:"shell",wrap:!1}}),J=new q({props:{title:"Install development tools",local:"install-development-tools",headingTag:"h2"}}),_=new z({props:{code:"JTI0JTIwcGlwJTIwaW5zdGFsbCUyMC4lNUJxdWFsaXR5JTVEJTBBJTI0JTIwcHJlLWNvbW1pdCUyMGluc3RhbGw=",highlighted:`<span class="hljs-meta prompt_">$ </span><span class="language-bash">pip install .[quality]</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">pre-commit install</span>`,lang:"shell",wrap:!1}}),I=new z({props:{code:"JTI0JTIwcGlwJTIwaW5zdGFsbCUyMC4lNUJ0ZXN0cyU1RA==",highlighted:'<span class="hljs-meta prompt_">$ </span><span class="language-bash">pip install .[tests]</span>',lang:"shell",wrap:!1}}),L=new q({props:{title:"Creating a development branch",local:"creating-a-development-branch",headingTag:"h2"}}),j=new z({props:{code:"JTI0JTIwZ2l0JTIwY2hlY2tvdXQlMjBtYWluJTBBJTI0JTIwZ2l0JTIwcHVsbCUwQSUyNCUyMGdpdCUyMGNoZWNrb3V0JTIwLWIlMjAlM0NteS1hd2Vzb21lLWNvbnRyaWJ1dGlvbiUzRQ==",highlighted:`<span class="hljs-meta prompt_">$ </span><span class="language-bash">git checkout main</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git pull</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git checkout -b &lt;my-awesome-contribution&gt;</span>`,lang:"shell",wrap:!1}}),W=new q({props:{title:"Committing your changes",local:"committing-your-changes",headingTag:"h2"}}),N=new z({props:{code:"JTI0JTIwcHJlLWNvbW1pdCUyMHJ1biUyMGVuZC1vZi1maWxlLWZpeGVyJTBBJTI0JTIwcHJlLWNvbW1pdCUyMHJ1biUyMHRyYWlsaW5nLXdoaXRlc3BhY2UlMEElMEFGb3IlMjBweXRob24lMjBjb2RlJTNBJTBBJTBBJTYwJTYwJTYwc2hlbGwlMEElMjQlMjBwcmUtY29tbWl0JTIwcnVuJTIwcnVmZi1jaGVjayUwQSUyNCUyMHByZS1jb21taXQlMjBydW4lMjBydWZmLWZvcm1hdA==",highlighted:`<span class="hljs-meta prompt_">$ </span><span class="language-bash">pre-commit run end-of-file-fixer</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">pre-commit run trailing-whitespace</span>
For python code:
\`\`\`shell
<span class="hljs-meta prompt_">$ </span><span class="language-bash">pre-commit run ruff-check</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">pre-commit run ruff-format</span>`,lang:"shell",wrap:!1}}),Z=new q({props:{title:"Submitting your pull-request",local:"submitting-your-pull-request",headingTag:"h2"}}),{c(){g=i("meta"),R=a(),E=i("p"),V=a(),m($.$$.fragment),F=a(),m(d.$$.fragment),Q=a(),y=i("p"),y.innerHTML=be,X=a(),v=i("p"),v.textContent=we,A=a(),m(b.$$.fragment),O=a(),w=i("blockquote"),w.innerHTML=Te,D=a(),m(T.$$.fragment),K=a(),M=i("p"),M.innerHTML=Me,ee=a(),m(J.$$.fragment),te=a(),C=i("p"),C.innerHTML=Je,ne=a(),m(_.$$.fragment),le=a(),x=i("p"),x.innerHTML=Ce,ae=a(),m(I.$$.fragment),se=a(),m(L.$$.fragment),ie=a(),H=i("p"),H.innerHTML=_e,oe=a(),m(j.$$.fragment),pe=a(),m(W.$$.fragment),me=a(),B=i("p"),B.innerHTML=xe,re=a(),U=i("p"),U.innerHTML=Ie,ue=a(),P=i("p"),P.textContent=Le,ce=a(),k=i("p"),k.textContent=He,fe=a(),m(N.$$.fragment),he=a(),m(Z.$$.fragment),ge=a(),G=i("p"),G.textContent=je,$e=a(),Y=i("p"),Y.innerHTML=We,de=a(),S=i("p"),this.h()},l(e){const t=Ye("svelte-u9bgzb",document.head);g=o(t,"META",{name:!0,content:!0}),t.forEach(n),R=s(e),E=o(e,"P",{}),Be(E).forEach(n),V=s(e),r($.$$.fragment,e),F=s(e),r(d.$$.fragment,e),Q=s(e),y=o(e,"P",{"data-svelte-h":!0}),p(y)!=="svelte-11qf41n"&&(y.innerHTML=be),X=s(e),v=o(e,"P",{"data-svelte-h":!0}),p(v)!=="svelte-jgt5w9"&&(v.textContent=we),A=s(e),r(b.$$.fragment,e),O=s(e),w=o(e,"BLOCKQUOTE",{"data-svelte-h":!0}),p(w)!=="svelte-1jz998z"&&(w.innerHTML=Te),D=s(e),r(T.$$.fragment,e),K=s(e),M=o(e,"P",{"data-svelte-h":!0}),p(M)!=="svelte-12zvn18"&&(M.innerHTML=Me),ee=s(e),r(J.$$.fragment,e),te=s(e),C=o(e,"P",{"data-svelte-h":!0}),p(C)!=="svelte-1rmndz1"&&(C.innerHTML=Je),ne=s(e),r(_.$$.fragment,e),le=s(e),x=o(e,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1s0r71s"&&(x.innerHTML=Ce),ae=s(e),r(I.$$.fragment,e),se=s(e),r(L.$$.fragment,e),ie=s(e),H=o(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-k85a3f"&&(H.innerHTML=_e),oe=s(e),r(j.$$.fragment,e),pe=s(e),r(W.$$.fragment,e),me=s(e),B=o(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-zalpic"&&(B.innerHTML=xe),re=s(e),U=o(e,"P",{"data-svelte-h":!0}),p(U)!=="svelte-1rm39oi"&&(U.innerHTML=Ie),ue=s(e),P=o(e,"P",{"data-svelte-h":!0}),p(P)!=="svelte-rgnxoa"&&(P.textContent=Le),ce=s(e),k=o(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-60vv19"&&(k.textContent=He),fe=s(e),r(N.$$.fragment,e),he=s(e),r(Z.$$.fragment,e),ge=s(e),G=o(e,"P",{"data-svelte-h":!0}),p(G)!=="svelte-1sje3d0"&&(G.textContent=je),$e=s(e),Y=o(e,"P",{"data-svelte-h":!0}),p(Y)!=="svelte-dx55e6"&&(Y.innerHTML=We),de=s(e),S=o(e,"P",{}),Be(S).forEach(n),this.h()},h(){Ue(g,"name","hf:doc:metadata"),Ue(g,"content",ze)},m(e,t){qe(document.head,g),l(e,R,t),l(e,E,t),l(e,V,t),u($,e,t),l(e,F,t),u(d,e,t),l(e,Q,t),l(e,y,t),l(e,X,t),l(e,v,t),l(e,A,t),u(b,e,t),l(e,O,t),l(e,w,t),l(e,D,t),u(T,e,t),l(e,K,t),l(e,M,t),l(e,ee,t),u(J,e,t),l(e,te,t),l(e,C,t),l(e,ne,t),u(_,e,t),l(e,le,t),l(e,x,t),l(e,ae,t),u(I,e,t),l(e,se,t),u(L,e,t),l(e,ie,t),l(e,H,t),l(e,oe,t),u(j,e,t),l(e,pe,t),u(W,e,t),l(e,me,t),l(e,B,t),l(e,re,t),l(e,U,t),l(e,ue,t),l(e,P,t),l(e,ce,t),l(e,k,t),l(e,fe,t),u(N,e,t),l(e,he,t),u(Z,e,t),l(e,ge,t),l(e,G,t),l(e,$e,t),l(e,Y,t),l(e,de,t),l(e,S,t),ye=!0},p:ke,i(e){ye||(c($.$$.fragment,e),c(d.$$.fragment,e),c(b.$$.fragment,e),c(T.$$.fragment,e),c(J.$$.fragment,e),c(_.$$.fragment,e),c(I.$$.fragment,e),c(L.$$.fragment,e),c(j.$$.fragment,e),c(W.$$.fragment,e),c(N.$$.fragment,e),c(Z.$$.fragment,e),ye=!0)},o(e){f($.$$.fragment,e),f(d.$$.fragment,e),f(b.$$.fragment,e),f(T.$$.fragment,e),f(J.$$.fragment,e),f(_.$$.fragment,e),f(I.$$.fragment,e),f(L.$$.fragment,e),f(j.$$.fragment,e),f(W.$$.fragment,e),f(N.$$.fragment,e),f(Z.$$.fragment,e),ye=!1},d(e){e&&(n(R),n(E),n(V),n(F),n(Q),n(y),n(X),n(v),n(A),n(O),n(w),n(D),n(K),n(M),n(ee),n(te),n(C),n(ne),n(le),n(x),n(ae),n(se),n(ie),n(H),n(oe),n(pe),n(me),n(B),n(re),n(U),n(ue),n(P),n(ce),n(k),n(fe),n(he),n(ge),n(G),n($e),n(Y),n(de),n(S)),n(g),h($,e),h(d,e),h(b,e),h(T,e),h(J,e),h(_,e),h(I,e),h(L,e),h(j,e),h(W,e),h(N,e),h(Z,e)}}}const ze='{"title":"Setting up your development environment","local":"setting-up-your-development-environment","sections":[{"title":"Prepare a python virtual environment","local":"prepare-a-python-virtual-environment","sections":[],"depth":2},{"title":"Install development tools","local":"install-development-tools","sections":[],"depth":2},{"title":"Creating a development branch","local":"creating-a-development-branch","sections":[],"depth":2},{"title":"Committing your changes","local":"committing-your-changes","sections":[],"depth":2},{"title":"Submitting your pull-request","local":"submitting-your-pull-request","sections":[],"depth":2}],"depth":1}';function Re(ve){return Ne(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Oe extends Ze{constructor(g){super(),Ge(this,g,Re,Se,Pe,{})}}export{Oe as component};

Xet Storage Details

Size:
10.4 kB
·
Xet hash:
0699c5c50f24d9623c8baa0702144b12d4a9f014184d81507fd2a47375361315

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.