import{S as Rv,i as Wv,s as Av,e as a,k as u,w as m,t as r,M as xv,c as s,d as o,m as h,a as n,x as y,h as l,b as d,G as e,g as f,y as w,q as v,o as g,B as b,v as Ov}from"../chunks/vendor-hf-doc-builder.js";import{T as Uv}from"../chunks/Tip-hf-doc-builder.js";import{I as R}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as E}from"../chunks/CodeBlock-hf-doc-builder.js";function Gv(Ka){let _,xe,T,O,se,W,gt,ne,ie,Oe,j;return{c(){_=a("p"),xe=r("Remember to specify a "),T=a("em"),O=r("path to a subfolder or a test file"),se=r(" to run the test. Otherwise, you\u2019ll run all the tests in the "),W=a("code"),gt=r("tests"),ne=r(" or "),ie=a("code"),Oe=r("examples"),j=r(" folder, which will take a very long time!")},l(ue){_=s(ue,"P",{});var I=n(_);xe=l(I,"Remember to specify a "),T=s(I,"EM",{});var he=n(T);O=l(he,"path to a subfolder or a test file"),he.forEach(o),se=l(I," to run the test. Otherwise, you\u2019ll run all the tests in the "),W=s(I,"CODE",{});var jo=n(W);gt=l(jo,"tests"),jo.forEach(o),ne=l(I," or "),ie=s(I,"CODE",{});var bt=n(ie);Oe=l(bt,"examples"),bt.forEach(o),j=l(I," folder, which will take a very long time!"),I.forEach(o)},m(ue,I){f(ue,_,I),e(_,xe),e(_,T),e(T,O),e(_,se),e(_,W),e(W,gt),e(_,ne),e(_,ie),e(ie,Oe),e(_,j)},d(ue){ue&&o(_)}}}function Lv(Ka){let _,xe,T,O,se,W,gt,ne,ie,Oe,j,ue,I,he,jo,bt,Ue,ni,_t,ii,ui,es,Xo,Et,hi,kt,fi,di,ts,fe,Ge,Ur,$t,ci,Gr,pi,os,Bo,mi,rs,U,Lr,yi,wi,Nr,vi,gi,Jr,bi,_i,Zr,Ei,ls,Le,ki,Tt,$i,Ti,as,Ne,Ii,It,Pi,Mi,ss,Vo,qr,Si,ns,de,Je,Dr,Pt,Ci,Hr,Ri,is,Ze,Wi,Mt,Ai,xi,us,ce,qe,Fr,St,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,qa,Wp,Ap,xp,Y,Op,Da,Up,Gp,Ha,Lp,Np,Fa,Jp,Zp,qp,Do,Dp,Ya,Hp,Fp,pn,st,Yp,ja,jp,Xp,mn,Ae,nt,Xa,Ho,Bp,Ba,Vp,yn,yr,zp,wn,it,Va,Qp,Kp,za,em,vn,Fo,gn;return W=new R({}),$t=new R({}),Pt=new R({}),St=new R({}),Ct=new R({}),At=new E({props:{code:"dHJhbnNmb3JtZXJzLWNsaSUyMGVudg==",highlighted:'transformers-cli <span class="hljs-built_in">env</span>'}}),xt=new E({props:{code:"cHl0aG9uJTIwc3JjJTJGdHJhbnNmb3JtZXJzJTJGY29tbWFuZHMlMkZ0cmFuc2Zvcm1lcnNfY2xpLnB5JTIwZW52",highlighted:'python src/transformers/commands/transformers_cli.py <span class="hljs-built_in">env</span>'}}),Ot=new R({}),Jt=new R({}),Dt=new R({}),Ft=new R({}),Vt=new E({props:{code:"Z2l0JTIwY2xvbmUlMjBnaXQlNDBnaXRodWIuY29tJTNBJTNDeW91ciUyMEdpdGh1YiUyMGhhbmRsZSUzRSUyRnRyYW5zZm9ybWVycy5naXQlMEFjZCUyMHRyYW5zZm9ybWVycyUwQWdpdCUyMHJlbW90ZSUyMGFkZCUyMHVwc3RyZWFtJTIwaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGaHVnZ2luZ2ZhY2UlMkZ0cmFuc2Zvcm1lcnMuZ2l0",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`}}),zt=new E({props:{code:"Z2l0JTIwY2hlY2tvdXQlMjAtYiUyMGEtZGVzY3JpcHRpdmUtbmFtZS1mb3ItbXktY2hhbmdlcw==",highlighted:"git checkout -b a-descriptive-name-for-my-changes"}}),Qt=new E({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QmRldiU1RCUyMg==",highlighted:'pip install -e <span class="hljs-string">&quot;.[dev]&quot;</span>'}}),Kt=new E({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QnF1YWxpdHklNUQlMjI=",highlighted:'pip install -e <span class="hljs-string">&quot;.[quality]&quot;</span>'}}),eo=new E({props:{code:"cHl0ZXN0JTIwdGVzdHMlMkYlM0NURVNUX1RPX1JVTiUzRS5weQ==",highlighted:"pytest tests/&lt;TEST_TO_RUN&gt;.py"}}),ro=new E({props:{code:"bWFrZSUyMGZpeHVw",highlighted:"make fixup"}}),lo=new E({props:{code:"bWFrZSUyMHN0eWxl",highlighted:"make style"}}),so=new E({props:{code:"bWFrZSUyMHF1YWxpdHk=",highlighted:"make quality"}}),no=new E({props:{code:"bWFrZSUyMHJlcG8tY29uc2lzdGVuY3k=",highlighted:"make repo-consistency"}}),fo=new E({props:{code:"cGlwJTIwaW5zdGFsbCUyMCUyMi4lNUJkb2NzJTVEJTIy",highlighted:'pip install <span class="hljs-string">&quot;.[docs]&quot;</span>'}}),co=new E({props:{code:"ZG9jLWJ1aWxkZXIlMjBidWlsZCUyMHRyYW5zZm9ybWVycyUyMGRvY3MlMkZzb3VyY2UlMkZlbiUyMC0tYnVpbGRfZGlyJTIwfiUyRnRtcCUyRnRlc3QtYnVpbGQ=",highlighted:"doc-builder build transformers docs/source/en --build_dir ~/tmp/test-build"}}),mo=new E({props:{code:"Z2l0JTIwYWRkJTIwbW9kaWZpZWRfZmlsZS5weSUwQWdpdCUyMGNvbW1pdA==",highlighted:`git add modified_file.py
git commit`}}),vo=new E({props:{code:"Z2l0JTIwZmV0Y2glMjB1cHN0cmVhbSUwQWdpdCUyMHJlYmFzZSUyMHVwc3RyZWFtJTJGbWFpbg==",highlighted:`git fetch upstream
git rebase upstream/main`}}),go=new E({props:{code:"Z2l0JTIwcHVzaCUyMC11JTIwb3JpZ2luJTIwYS1kZXNjcmlwdGl2ZS1uYW1lLWZvci1teS1jaGFuZ2Vz",highlighted:"git push -u origin a-descriptive-name-for-my-changes"}}),Eo=new R({}),So=new R({}),Wo=new E({props:{code:"cHl0aG9uJTIwLW0lMjBweXRlc3QlMjAtbiUyMGF1dG8lMjAtLWRpc3QlM0Rsb2FkZmlsZSUyMC1zJTIwLXYlMjAuJTJGdGVzdHMlMkZtb2RlbHMlMkZteV9uZXdfbW9kZWw=",highlighted:"python -m pytest -n auto --dist=loadfile -s -v ./tests/models/my_new_model"}}),Ao=new E({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1yJTIwZXhhbXBsZXMlMkZ4eHglMkZyZXF1aXJlbWVudHMudHh0JTIwJTIwJTIzJTIwb25seSUyMG5lZWRlZCUyMHRoZSUyMGZpcnN0JTIwdGltZSUwQXB5dGhvbiUyMC1tJTIwcHl0ZXN0JTIwLW4lMjBhdXRvJTIwLS1kaXN0JTNEbG9hZGZpbGUlMjAtcyUyMC12JTIwLiUyRmV4YW1wbGVzJTJGcHl0b3JjaCUyRnRleHQtY2xhc3NpZmljYXRpb24=",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/pytorch/text-classification`}}),et=new Uv({props:{warning:!0,$$slots:{default:[Gv]},$$scope:{ctx:Ka}}}),xo=new E({props:{code:"UlVOX1NMT1clM0R5ZXMlMjBweXRob24lMjAtbSUyMHB5dGVzdCUyMC1uJTIwYXV0byUyMC0tZGlzdCUzRGxvYWRmaWxlJTIwLXMlMjAtdiUyMC4lMkZ0ZXN0cyUyRm1vZGVscyUyRm15X25ld19tb2RlbCUwQVJVTl9TTE9XJTNEeWVzJTIwcHl0aG9uJTIwLW0lMjBweXRlc3QlMjAtbiUyMGF1dG8lMjAtLWRpc3QlM0Rsb2FkZmlsZSUyMC1zJTIwLXYlMjAuJTJGZXhhbXBsZXMlMkZweXRvcmNoJTJGdGV4dC1jbGFzc2lmaWNhdGlvbg==",highlighted:`RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./tests/models/my_new_model
RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./examples/pytorch/text-classification`}}),Oo=new E({props:{code:"cHl0aG9uJTIwLW0lMjB1bml0dGVzdCUyMGRpc2NvdmVyJTIwLXMlMjB0ZXN0cyUyMC10JTIwLiUyMC12JTBBcHl0aG9uJTIwLW0lMjB1bml0dGVzdCUyMGRpc2NvdmVyJTIwLXMlMjBleGFtcGxlcyUyMC10JTIwZXhhbXBsZXMlMjAtdg==",highlighted:`python -m unittest discover -s tests -t . -v
python -m unittest discover -s examples -t examples -v`}}),Uo=new R({}),No=new R({}),Zo=new E({props:{code:"Z2l0JTIwY29uZmlnJTIwY29yZS5hdXRvY3JsZiUyMGlucHV0",highlighted:"git config core.autocrlf input"}}),Ho=new R({}),Fo=new E({props:{code:"Z2l0JTIwY2hlY2tvdXQlMjAtYiUyMHlvdXItYnJhbmNoLWZvci1zeW5jaW5nJTBBZ2l0JTIwcHVsbCUyMC0tc3F1YXNoJTIwLS1uby1jb21taXQlMjB1cHN0cmVhbSUyMG1haW4lMEFnaXQlMjBjb21taXQlMjAtbSUyMCclM0N5b3VyJTIwbWVzc2FnZSUyMHdpdGhvdXQlMjBHaXRIdWIlMjByZWZlcmVuY2VzJTNFJyUwQWdpdCUyMHB1c2glMjAtLXNldC11cHN0cmVhbSUyMG9yaWdpbiUyMHlvdXItYnJhbmNoLWZvci1zeW5jaW5n",highlighted:`git checkout -b your-branch-for-syncing
git pull --squash --no-commit upstream main
git commit -m <span class="hljs-string">&#x27;&lt;your message without GitHub references&gt;&#x27;</span>
git push --set-upstream origin your-branch-for-syncing`}}),{c(){_=a("meta"),xe=u(),T=a("h1"),O=a("a"),se=a("span"),m(W.$$.fragment),gt=u(),ne=a("span"),ie=r("Contribute to \u{1F917} Transformers"),Oe=u(),j=a("p"),ue=r(`Everyone is welcome to contribute, and we value everybody\u2019s contribution. Code
contributions are not the only way to help the community. Answering questions, helping
others, and improving the documentation are also immensely valuable.`),I=u(),he=a("p"),jo=r(`It also helps us if you spread the word! Reference the library in blog posts
about the awesome projects it made possible, shout out on Twitter every time it has
helped you, or simply \u2B50\uFE0F the repository to say thank you.`),bt=u(),Ue=a("p"),ni=r(`However you choose to contribute, please be mindful and respect our
`),_t=a("a"),ii=r("code of conduct"),ui=r("."),es=u(),Xo=a("p"),Et=a("strong"),hi=r("This guide was heavily inspired by the awesome "),kt=a("a"),fi=r("scikit-learn guide to contributing"),di=r("."),ts=u(),fe=a("h2"),Ge=a("a"),Ur=a("span"),m($t.$$.fragment),ci=u(),Gr=a("span"),pi=r("Ways to contribute"),os=u(),Bo=a("p"),mi=r("There are several ways you can contribute to \u{1F917} Transformers:"),rs=u(),U=a("ul"),Lr=a("li"),yi=r("Fix outstanding issues with the existing code."),wi=u(),Nr=a("li"),vi=r("Submit issues related to bugs or desired new features."),gi=u(),Jr=a("li"),bi=r("Implement new models."),_i=u(),Zr=a("li"),Ei=r("Contribute to the examples or to the documentation."),ls=u(),Le=a("p"),ki=r("If you don\u2019t know where to start, there is a special "),Tt=a("a"),$i=r(`Good First
Issue`),Ti=r(` listing. It will give you a list of
open issues that are beginner-friendly and help you start contributing to open-source. Just comment in the issue that you\u2019d like to work
on it.`),as=u(),Ne=a("p"),Ii=r("For something slightly more challenging, you can also take a look at the "),It=a("a"),Pi=r("Good Second Issue"),Mi=r(" list. In general though, if you feel like you know what you\u2019re doing, go for it and we\u2019ll help you get there! \u{1F680}"),ss=u(),Vo=a("blockquote"),qr=a("p"),Si=r("All contributions are equally valuable to the community. \u{1F970}"),ns=u(),de=a("h2"),Je=a("a"),Dr=a("span"),m(Pt.$$.fragment),Ci=u(),Hr=a("span"),Ri=r("Fixing outstanding issues"),is=u(),Ze=a("p"),Wi=r("If you notice an issue with the existing code and have a fix in mind, feel free to "),Mt=a("a"),Ai=r("start contributing"),xi=r(" and open a Pull Request!"),us=u(),ce=a("h2"),qe=a("a"),Fr=a("span"),m(St.$$.fragment),Oi=u(),Yr=a("span"),Ui=r("Submitting a bug-related issue or feature request"),hs=u(),zo=a("p"),Gi=r(`Do your best to follow these guidelines when submitting a bug-related issue or a feature
request. It will make it easier for us to come back to you quickly and with good
feedback.`),fs=u(),pe=a("h3"),De=a("a"),jr=a("span"),m(Ct.$$.fragment),Li=u(),Xr=a("span"),Ni=r("Did you find a bug?"),ds=u(),Qo=a("p"),Ji=r("The \u{1F917} Transformers library is robust and reliable thanks to users who report the problems they encounter."),cs=u(),X=a("p"),Zi=r("Before you report an issue, we would really appreciate it if you could "),Br=a("strong"),qi=r(`make sure the bug was not
already reported`),Di=r(" (use the search bar on GitHub under Issues). Your issue should also be related to bugs in the library itself, and not your code. If you\u2019re unsure whether the bug is in your code or the library, please ask on the "),Rt=a("a"),Hi=r("forum"),Fi=r(" first. This helps us respond quicker to fixing issues related to the library versus general questions."),ps=u(),Ko=a("p"),Yi=r("Once you\u2019ve confirmed the bug hasn\u2019t already been reported, please include the following information in your issue so we can quickly resolve it:"),ms=u(),G=a("ul"),A=a("li"),ji=r("Your "),Vr=a("strong"),Xi=r("OS type and version"),Bi=r(" and "),zr=a("strong"),Vi=r("Python"),zi=r(", "),Qr=a("strong"),Qi=r("PyTorch"),Ki=r(` and
`),Kr=a("strong"),eu=r("TensorFlow"),tu=r(" versions when applicable."),ou=u(),el=a("li"),ru=r(`A short, self-contained, code snippet that allows us to reproduce the bug in
less than 30s.`),lu=u(),Wt=a("li"),au=r("The "),tl=a("em"),su=r("full"),nu=r(" traceback if an exception is raised."),iu=u(),ol=a("li"),uu=r("Attach any other additional information, like screenshots, you think may help."),ys=u(),er=a("p"),hu=r("To get the OS and software versions automatically, run the following command:"),ws=u(),m(At.$$.fragment),vs=u(),tr=a("p"),fu=r("You can also run the same command from the root of the repository:"),gs=u(),m(xt.$$.fragment),bs=u(),me=a("h3"),He=a("a"),rl=a("span"),m(Ot.$$.fragment),du=u(),ll=a("span"),cu=r("Do you want a new feature?"),_s=u(),or=a("p"),pu=r("If there is a new feature you\u2019d like to see in \u{1F917} Transformers, please open an issue and describe:"),Es=u(),L=a("ol"),Ut=a("li"),Gt=a("p"),mu=r("What is the "),al=a("em"),yu=r("motivation"),wu=r(" behind this feature? Is it related to a problem or frustration with the library? Is it a feature related to something you need for a project? Is it something you worked on and think it could benefit the community?"),vu=u(),sl=a("p"),gu=r("Whatever it is, we\u2019d love to hear about it!"),bu=u(),nl=a("li"),il=a("p"),_u=r("Describe your requested feature in as much detail as possible. The more you can tell us about it, the better we\u2019ll be able to help you."),Eu=u(),ul=a("li"),Lt=a("p"),ku=r("Provide a "),hl=a("em"),$u=r("code snippet"),Tu=r(" that demonstrates the features usage."),Iu=u(),fl=a("li"),dl=a("p"),Pu=r("If the feature is related to a paper, please include a link."),ks=u(),rr=a("p"),Mu=r("If your issue is well written we\u2019re already 80% of the way there by the time you create it."),$s=u(),Fe=a("p"),Su=r("We have added "),Nt=a("a"),Cu=r("templates"),Ru=r(" to help you get started with your issue."),Ts=u(),ye=a("h2"),Ye=a("a"),cl=a("span"),m(Jt.$$.fragment),Wu=u(),pl=a("span"),Au=r("Do you want to implement a new model?"),Is=u(),lr=a("p"),xu=r("New models are constantly released and if you want to implement a new model, please provide the following information"),Ps=u(),B=a("ul"),ml=a("li"),Ou=r("A short description of the model and link to the paper."),Uu=u(),yl=a("li"),Gu=r("Link to the implementation if it is open-sourced."),Lu=u(),wl=a("li"),Nu=r("Link to the model weights if they are available."),Ms=u(),ar=a("p"),Ju=r("If you are willing to contribute the model yourself, let us know so we can help you add it to \u{1F917} Transformers!"),Ss=u(),V=a("p"),Zu=r("We have added a "),Zt=a("a"),qu=r("detailed guide and templates"),Du=r(" to help you get started with adding a new model, and we also have a more technical guide for "),qt=a("a"),Hu=r("how to add a model to \u{1F917} Transformers"),Fu=r("."),Cs=u(),we=a("h2"),je=a("a"),vl=a("span"),m(Dt.$$.fragment),Yu=u(),gl=a("span"),ju=r("Do you want to add documentation?"),Rs=u(),sr=a("p"),Xu=r("We\u2019re always looking for improvements to the documentation that make it more clear and accurate. Please let us know how the documentation can be improved such as typos and any content that is missing, unclear or inaccurate. We\u2019ll be happy to make the changes or help you make a contribution if you\u2019re interested!"),Ws=u(),Xe=a("p"),Bu=r("For more details about how to generate, build, and write the documentation, take a look at the documentation "),Ht=a("a"),Vu=r("README"),zu=r("."),As=u(),ve=a("h2"),Be=a("a"),bl=a("span"),m(Ft.$$.fragment),Qu=u(),_l=a("span"),Ku=r("Create a Pull Request"),xs=u(),nr=a("p"),eh=r(`Before writing any code, we strongly advise you to search through the existing PRs or
issues to make sure 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.`),Os=u(),M=a("p"),th=r("You will need basic "),El=a("code"),oh=r("git"),rh=r(` proficiency to contribute to
\u{1F917} Transformers. While `),kl=a("code"),lh=r("git"),ah=r(` is not the easiest tool to use, it has the greatest
manual. Type `),$l=a("code"),sh=r("git --help"),nh=r(" in a shell and enjoy! If you prefer books, "),Yt=a("a"),ih=r(`Pro
Git`),uh=r(" is a very good reference."),Us=u(),Ve=a("p"),hh=r("You\u2019ll need "),Tl=a("strong"),ir=a("a"),fh=r("Python 3.8"),dh=r(" or above to contribute to \u{1F917} Transformers. Follow the steps below to start contributing:"),Gs=u(),k=a("ol"),Il=a("li"),ge=a("p"),ch=r("Fork the "),jt=a("a"),ph=r("repository"),mh=r(` by
clicking on the `),Pl=a("strong"),Xt=a("a"),yh=r("Fork"),wh=r(` button on the repository\u2019s page. This creates a copy of the code
under your GitHub user account.`),vh=u(),Bt=a("li"),Ml=a("p"),gh=r("Clone your fork to your local disk, and add the base repository as a remote:"),bh=u(),m(Vt.$$.fragment),_h=u(),be=a("li"),Sl=a("p"),Eh=r("Create a new branch to hold your development changes:"),kh=u(),m(zt.$$.fragment),$h=u(),_e=a("p"),Th=r("\u{1F6A8} "),Cl=a("strong"),Ih=r("Do not"),Ph=r(" work on the "),Rl=a("code"),Mh=r("main"),Sh=r(" branch!"),Ch=u(),P=a("li"),Wl=a("p"),Rh=r("Set up a development environment by running the following command in a virtual environment:"),Wh=u(),m(Qt.$$.fragment),Ah=u(),Ee=a("p"),xh=r(`If \u{1F917} Transformers was already installed in the virtual environment, remove
it with `),Al=a("code"),Oh=r("pip uninstall transformers"),Uh=r(` before reinstalling it in editable
mode with the `),xl=a("code"),Gh=r("-e"),Lh=r(" flag."),Nh=u(),Ol=a("p"),Jh=r(`Depending on your OS, and since the number of optional dependencies of Transformers is growing, you might get a
failure with this command. If that\u2019s the case make sure to install the Deep Learning framework you are working with
(PyTorch, TensorFlow and/or Flax) then do:`),Zh=u(),m(Kt.$$.fragment),qh=u(),Ul=a("p"),Dh=r("which should be enough for most use cases."),Hh=u(),c=a("li"),Gl=a("p"),Fh=r("Develop the features on your branch."),Yh=u(),Ll=a("p"),jh=r(`As you work on your code, you should make sure the test suite
passes. Run the tests impacted by your changes like this:`),Xh=u(),m(eo.$$.fragment),Bh=u(),to=a("p"),Vh=r(`For more information about tests, check out the
`),oo=a("a"),zh=r("Testing"),Qh=r(" guide."),Kh=u(),ke=a("p"),ef=r("\u{1F917} Transformers relies on "),Nl=a("code"),tf=r("black"),of=r(" and "),Jl=a("code"),rf=r("ruff"),lf=r(` 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:`),af=u(),m(ro.$$.fragment),sf=u(),Zl=a("p"),nf=r("This target is also optimized to only work with files modified by the PR you\u2019re working on."),uf=u(),ql=a("p"),hf=r(`If you prefer to run the checks one after the other, the following command applies the
style corrections:`),ff=u(),m(lo.$$.fragment),df=u(),ao=a("p"),cf=r("\u{1F917} Transformers also uses "),Dl=a("code"),pf=r("ruff"),mf=r(` and a few custom scripts to check for coding mistakes. Quality
controls are run by the CI, but you can run the same checks with:`),yf=u(),m(so.$$.fragment),wf=u(),Hl=a("p"),vf=r(`Finally, we have a lot of scripts to make sure we didn\u2019t forget to update
some files when adding a new model. You can run these scripts with:`),gf=u(),m(no.$$.fragment),bf=u(),io=a("p"),_f=r(`To learn more about those checks and how to fix any issues with them, check out the
`),uo=a("a"),Ef=r("Checks on a Pull Request"),kf=r(" guide."),$f=u(),ho=a("p"),Tf=r("If you\u2019re modifying documents under "),Fl=a("code"),If=r("docs/source"),Pf=r(` directory, make sure the documentation can still be built. This check will also run in the CI when you open a pull request. To run a local check
make sure you install the documentation builder:`),Mf=u(),m(fo.$$.fragment),Sf=u(),Yl=a("p"),Cf=r("Run the following command from the root of the repository:"),Rf=u(),m(co.$$.fragment),Wf=u(),po=a("p"),Af=r("This will build the documentation in the "),jl=a("code"),xf=r("~/tmp/test-build"),Of=r(` folder where you can inspect the generated
Markdown files with your favorite editor. You can also preview the docs on GitHub when you open a pull request.`),Uf=u(),$e=a("p"),Gf=r("Once you\u2019re happy with your changes, add changed files with "),Xl=a("code"),Lf=r("git add"),Nf=r(` and
record your changes locally with `),Bl=a("code"),Jf=r("git commit"),Zf=r(":"),qf=u(),m(mo.$$.fragment),Df=u(),yo=a("p"),Hf=r("Please remember to write "),wo=a("a"),Ff=r(`good commit
messages`),Yf=r(" to clearly communicate the changes you made!"),jf=u(),Te=a("p"),Xf=r(`To keep your copy of the code up to date with the original
repository, rebase your branch on `),Vl=a("code"),Bf=r("upstream/branch"),Vf=u(),zl=a("em"),zf=r("before"),Qf=r(" you open a pull request or if requested by a maintainer:"),Kf=u(),m(vo.$$.fragment),ed=u(),Ql=a("p"),td=r("Push your changes to your branch:"),od=u(),m(go.$$.fragment),rd=u(),bo=a("p"),ld=r("If you\u2019ve already opened a pull request, you\u2019ll need to force push with the "),Kl=a("code"),ad=r("--force"),sd=r(" flag. Otherwise, if the pull request hasn\u2019t been opened yet, you can just push your changes normally."),nd=u(),ea=a("li"),Ie=a("p"),id=r("Now you can go to your fork of the repository on GitHub and click on "),ta=a("strong"),ud=r("Pull request"),hd=r(" to open a pull request. Make sure you tick off all the boxes in our "),_o=a("a"),fd=r("checklist"),dd=r(" below. When you\u2019re ready, you can send your changes to the project maintainers for review."),cd=u(),oa=a("li"),ra=a("p"),pd=r(`It\u2019s ok if maintainers request changes, it happens to our 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.`),Ls=u(),Pe=a("h3"),ze=a("a"),la=a("span"),m(Eo.$$.fragment),md=u(),aa=a("span"),yd=r("Pull request checklist"),Ns=u(),$=a("p"),wd=r("\u2610 The pull request title should summarize your contribution."),vd=a("br"),gd=r(`
\u2610 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 viewing the issue know you
are working on it).`),bd=a("br"),_d=r(`
\u2610 To indicate a work in progress please prefix the title with `),sa=a("code"),Ed=r("[WIP]"),kd=r(`. These are
useful to avoid duplicated work, and to differentiate it from PRs ready to be merged.`),$d=a("br"),Td=r(`
\u2610 Make sure existing tests pass.`),Id=a("br"),Pd=r(`
\u2610 If adding a new feature, also add tests for it.`),Md=a("br"),Js=u(),N=a("ul"),ko=a("li"),Sd=r(`If you are adding a new model, make sure you use
`),na=a("code"),Cd=r("ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,...)"),Rd=r(" to trigger the common tests."),Wd=u(),Me=a("li"),Ad=r("If you are adding new "),ia=a("code"),xd=r("@slow"),Od=r(` tests, make sure they pass using
`),ua=a("code"),Ud=r("RUN_SLOW=1 python -m pytest tests/models/my_new_model/test_my_new_model.py"),Gd=r("."),Ld=u(),$o=a("li"),Nd=r(`If you are adding a new tokenizer, write tests and make sure
`),ha=a("code"),Jd=r("RUN_SLOW=1 python -m pytest tests/models/{your_model_name}/test_tokenization_{your_model_name}.py"),Zd=r(" passes."),qd=u(),ur=a("li"),Dd=r("CircleCI does not run the slow tests, but GitHub Actions does every night!"),Hd=a("br"),Zs=u(),S=a("p"),Fd=r(`\u2610 All public methods must have informative docstrings (see
`),To=a("a"),fa=a("code"),Yd=r("modeling_bert.py"),jd=r(`
for an example).`),Xd=a("br"),Bd=r(`
\u2610 Due to the rapidly growing repository, don\u2019t add any images, videos and other
non-text files that\u2019ll significantly weigh down the repository. Instead, use a Hub
repository such as `),Io=a("a"),da=a("code"),Vd=r("hf-internal-testing"),zd=r(`
to host these files and reference them by URL. We recommend placing documentation
related images in the following repository:
`),Po=a("a"),Qd=r("huggingface/documentation-images"),Kd=r(`.
You can open a PR on this dataset repostitory and ask a Hugging Face member to merge it.`),qs=u(),Qe=a("p"),ec=r("For more information about the checks run on a pull request, take a look at our "),Mo=a("a"),tc=r("Checks on a Pull Request"),oc=r(" guide."),Ds=u(),Se=a("h3"),Ke=a("a"),ca=a("span"),m(So.$$.fragment),rc=u(),pa=a("span"),lc=r("Tests"),Hs=u(),z=a("p"),ac=r(`An extensive test suite is included to test the library behavior and several examples. Library tests can be found in
the `),Co=a("a"),sc=r("tests"),nc=r(` folder and examples tests in the
`),Ro=a("a"),ic=r("examples"),uc=r(" folder."),Fs=u(),J=a("p"),hc=r("We like "),ma=a("code"),fc=r("pytest"),dc=r(" and "),ya=a("code"),cc=r("pytest-xdist"),pc=r(` because it\u2019s faster. From the root of the
repository, specify a `),wa=a("em"),mc=r("path to a subfolder or a test file"),yc=r(" to run the test."),Ys=u(),m(Wo.$$.fragment),js=u(),Z=a("p"),wc=r("Similarly, for the "),va=a("code"),vc=r("examples"),gc=r(" directory, specify a "),ga=a("em"),bc=r("path to a subfolder or test file"),_c=r(" to run the test. For example, the following command tests the text classification subfolder in the PyTorch "),ba=a("code"),Ec=r("examples"),kc=r(" directory:"),Xs=u(),m(Ao.$$.fragment),Bs=u(),q=a("p"),$c=r("In fact, this is actually how our "),_a=a("code"),Tc=r("make test"),Ic=r(" and "),Ea=a("code"),Pc=r("make test-examples"),Mc=r(" commands are implemented (not including the "),ka=a("code"),Sc=r("pip install"),Cc=r(")!"),Vs=u(),hr=a("p"),Rc=r(`You can also specify a smaller set of tests in order to test only the feature
you\u2019re working on.`),zs=u(),Q=a("p"),Wc=r("By default, slow tests are skipped but you can set the "),$a=a("code"),Ac=r("RUN_SLOW"),xc=r(` environment variable to
`),Ta=a("code"),Oc=r("yes"),Uc=r(` to run them. This will download many gigabytes of models so make sure you
have enough disk space, a good internet connection or a lot of patience!`),Qs=u(),m(et.$$.fragment),Ks=u(),m(xo.$$.fragment),en=u(),fr=a("p"),Gc=r("Like the slow tests, there are other environment variables available which not enabled by default during testing:"),tn=u(),K=a("ul"),dr=a("li"),Ia=a("code"),Lc=r("RUN_CUSTOM_TOKENIZERS"),Nc=r(": Enables tests for custom tokenizers."),Jc=u(),cr=a("li"),Pa=a("code"),Zc=r("RUN_PT_FLAX_CROSS_TESTS"),qc=r(": Enables tests for PyTorch + Flax integration."),Dc=u(),pr=a("li"),Ma=a("code"),Hc=r("RUN_PT_TF_CROSS_TESTS"),Fc=r(": Enables tests for TensorFlow + PyTorch integration."),on=u(),tt=a("p"),Yc=r("More environment variables and additional information can be found in the "),mr=a("a"),jc=r("testing_utils.py"),Xc=r("."),rn=u(),ee=a("p"),Bc=r("\u{1F917} Transformers uses "),Sa=a("code"),Vc=r("pytest"),zc=r(` as a test runner only. It doesn\u2019t use any
`),Ca=a("code"),Qc=r("pytest"),Kc=r("-specific features in the test suite itself."),ln=u(),te=a("p"),ep=r("This means "),Ra=a("code"),tp=r("unittest"),op=r(` is fully supported. Here\u2019s how to run tests with
`),Wa=a("code"),rp=r("unittest"),lp=r(":"),an=u(),m(Oo.$$.fragment),sn=u(),Ce=a("h3"),ot=a("a"),Aa=a("span"),m(Uo.$$.fragment),ap=u(),xa=a("span"),sp=r("Style guide"),nn=u(),oe=a("p"),np=r("For documentation strings, \u{1F917} Transformers follows the "),Go=a("a"),ip=r("Google Python Style Guide"),up=r(`.
Check our `),Lo=a("a"),hp=r("documentation writing guide"),fp=r(`
for more information.`),un=u(),Re=a("h3"),rt=a("a"),Oa=a("span"),m(No.$$.fragment),dp=u(),Ua=a("span"),cp=r("Develop on Windows"),hn=u(),D=a("p"),pp=r("On Windows (unless you\u2019re working in "),Jo=a("a"),mp=r("Windows Subsystem for Linux"),yp=r(" or WSL), you need to configure git to transform Windows "),Ga=a("code"),wp=r("CRLF"),vp=r(" line endings to Linux "),La=a("code"),gp=r("LF"),bp=r(" line endings:"),fn=u(),m(Zo.$$.fragment),dn=u(),lt=a("p"),_p=r("One way to run the "),Na=a("code"),Ep=r("make"),kp=r(" command on Windows is with MSYS2:"),cn=u(),H=a("ol"),at=a("li"),qo=a("a"),$p=r("Download MSYS2"),Tp=r(", and we assume it\u2019s installed in "),Ja=a("code"),Ip=r("C:\\msys64"),Pp=r("."),Mp=u(),We=a("li"),Sp=r("Open the command line "),Za=a("code"),Cp=r("C:\\msys64\\msys2.exe"),Rp=r(" (it should be available from the "),qa=a("strong"),Wp=r("Start"),Ap=r(" menu)."),xp=u(),Y=a("li"),Op=r("Run in the shell: "),Da=a("code"),Up=r("pacman -Syu"),Gp=r(" and install "),Ha=a("code"),Lp=r("make"),Np=r(" with "),Fa=a("code"),Jp=r("pacman -S make"),Zp=r("."),qp=u(),Do=a("li"),Dp=r("Add "),Ya=a("code"),Hp=r("C:\\msys64\\usr\\bin"),Fp=r(" to your PATH environment variable."),pn=u(),st=a("p"),Yp=r("You can now use "),ja=a("code"),jp=r("make"),Xp=r(" from any terminal (Powershell, cmd.exe, etc.)! \u{1F389}"),mn=u(),Ae=a("h3"),nt=a("a"),Xa=a("span"),m(Ho.$$.fragment),Bp=u(),Ba=a("span"),Vp=r("Sync a forked repository with upstream main (the Hugging Face repository)"),yn=u(),yr=a("p"),zp=r("When updating the main branch of a forked repository, please follow these steps 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."),wn=u(),it=a("ol"),Va=a("li"),Qp=r("When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead, merge directly into the forked main."),Kp=u(),za=a("li"),em=r("If a PR is absolutely necessary, use the following steps after checking out your branch:"),vn=u(),m(Fo.$$.fragment),this.h()},l(t){const i=xv('[data-svelte="svelte-1phssyn"]',document.head);_=s(i,"META",{name:!0,content:!0}),i.forEach(o),xe=h(t),T=s(t,"H1",{class:!0});var Yo=n(T);O=s(Yo,"A",{id:!0,class:!0,href:!0});var am=n(O);se=s(am,"SPAN",{});var sm=n(se);y(W.$$.fragment,sm),sm.forEach(o),am.forEach(o),gt=h(Yo),ne=s(Yo,"SPAN",{});var nm=n(ne);ie=l(nm,"Contribute to \u{1F917} Transformers"),nm.forEach(o),Yo.forEach(o),Oe=h(t),j=s(t,"P",{});var im=n(j);ue=l(im,`Everyone is welcome to contribute, and we value everybody\u2019s contribution. Code
contributions are not the only way to help the community. Answering questions, helping
others, and improving the documentation are also immensely valuable.`),im.forEach(o),I=h(t),he=s(t,"P",{});var um=n(he);jo=l(um,`It also helps us if you spread the word! Reference the library in blog posts
about the awesome projects it made possible, shout out on Twitter every time it has
helped you, or simply \u2B50\uFE0F the repository to say thank you.`),um.forEach(o),bt=h(t),Ue=s(t,"P",{});var bn=n(Ue);ni=l(bn,`However you choose to contribute, please be mindful and respect our
`),_t=s(bn,"A",{href:!0,rel:!0});var hm=n(_t);ii=l(hm,"code of conduct"),hm.forEach(o),ui=l(bn,"."),bn.forEach(o),es=h(t),Xo=s(t,"P",{});var fm=n(Xo);Et=s(fm,"STRONG",{});var _n=n(Et);hi=l(_n,"This guide was heavily inspired by the awesome "),kt=s(_n,"A",{href:!0,rel:!0});var dm=n(kt);fi=l(dm,"scikit-learn guide to contributing"),dm.forEach(o),di=l(_n,"."),_n.forEach(o),fm.forEach(o),ts=h(t),fe=s(t,"H2",{class:!0});var En=n(fe);Ge=s(En,"A",{id:!0,class:!0,href:!0});var cm=n(Ge);Ur=s(cm,"SPAN",{});var pm=n(Ur);y($t.$$.fragment,pm),pm.forEach(o),cm.forEach(o),ci=h(En),Gr=s(En,"SPAN",{});var mm=n(Gr);pi=l(mm,"Ways to contribute"),mm.forEach(o),En.forEach(o),os=h(t),Bo=s(t,"P",{});var ym=n(Bo);mi=l(ym,"There are several ways you can contribute to \u{1F917} Transformers:"),ym.forEach(o),rs=h(t),U=s(t,"UL",{});var ut=n(U);Lr=s(ut,"LI",{});var wm=n(Lr);yi=l(wm,"Fix outstanding issues with the existing code."),wm.forEach(o),wi=h(ut),Nr=s(ut,"LI",{});var vm=n(Nr);vi=l(vm,"Submit issues related to bugs or desired new features."),vm.forEach(o),gi=h(ut),Jr=s(ut,"LI",{});var gm=n(Jr);bi=l(gm,"Implement new models."),gm.forEach(o),_i=h(ut),Zr=s(ut,"LI",{});var bm=n(Zr);Ei=l(bm,"Contribute to the examples or to the documentation."),bm.forEach(o),ut.forEach(o),ls=h(t),Le=s(t,"P",{});var kn=n(Le);ki=l(kn,"If you don\u2019t know where to start, there is a special "),Tt=s(kn,"A",{href:!0,rel:!0});var _m=n(Tt);$i=l(_m,`Good First
Issue`),_m.forEach(o),Ti=l(kn,` listing. It will give you a list of
open issues that are beginner-friendly and help you start contributing to open-source. Just comment in the issue that you\u2019d like to work
on it.`),kn.forEach(o),as=h(t),Ne=s(t,"P",{});var $n=n(Ne);Ii=l($n,"For something slightly more challenging, you can also take a look at the "),It=s($n,"A",{href:!0,rel:!0});var Em=n(It);Pi=l(Em,"Good Second Issue"),Em.forEach(o),Mi=l($n," list. In general though, if you feel like you know what you\u2019re doing, go for it and we\u2019ll help you get there! \u{1F680}"),$n.forEach(o),ss=h(t),Vo=s(t,"BLOCKQUOTE",{});var km=n(Vo);qr=s(km,"P",{});var $m=n(qr);Si=l($m,"All contributions are equally valuable to the community. \u{1F970}"),$m.forEach(o),km.forEach(o),ns=h(t),de=s(t,"H2",{class:!0});var Tn=n(de);Je=s(Tn,"A",{id:!0,class:!0,href:!0});var Tm=n(Je);Dr=s(Tm,"SPAN",{});var Im=n(Dr);y(Pt.$$.fragment,Im),Im.forEach(o),Tm.forEach(o),Ci=h(Tn),Hr=s(Tn,"SPAN",{});var Pm=n(Hr);Ri=l(Pm,"Fixing outstanding issues"),Pm.forEach(o),Tn.forEach(o),is=h(t),Ze=s(t,"P",{});var In=n(Ze);Wi=l(In,"If you notice an issue with the existing code and have a fix in mind, feel free to "),Mt=s(In,"A",{href:!0,rel:!0});var Mm=n(Mt);Ai=l(Mm,"start contributing"),Mm.forEach(o),xi=l(In," and open a Pull Request!"),In.forEach(o),us=h(t),ce=s(t,"H2",{class:!0});var Pn=n(ce);qe=s(Pn,"A",{id:!0,class:!0,href:!0});var Sm=n(qe);Fr=s(Sm,"SPAN",{});var Cm=n(Fr);y(St.$$.fragment,Cm),Cm.forEach(o),Sm.forEach(o),Oi=h(Pn),Yr=s(Pn,"SPAN",{});var Rm=n(Yr);Ui=l(Rm,"Submitting a bug-related issue or feature request"),Rm.forEach(o),Pn.forEach(o),hs=h(t),zo=s(t,"P",{});var Wm=n(zo);Gi=l(Wm,`Do your best to follow these guidelines when submitting a bug-related issue or a feature
request. It will make it easier for us to come back to you quickly and with good
feedback.`),Wm.forEach(o),fs=h(t),pe=s(t,"H3",{class:!0});var Mn=n(pe);De=s(Mn,"A",{id:!0,class:!0,href:!0});var Am=n(De);jr=s(Am,"SPAN",{});var xm=n(jr);y(Ct.$$.fragment,xm),xm.forEach(o),Am.forEach(o),Li=h(Mn),Xr=s(Mn,"SPAN",{});var Om=n(Xr);Ni=l(Om,"Did you find a bug?"),Om.forEach(o),Mn.forEach(o),ds=h(t),Qo=s(t,"P",{});var Um=n(Qo);Ji=l(Um,"The \u{1F917} Transformers library is robust and reliable thanks to users who report the problems they encounter."),Um.forEach(o),cs=h(t),X=s(t,"P",{});var wr=n(X);Zi=l(wr,"Before you report an issue, we would really appreciate it if you could "),Br=s(wr,"STRONG",{});var Gm=n(Br);qi=l(Gm,`make sure the bug was not
already reported`),Gm.forEach(o),Di=l(wr," (use the search bar on GitHub under Issues). Your issue should also be related to bugs in the library itself, and not your code. If you\u2019re unsure whether the bug is in your code or the library, please ask on the "),Rt=s(wr,"A",{href:!0,rel:!0});var Lm=n(Rt);Hi=l(Lm,"forum"),Lm.forEach(o),Fi=l(wr," first. This helps us respond quicker to fixing issues related to the library versus general questions."),wr.forEach(o),ps=h(t),Ko=s(t,"P",{});var Nm=n(Ko);Yi=l(Nm,"Once you\u2019ve confirmed the bug hasn\u2019t already been reported, please include the following information in your issue so we can quickly resolve it:"),Nm.forEach(o),ms=h(t),G=s(t,"UL",{});var ht=n(G);A=s(ht,"LI",{});var re=n(A);ji=l(re,"Your "),Vr=s(re,"STRONG",{});var Jm=n(Vr);Xi=l(Jm,"OS type and version"),Jm.forEach(o),Bi=l(re," and "),zr=s(re,"STRONG",{});var Zm=n(zr);Vi=l(Zm,"Python"),Zm.forEach(o),zi=l(re,", "),Qr=s(re,"STRONG",{});var qm=n(Qr);Qi=l(qm,"PyTorch"),qm.forEach(o),Ki=l(re,` and
`),Kr=s(re,"STRONG",{});var Dm=n(Kr);eu=l(Dm,"TensorFlow"),Dm.forEach(o),tu=l(re," versions when applicable."),re.forEach(o),ou=h(ht),el=s(ht,"LI",{});var Hm=n(el);ru=l(Hm,`A short, self-contained, code snippet that allows us to reproduce the bug in
less than 30s.`),Hm.forEach(o),lu=h(ht),Wt=s(ht,"LI",{});var Sn=n(Wt);au=l(Sn,"The "),tl=s(Sn,"EM",{});var Fm=n(tl);su=l(Fm,"full"),Fm.forEach(o),nu=l(Sn," traceback if an exception is raised."),Sn.forEach(o),iu=h(ht),ol=s(ht,"LI",{});var Ym=n(ol);uu=l(Ym,"Attach any other additional information, like screenshots, you think may help."),Ym.forEach(o),ht.forEach(o),ys=h(t),er=s(t,"P",{});var jm=n(er);hu=l(jm,"To get the OS and software versions automatically, run the following command:"),jm.forEach(o),ws=h(t),y(At.$$.fragment,t),vs=h(t),tr=s(t,"P",{});var Xm=n(tr);fu=l(Xm,"You can also run the same command from the root of the repository:"),Xm.forEach(o),gs=h(t),y(xt.$$.fragment,t),bs=h(t),me=s(t,"H3",{class:!0});var Cn=n(me);He=s(Cn,"A",{id:!0,class:!0,href:!0});var Bm=n(He);rl=s(Bm,"SPAN",{});var Vm=n(rl);y(Ot.$$.fragment,Vm),Vm.forEach(o),Bm.forEach(o),du=h(Cn),ll=s(Cn,"SPAN",{});var zm=n(ll);cu=l(zm,"Do you want a new feature?"),zm.forEach(o),Cn.forEach(o),_s=h(t),or=s(t,"P",{});var Qm=n(or);pu=l(Qm,"If there is a new feature you\u2019d like to see in \u{1F917} Transformers, please open an issue and describe:"),Qm.forEach(o),Es=h(t),L=s(t,"OL",{});var ft=n(L);Ut=s(ft,"LI",{});var Rn=n(Ut);Gt=s(Rn,"P",{});var Wn=n(Gt);mu=l(Wn,"What is the "),al=s(Wn,"EM",{});var Km=n(al);yu=l(Km,"motivation"),Km.forEach(o),wu=l(Wn," behind this feature? Is it related to a problem or frustration with the library? Is it a feature related to something you need for a project? Is it something you worked on and think it could benefit the community?"),Wn.forEach(o),vu=h(Rn),sl=s(Rn,"P",{});var ey=n(sl);gu=l(ey,"Whatever it is, we\u2019d love to hear about it!"),ey.forEach(o),Rn.forEach(o),bu=h(ft),nl=s(ft,"LI",{});var ty=n(nl);il=s(ty,"P",{});var oy=n(il);_u=l(oy,"Describe your requested feature in as much detail as possible. The more you can tell us about it, the better we\u2019ll be able to help you."),oy.forEach(o),ty.forEach(o),Eu=h(ft),ul=s(ft,"LI",{});var ry=n(ul);Lt=s(ry,"P",{});var An=n(Lt);ku=l(An,"Provide a "),hl=s(An,"EM",{});var ly=n(hl);$u=l(ly,"code snippet"),ly.forEach(o),Tu=l(An," that demonstrates the features usage."),An.forEach(o),ry.forEach(o),Iu=h(ft),fl=s(ft,"LI",{});var ay=n(fl);dl=s(ay,"P",{});var sy=n(dl);Pu=l(sy,"If the feature is related to a paper, please include a link."),sy.forEach(o),ay.forEach(o),ft.forEach(o),ks=h(t),rr=s(t,"P",{});var ny=n(rr);Mu=l(ny,"If your issue is well written we\u2019re already 80% of the way there by the time you create it."),ny.forEach(o),$s=h(t),Fe=s(t,"P",{});var xn=n(Fe);Su=l(xn,"We have added "),Nt=s(xn,"A",{href:!0,rel:!0});var iy=n(Nt);Cu=l(iy,"templates"),iy.forEach(o),Ru=l(xn," to help you get started with your issue."),xn.forEach(o),Ts=h(t),ye=s(t,"H2",{class:!0});var On=n(ye);Ye=s(On,"A",{id:!0,class:!0,href:!0});var uy=n(Ye);cl=s(uy,"SPAN",{});var hy=n(cl);y(Jt.$$.fragment,hy),hy.forEach(o),uy.forEach(o),Wu=h(On),pl=s(On,"SPAN",{});var fy=n(pl);Au=l(fy,"Do you want to implement a new model?"),fy.forEach(o),On.forEach(o),Is=h(t),lr=s(t,"P",{});var dy=n(lr);xu=l(dy,"New models are constantly released and if you want to implement a new model, please provide the following information"),dy.forEach(o),Ps=h(t),B=s(t,"UL",{});var vr=n(B);ml=s(vr,"LI",{});var cy=n(ml);Ou=l(cy,"A short description of the model and link to the paper."),cy.forEach(o),Uu=h(vr),yl=s(vr,"LI",{});var py=n(yl);Gu=l(py,"Link to the implementation if it is open-sourced."),py.forEach(o),Lu=h(vr),wl=s(vr,"LI",{});var my=n(wl);Nu=l(my,"Link to the model weights if they are available."),my.forEach(o),vr.forEach(o),Ms=h(t),ar=s(t,"P",{});var yy=n(ar);Ju=l(yy,"If you are willing to contribute the model yourself, let us know so we can help you add it to \u{1F917} Transformers!"),yy.forEach(o),Ss=h(t),V=s(t,"P",{});var gr=n(V);Zu=l(gr,"We have added a "),Zt=s(gr,"A",{href:!0,rel:!0});var wy=n(Zt);qu=l(wy,"detailed guide and templates"),wy.forEach(o),Du=l(gr," to help you get started with adding a new model, and we also have a more technical guide for "),qt=s(gr,"A",{href:!0,rel:!0});var vy=n(qt);Hu=l(vy,"how to add a model to \u{1F917} Transformers"),vy.forEach(o),Fu=l(gr,"."),gr.forEach(o),Cs=h(t),we=s(t,"H2",{class:!0});var Un=n(we);je=s(Un,"A",{id:!0,class:!0,href:!0});var gy=n(je);vl=s(gy,"SPAN",{});var by=n(vl);y(Dt.$$.fragment,by),by.forEach(o),gy.forEach(o),Yu=h(Un),gl=s(Un,"SPAN",{});var _y=n(gl);ju=l(_y,"Do you want to add documentation?"),_y.forEach(o),Un.forEach(o),Rs=h(t),sr=s(t,"P",{});var Ey=n(sr);Xu=l(Ey,"We\u2019re always looking for improvements to the documentation that make it more clear and accurate. Please let us know how the documentation can be improved such as typos and any content that is missing, unclear or inaccurate. We\u2019ll be happy to make the changes or help you make a contribution if you\u2019re interested!"),Ey.forEach(o),Ws=h(t),Xe=s(t,"P",{});var Gn=n(Xe);Bu=l(Gn,"For more details about how to generate, build, and write the documentation, take a look at the documentation "),Ht=s(Gn,"A",{href:!0,rel:!0});var ky=n(Ht);Vu=l(ky,"README"),ky.forEach(o),zu=l(Gn,"."),Gn.forEach(o),As=h(t),ve=s(t,"H2",{class:!0});var Ln=n(ve);Be=s(Ln,"A",{id:!0,class:!0,href:!0});var $y=n(Be);bl=s($y,"SPAN",{});var Ty=n(bl);y(Ft.$$.fragment,Ty),Ty.forEach(o),$y.forEach(o),Qu=h(Ln),_l=s(Ln,"SPAN",{});var Iy=n(_l);Ku=l(Iy,"Create a Pull Request"),Iy.forEach(o),Ln.forEach(o),xs=h(t),nr=s(t,"P",{});var Py=n(nr);eh=l(Py,`Before writing any code, we strongly advise you to search through the existing PRs or
issues to make sure 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.`),Py.forEach(o),Os=h(t),M=s(t,"P",{});var le=n(M);th=l(le,"You will need basic "),El=s(le,"CODE",{});var My=n(El);oh=l(My,"git"),My.forEach(o),rh=l(le,` proficiency to contribute to
\u{1F917} Transformers. While `),kl=s(le,"CODE",{});var Sy=n(kl);lh=l(Sy,"git"),Sy.forEach(o),ah=l(le,` is not the easiest tool to use, it has the greatest
manual. Type `),$l=s(le,"CODE",{});var Cy=n($l);sh=l(Cy,"git --help"),Cy.forEach(o),nh=l(le," in a shell and enjoy! If you prefer books, "),Yt=s(le,"A",{href:!0,rel:!0});var Ry=n(Yt);ih=l(Ry,`Pro
Git`),Ry.forEach(o),uh=l(le," is a very good reference."),le.forEach(o),Us=h(t),Ve=s(t,"P",{});var Nn=n(Ve);hh=l(Nn,"You\u2019ll need "),Tl=s(Nn,"STRONG",{});var Wy=n(Tl);ir=s(Wy,"A",{href:!0});var Ay=n(ir);fh=l(Ay,"Python 3.8"),Ay.forEach(o),Wy.forEach(o),dh=l(Nn," or above to contribute to \u{1F917} Transformers. Follow the steps below to start contributing:"),Nn.forEach(o),Gs=h(t),k=s(t,"OL",{});var C=n(k);Il=s(C,"LI",{});var xy=n(Il);ge=s(xy,"P",{});var br=n(ge);ch=l(br,"Fork the "),jt=s(br,"A",{href:!0,rel:!0});var Oy=n(jt);ph=l(Oy,"repository"),Oy.forEach(o),mh=l(br,` by
clicking on the `),Pl=s(br,"STRONG",{});var Uy=n(Pl);Xt=s(Uy,"A",{href:!0,rel:!0});var Gy=n(Xt);yh=l(Gy,"Fork"),Gy.forEach(o),Uy.forEach(o),wh=l(br,` button on the repository\u2019s page. This creates a copy of the code
under your GitHub user account.`),br.forEach(o),xy.forEach(o),vh=h(C),Bt=s(C,"LI",{});var Jn=n(Bt);Ml=s(Jn,"P",{});var Ly=n(Ml);gh=l(Ly,"Clone your fork to your local disk, and add the base repository as a remote:"),Ly.forEach(o),bh=h(Jn),y(Vt.$$.fragment,Jn),Jn.forEach(o),_h=h(C),be=s(C,"LI",{});var _r=n(be);Sl=s(_r,"P",{});var Ny=n(Sl);Eh=l(Ny,"Create a new branch to hold your development changes:"),Ny.forEach(o),kh=h(_r),y(zt.$$.fragment,_r),$h=h(_r),_e=s(_r,"P",{});var Er=n(_e);Th=l(Er,"\u{1F6A8} "),Cl=s(Er,"STRONG",{});var Jy=n(Cl);Ih=l(Jy,"Do not"),Jy.forEach(o),Ph=l(Er," work on the "),Rl=s(Er,"CODE",{});var Zy=n(Rl);Mh=l(Zy,"main"),Zy.forEach(o),Sh=l(Er," branch!"),Er.forEach(o),_r.forEach(o),Ch=h(C),P=s(C,"LI",{});var F=n(P);Wl=s(F,"P",{});var qy=n(Wl);Rh=l(qy,"Set up a development environment by running the following command in a virtual environment:"),qy.forEach(o),Wh=h(F),y(Qt.$$.fragment,F),Ah=h(F),Ee=s(F,"P",{});var kr=n(Ee);xh=l(kr,`If \u{1F917} Transformers was already installed in the virtual environment, remove
it with `),Al=s(kr,"CODE",{});var Dy=n(Al);Oh=l(Dy,"pip uninstall transformers"),Dy.forEach(o),Uh=l(kr,` before reinstalling it in editable
mode with the `),xl=s(kr,"CODE",{});var Hy=n(xl);Gh=l(Hy,"-e"),Hy.forEach(o),Lh=l(kr," flag."),kr.forEach(o),Nh=h(F),Ol=s(F,"P",{});var Fy=n(Ol);Jh=l(Fy,`Depending on your OS, and since the number of optional dependencies of Transformers is growing, you might get a
failure with this command. If that\u2019s the case make sure to install the Deep Learning framework you are working with
(PyTorch, TensorFlow and/or Flax) then do:`),Fy.forEach(o),Zh=h(F),y(Kt.$$.fragment,F),qh=h(F),Ul=s(F,"P",{});var Yy=n(Ul);Dh=l(Yy,"which should be enough for most use cases."),Yy.forEach(o),F.forEach(o),Hh=h(C),c=s(C,"LI",{});var p=n(c);Gl=s(p,"P",{});var jy=n(Gl);Fh=l(jy,"Develop the features on your branch."),jy.forEach(o),Yh=h(p),Ll=s(p,"P",{});var Xy=n(Ll);jh=l(Xy,`As you work on your code, you should make sure the test suite
passes. Run the tests impacted by your changes like this:`),Xy.forEach(o),Xh=h(p),y(eo.$$.fragment,p),Bh=h(p),to=s(p,"P",{});var Zn=n(to);Vh=l(Zn,`For more information about tests, check out the
`),oo=s(Zn,"A",{href:!0,rel:!0});var By=n(oo);zh=l(By,"Testing"),By.forEach(o),Qh=l(Zn," guide."),Zn.forEach(o),Kh=h(p),ke=s(p,"P",{});var $r=n(ke);ef=l($r,"\u{1F917} Transformers relies on "),Nl=s($r,"CODE",{});var Vy=n(Nl);tf=l(Vy,"black"),Vy.forEach(o),of=l($r," and "),Jl=s($r,"CODE",{});var zy=n(Jl);rf=l(zy,"ruff"),zy.forEach(o),lf=l($r,` 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:`),$r.forEach(o),af=h(p),y(ro.$$.fragment,p),sf=h(p),Zl=s(p,"P",{});var Qy=n(Zl);nf=l(Qy,"This target is also optimized to only work with files modified by the PR you\u2019re working on."),Qy.forEach(o),uf=h(p),ql=s(p,"P",{});var Ky=n(ql);hf=l(Ky,`If you prefer to run the checks one after the other, the following command applies the
style corrections:`),Ky.forEach(o),ff=h(p),y(lo.$$.fragment,p),df=h(p),ao=s(p,"P",{});var qn=n(ao);cf=l(qn,"\u{1F917} Transformers also uses "),Dl=s(qn,"CODE",{});var ew=n(Dl);pf=l(ew,"ruff"),ew.forEach(o),mf=l(qn,` and a few custom scripts to check for coding mistakes. Quality
controls are run by the CI, but you can run the same checks with:`),qn.forEach(o),yf=h(p),y(so.$$.fragment,p),wf=h(p),Hl=s(p,"P",{});var tw=n(Hl);vf=l(tw,`Finally, we have a lot of scripts to make sure we didn\u2019t forget to update
some files when adding a new model. You can run these scripts with:`),tw.forEach(o),gf=h(p),y(no.$$.fragment,p),bf=h(p),io=s(p,"P",{});var Dn=n(io);_f=l(Dn,`To learn more about those checks and how to fix any issues with them, check out the
`),uo=s(Dn,"A",{href:!0,rel:!0});var ow=n(uo);Ef=l(ow,"Checks on a Pull Request"),ow.forEach(o),kf=l(Dn," guide."),Dn.forEach(o),$f=h(p),ho=s(p,"P",{});var Hn=n(ho);Tf=l(Hn,"If you\u2019re modifying documents under "),Fl=s(Hn,"CODE",{});var rw=n(Fl);If=l(rw,"docs/source"),rw.forEach(o),Pf=l(Hn,` directory, make sure the documentation can still be built. This check will also run in the CI when you open a pull request. To run a local check
make sure you install the documentation builder:`),Hn.forEach(o),Mf=h(p),y(fo.$$.fragment,p),Sf=h(p),Yl=s(p,"P",{});var lw=n(Yl);Cf=l(lw,"Run the following command from the root of the repository:"),lw.forEach(o),Rf=h(p),y(co.$$.fragment,p),Wf=h(p),po=s(p,"P",{});var Fn=n(po);Af=l(Fn,"This will build the documentation in the "),jl=s(Fn,"CODE",{});var aw=n(jl);xf=l(aw,"~/tmp/test-build"),aw.forEach(o),Of=l(Fn,` folder where you can inspect the generated
Markdown files with your favorite editor. You can also preview the docs on GitHub when you open a pull request.`),Fn.forEach(o),Uf=h(p),$e=s(p,"P",{});var Tr=n($e);Gf=l(Tr,"Once you\u2019re happy with your changes, add changed files with "),Xl=s(Tr,"CODE",{});var sw=n(Xl);Lf=l(sw,"git add"),sw.forEach(o),Nf=l(Tr,` and
record your changes locally with `),Bl=s(Tr,"CODE",{});var nw=n(Bl);Jf=l(nw,"git commit"),nw.forEach(o),Zf=l(Tr,":"),Tr.forEach(o),qf=h(p),y(mo.$$.fragment,p),Df=h(p),yo=s(p,"P",{});var Yn=n(yo);Hf=l(Yn,"Please remember to write "),wo=s(Yn,"A",{href:!0,rel:!0});var iw=n(wo);Ff=l(iw,`good commit
messages`),iw.forEach(o),Yf=l(Yn," to clearly communicate the changes you made!"),Yn.forEach(o),jf=h(p),Te=s(p,"P",{});var Ir=n(Te);Xf=l(Ir,`To keep your copy of the code up to date with the original
repository, rebase your branch on `),Vl=s(Ir,"CODE",{});var uw=n(Vl);Bf=l(uw,"upstream/branch"),uw.forEach(o),Vf=h(Ir),zl=s(Ir,"EM",{});var hw=n(zl);zf=l(hw,"before"),hw.forEach(o),Qf=l(Ir," you open a pull request or if requested by a maintainer:"),Ir.forEach(o),Kf=h(p),y(vo.$$.fragment,p),ed=h(p),Ql=s(p,"P",{});var fw=n(Ql);td=l(fw,"Push your changes to your branch:"),fw.forEach(o),od=h(p),y(go.$$.fragment,p),rd=h(p),bo=s(p,"P",{});var jn=n(bo);ld=l(jn,"If you\u2019ve already opened a pull request, you\u2019ll need to force push with the "),Kl=s(jn,"CODE",{});var dw=n(Kl);ad=l(dw,"--force"),dw.forEach(o),sd=l(jn," flag. Otherwise, if the pull request hasn\u2019t been opened yet, you can just push your changes normally."),jn.forEach(o),p.forEach(o),nd=h(C),ea=s(C,"LI",{});var cw=n(ea);Ie=s(cw,"P",{});var Pr=n(Ie);id=l(Pr,"Now you can go to your fork of the repository on GitHub and click on "),ta=s(Pr,"STRONG",{});var pw=n(ta);ud=l(pw,"Pull request"),pw.forEach(o),hd=l(Pr," to open a pull request. Make sure you tick off all the boxes in our "),_o=s(Pr,"A",{href:!0,rel:!0});var mw=n(_o);fd=l(mw,"checklist"),mw.forEach(o),dd=l(Pr," below. When you\u2019re ready, you can send your changes to the project maintainers for review."),Pr.forEach(o),cw.forEach(o),cd=h(C),oa=s(C,"LI",{});var yw=n(oa);ra=s(yw,"P",{});var ww=n(ra);pd=l(ww,`It\u2019s ok if maintainers request changes, it happens to our 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.`),ww.forEach(o),yw.forEach(o),C.forEach(o),Ls=h(t),Pe=s(t,"H3",{class:!0});var Xn=n(Pe);ze=s(Xn,"A",{id:!0,class:!0,href:!0});var vw=n(ze);la=s(vw,"SPAN",{});var gw=n(la);y(Eo.$$.fragment,gw),gw.forEach(o),vw.forEach(o),md=h(Xn),aa=s(Xn,"SPAN",{});var bw=n(aa);yd=l(bw,"Pull request checklist"),bw.forEach(o),Xn.forEach(o),Ns=h(t),$=s(t,"P",{});var x=n($);wd=l(x,"\u2610 The pull request title should summarize your contribution."),vd=s(x,"BR",{}),gd=l(x,`
\u2610 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 viewing the issue know you
are working on it).`),bd=s(x,"BR",{}),_d=l(x,`
\u2610 To indicate a work in progress please prefix the title with `),sa=s(x,"CODE",{});var _w=n(sa);Ed=l(_w,"[WIP]"),_w.forEach(o),kd=l(x,`. These are
useful to avoid duplicated work, and to differentiate it from PRs ready to be merged.`),$d=s(x,"BR",{}),Td=l(x,`
\u2610 Make sure existing tests pass.`),Id=s(x,"BR",{}),Pd=l(x,`
\u2610 If adding a new feature, also add tests for it.`),Md=s(x,"BR",{}),x.forEach(o),Js=h(t),N=s(t,"UL",{});var dt=n(N);ko=s(dt,"LI",{});var Bn=n(ko);Sd=l(Bn,`If you are adding a new model, make sure you use
`),na=s(Bn,"CODE",{});var Ew=n(na);Cd=l(Ew,"ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,...)"),Ew.forEach(o),Rd=l(Bn," to trigger the common tests."),Bn.forEach(o),Wd=h(dt),Me=s(dt,"LI",{});var Mr=n(Me);Ad=l(Mr,"If you are adding new "),ia=s(Mr,"CODE",{});var kw=n(ia);xd=l(kw,"@slow"),kw.forEach(o),Od=l(Mr,` tests, make sure they pass using
`),ua=s(Mr,"CODE",{});var $w=n(ua);Ud=l($w,"RUN_SLOW=1 python -m pytest tests/models/my_new_model/test_my_new_model.py"),$w.forEach(o),Gd=l(Mr,"."),Mr.forEach(o),Ld=h(dt),$o=s(dt,"LI",{});var Vn=n($o);Nd=l(Vn,`If you are adding a new tokenizer, write tests and make sure
`),ha=s(Vn,"CODE",{});var Tw=n(ha);Jd=l(Tw,"RUN_SLOW=1 python -m pytest tests/models/{your_model_name}/test_tokenization_{your_model_name}.py"),Tw.forEach(o),Zd=l(Vn," passes."),Vn.forEach(o),qd=h(dt),ur=s(dt,"LI",{});var tm=n(ur);Dd=l(tm,"CircleCI does not run the slow tests, but GitHub Actions does every night!"),Hd=s(tm,"BR",{}),tm.forEach(o),dt.forEach(o),Zs=h(t),S=s(t,"P",{});var ae=n(S);Fd=l(ae,`\u2610 All public methods must have informative docstrings (see
`),To=s(ae,"A",{href:!0,rel:!0});var Iw=n(To);fa=s(Iw,"CODE",{});var Pw=n(fa);Yd=l(Pw,"modeling_bert.py"),Pw.forEach(o),Iw.forEach(o),jd=l(ae,`
for an example).`),Xd=s(ae,"BR",{}),Bd=l(ae,`
\u2610 Due to the rapidly growing repository, don\u2019t add any images, videos and other
non-text files that\u2019ll significantly weigh down the repository. Instead, use a Hub
repository such as `),Io=s(ae,"A",{href:!0,rel:!0});var Mw=n(Io);da=s(Mw,"CODE",{});var Sw=n(da);Vd=l(Sw,"hf-internal-testing"),Sw.forEach(o),Mw.forEach(o),zd=l(ae,`
to host these files and reference them by URL. We recommend placing documentation
related images in the following repository:
`),Po=s(ae,"A",{href:!0,rel:!0});var Cw=n(Po);Qd=l(Cw,"huggingface/documentation-images"),Cw.forEach(o),Kd=l(ae,`.
You can open a PR on this dataset repostitory and ask a Hugging Face member to merge it.`),ae.forEach(o),qs=h(t),Qe=s(t,"P",{});var zn=n(Qe);ec=l(zn,"For more information about the checks run on a pull request, take a look at our "),Mo=s(zn,"A",{href:!0,rel:!0});var Rw=n(Mo);tc=l(Rw,"Checks on a Pull Request"),Rw.forEach(o),oc=l(zn," guide."),zn.forEach(o),Ds=h(t),Se=s(t,"H3",{class:!0});var Qn=n(Se);Ke=s(Qn,"A",{id:!0,class:!0,href:!0});var Ww=n(Ke);ca=s(Ww,"SPAN",{});var Aw=n(ca);y(So.$$.fragment,Aw),Aw.forEach(o),Ww.forEach(o),rc=h(Qn),pa=s(Qn,"SPAN",{});var xw=n(pa);lc=l(xw,"Tests"),xw.forEach(o),Qn.forEach(o),Hs=h(t),z=s(t,"P",{});var Sr=n(z);ac=l(Sr,`An extensive test suite is included to test the library behavior and several examples. Library tests can be found in
the `),Co=s(Sr,"A",{href:!0,rel:!0});var Ow=n(Co);sc=l(Ow,"tests"),Ow.forEach(o),nc=l(Sr,` folder and examples tests in the
`),Ro=s(Sr,"A",{href:!0,rel:!0});var Uw=n(Ro);ic=l(Uw,"examples"),Uw.forEach(o),uc=l(Sr," folder."),Sr.forEach(o),Fs=h(t),J=s(t,"P",{});var ct=n(J);hc=l(ct,"We like "),ma=s(ct,"CODE",{});var Gw=n(ma);fc=l(Gw,"pytest"),Gw.forEach(o),dc=l(ct," and "),ya=s(ct,"CODE",{});var Lw=n(ya);cc=l(Lw,"pytest-xdist"),Lw.forEach(o),pc=l(ct,` because it\u2019s faster. From the root of the
repository, specify a `),wa=s(ct,"EM",{});var Nw=n(wa);mc=l(Nw,"path to a subfolder or a test file"),Nw.forEach(o),yc=l(ct," to run the test."),ct.forEach(o),Ys=h(t),y(Wo.$$.fragment,t),js=h(t),Z=s(t,"P",{});var pt=n(Z);wc=l(pt,"Similarly, for the "),va=s(pt,"CODE",{});var Jw=n(va);vc=l(Jw,"examples"),Jw.forEach(o),gc=l(pt," directory, specify a "),ga=s(pt,"EM",{});var Zw=n(ga);bc=l(Zw,"path to a subfolder or test file"),Zw.forEach(o),_c=l(pt," to run the test. For example, the following command tests the text classification subfolder in the PyTorch "),ba=s(pt,"CODE",{});var qw=n(ba);Ec=l(qw,"examples"),qw.forEach(o),kc=l(pt," directory:"),pt.forEach(o),Xs=h(t),y(Ao.$$.fragment,t),Bs=h(t),q=s(t,"P",{});var mt=n(q);$c=l(mt,"In fact, this is actually how our "),_a=s(mt,"CODE",{});var Dw=n(_a);Tc=l(Dw,"make test"),Dw.forEach(o),Ic=l(mt," and "),Ea=s(mt,"CODE",{});var Hw=n(Ea);Pc=l(Hw,"make test-examples"),Hw.forEach(o),Mc=l(mt," commands are implemented (not including the "),ka=s(mt,"CODE",{});var Fw=n(ka);Sc=l(Fw,"pip install"),Fw.forEach(o),Cc=l(mt,")!"),mt.forEach(o),Vs=h(t),hr=s(t,"P",{});var Yw=n(hr);Rc=l(Yw,`You can also specify a smaller set of tests in order to test only the feature
you\u2019re working on.`),Yw.forEach(o),zs=h(t),Q=s(t,"P",{});var Cr=n(Q);Wc=l(Cr,"By default, slow tests are skipped but you can set the "),$a=s(Cr,"CODE",{});var jw=n($a);Ac=l(jw,"RUN_SLOW"),jw.forEach(o),xc=l(Cr,` environment variable to
`),Ta=s(Cr,"CODE",{});var Xw=n(Ta);Oc=l(Xw,"yes"),Xw.forEach(o),Uc=l(Cr,` to run them. This will download many gigabytes of models so make sure you
have enough disk space, a good internet connection or a lot of patience!`),Cr.forEach(o),Qs=h(t),y(et.$$.fragment,t),Ks=h(t),y(xo.$$.fragment,t),en=h(t),fr=s(t,"P",{});var Bw=n(fr);Gc=l(Bw,"Like the slow tests, there are other environment variables available which not enabled by default during testing:"),Bw.forEach(o),tn=h(t),K=s(t,"UL",{});var Rr=n(K);dr=s(Rr,"LI",{});var om=n(dr);Ia=s(om,"CODE",{});var Vw=n(Ia);Lc=l(Vw,"RUN_CUSTOM_TOKENIZERS"),Vw.forEach(o),Nc=l(om,": Enables tests for custom tokenizers."),om.forEach(o),Jc=h(Rr),cr=s(Rr,"LI",{});var rm=n(cr);Pa=s(rm,"CODE",{});var zw=n(Pa);Zc=l(zw,"RUN_PT_FLAX_CROSS_TESTS"),zw.forEach(o),qc=l(rm,": Enables tests for PyTorch + Flax integration."),rm.forEach(o),Dc=h(Rr),pr=s(Rr,"LI",{});var lm=n(pr);Ma=s(lm,"CODE",{});var Qw=n(Ma);Hc=l(Qw,"RUN_PT_TF_CROSS_TESTS"),Qw.forEach(o),Fc=l(lm,": Enables tests for TensorFlow + PyTorch integration."),lm.forEach(o),Rr.forEach(o),on=h(t),tt=s(t,"P",{});var Kn=n(tt);Yc=l(Kn,"More environment variables and additional information can be found in the "),mr=s(Kn,"A",{href:!0});var Kw=n(mr);jc=l(Kw,"testing_utils.py"),Kw.forEach(o),Xc=l(Kn,"."),Kn.forEach(o),rn=h(t),ee=s(t,"P",{});var Wr=n(ee);Bc=l(Wr,"\u{1F917} Transformers uses "),Sa=s(Wr,"CODE",{});var ev=n(Sa);Vc=l(ev,"pytest"),ev.forEach(o),zc=l(Wr,` as a test runner only. It doesn\u2019t use any
`),Ca=s(Wr,"CODE",{});var tv=n(Ca);Qc=l(tv,"pytest"),tv.forEach(o),Kc=l(Wr,"-specific features in the test suite itself."),Wr.forEach(o),ln=h(t),te=s(t,"P",{});var Ar=n(te);ep=l(Ar,"This means "),Ra=s(Ar,"CODE",{});var ov=n(Ra);tp=l(ov,"unittest"),ov.forEach(o),op=l(Ar,` is fully supported. Here\u2019s how to run tests with
`),Wa=s(Ar,"CODE",{});var rv=n(Wa);rp=l(rv,"unittest"),rv.forEach(o),lp=l(Ar,":"),Ar.forEach(o),an=h(t),y(Oo.$$.fragment,t),sn=h(t),Ce=s(t,"H3",{class:!0});var ei=n(Ce);ot=s(ei,"A",{id:!0,class:!0,href:!0});var lv=n(ot);Aa=s(lv,"SPAN",{});var av=n(Aa);y(Uo.$$.fragment,av),av.forEach(o),lv.forEach(o),ap=h(ei),xa=s(ei,"SPAN",{});var sv=n(xa);sp=l(sv,"Style guide"),sv.forEach(o),ei.forEach(o),nn=h(t),oe=s(t,"P",{});var xr=n(oe);np=l(xr,"For documentation strings, \u{1F917} Transformers follows the "),Go=s(xr,"A",{href:!0,rel:!0});var nv=n(Go);ip=l(nv,"Google Python Style Guide"),nv.forEach(o),up=l(xr,`.
Check our `),Lo=s(xr,"A",{href:!0,rel:!0});var iv=n(Lo);hp=l(iv,"documentation writing guide"),iv.forEach(o),fp=l(xr,`
for more information.`),xr.forEach(o),un=h(t),Re=s(t,"H3",{class:!0});var ti=n(Re);rt=s(ti,"A",{id:!0,class:!0,href:!0});var uv=n(rt);Oa=s(uv,"SPAN",{});var hv=n(Oa);y(No.$$.fragment,hv),hv.forEach(o),uv.forEach(o),dp=h(ti),Ua=s(ti,"SPAN",{});var fv=n(Ua);cp=l(fv,"Develop on Windows"),fv.forEach(o),ti.forEach(o),hn=h(t),D=s(t,"P",{});var yt=n(D);pp=l(yt,"On Windows (unless you\u2019re working in "),Jo=s(yt,"A",{href:!0,rel:!0});var dv=n(Jo);mp=l(dv,"Windows Subsystem for Linux"),dv.forEach(o),yp=l(yt," or WSL), you need to configure git to transform Windows "),Ga=s(yt,"CODE",{});var cv=n(Ga);wp=l(cv,"CRLF"),cv.forEach(o),vp=l(yt," line endings to Linux "),La=s(yt,"CODE",{});var pv=n(La);gp=l(pv,"LF"),pv.forEach(o),bp=l(yt," line endings:"),yt.forEach(o),fn=h(t),y(Zo.$$.fragment,t),dn=h(t),lt=s(t,"P",{});var oi=n(lt);_p=l(oi,"One way to run the "),Na=s(oi,"CODE",{});var mv=n(Na);Ep=l(mv,"make"),mv.forEach(o),kp=l(oi," command on Windows is with MSYS2:"),oi.forEach(o),cn=h(t),H=s(t,"OL",{});var wt=n(H);at=s(wt,"LI",{});var Qa=n(at);qo=s(Qa,"A",{href:!0,rel:!0});var yv=n(qo);$p=l(yv,"Download MSYS2"),yv.forEach(o),Tp=l(Qa,", and we assume it\u2019s installed in "),Ja=s(Qa,"CODE",{});var wv=n(Ja);Ip=l(wv,"C:\\msys64"),wv.forEach(o),Pp=l(Qa,"."),Qa.forEach(o),Mp=h(wt),We=s(wt,"LI",{});var Or=n(We);Sp=l(Or,"Open the command line "),Za=s(Or,"CODE",{});var vv=n(Za);Cp=l(vv,"C:\\msys64\\msys2.exe"),vv.forEach(o),Rp=l(Or," (it should be available from the "),qa=s(Or,"STRONG",{});var gv=n(qa);Wp=l(gv,"Start"),gv.forEach(o),Ap=l(Or," menu)."),Or.forEach(o),xp=h(wt),Y=s(wt,"LI",{});var vt=n(Y);Op=l(vt,"Run in the shell: "),Da=s(vt,"CODE",{});var bv=n(Da);Up=l(bv,"pacman -Syu"),bv.forEach(o),Gp=l(vt," and install "),Ha=s(vt,"CODE",{});var _v=n(Ha);Lp=l(_v,"make"),_v.forEach(o),Np=l(vt," with "),Fa=s(vt,"CODE",{});var Ev=n(Fa);Jp=l(Ev,"pacman -S make"),Ev.forEach(o),Zp=l(vt,"."),vt.forEach(o),qp=h(wt),Do=s(wt,"LI",{});var ri=n(Do);Dp=l(ri,"Add "),Ya=s(ri,"CODE",{});var kv=n(Ya);Hp=l(kv,"C:\\msys64\\usr\\bin"),kv.forEach(o),Fp=l(ri," to your PATH environment variable."),ri.forEach(o),wt.forEach(o),pn=h(t),st=s(t,"P",{});var li=n(st);Yp=l(li,"You can now use "),ja=s(li,"CODE",{});var $v=n(ja);jp=l($v,"make"),$v.forEach(o),Xp=l(li," from any terminal (Powershell, cmd.exe, etc.)! \u{1F389}"),li.forEach(o),mn=h(t),Ae=s(t,"H3",{class:!0});var ai=n(Ae);nt=s(ai,"A",{id:!0,class:!0,href:!0});var Tv=n(nt);Xa=s(Tv,"SPAN",{});var Iv=n(Xa);y(Ho.$$.fragment,Iv),Iv.forEach(o),Tv.forEach(o),Bp=h(ai),Ba=s(ai,"SPAN",{});var Pv=n(Ba);Vp=l(Pv,"Sync a forked repository with upstream main (the Hugging Face repository)"),Pv.forEach(o),ai.forEach(o),yn=h(t),yr=s(t,"P",{});var Mv=n(yr);zp=l(Mv,"When updating the main branch of a forked repository, please follow these steps 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."),Mv.forEach(o),wn=h(t),it=s(t,"OL",{});var si=n(it);Va=s(si,"LI",{});var Sv=n(Va);Qp=l(Sv,"When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead, merge directly into the forked main."),Sv.forEach(o),Kp=h(si),za=s(si,"LI",{});var Cv=n(za);em=l(Cv,"If a PR is absolutely necessary, use the following steps after checking out your branch:"),Cv.forEach(o),si.forEach(o),vn=h(t),y(Fo.$$.fragment,t),this.h()},h(){d(_,"name","hf:doc:metadata"),d(_,"content",JSON.stringify(Nv)),d(O,"id","contribute-to-transformers"),d(O,"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(O,"href","#contribute-to-transformers"),d(T,"class","relative group"),d(_t,"href","https://github.com/huggingface/transformers/blob/main/CODE_OF_CONDUCT.md"),d(_t,"rel","nofollow"),d(kt,"href","https://github.com/scikit-learn/scikit-learn/blob/main/CONTRIBUTING.md"),d(kt,"rel","nofollow"),d(Ge,"id","ways-to-contribute"),d(Ge,"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(Ge,"href","#ways-to-contribute"),d(fe,"class","relative group"),d(Tt,"href","https://github.com/huggingface/transformers/contribute"),d(Tt,"rel","nofollow"),d(It,"href","https://github.com/huggingface/transformers/labels/Good%20Second%20Issue"),d(It,"rel","nofollow"),d(Je,"id","fixing-outstanding-issues"),d(Je,"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(Je,"href","#fixing-outstanding-issues"),d(de,"class","relative group"),d(Mt,"href","https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md/#create-a-pull-request"),d(Mt,"rel","nofollow"),d(qe,"id","submitting-a-bugrelated-issue-or-feature-request"),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","#submitting-a-bugrelated-issue-or-feature-request"),d(ce,"class","relative group"),d(De,"id","did-you-find-a-bug"),d(De,"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(De,"href","#did-you-find-a-bug"),d(pe,"class","relative group"),d(Rt,"href","https://discuss.huggingface.co/"),d(Rt,"rel","nofollow"),d(He,"id","do-you-want-a-new-feature"),d(He,"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(He,"href","#do-you-want-a-new-feature"),d(me,"class","relative group"),d(Nt,"href","https://github.com/huggingface/transformers/tree/main/templates"),d(Nt,"rel","nofollow"),d(Ye,"id","do-you-want-to-implement-a-new-model"),d(Ye,"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(Ye,"href","#do-you-want-to-implement-a-new-model"),d(ye,"class","relative group"),d(Zt,"href","https://github.com/huggingface/transformers/tree/main/templates"),d(Zt,"rel","nofollow"),d(qt,"href","https://huggingface.co/docs/transformers/add_new_model"),d(qt,"rel","nofollow"),d(je,"id","do-you-want-to-add-documentation"),d(je,"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(je,"href","#do-you-want-to-add-documentation"),d(we,"class","relative group"),d(Ht,"href","https://github.com/huggingface/transformers/tree/main/docs"),d(Ht,"rel","nofollow"),d(Be,"id","create-a-pull-request"),d(Be,"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(Be,"href","#create-a-pull-request"),d(ve,"class","relative group"),d(Yt,"href","https://git-scm.com/book/en/v2"),d(Yt,"rel","nofollow"),d(ir,"href","(https://github.com/huggingface/transformers/blob/main/setup.py#L426)"),d(jt,"href","https://github.com/huggingface/transformers"),d(jt,"rel","nofollow"),d(Xt,"href","https://github.com/huggingface/transformers/fork"),d(Xt,"rel","nofollow"),d(oo,"href","https://huggingface.co/docs/transformers/testing"),d(oo,"rel","nofollow"),d(uo,"href","https://huggingface.co/docs/transformers/pr_checks"),d(uo,"rel","nofollow"),d(wo,"href","https://chris.beams.io/posts/git-commit/"),d(wo,"rel","nofollow"),d(_o,"href","https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md/#pull-request-checklist"),d(_o,"rel","nofollow"),d(ze,"id","pull-request-checklist"),d(ze,"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(ze,"href","#pull-request-checklist"),d(Pe,"class","relative group"),d(To,"href","https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py"),d(To,"rel","nofollow"),d(Io,"href","https://huggingface.co/hf-internal-testing"),d(Io,"rel","nofollow"),d(Po,"href","https://huggingface.co/datasets/huggingface/documentation-images"),d(Po,"rel","nofollow"),d(Mo,"href","https://huggingface.co/docs/transformers/pr_checks"),d(Mo,"rel","nofollow"),d(Ke,"id","tests"),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","#tests"),d(Se,"class","relative group"),d(Co,"href","https://github.com/huggingface/transformers/tree/main/tests"),d(Co,"rel","nofollow"),d(Ro,"href","https://github.com/huggingface/transformers/tree/main/examples"),d(Ro,"rel","nofollow"),d(mr,"href","src/transformers/testing_utils.py"),d(ot,"id","style-guide"),d(ot,"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(ot,"href","#style-guide"),d(Ce,"class","relative group"),d(Go,"href","https://google.github.io/styleguide/pyguide.html"),d(Go,"rel","nofollow"),d(Lo,"href","https://github.com/huggingface/transformers/tree/main/docs#writing-documentation---specification"),d(Lo,"rel","nofollow"),d(rt,"id","develop-on-windows"),d(rt,"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(rt,"href","#develop-on-windows"),d(Re,"class","relative group"),d(Jo,"href","https://learn.microsoft.com/en-us/windows/wsl/"),d(Jo,"rel","nofollow"),d(qo,"href","https://www.msys2.org/"),d(qo,"rel","nofollow"),d(nt,"id","sync-a-forked-repository-with-upstream-main-the-hugging-face-repository"),d(nt,"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(nt,"href","#sync-a-forked-repository-with-upstream-main-the-hugging-face-repository"),d(Ae,"class","relative group")},m(t,i){e(document.head,_),f(t,xe,i),f(t,T,i),e(T,O),e(O,se),w(W,se,null),e(T,gt),e(T,ne),e(ne,ie),f(t,Oe,i),f(t,j,i),e(j,ue),f(t,I,i),f(t,he,i),e(he,jo),f(t,bt,i),f(t,Ue,i),e(Ue,ni),e(Ue,_t),e(_t,ii),e(Ue,ui),f(t,es,i),f(t,Xo,i),e(Xo,Et),e(Et,hi),e(Et,kt),e(kt,fi),e(Et,di),f(t,ts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ho),e(ho,Tf),e(ho,Fl),e(Fl,If),e(ho,Pf),e(c,Mf),w(fo,c,null),e(c,Sf),e(c,Yl),e(Yl,Cf),e(c,Rf),w(co,c,null),e(c,Wf),e(c,po),e(po,Af),e(po,jl),e(jl,xf),e(po,Of),e(c,Uf),e(c,$e),e($e,Gf),e($e,Xl),e(Xl,Lf),e($e,Nf),e($e,Bl),e(Bl,Jf),e($e,Zf),e(c,qf),w(mo,c,null),e(c,Df),e(c,yo),e(yo,Hf),e(yo,wo),e(wo,Ff),e(yo,Yf),e(c,jf),e(c,Te),e(Te,Xf),e(Te,Vl),e(Vl,Bf),e(Te,Vf),e(Te,zl),e(zl,zf),e(Te,Qf),e(c,Kf),w(vo,c,null),e(c,ed),e(c,Ql),e(Ql,td),e(c,od),w(go,c,null),e(c,rd),e(c,bo),e(bo,ld),e(bo,Kl),e(Kl,ad),e(bo,sd),e(k,nd),e(k,ea),e(ea,Ie),e(Ie,id),e(Ie,ta),e(ta,ud),e(Ie,hd),e(Ie,_o),e(_o,fd),e(Ie,dd),e(k,cd),e(k,oa),e(oa,ra),e(ra,pd),f(t,Ls,i),f(t,Pe,i),e(Pe,ze),e(ze,la),w(Eo,la,null),e(Pe,md),e(Pe,aa),e(aa,yd),f(t,Ns,i),f(t,$,i),e($,wd),e($,vd),e($,gd),e($,bd),e($,_d),e($,sa),e(sa,Ed),e($,kd),e($,$d),e($,Td),e($,Id),e($,Pd),e($,Md),f(t,Js,i),f(t,N,i),e(N,ko),e(ko,Sd),e(ko,na),e(na,Cd),e(ko,Rd),e(N,Wd),e(N,Me),e(Me,Ad),e(Me,ia),e(ia,xd),e(Me,Od),e(Me,ua),e(ua,Ud),e(Me,Gd),e(N,Ld),e(N,$o),e($o,Nd),e($o,ha),e(ha,Jd),e($o,Zd),e(N,qd),e(N,ur),e(ur,Dd),e(ur,Hd),f(t,Zs,i),f(t,S,i),e(S,Fd),e(S,To),e(To,fa),e(fa,Yd),e(S,jd),e(S,Xd),e(S,Bd),e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f(t,te,i),e(te,ep),e(te,Ra),e(Ra,tp),e(te,op),e(te,Wa),e(Wa,rp),e(te,lp),f(t,an,i),w(Oo,t,i),f(t,sn,i),f(t,Ce,i),e(Ce,ot),e(ot,Aa),w(Uo,Aa,null),e(Ce,ap),e(Ce,xa),e(xa,sp),f(t,nn,i),f(t,oe,i),e(oe,np),e(oe,Go),e(Go,ip),e(oe,up),e(oe,Lo),e(Lo,hp),e(oe,fp),f(t,un,i),f(t,Re,i),e(Re,rt),e(rt,Oa),w(No,Oa,null),e(Re,dp),e(Re,Ua),e(Ua,cp),f(t,hn,i),f(t,D,i),e(D,pp),e(D,Jo),e(Jo,mp),e(D,yp),e(D,Ga),e(Ga,wp),e(D,vp),e(D,La),e(La,gp),e(D,bp),f(t,fn,i),w(Zo,t,i),f(t,dn,i),f(t,lt,i),e(lt,_p),e(lt,Na),e(Na,Ep),e(lt,kp),f(t,cn,i),f(t,H,i),e(H,at),e(at,qo),e(qo,$p),e(at,Tp),e(at,Ja),e(Ja,Ip),e(at,Pp),e(H,Mp),e(H,We),e(We,Sp),e(We,Za),e(Za,Cp),e(We,Rp),e(We,qa),e(qa,Wp),e(We,Ap),e(H,xp),e(H,Y),e(Y,Op),e(Y,Da),e(Da,Up),e(Y,Gp),e(Y,Ha),e(Ha,Lp),e(Y,Np),e(Y,Fa),e(Fa,Jp),e(Y,Zp),e(H,qp),e(H,Do),e(Do,Dp),e(Do,Ya),e(Ya,Hp),e(Do,Fp),f(t,pn,i),f(t,st,i),e(st,Yp),e(st,ja),e(ja,jp),e(st,Xp),f(t,mn,i),f(t,Ae,i),e(Ae,nt),e(nt,Xa),w(Ho,Xa,null),e(Ae,Bp),e(Ae,Ba),e(Ba,Vp),f(t,yn,i),f(t,yr,i),e(yr,zp),f(t,wn,i),f(t,it,i),e(it,Va),e(Va,Qp),e(it,Kp),e(it,za),e(za,em),f(t,vn,i),w(Fo,t,i),gn=!0},p(t,[i]){const Yo={};i&2&&(Yo.$$scope={dirty:i,ctx:t}),et.$set(Yo)},i(t){gn||(v(W.$$.fragment,t),v($t.$$.fragment,t),v(Pt.$$.fragment,t),v(St.$$.fragment,t),v(Ct.$$.fragment,t),v(At.$$.fragment,t),v(xt.$$.fragment,t),v(Ot.$$.fragment,t),v(Jt.$$.fragment,t),v(Dt.$$.fragment,t),v(Ft.$$.fragment,t),v(Vt.$$.fragment,t),v(zt.$$.fragment,t),v(Qt.$$.fragment,t),v(Kt.$$.fragment,t),v(eo.$$.fragment,t),v(ro.$$.fragment,t),v(lo.$$.fragment,t),v(so.$$.fragment,t),v(no.$$.fragment,t),v(fo.$$.fragment,t),v(co.$$.fragment,t),v(mo.$$.fragment,t),v(vo.$$.fragment,t),v(go.$$.fragment,t),v(Eo.$$.fragment,t),v(So.$$.fragment,t),v(Wo.$$.fragment,t),v(Ao.$$.fragment,t),v(et.$$.fragment,t),v(xo.$$.fragment,t),v(Oo.$$.fragment,t),v(Uo.$$.fragment,t),v(No.$$.fragment,t),v(Zo.$$.fragment,t),v(Ho.$$.fragment,t),v(Fo.$$.fragment,t),gn=!0)},o(t){g(W.$$.fragment,t),g($t.$$.fragment,t),g(Pt.$$.fragment,t),g(St.$$.fragment,t),g(Ct.$$.fragment,t),g(At.$$.fragment,t),g(xt.$$.fragment,t),g(Ot.$$.fragment,t),g(Jt.$$.fragment,t),g(Dt.$$.fragment,t),g(Ft.$$.fragment,t),g(Vt.$$.fragment,t),g(zt.$$.fragment,t),g(Qt.$$.fragment,t),g(Kt.$$.fragment,t),g(eo.$$.fragment,t),g(ro.$$.fragment,t),g(lo.$$.fragment,t),g(so.$$.fragment,t),g(no.$$.fragment,t),g(fo.$$.fragment,t),g(co.$$.fragment,t),g(mo.$$.fragment,t),g(vo.$$.fragment,t),g(go.$$.fragment,t),g(Eo.$$.fragment,t),g(So.$$.fragment,t),g(Wo.$$.fragment,t),g(Ao.$$.fragment,t),g(et.$$.fragment,t),g(xo.$$.fragment,t),g(Oo.$$.fragment,t),g(Uo.$$.fragment,t),g(No.$$.fragment,t),g(Zo.$$.fragment,t),g(Ho.$$.fragment,t),g(Fo.$$.fragment,t),gn=!1},d(t){o(_),t&&o(xe),t&&o(T),b(W),t&&o(Oe),t&&o(j),t&&o(I),t&&o(he),t&&o(bt),t&&o(Ue),t&&o(es),t&&o(Xo),t&&o(ts),t&&o(fe),b($t),t&&o(os),t&&o(Bo),t&&o(rs),t&&o(U),t&&o(ls),t&&o(Le),t&&o(as),t&&o(Ne),t&&o(ss),t&&o(Vo),t&&o(ns),t&&o(de),b(Pt),t&&o(is),t&&o(Ze),t&&o(us),t&&o(ce),b(St),t&&o(hs),t&&o(zo),t&&o(fs),t&&o(pe),b(Ct),t&&o(ds),t&&o(Qo),t&&o(cs),t&&o(X),t&&o(ps),t&&o(Ko),t&&o(ms),t&&o(G),t&&o(ys),t&&o(er),t&&o(ws),b(At,t),t&&o(vs),t&&o(tr),t&&o(gs),b(xt,t),t&&o(bs),t&&o(me),b(Ot),t&&o(_s),t&&o(or),t&&o(Es),t&&o(L),t&&o(ks),t&&o(rr),t&&o($s),t&&o(Fe),t&&o(Ts),t&&o(ye),b(Jt),t&&o(Is),t&&o(lr),t&&o(Ps),t&&o(B),t&&o(Ms),t&&o(ar),t&&o(Ss),t&&o(V),t&&o(Cs),t&&o(we),b(Dt),t&&o(Rs),t&&o(sr),t&&o(Ws),t&&o(Xe),t&&o(As),t&&o(ve),b(Ft),t&&o(xs),t&&o(nr),t&&o(Os),t&&o(M),t&&o(Us),t&&o(Ve),t&&o(Gs),t&&o(k),b(Vt),b(zt),b(Qt),b(Kt),b(eo),b(ro),b(lo),b(so),b(no),b(fo),b(co),b(mo),b(vo),b(go),t&&o(Ls),t&&o(Pe),b(Eo),t&&o(Ns),t&&o($),t&&o(Js),t&&o(N),t&&o(Zs),t&&o(S),t&&o(qs),t&&o(Qe),t&&o(Ds),t&&o(Se),b(So),t&&o(Hs),t&&o(z),t&&o(Fs),t&&o(J),t&&o(Ys),b(Wo,t),t&&o(js),t&&o(Z),t&&o(Xs),b(Ao,t),t&&o(Bs),t&&o(q),t&&o(Vs),t&&o(hr),t&&o(zs),t&&o(Q),t&&o(Qs),b(et,t),t&&o(Ks),b(xo,t),t&&o(en),t&&o(fr),t&&o(tn),t&&o(K),t&&o(on),t&&o(tt),t&&o(rn),t&&o(ee),t&&o(ln),t&&o(te),t&&o(an),b(Oo,t),t&&o(sn),t&&o(Ce),b(Uo),t&&o(nn),t&&o(oe),t&&o(un),t&&o(Re),b(No),t&&o(hn),t&&o(D),t&&o(fn),b(Zo,t),t&&o(dn),t&&o(lt),t&&o(cn),t&&o(H),t&&o(pn),t&&o(st),t&&o(mn),t&&o(Ae),b(Ho),t&&o(yn),t&&o(yr),t&&o(wn),t&&o(it),t&&o(vn),b(Fo,t)}}}const Nv={local:"contribute-to-transformers",sections:[{local:"ways-to-contribute",title:"Ways to contribute"},{local:"fixing-outstanding-issues",title:"Fixing outstanding issues"},{local:"submitting-a-bugrelated-issue-or-feature-request",sections:[{local:"did-you-find-a-bug",title:"Did you find a bug?"},{local:"do-you-want-a-new-feature",title:"Do you want a new feature?"}],title:"Submitting a bug-related issue or feature request"},{local:"do-you-want-to-implement-a-new-model",title:"Do you want to implement a new model?"},{local:"do-you-want-to-add-documentation",title:"Do you want to add documentation?"},{local:"create-a-pull-request",sections:[{local:"pull-request-checklist",title:"Pull request checklist"},{local:"tests",title:"Tests"},{local:"style-guide",title:"Style guide"},{local:"develop-on-windows",title:"Develop on Windows"},{local:"sync-a-forked-repository-with-upstream-main-the-hugging-face-repository",title:"Sync a forked repository with upstream main (the Hugging Face repository)"}],title:"Create a Pull Request"}],title:"Contribute to \u{1F917} Transformers"};function Jv(Ka){return Ov(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fv extends Rv{constructor(_){super();Wv(this,_,Jv,Lv,Av,{})}}export{Fv as default,Nv as metadata};
