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