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