import{S as Gy,i as My,s as Uy,e as a,k as i,w as m,t as s,M as Yy,c as l,d as o,m as h,a as n,x as y,h as r,b as d,F as e,g as f,y as g,L as By,q as v,o as w,B as b}from"../chunks/vendor-4833417e.js";import{I as C}from"../chunks/IconCopyLink-4b81c553.js";import{C as $}from"../chunks/CodeBlock-6a3d1b46.js";import"../chunks/CopyButton-dacfbfaf.js";function zy(fn){let H,lo,x,W,Xo,Ye,dn,es,cn,va,no,pn,wa,io,mn,ba,be,yn,Be,gn,vn,$a,te,$e,ts,ze,wn,os,bn,_a,ho,$n,ka,A,ss,_n,kn,rs,En,Pn,as,In,Tn,ls,Sn,Ea,L,On,Je,Cn,xn,ns,An,Ln,is,Dn,Nn,Pa,uo,hs,qn,Ia,oe,_e,us,Ke,Rn,fs,Wn,Ta,fo,Fn,Sa,se,ke,ds,Qe,Hn,cs,jn,Oa,co,Gn,Ca,Ee,Mn,ps,Un,Yn,xa,po,Bn,Aa,j,S,zn,ms,Jn,Kn,ys,Qn,Zn,gs,Vn,Xn,vs,ei,ti,oi,ws,si,ri,Ze,ai,bs,li,ni,La,mo,ii,Da,Ve,Na,yo,hi,qa,Xe,Ra,re,Pe,$s,et,ui,_s,fi,Wa,go,di,Fa,G,ks,ci,pi,Es,mi,yi,Ps,gi,Ha,vo,vi,ja,M,wi,Is,bi,$i,tt,Ts,_i,ki,Ga,ae,Ie,Ss,ot,Ei,Os,Pi,Ma,wo,Ii,Ua,bo,Cs,Ti,Ya,U,xs,Si,Oi,As,Ci,xi,Ls,Ai,Ba,O,st,Li,Ds,Di,Ni,qi,rt,Ri,Ns,Wi,Fi,Hi,qs,ji,Gi,Rs,Mi,za,$o,Ui,Ja,Y,Yi,Ws,Bi,zi,at,Fs,Ji,Ki,Ka,le,Te,Hs,lt,Qi,js,Zi,Qa,_o,Vi,Za,P,Xi,Gs,eh,th,Ms,oh,sh,Us,rh,ah,nt,lh,nh,Va,ko,ih,Xa,_,Ys,it,hh,ht,uh,fh,dh,ut,Bs,ch,ph,ft,mh,ne,zs,yh,gh,dt,vh,Se,Js,wh,bh,Ks,$h,_h,kh,E,Qs,Eh,Ph,ct,Ih,ie,Th,Zs,Sh,Oh,Vs,Ch,xh,Ah,pt,Lh,Xs,Dh,Nh,qh,mt,Rh,he,Wh,er,Fh,Hh,tr,jh,Gh,Mh,c,or,Uh,Yh,sr,Bh,zh,yt,Jh,rr,Kh,Qh,gt,Zh,Eo,Vh,vt,Xh,eu,ue,tu,ar,ou,su,lr,ru,au,lu,wt,nu,nr,iu,hu,ir,uu,fu,bt,du,$t,cu,hr,pu,mu,yu,_t,gu,ur,vu,wu,kt,bu,Po,$u,Et,_u,ku,Pt,Eu,fr,Pu,Iu,Tu,It,Su,dr,Ou,Cu,Tt,xu,cr,Au,Lu,St,Du,Ot,Nu,pr,qu,Ru,Wu,fe,Fu,mr,Hu,ju,yr,Gu,Mu,Uu,Ct,Yu,xt,Bu,At,zu,Ju,Ku,gr,Qu,Zu,Lt,Vu,vr,Xu,ef,Dt,tf,wr,Nt,of,br,sf,rf,af,$r,_r,lf,el,de,Oe,kr,qt,nf,Er,hf,tl,k,Pr,uf,ff,Ir,df,cf,Rt,pf,Tr,mf,yf,gf,Sr,vf,wf,Io,bf,ce,Wt,$f,Or,_f,kf,Ef,pe,Pf,Cr,If,Tf,xr,Sf,Of,Cf,Ft,xf,Ar,Af,Lf,Df,Ht,Nf,Lr,qf,Rf,Wf,F,Ff,Dr,Hf,jf,jt,Nr,Gf,Mf,Gt,Uf,Yf,ol,Mt,Bf,To,zf,sl,me,Ce,qr,Ut,Jf,Rr,Kf,rl,B,Qf,Yt,Zf,Vf,Bt,Xf,ed,al,D,td,Wr,od,sd,Fr,rd,ad,Hr,ld,nd,ll,zt,nl,So,id,il,Jt,hl,N,hd,jr,ud,fd,Gr,dd,cd,Mr,pd,md,ul,Oo,yd,fl,z,gd,Ur,vd,wd,Yr,bd,$d,dl,Kt,cl,J,_d,Br,kd,Ed,zr,Pd,Id,pl,K,Td,Jr,Sd,Od,Kr,Cd,xd,ml,Q,Ad,Qr,Ld,Dd,Zr,Nd,qd,yl,Qt,gl,ye,xe,Vr,Zt,Rd,Xr,Wd,vl,Z,Fd,Vt,Hd,jd,Xt,Gd,Md,wl,ge,Ae,ea,eo,Ud,ta,Yd,bl,ve,Le,oa,to,Bd,sa,zd,$l,V,Jd,ra,Kd,Qd,aa,Zd,Vd,_l,Co,la,Xd,kl,xo,ec,El,q,Ao,oo,tc,oc,sc,na,rc,ac,De,lc,ia,nc,ic,ha,hc,uc,so,fc,ua,dc,cc,Pl,Ne,pc,fa,mc,yc,Il,we,qe,da,ro,gc,ca,vc,Tl,Lo,wc,Sl,Re,pa,bc,$c,ma,_c,Ol,ao,Cl;return Ye=new C({}),ze=new C({}),Ke=new C({}),Qe=new C({}),Ve=new $({props:{code:"transformers-cli env",highlighted:'transformers-cli <span class="hljs-built_in">env</span>'}}),Xe=new $({props:{code:"python src/transformers/commands/transformers_cli.py env",highlighted:'python src/transformers/commands/transformers_cli.py <span class="hljs-built_in">env</span>'}}),et=new C({}),ot=new C({}),lt=new C({}),ft=new $({props:{code:`$ git clone git@github.com:<your Github handle>/transformers.git
$ cd transformers
$ git remote add upstream https://github.com/huggingface/transformers.git`,highlighted:`$ git <span class="hljs-built_in">clone</span> git@github.com:&lt;your Github handle&gt;/transformers.git
$ <span class="hljs-built_in">cd</span> transformers
$ git remote add upstream https://github.com/huggingface/transformers.git`}}),dt=new $({props:{code:"$ git checkout -b a-descriptive-name-for-my-changes",highlighted:"$ git checkout -b a-descriptive-name-for-my-changes"}}),ct=new $({props:{code:'$ pip install -e ".[dev]"',highlighted:'$ pip install -e <span class="hljs-string">&quot;.[dev]&quot;</span>'}}),mt=new $({props:{code:`$ git clone https://github.com/huggingface/datasets
$ cd datasets
$ pip install -e .`,highlighted:`$ git <span class="hljs-built_in">clone</span> https://github.com/huggingface/datasets
$ <span class="hljs-built_in">cd</span> datasets
$ pip install -e .`}}),yt=new $({props:{code:"$ pytest tests/<TEST_TO_RUN>.py",highlighted:"$ pytest tests/&lt;TEST_TO_RUN&gt;.py"}}),gt=new $({props:{code:"$ make test",highlighted:'$ make <span class="hljs-built_in">test</span>'}}),wt=new $({props:{code:"$ make fixup",highlighted:"$ make fixup"}}),bt=new $({props:{code:"$ make style",highlighted:"$ make style"}}),_t=new $({props:{code:"$ make quality",highlighted:"$ make quality"}}),kt=new $({props:{code:"$ make repo-consistency",highlighted:"$ make repo-consistency"}}),It=new $({props:{code:"$ pip install git+https://github.com/huggingface/doc-builder",highlighted:"$ pip install git+https://github.com/huggingface/doc-builder"}}),Tt=new $({props:{code:'$ pip install ".[docs]"',highlighted:'$ pip install <span class="hljs-string">&quot;.[docs]&quot;</span>'}}),St=new $({props:{code:"$ doc-builder build transformers docs/source/ --build_dir ~/tmp/test-build",highlighted:"$ doc-builder build transformers docs/source/ --build_dir ~/tmp/test-build"}}),Ct=new $({props:{code:`$ git add modified_file.py
$ git commit`,highlighted:`$ git add modified_file.py
$ git commit`}}),Lt=new $({props:{code:`$ git fetch upstream
$ git rebase upstream/master`,highlighted:`$ git fetch upstream
$ git rebase upstream/master`}}),Dt=new $({props:{code:"$ git push -u origin a-descriptive-name-for-my-changes",highlighted:"$ git push -u origin a-descriptive-name-for-my-changes"}}),qt=new C({}),Ut=new C({}),zt=new $({props:{code:"$ python -m pytest -n auto --dist=loadfile -s -v ./tests/",highlighted:"$ python -m pytest -n auto --dist=loadfile -s -v ./tests/"}}),Jt=new $({props:{code:`$ pip install -r examples/xxx/requirements.txt  # only needed the first time
$ python -m pytest -n auto --dist=loadfile -s -v ./examples/`,highlighted:`$ pip install -r examples/xxx/requirements.txt  <span class="hljs-comment"># only needed the first time</span>
$ python -m pytest -n auto --dist=loadfile -s -v ./examples/`}}),Kt=new $({props:{code:`$ RUN_SLOW=yes python -m pytest -n auto --dist=loadfile -s -v ./tests/
$ RUN_SLOW=yes python -m pytest -n auto --dist=loadfile -s -v ./examples/`,highlighted:`$ RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./tests/
$ RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./examples/`}}),Qt=new $({props:{code:`$ python -m unittest discover -s tests -t . -v
$ python -m unittest discover -s examples -t examples -v`,highlighted:`$ python -m unittest discover -s tests -t . -v
$ python -m unittest discover -s examples -t examples -v`}}),Zt=new C({}),eo=new C({}),to=new C({}),ro=new C({}),ao=new $({props:{code:`$ git checkout -b your-branch-for-syncing
$ git pull --squash --no-commit upstream master
$ git commit -m '<your message without GitHub references>'
$ git push --set-upstream origin your-branch-for-syncing`,highlighted:`<span class="hljs-symbol">$</span> git checkout -b your-branch-<span class="hljs-keyword">for</span>-syncing
<span class="hljs-symbol">$</span> git pull --squash --<span class="hljs-keyword">no</span>-commit upstream master
<span class="hljs-symbol">$</span> git commit -m <span class="hljs-string">&#x27;&lt;your message without GitHub references&gt;&#x27;</span>
<span class="hljs-symbol">$</span> git push --<span class="hljs-keyword">set</span>-upstream <span class="hljs-comment">origin your-branch-for-syncing</span>`}}),{c(){H=a("meta"),lo=i(),x=a("h1"),W=a("a"),Xo=a("span"),m(Ye.$$.fragment),dn=i(),es=a("span"),cn=s("How to contribute to transformers?"),va=i(),no=a("p"),pn=s(`Everyone is welcome to contribute, and we value everybody\u2019s contribution. Code
is thus not the only way to help the community. Answering questions, helping
others, reaching out and improving the documentations are immensely valuable to
the community.`),wa=i(),io=a("p"),mn=s(`It also helps us if you spread the word: reference the library from blog posts
on the awesome projects it made possible, shout out on Twitter every time it has
helped you, or simply star the repo to say \u201Cthank you\u201D.`),ba=i(),be=a("p"),yn=s(`Whichever way you choose to contribute, please be mindful to respect our
`),Be=a("a"),gn=s("code of conduct"),vn=s("."),$a=i(),te=a("h2"),$e=a("a"),ts=a("span"),m(ze.$$.fragment),wn=i(),os=a("span"),bn=s("You can contribute in so many ways!"),_a=i(),ho=a("p"),$n=s("There are 4 ways you can contribute to transformers:"),ka=i(),A=a("ul"),ss=a("li"),_n=s("Fixing outstanding issues with the existing code;"),kn=i(),rs=a("li"),En=s("Implementing new models;"),Pn=i(),as=a("li"),In=s("Contributing to the examples or to the documentation;"),Tn=i(),ls=a("li"),Sn=s("Submitting issues related to bugs or desired new features."),Ea=i(),L=a("p"),On=s("In particular there is a special "),Je=a("a"),Cn=s(`Good First
Issue`),xn=s(` listing. It will give you a list of
open Issues that are open to anybody to work on. Just comment in the issue that you\u2019d like to work
on it. In that same listing you will also find some Issues with `),ns=a("code"),An=s("Good Second Issue"),Ln=s(` label. These are
typically slightly more complicated than the Issues with just `),is=a("code"),Dn=s("Good First Issue"),Nn=s(` label. But if you
feel you know what you\u2019re doing, go for it.`),Pa=i(),uo=a("p"),hs=a("em"),qn=s("All are equally valuable to the community."),Ia=i(),oe=a("h2"),_e=a("a"),us=a("span"),m(Ke.$$.fragment),Rn=i(),fs=a("span"),Wn=s("Submitting a new issue or feature request"),Ta=i(),fo=a("p"),Fn=s(`Do your best to follow these guidelines when submitting an issue or a feature
request. It will make it easier for us to come back to you quickly and with good
feedback.`),Sa=i(),se=a("h3"),ke=a("a"),ds=a("span"),m(Qe.$$.fragment),Hn=i(),cs=a("span"),jn=s("Did you find a bug?"),Oa=i(),co=a("p"),Gn=s(`The \u{1F917} Transformers library is robust and reliable thanks to the users who notify us of
the problems they encounter. So thank you for reporting an issue.`),Ca=i(),Ee=a("p"),Mn=s("First, we would really appreciate it if you could "),ps=a("strong"),Un=s(`make sure the bug was not
already reported`),Yn=s(" (use the search bar on Github under Issues)."),xa=i(),po=a("p"),Bn=s("Did not find it? :( So we can act quickly on it, please follow these steps:"),Aa=i(),j=a("ul"),S=a("li"),zn=s("Include your "),ms=a("strong"),Jn=s("OS type and version"),Kn=s(", the versions of "),ys=a("strong"),Qn=s("Python"),Zn=s(", "),gs=a("strong"),Vn=s("PyTorch"),Xn=s(` and
`),vs=a("strong"),ei=s("Tensorflow"),ti=s(" when applicable;"),oi=i(),ws=a("li"),si=s(`A short, self-contained, code snippet that allows us to reproduce the bug in
less than 30s;`),ri=i(),Ze=a("li"),ai=s("Provide the "),bs=a("em"),li=s("full"),ni=s(" traceback if an exception is raised."),La=i(),mo=a("p"),ii=s("To get the OS and software versions automatically, you can run the following command:"),Da=i(),m(Ve.$$.fragment),Na=i(),yo=a("p"),hi=s("or from the root of the repository the following command:"),qa=i(),m(Xe.$$.fragment),Ra=i(),re=a("h3"),Pe=a("a"),$s=a("span"),m(et.$$.fragment),ui=i(),_s=a("span"),fi=s("Do you want to implement a new model?"),Wa=i(),go=a("p"),di=s("Awesome! Please provide the following information:"),Fa=i(),G=a("ul"),ks=a("li"),ci=s("Short description of the model and link to the paper;"),pi=i(),Es=a("li"),mi=s("Link to the implementation if it is open-source;"),yi=i(),Ps=a("li"),gi=s("Link to the model weights if they are available."),Ha=i(),vo=a("p"),vi=s(`If you are willing to contribute the model yourself, let us know so we can best
guide you.`),ja=i(),M=a("p"),wi=s("We have added a "),Is=a("strong"),bi=s("detailed guide and templates"),$i=s(` to guide you in the process of adding a new model. You can find them
in the `),tt=a("a"),Ts=a("code"),_i=s("templates"),ki=s(" folder."),Ga=i(),ae=a("h3"),Ie=a("a"),Ss=a("span"),m(ot.$$.fragment),Ei=i(),Os=a("span"),Pi=s("Do you want a new feature (that is not a model)?"),Ma=i(),wo=a("p"),Ii=s("A world-class feature request addresses the following points:"),Ua=i(),bo=a("ol"),Cs=a("li"),Ti=s("Motivation first:"),Ya=i(),U=a("ul"),xs=a("li"),Si=s(`Is it related to a problem/frustration with the library? If so, please explain
why. Providing a code snippet that demonstrates the problem is best.`),Oi=i(),As=a("li"),Ci=s(`Is it related to something you would need for a project? We\u2019d love to hear
about it!`),xi=i(),Ls=a("li"),Ai=s(`Is it something you worked on and think could benefit the community?
Awesome! Tell us what problem it solved for you.`),Ba=i(),O=a("ol"),st=a("li"),Li=s("Write a "),Ds=a("em"),Di=s("full paragraph"),Ni=s(" describing the feature;"),qi=i(),rt=a("li"),Ri=s("Provide a "),Ns=a("strong"),Wi=s("code snippet"),Fi=s(" that demonstrates its future use;"),Hi=i(),qs=a("li"),ji=s("In case this is related to a paper, please attach a link;"),Gi=i(),Rs=a("li"),Mi=s("Attach any additional information (drawings, screenshots, etc.) you think may help."),za=i(),$o=a("p"),Ui=s(`If your issue is well written we\u2019re already 80% of the way there by the time you
post it.`),Ja=i(),Y=a("p"),Yi=s("We have added "),Ws=a("strong"),Bi=s("templates"),zi=s(` to guide you in the process of adding a new example script for training or testing the
models in the library. You can find them in the `),at=a("a"),Fs=a("code"),Ji=s("templates"),Ki=s(`
folder.`),Ka=i(),le=a("h2"),Te=a("a"),Hs=a("span"),m(lt.$$.fragment),Qi=i(),js=a("span"),Zi=s("Start contributing! (Pull Requests)"),Qa=i(),_o=a("p"),Vi=s(`Before writing code, we strongly advise you to search through the existing PRs or
issues to make sure that nobody is already working on the same thing. If you are
unsure, it is always a good idea to open an issue to get some feedback.`),Za=i(),P=a("p"),Xi=s("You will need basic "),Gs=a("code"),eh=s("git"),th=s(` proficiency to be able to contribute to
\u{1F917} Transformers. `),Ms=a("code"),oh=s("git"),sh=s(` is not the easiest tool to use but it has the greatest
manual. Type `),Us=a("code"),rh=s("git --help"),ah=s(" in a shell and enjoy. If you prefer books, "),nt=a("a"),lh=s(`Pro
Git`),nh=s(" is a very good reference."),Va=i(),ko=a("p"),ih=s("Follow these steps to start contributing:"),Xa=i(),_=a("ol"),Ys=a("li"),it=a("p"),hh=s("Fork the "),ht=a("a"),uh=s("repository"),fh=s(` by
clicking on the \u2018Fork\u2019 button on the repository\u2019s page. This creates a copy of the code
under your GitHub user account.`),dh=i(),ut=a("li"),Bs=a("p"),ch=s("Clone your fork to your local disk, and add the base repository as a remote:"),ph=i(),m(ft.$$.fragment),mh=i(),ne=a("li"),zs=a("p"),yh=s("Create a new branch to hold your development changes:"),gh=i(),m(dt.$$.fragment),vh=i(),Se=a("p"),Js=a("strong"),wh=s("Do not"),bh=s(" work on the "),Ks=a("code"),$h=s("master"),_h=s(" branch."),kh=i(),E=a("li"),Qs=a("p"),Eh=s("Set up a development environment by running the following command in a virtual environment:"),Ph=i(),m(ct.$$.fragment),Ih=i(),ie=a("p"),Th=s(`(If transformers was already installed in the virtual environment, remove
it with `),Zs=a("code"),Sh=s("pip uninstall transformers"),Oh=s(` before reinstalling it in editable
mode with the `),Vs=a("code"),Ch=s("-e"),xh=s(" flag.)"),Ah=i(),pt=a("p"),Lh=s("To run the full test suite, you might need the additional dependency on "),Xs=a("code"),Dh=s("datasets"),Nh=s(` which requires a separate source
install:`),qh=i(),m(mt.$$.fragment),Rh=i(),he=a("p"),Wh=s("If you have already cloned that repo, you might need to "),er=a("code"),Fh=s("git pull"),Hh=s(" to get the most recent changes in the "),tr=a("code"),jh=s("datasets"),Gh=s(`
library.`),Mh=i(),c=a("li"),or=a("p"),Uh=s("Develop the features on your branch."),Yh=i(),sr=a("p"),Bh=s(`As you work on the features, you should make sure that the test suite
passes. You should run the tests impacted by your changes like this:`),zh=i(),m(yt.$$.fragment),Jh=i(),rr=a("p"),Kh=s(`You can also run the full suite with the following command, but it takes
a beefy machine to produce a result in a decent amount of time now that
Transformers has grown a lot. Here is the command for it:`),Qh=i(),m(gt.$$.fragment),Zh=i(),Eo=a("p"),Vh=s(`For more information about tests, check out the
`),vt=a("a"),Xh=s("dedicated documentation"),eu=i(),ue=a("p"),tu=s("\u{1F917} Transformers relies on "),ar=a("code"),ou=s("black"),su=s(" and "),lr=a("code"),ru=s("isort"),au=s(` to format its source code
consistently. After you make changes, apply automatic style corrections and code verifications
that can\u2019t be automated in one go with:`),lu=i(),m(wt.$$.fragment),nu=i(),nr=a("p"),iu=s("This target is also optimized to only work with files modified by the PR you\u2019re working on."),hu=i(),ir=a("p"),uu=s(`If you prefer to run the checks one after the other, the following command apply the
style corrections:`),fu=i(),m(bt.$$.fragment),du=i(),$t=a("p"),cu=s("\u{1F917} Transformers also uses "),hr=a("code"),pu=s("flake8"),mu=s(` and a few custom scripts to check for coding mistakes. Quality
control runs in CI, however you can also run the same checks with:`),yu=i(),m(_t.$$.fragment),gu=i(),ur=a("p"),vu=s(`Finally we have a lot of scripts that check we didn\u2019t forget to update
some files when adding a new model, that you can run with`),wu=i(),m(kt.$$.fragment),bu=i(),Po=a("p"),$u=s(`To learn more about those checks and how to fix any issue with them, check out the
`),Et=a("a"),_u=s("documentation"),ku=i(),Pt=a("p"),Eu=s("If you\u2019re modifying documents under "),fr=a("code"),Pu=s("docs/source"),Iu=s(`, make sure to validate that
they can still be built. This check also runs in CI. To run a local check
make sure you have installed the documentation builder requirements. First you will need to clone the
repository containing our tools to build the documentation:`),Tu=i(),m(It.$$.fragment),Su=i(),dr=a("p"),Ou=s("Then, make sure you have all the dependencies to be able to build the doc with:"),Cu=i(),m(Tt.$$.fragment),xu=i(),cr=a("p"),Au=s("Finally run the following command from the root of the repository:"),Lu=i(),m(St.$$.fragment),Du=i(),Ot=a("p"),Nu=s("This will build the documentation in the "),pr=a("code"),qu=s("~/tmp/test-build"),Ru=s(` folder where you can inspect the generated
Markdown files with your favorite editor. You won\u2019t be able to see the final rendering on the website
before your PR is merged, we are actively working on adding a tool for this.`),Wu=i(),fe=a("p"),Fu=s("Once you\u2019re happy with your changes, add changed files using "),mr=a("code"),Hu=s("git add"),ju=s(` and
make a commit with `),yr=a("code"),Gu=s("git commit"),Mu=s(" to record your changes locally:"),Uu=i(),m(Ct.$$.fragment),Yu=i(),xt=a("p"),Bu=s("Please write "),At=a("a"),zu=s(`good commit
messages`),Ju=s("."),Ku=i(),gr=a("p"),Qu=s(`It is a good idea to sync your copy of the code with the original
repository regularly. This way you can quickly account for changes:`),Zu=i(),m(Lt.$$.fragment),Vu=i(),vr=a("p"),Xu=s("Push the changes to your account using:"),ef=i(),m(Dt.$$.fragment),tf=i(),wr=a("li"),Nt=a("p"),of=s("Once you are satisfied ("),br=a("strong"),sf=s("and the checklist below is happy too"),rf=s(`), go to the
webpage of your fork on GitHub. Click on \u2018Pull request\u2019 to send your changes
to the project maintainers for review.`),af=i(),$r=a("li"),_r=a("p"),lf=s(`It\u2019s ok if maintainers ask you for changes. It happens to core contributors
too! So everyone can see the changes in the Pull request, work in your local
branch and push the changes to your fork. They will automatically appear in
the pull request.`),el=i(),de=a("h3"),Oe=a("a"),kr=a("span"),m(qt.$$.fragment),nf=i(),Er=a("span"),hf=s("Checklist"),tl=i(),k=a("ol"),Pr=a("li"),uf=s("The title of your pull request should be a summary of its contribution;"),ff=i(),Ir=a("li"),df=s(`If your pull request addresses an issue, please mention the issue number in
the pull request description to make sure they are linked (and people
consulting the issue know you are working on it);`),cf=i(),Rt=a("li"),pf=s("To indicate a work in progress please prefix the title with "),Tr=a("code"),mf=s("[WIP]"),yf=s(`. These
are useful to avoid duplicated work, and to differentiate it from PRs ready
to be merged;`),gf=i(),Sr=a("li"),vf=s("Make sure existing tests pass;"),wf=i(),Io=a("li"),bf=s("Add high-coverage tests. No quality testing = no merge."),ce=a("ul"),Wt=a("li"),$f=s(`If you are adding a new model, make sure that you use
`),Or=a("code"),_f=s("ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,...)"),kf=s(", which triggers the common tests."),Ef=i(),pe=a("li"),Pf=s("If you are adding new "),Cr=a("code"),If=s("@slow"),Tf=s(` tests, make sure they pass using
`),xr=a("code"),Sf=s("RUN_SLOW=1 python -m pytest tests/test_my_new_model.py"),Of=s("."),Cf=i(),Ft=a("li"),xf=s(`If you are adding a new tokenizer, write tests, and make sure
`),Ar=a("code"),Af=s("RUN_SLOW=1 python -m pytest tests/test_tokenization_{your_model_name}.py"),Lf=s(` passes.
CircleCI does not run the slow tests, but github actions does every night!`),Df=i(),Ht=a("li"),Nf=s("All public methods must have informative docstrings that work nicely with sphinx. See "),Lr=a("code"),qf=s("modeling_bert.py"),Rf=s(` for an
example.`),Wf=i(),F=a("li"),Ff=s("Due to the rapidly growing repository, it is important to make sure that no files that would significantly weigh down the repository are added. This includes images, videos and other non-text files. We prefer to leverage a hf.co hosted "),Dr=a("code"),Hf=s("dataset"),jf=s(` like
the ones hosted on `),jt=a("a"),Nr=a("code"),Gf=s("hf-internal-testing"),Mf=s(` in which to place these files and reference
them by URL. We recommend putting them in the following dataset: `),Gt=a("a"),Uf=s("huggingface/documentation-images"),Yf=s(`.
If an external contribution, feel free to add the images to your PR and ask a Hugging Face member to migrate your images
to this dataset.`),ol=i(),Mt=a("p"),Bf=s("See more about the checks run on a pull request in our "),To=a("a"),zf=s("PR guide"),sl=i(),me=a("h3"),Ce=a("a"),qr=a("span"),m(Ut.$$.fragment),Jf=i(),Rr=a("span"),Kf=s("Tests"),rl=i(),B=a("p"),Qf=s(`An extensive test suite is included to test the library behavior and several examples. Library tests can be found in
the `),Yt=a("a"),Zf=s("tests folder"),Vf=s(` and examples tests in the
`),Bt=a("a"),Xf=s("examples folder"),ed=s("."),al=i(),D=a("p"),td=s("We like "),Wr=a("code"),od=s("pytest"),sd=s(" and "),Fr=a("code"),rd=s("pytest-xdist"),ad=s(` because it\u2019s faster. From the root of the
repository, here\u2019s how to run tests with `),Hr=a("code"),ld=s("pytest"),nd=s(" for the library:"),ll=i(),m(zt.$$.fragment),nl=i(),So=a("p"),id=s("and for the examples:"),il=i(),m(Jt.$$.fragment),hl=i(),N=a("p"),hd=s("In fact, that\u2019s how "),jr=a("code"),ud=s("make test"),fd=s(" and "),Gr=a("code"),dd=s("make test-examples"),cd=s(" are implemented (sans the "),Mr=a("code"),pd=s("pip install"),md=s(" line)!"),ul=i(),Oo=a("p"),yd=s(`You can specify a smaller set of tests in order to test only the feature
you\u2019re working on.`),fl=i(),z=a("p"),gd=s("By default, slow tests are skipped. Set the "),Ur=a("code"),vd=s("RUN_SLOW"),wd=s(` environment variable to
`),Yr=a("code"),bd=s("yes"),$d=s(` to run them. This will download many gigabytes of models \u2014 make sure you
have enough disk space and a good Internet connection, or a lot of patience!`),dl=i(),m(Kt.$$.fragment),cl=i(),J=a("p"),_d=s("Likewise, set the "),Br=a("code"),kd=s("RUN_CUSTOM_TOKENIZERS"),Ed=s(" environment variable to "),zr=a("code"),Pd=s("yes"),Id=s(` to run
tests for custom tokenizers, which don\u2019t run by default either.`),pl=i(),K=a("p"),Td=s("\u{1F917} Transformers uses "),Jr=a("code"),Sd=s("pytest"),Od=s(` as a test runner only. It doesn\u2019t use any
`),Kr=a("code"),Cd=s("pytest"),xd=s("-specific features in the test suite itself."),ml=i(),Q=a("p"),Ad=s("This means "),Qr=a("code"),Ld=s("unittest"),Dd=s(` is fully supported. Here\u2019s how to run tests with
`),Zr=a("code"),Nd=s("unittest"),qd=s(":"),yl=i(),m(Qt.$$.fragment),gl=i(),ye=a("h3"),xe=a("a"),Vr=a("span"),m(Zt.$$.fragment),Rd=i(),Xr=a("span"),Wd=s("Style guide"),vl=i(),Z=a("p"),Fd=s("For documentation strings, \u{1F917} Transformers follows the "),Vt=a("a"),Hd=s("google style"),jd=s(`.
Check our `),Xt=a("a"),Gd=s("documentation writing guide"),Md=s(`
for more information.`),wl=i(),ge=a("h4"),Ae=a("a"),ea=a("span"),m(eo.$$.fragment),Ud=i(),ta=a("span"),Yd=s("This guide was heavily inspired by the awesome [scikit-learn guide to contributing](https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md)"),bl=i(),ve=a("h3"),Le=a("a"),oa=a("span"),m(to.$$.fragment),Bd=i(),sa=a("span"),zd=s("Develop on Windows"),$l=i(),V=a("p"),Jd=s("On windows, you need to configure git to transform Windows "),ra=a("code"),Kd=s("CRLF"),Qd=s(" line endings to Linux "),aa=a("code"),Zd=s("LF"),Vd=s(" line endings:"),_l=i(),Co=a("p"),la=a("code"),Xd=s("git config core.autocrlf input"),kl=i(),xo=a("p"),ec=s("One way one can run the make command on Window is to pass by MSYS2:"),El=i(),q=a("ol"),Ao=a("li"),oo=a("a"),tc=s("Download MSYS2"),oc=s(", we assume to have it installed in C:\\msys64"),sc=i(),na=a("li"),rc=s("Open the command line C:\\msys64\\msys2.exe (it should be available from the start menu)"),ac=i(),De=a("li"),lc=s("Run in the shell: "),ia=a("code"),nc=s("pacman -Syu"),ic=s(" and install make with "),ha=a("code"),hc=s("pacman -S make"),uc=i(),so=a("li"),fc=s("Add "),ua=a("code"),dc=s("C:\\msys64\\usr\\bin"),cc=s(" to your PATH environment variable."),Pl=i(),Ne=a("p"),pc=s("You can now use "),fa=a("code"),mc=s("make"),yc=s(" from any terminal (Powershell, cmd.exe, etc) \u{1F389}"),Il=i(),we=a("h3"),qe=a("a"),da=a("span"),m(ro.$$.fragment),gc=i(),ca=a("span"),vc=s("Syncing forked master with upstream (HuggingFace) master"),Tl=i(),Lo=a("p"),wc=s(`To avoid pinging the upstream repository which adds reference notes to each upstream PR and sends unnecessary notifications to the developers involved in these PRs,
when syncing the master branch of a forked repository, please, follow these steps:`),Sl=i(),Re=a("ol"),pa=a("li"),bc=s("When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead merge directly into the forked master."),$c=i(),ma=a("li"),_c=s("If a PR is absolutely necessary, use the following steps after checking out your branch:"),Ol=i(),m(ao.$$.fragment),this.h()},l(t){const u=Yy('[data-svelte="svelte-1phssyn"]',document.head);H=l(u,"META",{name:!0,content:!0}),u.forEach(o),lo=h(t),x=l(t,"H1",{class:!0});var xl=n(x);W=l(xl,"A",{id:!0,class:!0,href:!0});var Sc=n(W);Xo=l(Sc,"SPAN",{});var Oc=n(Xo);y(Ye.$$.fragment,Oc),Oc.forEach(o),Sc.forEach(o),dn=h(xl),es=l(xl,"SPAN",{});var Cc=n(es);cn=r(Cc,"How to contribute to transformers?"),Cc.forEach(o),xl.forEach(o),va=h(t),no=l(t,"P",{});var xc=n(no);pn=r(xc,`Everyone is welcome to contribute, and we value everybody\u2019s contribution. Code
is thus not the only way to help the community. Answering questions, helping
others, reaching out and improving the documentations are immensely valuable to
the community.`),xc.forEach(o),wa=h(t),io=l(t,"P",{});var Ac=n(io);mn=r(Ac,`It also helps us if you spread the word: reference the library from blog posts
on the awesome projects it made possible, shout out on Twitter every time it has
helped you, or simply star the repo to say \u201Cthank you\u201D.`),Ac.forEach(o),ba=h(t),be=l(t,"P",{});var Al=n(be);yn=r(Al,`Whichever way you choose to contribute, please be mindful to respect our
`),Be=l(Al,"A",{href:!0,rel:!0});var Lc=n(Be);gn=r(Lc,"code of conduct"),Lc.forEach(o),vn=r(Al,"."),Al.forEach(o),$a=h(t),te=l(t,"H2",{class:!0});var Ll=n(te);$e=l(Ll,"A",{id:!0,class:!0,href:!0});var Dc=n($e);ts=l(Dc,"SPAN",{});var Nc=n(ts);y(ze.$$.fragment,Nc),Nc.forEach(o),Dc.forEach(o),wn=h(Ll),os=l(Ll,"SPAN",{});var qc=n(os);bn=r(qc,"You can contribute in so many ways!"),qc.forEach(o),Ll.forEach(o),_a=h(t),ho=l(t,"P",{});var Rc=n(ho);$n=r(Rc,"There are 4 ways you can contribute to transformers:"),Rc.forEach(o),ka=h(t),A=l(t,"UL",{});var We=n(A);ss=l(We,"LI",{});var Wc=n(ss);_n=r(Wc,"Fixing outstanding issues with the existing code;"),Wc.forEach(o),kn=h(We),rs=l(We,"LI",{});var Fc=n(rs);En=r(Fc,"Implementing new models;"),Fc.forEach(o),Pn=h(We),as=l(We,"LI",{});var Hc=n(as);In=r(Hc,"Contributing to the examples or to the documentation;"),Hc.forEach(o),Tn=h(We),ls=l(We,"LI",{});var jc=n(ls);Sn=r(jc,"Submitting issues related to bugs or desired new features."),jc.forEach(o),We.forEach(o),Ea=h(t),L=l(t,"P",{});var Fe=n(L);On=r(Fe,"In particular there is a special "),Je=l(Fe,"A",{href:!0,rel:!0});var Gc=n(Je);Cn=r(Gc,`Good First
Issue`),Gc.forEach(o),xn=r(Fe,` listing. It will give you a list of
open Issues that are open to anybody to work on. Just comment in the issue that you\u2019d like to work
on it. In that same listing you will also find some Issues with `),ns=l(Fe,"CODE",{});var Mc=n(ns);An=r(Mc,"Good Second Issue"),Mc.forEach(o),Ln=r(Fe,` label. These are
typically slightly more complicated than the Issues with just `),is=l(Fe,"CODE",{});var Uc=n(is);Dn=r(Uc,"Good First Issue"),Uc.forEach(o),Nn=r(Fe,` label. But if you
feel you know what you\u2019re doing, go for it.`),Fe.forEach(o),Pa=h(t),uo=l(t,"P",{});var Yc=n(uo);hs=l(Yc,"EM",{});var Bc=n(hs);qn=r(Bc,"All are equally valuable to the community."),Bc.forEach(o),Yc.forEach(o),Ia=h(t),oe=l(t,"H2",{class:!0});var Dl=n(oe);_e=l(Dl,"A",{id:!0,class:!0,href:!0});var zc=n(_e);us=l(zc,"SPAN",{});var Jc=n(us);y(Ke.$$.fragment,Jc),Jc.forEach(o),zc.forEach(o),Rn=h(Dl),fs=l(Dl,"SPAN",{});var Kc=n(fs);Wn=r(Kc,"Submitting a new issue or feature request"),Kc.forEach(o),Dl.forEach(o),Ta=h(t),fo=l(t,"P",{});var Qc=n(fo);Fn=r(Qc,`Do your best to follow these guidelines when submitting an issue or a feature
request. It will make it easier for us to come back to you quickly and with good
feedback.`),Qc.forEach(o),Sa=h(t),se=l(t,"H3",{class:!0});var Nl=n(se);ke=l(Nl,"A",{id:!0,class:!0,href:!0});var Zc=n(ke);ds=l(Zc,"SPAN",{});var Vc=n(ds);y(Qe.$$.fragment,Vc),Vc.forEach(o),Zc.forEach(o),Hn=h(Nl),cs=l(Nl,"SPAN",{});var Xc=n(cs);jn=r(Xc,"Did you find a bug?"),Xc.forEach(o),Nl.forEach(o),Oa=h(t),co=l(t,"P",{});var ep=n(co);Gn=r(ep,`The \u{1F917} Transformers library is robust and reliable thanks to the users who notify us of
the problems they encounter. So thank you for reporting an issue.`),ep.forEach(o),Ca=h(t),Ee=l(t,"P",{});var ql=n(Ee);Mn=r(ql,"First, we would really appreciate it if you could "),ps=l(ql,"STRONG",{});var tp=n(ps);Un=r(tp,`make sure the bug was not
already reported`),tp.forEach(o),Yn=r(ql," (use the search bar on Github under Issues)."),ql.forEach(o),xa=h(t),po=l(t,"P",{});var op=n(po);Bn=r(op,"Did not find it? :( So we can act quickly on it, please follow these steps:"),op.forEach(o),Aa=h(t),j=l(t,"UL",{});var Do=n(j);S=l(Do,"LI",{});var X=n(S);zn=r(X,"Include your "),ms=l(X,"STRONG",{});var sp=n(ms);Jn=r(sp,"OS type and version"),sp.forEach(o),Kn=r(X,", the versions of "),ys=l(X,"STRONG",{});var rp=n(ys);Qn=r(rp,"Python"),rp.forEach(o),Zn=r(X,", "),gs=l(X,"STRONG",{});var ap=n(gs);Vn=r(ap,"PyTorch"),ap.forEach(o),Xn=r(X,` and
`),vs=l(X,"STRONG",{});var lp=n(vs);ei=r(lp,"Tensorflow"),lp.forEach(o),ti=r(X," when applicable;"),X.forEach(o),oi=h(Do),ws=l(Do,"LI",{});var np=n(ws);si=r(np,`A short, self-contained, code snippet that allows us to reproduce the bug in
less than 30s;`),np.forEach(o),ri=h(Do),Ze=l(Do,"LI",{});var Rl=n(Ze);ai=r(Rl,"Provide the "),bs=l(Rl,"EM",{});var ip=n(bs);li=r(ip,"full"),ip.forEach(o),ni=r(Rl," traceback if an exception is raised."),Rl.forEach(o),Do.forEach(o),La=h(t),mo=l(t,"P",{});var hp=n(mo);ii=r(hp,"To get the OS and software versions automatically, you can run the following command:"),hp.forEach(o),Da=h(t),y(Ve.$$.fragment,t),Na=h(t),yo=l(t,"P",{});var up=n(yo);hi=r(up,"or from the root of the repository the following command:"),up.forEach(o),qa=h(t),y(Xe.$$.fragment,t),Ra=h(t),re=l(t,"H3",{class:!0});var Wl=n(re);Pe=l(Wl,"A",{id:!0,class:!0,href:!0});var fp=n(Pe);$s=l(fp,"SPAN",{});var dp=n($s);y(et.$$.fragment,dp),dp.forEach(o),fp.forEach(o),ui=h(Wl),_s=l(Wl,"SPAN",{});var cp=n(_s);fi=r(cp,"Do you want to implement a new model?"),cp.forEach(o),Wl.forEach(o),Wa=h(t),go=l(t,"P",{});var pp=n(go);di=r(pp,"Awesome! Please provide the following information:"),pp.forEach(o),Fa=h(t),G=l(t,"UL",{});var No=n(G);ks=l(No,"LI",{});var mp=n(ks);ci=r(mp,"Short description of the model and link to the paper;"),mp.forEach(o),pi=h(No),Es=l(No,"LI",{});var yp=n(Es);mi=r(yp,"Link to the implementation if it is open-source;"),yp.forEach(o),yi=h(No),Ps=l(No,"LI",{});var gp=n(Ps);gi=r(gp,"Link to the model weights if they are available."),gp.forEach(o),No.forEach(o),Ha=h(t),vo=l(t,"P",{});var vp=n(vo);vi=r(vp,`If you are willing to contribute the model yourself, let us know so we can best
guide you.`),vp.forEach(o),ja=h(t),M=l(t,"P",{});var qo=n(M);wi=r(qo,"We have added a "),Is=l(qo,"STRONG",{});var wp=n(Is);bi=r(wp,"detailed guide and templates"),wp.forEach(o),$i=r(qo,` to guide you in the process of adding a new model. You can find them
in the `),tt=l(qo,"A",{href:!0,rel:!0});var bp=n(tt);Ts=l(bp,"CODE",{});var $p=n(Ts);_i=r($p,"templates"),$p.forEach(o),bp.forEach(o),ki=r(qo," folder."),qo.forEach(o),Ga=h(t),ae=l(t,"H3",{class:!0});var Fl=n(ae);Ie=l(Fl,"A",{id:!0,class:!0,href:!0});var _p=n(Ie);Ss=l(_p,"SPAN",{});var kp=n(Ss);y(ot.$$.fragment,kp),kp.forEach(o),_p.forEach(o),Ei=h(Fl),Os=l(Fl,"SPAN",{});var Ep=n(Os);Pi=r(Ep,"Do you want a new feature (that is not a model)?"),Ep.forEach(o),Fl.forEach(o),Ma=h(t),wo=l(t,"P",{});var Pp=n(wo);Ii=r(Pp,"A world-class feature request addresses the following points:"),Pp.forEach(o),Ua=h(t),bo=l(t,"OL",{});var Ip=n(bo);Cs=l(Ip,"LI",{});var Tp=n(Cs);Ti=r(Tp,"Motivation first:"),Tp.forEach(o),Ip.forEach(o),Ya=h(t),U=l(t,"UL",{});var Ro=n(U);xs=l(Ro,"LI",{});var Sp=n(xs);Si=r(Sp,`Is it related to a problem/frustration with the library? If so, please explain
why. Providing a code snippet that demonstrates the problem is best.`),Sp.forEach(o),Oi=h(Ro),As=l(Ro,"LI",{});var Op=n(As);Ci=r(Op,`Is it related to something you would need for a project? We\u2019d love to hear
about it!`),Op.forEach(o),xi=h(Ro),Ls=l(Ro,"LI",{});var Cp=n(Ls);Ai=r(Cp,`Is it something you worked on and think could benefit the community?
Awesome! Tell us what problem it solved for you.`),Cp.forEach(o),Ro.forEach(o),Ba=h(t),O=l(t,"OL",{start:!0});var He=n(O);st=l(He,"LI",{});var Hl=n(st);Li=r(Hl,"Write a "),Ds=l(Hl,"EM",{});var xp=n(Ds);Di=r(xp,"full paragraph"),xp.forEach(o),Ni=r(Hl," describing the feature;"),Hl.forEach(o),qi=h(He),rt=l(He,"LI",{});var jl=n(rt);Ri=r(jl,"Provide a "),Ns=l(jl,"STRONG",{});var Ap=n(Ns);Wi=r(Ap,"code snippet"),Ap.forEach(o),Fi=r(jl," that demonstrates its future use;"),jl.forEach(o),Hi=h(He),qs=l(He,"LI",{});var Lp=n(qs);ji=r(Lp,"In case this is related to a paper, please attach a link;"),Lp.forEach(o),Gi=h(He),Rs=l(He,"LI",{});var Dp=n(Rs);Mi=r(Dp,"Attach any additional information (drawings, screenshots, etc.) you think may help."),Dp.forEach(o),He.forEach(o),za=h(t),$o=l(t,"P",{});var Np=n($o);Ui=r(Np,`If your issue is well written we\u2019re already 80% of the way there by the time you
post it.`),Np.forEach(o),Ja=h(t),Y=l(t,"P",{});var Wo=n(Y);Yi=r(Wo,"We have added "),Ws=l(Wo,"STRONG",{});var qp=n(Ws);Bi=r(qp,"templates"),qp.forEach(o),zi=r(Wo,` to guide you in the process of adding a new example script for training or testing the
models in the library. You can find them in the `),at=l(Wo,"A",{href:!0,rel:!0});var Rp=n(at);Fs=l(Rp,"CODE",{});var Wp=n(Fs);Ji=r(Wp,"templates"),Wp.forEach(o),Rp.forEach(o),Ki=r(Wo,`
folder.`),Wo.forEach(o),Ka=h(t),le=l(t,"H2",{class:!0});var Gl=n(le);Te=l(Gl,"A",{id:!0,class:!0,href:!0});var Fp=n(Te);Hs=l(Fp,"SPAN",{});var Hp=n(Hs);y(lt.$$.fragment,Hp),Hp.forEach(o),Fp.forEach(o),Qi=h(Gl),js=l(Gl,"SPAN",{});var jp=n(js);Zi=r(jp,"Start contributing! (Pull Requests)"),jp.forEach(o),Gl.forEach(o),Qa=h(t),_o=l(t,"P",{});var Gp=n(_o);Vi=r(Gp,`Before writing code, we strongly advise you to search through the existing PRs or
issues to make sure that nobody is already working on the same thing. If you are
unsure, it is always a good idea to open an issue to get some feedback.`),Gp.forEach(o),Za=h(t),P=l(t,"P",{});var ee=n(P);Xi=r(ee,"You will need basic "),Gs=l(ee,"CODE",{});var Mp=n(Gs);eh=r(Mp,"git"),Mp.forEach(o),th=r(ee,` proficiency to be able to contribute to
\u{1F917} Transformers. `),Ms=l(ee,"CODE",{});var Up=n(Ms);oh=r(Up,"git"),Up.forEach(o),sh=r(ee,` is not the easiest tool to use but it has the greatest
manual. Type `),Us=l(ee,"CODE",{});var Yp=n(Us);rh=r(Yp,"git --help"),Yp.forEach(o),ah=r(ee," in a shell and enjoy. If you prefer books, "),nt=l(ee,"A",{href:!0,rel:!0});var Bp=n(nt);lh=r(Bp,`Pro
Git`),Bp.forEach(o),nh=r(ee," is a very good reference."),ee.forEach(o),Va=h(t),ko=l(t,"P",{});var zp=n(ko);ih=r(zp,"Follow these steps to start contributing:"),zp.forEach(o),Xa=h(t),_=l(t,"OL",{});var I=n(_);Ys=l(I,"LI",{});var Jp=n(Ys);it=l(Jp,"P",{});var Ml=n(it);hh=r(Ml,"Fork the "),ht=l(Ml,"A",{href:!0,rel:!0});var Kp=n(ht);uh=r(Kp,"repository"),Kp.forEach(o),fh=r(Ml,` by
clicking on the \u2018Fork\u2019 button on the repository\u2019s page. This creates a copy of the code
under your GitHub user account.`),Ml.forEach(o),Jp.forEach(o),dh=h(I),ut=l(I,"LI",{});var Ul=n(ut);Bs=l(Ul,"P",{});var Qp=n(Bs);ch=r(Qp,"Clone your fork to your local disk, and add the base repository as a remote:"),Qp.forEach(o),ph=h(Ul),y(ft.$$.fragment,Ul),Ul.forEach(o),mh=h(I),ne=l(I,"LI",{});var Fo=n(ne);zs=l(Fo,"P",{});var Zp=n(zs);yh=r(Zp,"Create a new branch to hold your development changes:"),Zp.forEach(o),gh=h(Fo),y(dt.$$.fragment,Fo),vh=h(Fo),Se=l(Fo,"P",{});var ya=n(Se);Js=l(ya,"STRONG",{});var Vp=n(Js);wh=r(Vp,"Do not"),Vp.forEach(o),bh=r(ya," work on the "),Ks=l(ya,"CODE",{});var Xp=n(Ks);$h=r(Xp,"master"),Xp.forEach(o),_h=r(ya," branch."),ya.forEach(o),Fo.forEach(o),kh=h(I),E=l(I,"LI",{});var R=n(E);Qs=l(R,"P",{});var em=n(Qs);Eh=r(em,"Set up a development environment by running the following command in a virtual environment:"),em.forEach(o),Ph=h(R),y(ct.$$.fragment,R),Ih=h(R),ie=l(R,"P",{});var Ho=n(ie);Th=r(Ho,`(If transformers was already installed in the virtual environment, remove
it with `),Zs=l(Ho,"CODE",{});var tm=n(Zs);Sh=r(tm,"pip uninstall transformers"),tm.forEach(o),Oh=r(Ho,` before reinstalling it in editable
mode with the `),Vs=l(Ho,"CODE",{});var om=n(Vs);Ch=r(om,"-e"),om.forEach(o),xh=r(Ho," flag.)"),Ho.forEach(o),Ah=h(R),pt=l(R,"P",{});var Yl=n(pt);Lh=r(Yl,"To run the full test suite, you might need the additional dependency on "),Xs=l(Yl,"CODE",{});var sm=n(Xs);Dh=r(sm,"datasets"),sm.forEach(o),Nh=r(Yl,` which requires a separate source
install:`),Yl.forEach(o),qh=h(R),y(mt.$$.fragment,R),Rh=h(R),he=l(R,"P",{});var jo=n(he);Wh=r(jo,"If you have already cloned that repo, you might need to "),er=l(jo,"CODE",{});var rm=n(er);Fh=r(rm,"git pull"),rm.forEach(o),Hh=r(jo," to get the most recent changes in the "),tr=l(jo,"CODE",{});var am=n(tr);jh=r(am,"datasets"),am.forEach(o),Gh=r(jo,`
library.`),jo.forEach(o),R.forEach(o),Mh=h(I),c=l(I,"LI",{});var p=n(c);or=l(p,"P",{});var lm=n(or);Uh=r(lm,"Develop the features on your branch."),lm.forEach(o),Yh=h(p),sr=l(p,"P",{});var nm=n(sr);Bh=r(nm,`As you work on the features, you should make sure that the test suite
passes. You should run the tests impacted by your changes like this:`),nm.forEach(o),zh=h(p),y(yt.$$.fragment,p),Jh=h(p),rr=l(p,"P",{});var im=n(rr);Kh=r(im,`You can also run the full suite with the following command, but it takes
a beefy machine to produce a result in a decent amount of time now that
Transformers has grown a lot. Here is the command for it:`),im.forEach(o),Qh=h(p),y(gt.$$.fragment,p),Zh=h(p),Eo=l(p,"P",{});var kc=n(Eo);Vh=r(kc,`For more information about tests, check out the
`),vt=l(kc,"A",{href:!0,rel:!0});var hm=n(vt);Xh=r(hm,"dedicated documentation"),hm.forEach(o),kc.forEach(o),eu=h(p),ue=l(p,"P",{});var Go=n(ue);tu=r(Go,"\u{1F917} Transformers relies on "),ar=l(Go,"CODE",{});var um=n(ar);ou=r(um,"black"),um.forEach(o),su=r(Go," and "),lr=l(Go,"CODE",{});var fm=n(lr);ru=r(fm,"isort"),fm.forEach(o),au=r(Go,` to format its source code
consistently. After you make changes, apply automatic style corrections and code verifications
that can\u2019t be automated in one go with:`),Go.forEach(o),lu=h(p),y(wt.$$.fragment,p),nu=h(p),nr=l(p,"P",{});var dm=n(nr);iu=r(dm,"This target is also optimized to only work with files modified by the PR you\u2019re working on."),dm.forEach(o),hu=h(p),ir=l(p,"P",{});var cm=n(ir);uu=r(cm,`If you prefer to run the checks one after the other, the following command apply the
style corrections:`),cm.forEach(o),fu=h(p),y(bt.$$.fragment,p),du=h(p),$t=l(p,"P",{});var Bl=n($t);cu=r(Bl,"\u{1F917} Transformers also uses "),hr=l(Bl,"CODE",{});var pm=n(hr);pu=r(pm,"flake8"),pm.forEach(o),mu=r(Bl,` and a few custom scripts to check for coding mistakes. Quality
control runs in CI, however you can also run the same checks with:`),Bl.forEach(o),yu=h(p),y(_t.$$.fragment,p),gu=h(p),ur=l(p,"P",{});var mm=n(ur);vu=r(mm,`Finally we have a lot of scripts that check we didn\u2019t forget to update
some files when adding a new model, that you can run with`),mm.forEach(o),wu=h(p),y(kt.$$.fragment,p),bu=h(p),Po=l(p,"P",{});var Ec=n(Po);$u=r(Ec,`To learn more about those checks and how to fix any issue with them, check out the
`),Et=l(Ec,"A",{href:!0,rel:!0});var ym=n(Et);_u=r(ym,"documentation"),ym.forEach(o),Ec.forEach(o),ku=h(p),Pt=l(p,"P",{});var zl=n(Pt);Eu=r(zl,"If you\u2019re modifying documents under "),fr=l(zl,"CODE",{});var gm=n(fr);Pu=r(gm,"docs/source"),gm.forEach(o),Iu=r(zl,`, make sure to validate that
they can still be built. This check also runs in CI. To run a local check
make sure you have installed the documentation builder requirements. First you will need to clone the
repository containing our tools to build the documentation:`),zl.forEach(o),Tu=h(p),y(It.$$.fragment,p),Su=h(p),dr=l(p,"P",{});var vm=n(dr);Ou=r(vm,"Then, make sure you have all the dependencies to be able to build the doc with:"),vm.forEach(o),Cu=h(p),y(Tt.$$.fragment,p),xu=h(p),cr=l(p,"P",{});var wm=n(cr);Au=r(wm,"Finally run the following command from the root of the repository:"),wm.forEach(o),Lu=h(p),y(St.$$.fragment,p),Du=h(p),Ot=l(p,"P",{});var Jl=n(Ot);Nu=r(Jl,"This will build the documentation in the "),pr=l(Jl,"CODE",{});var bm=n(pr);qu=r(bm,"~/tmp/test-build"),bm.forEach(o),Ru=r(Jl,` folder where you can inspect the generated
Markdown files with your favorite editor. You won\u2019t be able to see the final rendering on the website
before your PR is merged, we are actively working on adding a tool for this.`),Jl.forEach(o),Wu=h(p),fe=l(p,"P",{});var Mo=n(fe);Fu=r(Mo,"Once you\u2019re happy with your changes, add changed files using "),mr=l(Mo,"CODE",{});var $m=n(mr);Hu=r($m,"git add"),$m.forEach(o),ju=r(Mo,` and
make a commit with `),yr=l(Mo,"CODE",{});var _m=n(yr);Gu=r(_m,"git commit"),_m.forEach(o),Mu=r(Mo," to record your changes locally:"),Mo.forEach(o),Uu=h(p),y(Ct.$$.fragment,p),Yu=h(p),xt=l(p,"P",{});var Kl=n(xt);Bu=r(Kl,"Please write "),At=l(Kl,"A",{href:!0,rel:!0});var km=n(At);zu=r(km,`good commit
messages`),km.forEach(o),Ju=r(Kl,"."),Kl.forEach(o),Ku=h(p),gr=l(p,"P",{});var Em=n(gr);Qu=r(Em,`It is a good idea to sync your copy of the code with the original
repository regularly. This way you can quickly account for changes:`),Em.forEach(o),Zu=h(p),y(Lt.$$.fragment,p),Vu=h(p),vr=l(p,"P",{});var Pm=n(vr);Xu=r(Pm,"Push the changes to your account using:"),Pm.forEach(o),ef=h(p),y(Dt.$$.fragment,p),p.forEach(o),tf=h(I),wr=l(I,"LI",{});var Im=n(wr);Nt=l(Im,"P",{});var Ql=n(Nt);of=r(Ql,"Once you are satisfied ("),br=l(Ql,"STRONG",{});var Tm=n(br);sf=r(Tm,"and the checklist below is happy too"),Tm.forEach(o),rf=r(Ql,`), go to the
webpage of your fork on GitHub. Click on \u2018Pull request\u2019 to send your changes
to the project maintainers for review.`),Ql.forEach(o),Im.forEach(o),af=h(I),$r=l(I,"LI",{});var Sm=n($r);_r=l(Sm,"P",{});var Om=n(_r);lf=r(Om,`It\u2019s ok if maintainers ask you for changes. It happens to core contributors
too! So everyone can see the changes in the Pull request, work in your local
branch and push the changes to your fork. They will automatically appear in
the pull request.`),Om.forEach(o),Sm.forEach(o),I.forEach(o),el=h(t),de=l(t,"H3",{class:!0});var Zl=n(de);Oe=l(Zl,"A",{id:!0,class:!0,href:!0});var Cm=n(Oe);kr=l(Cm,"SPAN",{});var xm=n(kr);y(qt.$$.fragment,xm),xm.forEach(o),Cm.forEach(o),nf=h(Zl),Er=l(Zl,"SPAN",{});var Am=n(Er);hf=r(Am,"Checklist"),Am.forEach(o),Zl.forEach(o),tl=h(t),k=l(t,"OL",{});var T=n(k);Pr=l(T,"LI",{});var Lm=n(Pr);uf=r(Lm,"The title of your pull request should be a summary of its contribution;"),Lm.forEach(o),ff=h(T),Ir=l(T,"LI",{});var Dm=n(Ir);df=r(Dm,`If your pull request addresses an issue, please mention the issue number in
the pull request description to make sure they are linked (and people
consulting the issue know you are working on it);`),Dm.forEach(o),cf=h(T),Rt=l(T,"LI",{});var Vl=n(Rt);pf=r(Vl,"To indicate a work in progress please prefix the title with "),Tr=l(Vl,"CODE",{});var Nm=n(Tr);mf=r(Nm,"[WIP]"),Nm.forEach(o),yf=r(Vl,`. These
are useful to avoid duplicated work, and to differentiate it from PRs ready
to be merged;`),Vl.forEach(o),gf=h(T),Sr=l(T,"LI",{});var qm=n(Sr);vf=r(qm,"Make sure existing tests pass;"),qm.forEach(o),wf=h(T),Io=l(T,"LI",{});var Pc=n(Io);bf=r(Pc,"Add high-coverage tests. No quality testing = no merge."),ce=l(Pc,"UL",{});var Uo=n(ce);Wt=l(Uo,"LI",{});var Xl=n(Wt);$f=r(Xl,`If you are adding a new model, make sure that you use
`),Or=l(Xl,"CODE",{});var Rm=n(Or);_f=r(Rm,"ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,...)"),Rm.forEach(o),kf=r(Xl,", which triggers the common tests."),Xl.forEach(o),Ef=h(Uo),pe=l(Uo,"LI",{});var Yo=n(pe);Pf=r(Yo,"If you are adding new "),Cr=l(Yo,"CODE",{});var Wm=n(Cr);If=r(Wm,"@slow"),Wm.forEach(o),Tf=r(Yo,` tests, make sure they pass using
`),xr=l(Yo,"CODE",{});var Fm=n(xr);Sf=r(Fm,"RUN_SLOW=1 python -m pytest tests/test_my_new_model.py"),Fm.forEach(o),Of=r(Yo,"."),Yo.forEach(o),Cf=h(Uo),Ft=l(Uo,"LI",{});var en=n(Ft);xf=r(en,`If you are adding a new tokenizer, write tests, and make sure
`),Ar=l(en,"CODE",{});var Hm=n(Ar);Af=r(Hm,"RUN_SLOW=1 python -m pytest tests/test_tokenization_{your_model_name}.py"),Hm.forEach(o),Lf=r(en,` passes.
CircleCI does not run the slow tests, but github actions does every night!`),en.forEach(o),Uo.forEach(o),Pc.forEach(o),Df=h(T),Ht=l(T,"LI",{});var tn=n(Ht);Nf=r(tn,"All public methods must have informative docstrings that work nicely with sphinx. See "),Lr=l(tn,"CODE",{});var jm=n(Lr);qf=r(jm,"modeling_bert.py"),jm.forEach(o),Rf=r(tn,` for an
example.`),tn.forEach(o),Wf=h(T),F=l(T,"LI",{});var je=n(F);Ff=r(je,"Due to the rapidly growing repository, it is important to make sure that no files that would significantly weigh down the repository are added. This includes images, videos and other non-text files. We prefer to leverage a hf.co hosted "),Dr=l(je,"CODE",{});var Gm=n(Dr);Hf=r(Gm,"dataset"),Gm.forEach(o),jf=r(je,` like
the ones hosted on `),jt=l(je,"A",{href:!0,rel:!0});var Mm=n(jt);Nr=l(Mm,"CODE",{});var Um=n(Nr);Gf=r(Um,"hf-internal-testing"),Um.forEach(o),Mm.forEach(o),Mf=r(je,` in which to place these files and reference
them by URL. We recommend putting them in the following dataset: `),Gt=l(je,"A",{href:!0,rel:!0});var Ym=n(Gt);Uf=r(Ym,"huggingface/documentation-images"),Ym.forEach(o),Yf=r(je,`.
If an external contribution, feel free to add the images to your PR and ask a Hugging Face member to migrate your images
to this dataset.`),je.forEach(o),T.forEach(o),ol=h(t),Mt=l(t,"P",{});var Ic=n(Mt);Bf=r(Ic,"See more about the checks run on a pull request in our "),To=l(Ic,"A",{href:!0});var Bm=n(To);zf=r(Bm,"PR guide"),Bm.forEach(o),Ic.forEach(o),sl=h(t),me=l(t,"H3",{class:!0});var on=n(me);Ce=l(on,"A",{id:!0,class:!0,href:!0});var zm=n(Ce);qr=l(zm,"SPAN",{});var Jm=n(qr);y(Ut.$$.fragment,Jm),Jm.forEach(o),zm.forEach(o),Jf=h(on),Rr=l(on,"SPAN",{});var Km=n(Rr);Kf=r(Km,"Tests"),Km.forEach(o),on.forEach(o),rl=h(t),B=l(t,"P",{});var Bo=n(B);Qf=r(Bo,`An extensive test suite is included to test the library behavior and several examples. Library tests can be found in
the `),Yt=l(Bo,"A",{href:!0,rel:!0});var Qm=n(Yt);Zf=r(Qm,"tests folder"),Qm.forEach(o),Vf=r(Bo,` and examples tests in the
`),Bt=l(Bo,"A",{href:!0,rel:!0});var Zm=n(Bt);Xf=r(Zm,"examples folder"),Zm.forEach(o),ed=r(Bo,"."),Bo.forEach(o),al=h(t),D=l(t,"P",{});var Ge=n(D);td=r(Ge,"We like "),Wr=l(Ge,"CODE",{});var Vm=n(Wr);od=r(Vm,"pytest"),Vm.forEach(o),sd=r(Ge," and "),Fr=l(Ge,"CODE",{});var Xm=n(Fr);rd=r(Xm,"pytest-xdist"),Xm.forEach(o),ad=r(Ge,` because it\u2019s faster. From the root of the
repository, here\u2019s how to run tests with `),Hr=l(Ge,"CODE",{});var ey=n(Hr);ld=r(ey,"pytest"),ey.forEach(o),nd=r(Ge," for the library:"),Ge.forEach(o),ll=h(t),y(zt.$$.fragment,t),nl=h(t),So=l(t,"P",{});var ty=n(So);id=r(ty,"and for the examples:"),ty.forEach(o),il=h(t),y(Jt.$$.fragment,t),hl=h(t),N=l(t,"P",{});var Me=n(N);hd=r(Me,"In fact, that\u2019s how "),jr=l(Me,"CODE",{});var oy=n(jr);ud=r(oy,"make test"),oy.forEach(o),fd=r(Me," and "),Gr=l(Me,"CODE",{});var sy=n(Gr);dd=r(sy,"make test-examples"),sy.forEach(o),cd=r(Me," are implemented (sans the "),Mr=l(Me,"CODE",{});var ry=n(Mr);pd=r(ry,"pip install"),ry.forEach(o),md=r(Me," line)!"),Me.forEach(o),ul=h(t),Oo=l(t,"P",{});var ay=n(Oo);yd=r(ay,`You can specify a smaller set of tests in order to test only the feature
you\u2019re working on.`),ay.forEach(o),fl=h(t),z=l(t,"P",{});var zo=n(z);gd=r(zo,"By default, slow tests are skipped. Set the "),Ur=l(zo,"CODE",{});var ly=n(Ur);vd=r(ly,"RUN_SLOW"),ly.forEach(o),wd=r(zo,` environment variable to
`),Yr=l(zo,"CODE",{});var ny=n(Yr);bd=r(ny,"yes"),ny.forEach(o),$d=r(zo,` to run them. This will download many gigabytes of models \u2014 make sure you
have enough disk space and a good Internet connection, or a lot of patience!`),zo.forEach(o),dl=h(t),y(Kt.$$.fragment,t),cl=h(t),J=l(t,"P",{});var Jo=n(J);_d=r(Jo,"Likewise, set the "),Br=l(Jo,"CODE",{});var iy=n(Br);kd=r(iy,"RUN_CUSTOM_TOKENIZERS"),iy.forEach(o),Ed=r(Jo," environment variable to "),zr=l(Jo,"CODE",{});var hy=n(zr);Pd=r(hy,"yes"),hy.forEach(o),Id=r(Jo,` to run
tests for custom tokenizers, which don\u2019t run by default either.`),Jo.forEach(o),pl=h(t),K=l(t,"P",{});var Ko=n(K);Td=r(Ko,"\u{1F917} Transformers uses "),Jr=l(Ko,"CODE",{});var uy=n(Jr);Sd=r(uy,"pytest"),uy.forEach(o),Od=r(Ko,` as a test runner only. It doesn\u2019t use any
`),Kr=l(Ko,"CODE",{});var fy=n(Kr);Cd=r(fy,"pytest"),fy.forEach(o),xd=r(Ko,"-specific features in the test suite itself."),Ko.forEach(o),ml=h(t),Q=l(t,"P",{});var Qo=n(Q);Ad=r(Qo,"This means "),Qr=l(Qo,"CODE",{});var dy=n(Qr);Ld=r(dy,"unittest"),dy.forEach(o),Dd=r(Qo,` is fully supported. Here\u2019s how to run tests with
`),Zr=l(Qo,"CODE",{});var cy=n(Zr);Nd=r(cy,"unittest"),cy.forEach(o),qd=r(Qo,":"),Qo.forEach(o),yl=h(t),y(Qt.$$.fragment,t),gl=h(t),ye=l(t,"H3",{class:!0});var sn=n(ye);xe=l(sn,"A",{id:!0,class:!0,href:!0});var py=n(xe);Vr=l(py,"SPAN",{});var my=n(Vr);y(Zt.$$.fragment,my),my.forEach(o),py.forEach(o),Rd=h(sn),Xr=l(sn,"SPAN",{});var yy=n(Xr);Wd=r(yy,"Style guide"),yy.forEach(o),sn.forEach(o),vl=h(t),Z=l(t,"P",{});var Zo=n(Z);Fd=r(Zo,"For documentation strings, \u{1F917} Transformers follows the "),Vt=l(Zo,"A",{href:!0,rel:!0});var gy=n(Vt);Hd=r(gy,"google style"),gy.forEach(o),jd=r(Zo,`.
Check our `),Xt=l(Zo,"A",{href:!0,rel:!0});var vy=n(Xt);Gd=r(vy,"documentation writing guide"),vy.forEach(o),Md=r(Zo,`
for more information.`),Zo.forEach(o),wl=h(t),ge=l(t,"H4",{class:!0});var rn=n(ge);Ae=l(rn,"A",{id:!0,class:!0,href:!0});var wy=n(Ae);ea=l(wy,"SPAN",{});var by=n(ea);y(eo.$$.fragment,by),by.forEach(o),wy.forEach(o),Ud=h(rn),ta=l(rn,"SPAN",{});var $y=n(ta);Yd=r($y,"This guide was heavily inspired by the awesome [scikit-learn guide to contributing](https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md)"),$y.forEach(o),rn.forEach(o),bl=h(t),ve=l(t,"H3",{class:!0});var an=n(ve);Le=l(an,"A",{id:!0,class:!0,href:!0});var _y=n(Le);oa=l(_y,"SPAN",{});var ky=n(oa);y(to.$$.fragment,ky),ky.forEach(o),_y.forEach(o),Bd=h(an),sa=l(an,"SPAN",{});var Ey=n(sa);zd=r(Ey,"Develop on Windows"),Ey.forEach(o),an.forEach(o),$l=h(t),V=l(t,"P",{});var Vo=n(V);Jd=r(Vo,"On windows, you need to configure git to transform Windows "),ra=l(Vo,"CODE",{});var Py=n(ra);Kd=r(Py,"CRLF"),Py.forEach(o),Qd=r(Vo," line endings to Linux "),aa=l(Vo,"CODE",{});var Iy=n(aa);Zd=r(Iy,"LF"),Iy.forEach(o),Vd=r(Vo," line endings:"),Vo.forEach(o),_l=h(t),Co=l(t,"P",{});var Ty=n(Co);la=l(Ty,"CODE",{});var Sy=n(la);Xd=r(Sy,"git config core.autocrlf input"),Sy.forEach(o),Ty.forEach(o),kl=h(t),xo=l(t,"P",{});var Oy=n(xo);ec=r(Oy,"One way one can run the make command on Window is to pass by MSYS2:"),Oy.forEach(o),El=h(t),q=l(t,"OL",{});var Ue=n(q);Ao=l(Ue,"LI",{});var Tc=n(Ao);oo=l(Tc,"A",{href:!0,rel:!0});var Cy=n(oo);tc=r(Cy,"Download MSYS2"),Cy.forEach(o),oc=r(Tc,", we assume to have it installed in C:\\msys64"),Tc.forEach(o),sc=h(Ue),na=l(Ue,"LI",{});var xy=n(na);rc=r(xy,"Open the command line C:\\msys64\\msys2.exe (it should be available from the start menu)"),xy.forEach(o),ac=h(Ue),De=l(Ue,"LI",{});var ga=n(De);lc=r(ga,"Run in the shell: "),ia=l(ga,"CODE",{});var Ay=n(ia);nc=r(Ay,"pacman -Syu"),Ay.forEach(o),ic=r(ga," and install make with "),ha=l(ga,"CODE",{});var Ly=n(ha);hc=r(Ly,"pacman -S make"),Ly.forEach(o),ga.forEach(o),uc=h(Ue),so=l(Ue,"LI",{});var ln=n(so);fc=r(ln,"Add "),ua=l(ln,"CODE",{});var Dy=n(ua);dc=r(Dy,"C:\\msys64\\usr\\bin"),Dy.forEach(o),cc=r(ln," to your PATH environment variable."),ln.forEach(o),Ue.forEach(o),Pl=h(t),Ne=l(t,"P",{});var nn=n(Ne);pc=r(nn,"You can now use "),fa=l(nn,"CODE",{});var Ny=n(fa);mc=r(Ny,"make"),Ny.forEach(o),yc=r(nn," from any terminal (Powershell, cmd.exe, etc) \u{1F389}"),nn.forEach(o),Il=h(t),we=l(t,"H3",{class:!0});var hn=n(we);qe=l(hn,"A",{id:!0,class:!0,href:!0});var qy=n(qe);da=l(qy,"SPAN",{});var Ry=n(da);y(ro.$$.fragment,Ry),Ry.forEach(o),qy.forEach(o),gc=h(hn),ca=l(hn,"SPAN",{});var Wy=n(ca);vc=r(Wy,"Syncing forked master with upstream (HuggingFace) master"),Wy.forEach(o),hn.forEach(o),Tl=h(t),Lo=l(t,"P",{});var Fy=n(Lo);wc=r(Fy,`To avoid pinging the upstream repository which adds reference notes to each upstream PR and sends unnecessary notifications to the developers involved in these PRs,
when syncing the master branch of a forked repository, please, follow these steps:`),Fy.forEach(o),Sl=h(t),Re=l(t,"OL",{});var un=n(Re);pa=l(un,"LI",{});var Hy=n(pa);bc=r(Hy,"When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead merge directly into the forked master."),Hy.forEach(o),$c=h(un),ma=l(un,"LI",{});var jy=n(ma);_c=r(jy,"If a PR is absolutely necessary, use the following steps after checking out your branch:"),jy.forEach(o),un.forEach(o),Ol=h(t),y(ao.$$.fragment,t),this.h()},h(){d(H,"name","hf:doc:metadata"),d(H,"content",JSON.stringify(Jy)),d(W,"id","how-to-contribute-to-transformers"),d(W,"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"),d(W,"href","#how-to-contribute-to-transformers"),d(x,"class","relative group"),d(Be,"href","https://github.com/huggingface/transformers/blob/master/CODE_OF_CONDUCT.md"),d(Be,"rel","nofollow"),d($e,"id","you-can-contribute-in-so-many-ways"),d($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"),d($e,"href","#you-can-contribute-in-so-many-ways"),d(te,"class","relative group"),d(Je,"href","https://github.com/huggingface/transformers/contribute"),d(Je,"rel","nofollow"),d(_e,"id","submitting-a-new-issue-or-feature-request"),d(_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"),d(_e,"href","#submitting-a-new-issue-or-feature-request"),d(oe,"class","relative group"),d(ke,"id","did-you-find-a-bug"),d(ke,"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"),d(ke,"href","#did-you-find-a-bug"),d(se,"class","relative group"),d(Pe,"id","do-you-want-to-implement-a-new-model"),d(Pe,"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"),d(Pe,"href","#do-you-want-to-implement-a-new-model"),d(re,"class","relative group"),d(tt,"href","https://github.com/huggingface/transformers/tree/master/templates"),d(tt,"rel","nofollow"),d(Ie,"id","do-you-want-a-new-feature-that-is-not-a-model"),d(Ie,"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"),d(Ie,"href","#do-you-want-a-new-feature-that-is-not-a-model"),d(ae,"class","relative group"),d(O,"start","2"),d(at,"href","https://github.com/huggingface/transformers/tree/master/templates"),d(at,"rel","nofollow"),d(Te,"id","start-contributing-pull-requests"),d(Te,"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"),d(Te,"href","#start-contributing-pull-requests"),d(le,"class","relative group"),d(nt,"href","https://git-scm.com/book/en/v2"),d(nt,"rel","nofollow"),d(ht,"href","https://github.com/huggingface/transformers"),d(ht,"rel","nofollow"),d(vt,"href","https://huggingface.co/docs/transformers/testing"),d(vt,"rel","nofollow"),d(Et,"href","https://huggingface.co/docs/transformers/pr_checks"),d(Et,"rel","nofollow"),d(At,"href","https://chris.beams.io/posts/git-commit/"),d(At,"rel","nofollow"),d(Oe,"id","checklist"),d(Oe,"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"),d(Oe,"href","#checklist"),d(de,"class","relative group"),d(jt,"href","https://huggingface.co/hf-internal-testing"),d(jt,"rel","nofollow"),d(Gt,"href","https://huggingface.co/datasets/huggingface/documentation-images"),d(Gt,"rel","nofollow"),d(To,"href","pr_checks"),d(Ce,"id","tests"),d(Ce,"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"),d(Ce,"href","#tests"),d(me,"class","relative group"),d(Yt,"href","https://github.com/huggingface/transformers/tree/master/tests"),d(Yt,"rel","nofollow"),d(Bt,"href","https://github.com/huggingface/transformers/tree/master/examples"),d(Bt,"rel","nofollow"),d(xe,"id","style-guide"),d(xe,"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"),d(xe,"href","#style-guide"),d(ye,"class","relative group"),d(Vt,"href","https://google.github.io/styleguide/pyguide.html"),d(Vt,"rel","nofollow"),d(Xt,"href","https://github.com/huggingface/transformers/tree/master/docs#writing-documentation---specification"),d(Xt,"rel","nofollow"),d(Ae,"id","this-guide-was-heavily-inspired-by-the-awesome-scikitlearn-guide-to-contributinghttpsgithubcomscikitlearnscikitlearnblobmastercontributingmd"),d(Ae,"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"),d(Ae,"href","#this-guide-was-heavily-inspired-by-the-awesome-scikitlearn-guide-to-contributinghttpsgithubcomscikitlearnscikitlearnblobmastercontributingmd"),d(ge,"class","relative group"),d(Le,"id","develop-on-windows"),d(Le,"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"),d(Le,"href","#develop-on-windows"),d(ve,"class","relative group"),d(oo,"href","https://www.msys2.org/"),d(oo,"rel","nofollow"),d(qe,"id","syncing-forked-master-with-upstream-huggingface-master"),d(qe,"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"),d(qe,"href","#syncing-forked-master-with-upstream-huggingface-master"),d(we,"class","relative group")},m(t,u){e(document.head,H),f(t,lo,u),f(t,x,u),e(x,W),e(W,Xo),g(Ye,Xo,null),e(x,dn),e(x,es),e(es,cn),f(t,va,u),f(t,no,u),e(no,pn),f(t,wa,u),f(t,io,u),e(io,mn),f(t,ba,u),f(t,be,u),e(be,yn),e(be,Be),e(Be,gn),e(be,vn),f(t,$a,u),f(t,te,u),e(te,$e),e($e,ts),g(ze,ts,null),e(te,wn),e(te,os),e(os,bn),f(t,_a,u),f(t,ho,u),e(ho,$n),f(t,ka,u),f(t,A,u),e(A,ss),e(ss,_n),e(A,kn),e(A,rs),e(rs,En),e(A,Pn),e(A,as),e(as,In),e(A,Tn),e(A,ls),e(ls,Sn),f(t,Ea,u),f(t,L,u),e(L,On),e(L,Je),e(Je,Cn),e(L,xn),e(L,ns),e(ns,An),e(L,Ln),e(L,is),e(is,Dn),e(L,Nn),f(t,Pa,u),f(t,uo,u),e(uo,hs),e(hs,qn),f(t,Ia,u),f(t,oe,u),e(oe,_e),e(_e,us),g(Ke,us,null),e(oe,Rn),e(oe,fs),e(fs,Wn),f(t,Ta,u),f(t,fo,u),e(fo,Fn),f(t,Sa,u),f(t,se,u),e(se,ke),e(ke,ds),g(Qe,ds,null),e(se,Hn),e(se,cs),e(cs,jn),f(t,Oa,u),f(t,co,u),e(co,Gn),f(t,Ca,u),f(t,Ee,u),e(Ee,Mn),e(Ee,ps),e(ps,Un),e(Ee,Yn),f(t,xa,u),f(t,po,u),e(po,Bn),f(t,Aa,u),f(t,j,u),e(j,S),e(S,zn),e(S,ms),e(ms,Jn),e(S,Kn),e(S,ys),e(ys,Qn),e(S,Zn),e(S,gs),e(gs,Vn),e(S,Xn),e(S,vs),e(vs,ei),e(S,ti),e(j,oi),e(j,ws),e(ws,si),e(j,ri),e(j,Ze),e(Ze,ai),e(Ze,bs),e(bs,li),e(Ze,ni),f(t,La,u),f(t,mo,u),e(mo,ii),f(t,Da,u),g(Ve,t,u),f(t,Na,u),f(t,yo,u),e(yo,hi),f(t,qa,u),g(Xe,t,u),f(t,Ra,u),f(t,re,u),e(re,Pe),e(Pe,$s),g(et,$s,null),e(re,ui),e(re,_s),e(_s,fi),f(t,Wa,u),f(t,go,u),e(go,di),f(t,Fa,u),f(t,G,u),e(G,ks),e(ks,ci),e(G,pi),e(G,Es),e(Es,mi),e(G,yi),e(G,Ps),e(Ps,gi),f(t,Ha,u),f(t,vo,u),e(vo,vi),f(t,ja,u),f(t,M,u),e(M,wi),e(M,Is),e(Is,bi),e(M,$i),e(M,tt),e(tt,Ts),e(Ts,_i),e(M,ki),f(t,Ga,u),f(t,ae,u),e(ae,Ie),e(Ie,Ss),g(ot,Ss,null),e(ae,Ei),e(ae,Os),e(Os,Pi),f(t,Ma,u),f(t,wo,u),e(wo,Ii),f(t,Ua,u),f(t,bo,u),e(bo,Cs),e(Cs,Ti),f(t,Ya,u),f(t,U,u),e(U,xs),e(xs,Si),e(U,Oi),e(U,As),e(As,Ci),e(U,xi),e(U,Ls),e(Ls,Ai),f(t,Ba,u),f(t,O,u),e(O,st),e(st,Li),e(st,Ds),e(Ds,Di),e(st,Ni),e(O,qi),e(O,rt),e(rt,Ri),e(rt,Ns),e(Ns,Wi),e(rt,Fi),e(O,Hi),e(O,qs),e(qs,ji),e(O,Gi),e(O,Rs),e(Rs,Mi),f(t,za,u),f(t,$o,u),e($o,Ui),f(t,Ja,u),f(t,Y,u),e(Y,Yi),e(Y,Ws),e(Ws,Bi),e(Y,zi),e(Y,at),e(at,Fs),e(Fs,Ji),e(Y,Ki),f(t,Ka,u),f(t,le,u),e(le,Te),e(Te,Hs),g(lt,Hs,null),e(le,Qi),e(le,js),e(js,Zi),f(t,Qa,u),f(t,_o,u),e(_o,Vi),f(t,Za,u),f(t,P,u),e(P,Xi),e(P,Gs),e(Gs,eh),e(P,th),e(P,Ms),e(Ms,oh),e(P,sh),e(P,Us),e(Us,rh),e(P,ah),e(P,nt),e(nt,lh),e(P,nh),f(t,Va,u),f(t,ko,u),e(ko,ih),f(t,Xa,u),f(t,_,u),e(_,Ys),e(Ys,it),e(it,hh),e(it,ht),e(ht,uh),e(it,fh),e(_,dh),e(_,ut),e(ut,Bs),e(Bs,ch),e(ut,ph),g(ft,ut,null),e(_,mh),e(_,ne),e(ne,zs),e(zs,yh),e(ne,gh),g(dt,ne,null),e(ne,vh),e(ne,Se),e(Se,Js),e(Js,wh),e(Se,bh),e(Se,Ks),e(Ks,$h),e(Se,_h),e(_,kh),e(_,E),e(E,Qs),e(Qs,Eh),e(E,Ph),g(ct,E,null),e(E,Ih),e(E,ie),e(ie,Th),e(ie,Zs),e(Zs,Sh),e(ie,Oh),e(ie,Vs),e(Vs,Ch),e(ie,xh),e(E,Ah),e(E,pt),e(pt,Lh),e(pt,Xs),e(Xs,Dh),e(pt,Nh),e(E,qh),g(mt,E,null),e(E,Rh),e(E,he),e(he,Wh),e(he,er),e(er,Fh),e(he,Hh),e(he,tr),e(tr,jh),e(he,Gh),e(_,Mh),e(_,c),e(c,or),e(or,Uh),e(c,Yh),e(c,sr),e(sr,Bh),e(c,zh),g(yt,c,null),e(c,Jh),e(c,rr),e(rr,Kh),e(c,Qh),g(gt,c,null),e(c,Zh),e(c,Eo),e(Eo,Vh),e(Eo,vt),e(vt,Xh),e(c,eu),e(c,ue),e(ue,tu),e(ue,ar),e(ar,ou),e(ue,su),e(ue,lr),e(lr,ru),e(ue,au),e(c,lu),g(wt,c,null),e(c,nu),e(c,nr),e(nr,iu),e(c,hu),e(c,ir),e(ir,uu),e(c,fu),g(bt,c,null),e(c,du),e(c,$t),e($t,cu),e($t,hr),e(hr,pu),e($t,mu),e(c,yu),g(_t,c,null),e(c,gu),e(c,ur),e(ur,vu),e(c,wu),g(kt,c,null),e(c,bu),e(c,Po),e(Po,$u),e(Po,Et),e(Et,_u),e(c,ku),e(c,Pt),e(Pt,Eu),e(Pt,fr),e(fr,Pu),e(Pt,Iu),e(c,Tu),g(It,c,null),e(c,Su),e(c,dr),e(dr,Ou),e(c,Cu),g(Tt,c,null),e(c,xu),e(c,cr),e(cr,Au),e(c,Lu),g(St,c,null),e(c,Du),e(c,Ot),e(Ot,Nu),e(Ot,pr),e(pr,qu),e(Ot,Ru),e(c,Wu),e(c,fe),e(fe,Fu),e(fe,mr),e(mr,Hu),e(fe,ju),e(fe,yr),e(yr,Gu),e(fe,Mu),e(c,Uu),g(Ct,c,null),e(c,Yu),e(c,xt),e(xt,Bu),e(xt,At),e(At,zu),e(xt,Ju),e(c,Ku),e(c,gr),e(gr,Qu),e(c,Zu),g(Lt,c,null),e(c,Vu),e(c,vr),e(vr,Xu),e(c,ef),g(Dt,c,null),e(_,tf),e(_,wr),e(wr,Nt),e(Nt,of),e(Nt,br),e(br,sf),e(Nt,rf),e(_,af),e(_,$r),e($r,_r),e(_r,lf),f(t,el,u),f(t,de,u),e(de,Oe),e(Oe,kr),g(qt,kr,null),e(de,nf),e(de,Er),e(Er,hf),f(t,tl,u),f(t,k,u),e(k,Pr),e(Pr,uf),e(k,ff),e(k,Ir),e(Ir,df),e(k,cf),e(k,Rt),e(Rt,pf),e(Rt,Tr),e(Tr,mf),e(Rt,yf),e(k,gf),e(k,Sr),e(Sr,vf),e(k,wf),e(k,Io),e(Io,bf),e(Io,ce),e(ce,Wt),e(Wt,$f),e(Wt,Or),e(Or,_f),e(Wt,kf),e(ce,Ef),e(ce,pe),e(pe,Pf),e(pe,Cr),e(Cr,If),e(pe,Tf),e(pe,xr),e(xr,Sf),e(pe,Of),e(ce,Cf),e(ce,Ft),e(Ft,xf),e(Ft,Ar),e(Ar,Af),e(Ft,Lf),e(k,Df),e(k,Ht),e(Ht,Nf),e(Ht,Lr),e(Lr,qf),e(Ht,Rf),e(k,Wf),e(k,F),e(F,Ff),e(F,Dr),e(Dr,Hf),e(F,jf),e(F,jt),e(jt,Nr),e(Nr,Gf),e(F,Mf),e(F,Gt),e(Gt,Uf),e(F,Yf),f(t,ol,u),f(t,Mt,u),e(Mt,Bf),e(Mt,To),e(To,zf),f(t,sl,u),f(t,me,u),e(me,Ce),e(Ce,qr),g(Ut,qr,null),e(me,Jf),e(me,Rr),e(Rr,Kf),f(t,rl,u),f(t,B,u),e(B,Qf),e(B,Yt),e(Yt,Zf),e(B,Vf),e(B,Bt),e(Bt,Xf),e(B,ed),f(t,al,u),f(t,D,u),e(D,td),e(D,Wr),e(Wr,od),e(D,sd),e(D,Fr),e(Fr,rd),e(D,ad),e(D,Hr),e(Hr,ld),e(D,nd),f(t,ll,u),g(zt,t,u),f(t,nl,u),f(t,So,u),e(So,id),f(t,il,u),g(Jt,t,u),f(t,hl,u),f(t,N,u),e(N,hd),e(N,jr),e(jr,ud),e(N,fd),e(N,Gr),e(Gr,dd),e(N,cd),e(N,Mr),e(Mr,pd),e(N,md),f(t,ul,u),f(t,Oo,u),e(Oo,yd),f(t,fl,u),f(t,z,u),e(z,gd),e(z,Ur),e(Ur,vd),e(z,wd),e(z,Yr),e(Yr,bd),e(z,$d),f(t,dl,u),g(Kt,t,u),f(t,cl,u),f(t,J,u),e(J,_d),e(J,Br),e(Br,kd),e(J,Ed),e(J,zr),e(zr,Pd),e(J,Id),f(t,pl,u),f(t,K,u),e(K,Td),e(K,Jr),e(Jr,Sd),e(K,Od),e(K,Kr),e(Kr,Cd),e(K,xd),f(t,ml,u),f(t,Q,u),e(Q,Ad),e(Q,Qr),e(Qr,Ld),e(Q,Dd),e(Q,Zr),e(Zr,Nd),e(Q,qd),f(t,yl,u),g(Qt,t,u),f(t,gl,u),f(t,ye,u),e(ye,xe),e(xe,Vr),g(Zt,Vr,null),e(ye,Rd),e(ye,Xr),e(Xr,Wd),f(t,vl,u),f(t,Z,u),e(Z,Fd),e(Z,Vt),e(Vt,Hd),e(Z,jd),e(Z,Xt),e(Xt,Gd),e(Z,Md),f(t,wl,u),f(t,ge,u),e(ge,Ae),e(Ae,ea),g(eo,ea,null),e(ge,Ud),e(ge,ta),e(ta,Yd),f(t,bl,u),f(t,ve,u),e(ve,Le),e(Le,oa),g(to,oa,null),e(ve,Bd),e(ve,sa),e(sa,zd),f(t,$l,u),f(t,V,u),e(V,Jd),e(V,ra),e(ra,Kd),e(V,Qd),e(V,aa),e(aa,Zd),e(V,Vd),f(t,_l,u),f(t,Co,u),e(Co,la),e(la,Xd),f(t,kl,u),f(t,xo,u),e(xo,ec),f(t,El,u),f(t,q,u),e(q,Ao),e(Ao,oo),e(oo,tc),e(Ao,oc),e(q,sc),e(q,na),e(na,rc),e(q,ac),e(q,De),e(De,lc),e(De,ia),e(ia,nc),e(De,ic),e(De,ha),e(ha,hc),e(q,uc),e(q,so),e(so,fc),e(so,ua),e(ua,dc),e(so,cc),f(t,Pl,u),f(t,Ne,u),e(Ne,pc),e(Ne,fa),e(fa,mc),e(Ne,yc),f(t,Il,u),f(t,we,u),e(we,qe),e(qe,da),g(ro,da,null),e(we,gc),e(we,ca),e(ca,vc),f(t,Tl,u),f(t,Lo,u),e(Lo,wc),f(t,Sl,u),f(t,Re,u),e(Re,pa),e(pa,bc),e(Re,$c),e(Re,ma),e(ma,_c),f(t,Ol,u),g(ao,t,u),Cl=!0},p:By,i(t){Cl||(v(Ye.$$.fragment,t),v(ze.$$.fragment,t),v(Ke.$$.fragment,t),v(Qe.$$.fragment,t),v(Ve.$$.fragment,t),v(Xe.$$.fragment,t),v(et.$$.fragment,t),v(ot.$$.fragment,t),v(lt.$$.fragment,t),v(ft.$$.fragment,t),v(dt.$$.fragment,t),v(ct.$$.fragment,t),v(mt.$$.fragment,t),v(yt.$$.fragment,t),v(gt.$$.fragment,t),v(wt.$$.fragment,t),v(bt.$$.fragment,t),v(_t.$$.fragment,t),v(kt.$$.fragment,t),v(It.$$.fragment,t),v(Tt.$$.fragment,t),v(St.$$.fragment,t),v(Ct.$$.fragment,t),v(Lt.$$.fragment,t),v(Dt.$$.fragment,t),v(qt.$$.fragment,t),v(Ut.$$.fragment,t),v(zt.$$.fragment,t),v(Jt.$$.fragment,t),v(Kt.$$.fragment,t),v(Qt.$$.fragment,t),v(Zt.$$.fragment,t),v(eo.$$.fragment,t),v(to.$$.fragment,t),v(ro.$$.fragment,t),v(ao.$$.fragment,t),Cl=!0)},o(t){w(Ye.$$.fragment,t),w(ze.$$.fragment,t),w(Ke.$$.fragment,t),w(Qe.$$.fragment,t),w(Ve.$$.fragment,t),w(Xe.$$.fragment,t),w(et.$$.fragment,t),w(ot.$$.fragment,t),w(lt.$$.fragment,t),w(ft.$$.fragment,t),w(dt.$$.fragment,t),w(ct.$$.fragment,t),w(mt.$$.fragment,t),w(yt.$$.fragment,t),w(gt.$$.fragment,t),w(wt.$$.fragment,t),w(bt.$$.fragment,t),w(_t.$$.fragment,t),w(kt.$$.fragment,t),w(It.$$.fragment,t),w(Tt.$$.fragment,t),w(St.$$.fragment,t),w(Ct.$$.fragment,t),w(Lt.$$.fragment,t),w(Dt.$$.fragment,t),w(qt.$$.fragment,t),w(Ut.$$.fragment,t),w(zt.$$.fragment,t),w(Jt.$$.fragment,t),w(Kt.$$.fragment,t),w(Qt.$$.fragment,t),w(Zt.$$.fragment,t),w(eo.$$.fragment,t),w(to.$$.fragment,t),w(ro.$$.fragment,t),w(ao.$$.fragment,t),Cl=!1},d(t){o(H),t&&o(lo),t&&o(x),b(Ye),t&&o(va),t&&o(no),t&&o(wa),t&&o(io),t&&o(ba),t&&o(be),t&&o($a),t&&o(te),b(ze),t&&o(_a),t&&o(ho),t&&o(ka),t&&o(A),t&&o(Ea),t&&o(L),t&&o(Pa),t&&o(uo),t&&o(Ia),t&&o(oe),b(Ke),t&&o(Ta),t&&o(fo),t&&o(Sa),t&&o(se),b(Qe),t&&o(Oa),t&&o(co),t&&o(Ca),t&&o(Ee),t&&o(xa),t&&o(po),t&&o(Aa),t&&o(j),t&&o(La),t&&o(mo),t&&o(Da),b(Ve,t),t&&o(Na),t&&o(yo),t&&o(qa),b(Xe,t),t&&o(Ra),t&&o(re),b(et),t&&o(Wa),t&&o(go),t&&o(Fa),t&&o(G),t&&o(Ha),t&&o(vo),t&&o(ja),t&&o(M),t&&o(Ga),t&&o(ae),b(ot),t&&o(Ma),t&&o(wo),t&&o(Ua),t&&o(bo),t&&o(Ya),t&&o(U),t&&o(Ba),t&&o(O),t&&o(za),t&&o($o),t&&o(Ja),t&&o(Y),t&&o(Ka),t&&o(le),b(lt),t&&o(Qa),t&&o(_o),t&&o(Za),t&&o(P),t&&o(Va),t&&o(ko),t&&o(Xa),t&&o(_),b(ft),b(dt),b(ct),b(mt),b(yt),b(gt),b(wt),b(bt),b(_t),b(kt),b(It),b(Tt),b(St),b(Ct),b(Lt),b(Dt),t&&o(el),t&&o(de),b(qt),t&&o(tl),t&&o(k),t&&o(ol),t&&o(Mt),t&&o(sl),t&&o(me),b(Ut),t&&o(rl),t&&o(B),t&&o(al),t&&o(D),t&&o(ll),b(zt,t),t&&o(nl),t&&o(So),t&&o(il),b(Jt,t),t&&o(hl),t&&o(N),t&&o(ul),t&&o(Oo),t&&o(fl),t&&o(z),t&&o(dl),b(Kt,t),t&&o(cl),t&&o(J),t&&o(pl),t&&o(K),t&&o(ml),t&&o(Q),t&&o(yl),b(Qt,t),t&&o(gl),t&&o(ye),b(Zt),t&&o(vl),t&&o(Z),t&&o(wl),t&&o(ge),b(eo),t&&o(bl),t&&o(ve),b(to),t&&o($l),t&&o(V),t&&o(_l),t&&o(Co),t&&o(kl),t&&o(xo),t&&o(El),t&&o(q),t&&o(Pl),t&&o(Ne),t&&o(Il),t&&o(we),b(ro),t&&o(Tl),t&&o(Lo),t&&o(Sl),t&&o(Re),t&&o(Ol),b(ao,t)}}}const Jy={local:"how-to-contribute-to-transformers",sections:[{local:"you-can-contribute-in-so-many-ways",title:"You can contribute in so many ways!"},{local:"submitting-a-new-issue-or-feature-request",sections:[{local:"did-you-find-a-bug",title:"Did you find a bug?"},{local:"do-you-want-to-implement-a-new-model",title:"Do you want to implement a new model?"},{local:"do-you-want-a-new-feature-that-is-not-a-model",title:"Do you want a new feature (that is not a model)?"}],title:"Submitting a new issue or feature request"},{local:"start-contributing-pull-requests",sections:[{local:"checklist",title:"Checklist"},{local:"tests",title:"Tests"},{local:"style-guide",sections:[{local:"this-guide-was-heavily-inspired-by-the-awesome-scikitlearn-guide-to-contributinghttpsgithubcomscikitlearnscikitlearnblobmastercontributingmd",title:"This guide was heavily inspired by the awesome [scikit-learn guide to contributing](https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md)"}],title:"Style guide"},{local:"develop-on-windows",title:"Develop on Windows"},{local:"syncing-forked-master-with-upstream-huggingface-master",title:"Syncing forked master with upstream (HuggingFace) master"}],title:"Start contributing! (Pull Requests)"}],title:"How to contribute to transformers?"};function Ky(fn,H,lo){let{fw:x}=H;return fn.$$set=W=>{"fw"in W&&lo(0,x=W.fw)},[x]}class eg extends Gy{constructor(H){super();My(this,H,Ky,zy,Uy,{fw:0})}}export{eg as default,Jy as metadata};
