import{S as Hs,i as Fs,s as Ws,e as s,k as h,w as v,t as l,M as Gs,c as a,d as o,m as f,a as r,x as _,h as i,b as d,G as t,g as c,y as k,L as Us,q as b,o as w,B as E,v as Js}from"../chunks/vendor-hf-doc-builder.js";import{I as $t}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as q}from"../chunks/CodeBlock-hf-doc-builder.js";function zs(Oi){let C,gt,x,S,Re,Y,To,Le,Co,At,ve,xo,Pt,$,qe,Do,Oo,Se,Io,Ro,Ne,Lo,qo,je,So,Tt,_e,No,Ct,ke,jo,xt,K,Dt,be,Mo,Ot,Q,It,we,Bo,Rt,D,N,Me,V,Ho,Be,Fo,Lt,P,Wo,He,Go,Uo,Fe,Jo,zo,qt,Ee,Yo,St,X,Nt,$e,Ko,jt,g,We,Qo,Vo,Ge,Xo,Zo,Ue,el,tl,Je,ol,Mt,j,ll,ze,il,sl,Bt,Z,Ht,ge,al,Ft,O,M,Ye,ee,rl,Ke,nl,Wt,A,cl,Qe,hl,fl,Ve,dl,pl,Xe,ul,ml,Gt,B,yl,te,Ze,vl,_l,Ut,I,H,et,oe,kl,tt,bl,Jt,p,wl,ot,El,$l,lt,gl,Al,it,Pl,Tl,st,Cl,xl,at,Dl,Ol,rt,Il,Rl,zt,le,Yt,T,Ll,nt,ql,Sl,ct,Nl,jl,Kt,ie,Qt,Ae,Ml,Vt,se,Xt,Pe,Bl,Zt,R,F,ht,ae,Hl,ft,Fl,eo,W,Wl,dt,Gl,Ul,to,re,oo,Te,Jl,lo,u,ne,zl,pt,Yl,Kl,Ql,L,Vl,ut,Xl,Zl,mt,ei,ti,oi,ce,li,yt,ii,si,ai,he,ri,vt,ni,ci,hi,fe,fi,_t,di,pi,ui,de,mi,kt,yi,vi,_i,pe,ki,bt,bi,wi,io,Ce,Ei,so,ue,ao,xe,$i,ro,G,me,gi,wt,Ai,Pi,Ti,ye,Ci,Et,xi,Di,no;return Y=new $t({}),K=new q({props:{code:"pip install transformers[dev]",highlighted:"pip install transformers[dev]"}}),Q=new q({props:{code:"pip install -e .[dev]",highlighted:"pip install -e .[dev]"}}),V=new $t({}),X=new q({props:{code:"python utils/tests_fetcher.py",highlighted:"python utils/tests_fetcher.py"}}),Z=new q({props:{code:"python -m pytest -n 8 --dist=loadfile -rA -s $(cat test_list.txt)",highlighted:'python -m pytest -n 8 --dist=loadfile -rA -s $(<span class="hljs-built_in">cat</span> test_list.txt)'}}),ee=new $t({}),oe=new $t({}),le=new q({props:{code:"make style",highlighted:"make style"}}),ie=new q({props:{code:"make quality",highlighted:"make quality"}}),se=new q({props:{code:"make fixup",highlighted:"make fixup"}}),ae=new $t({}),re=new q({props:{code:"make repo-consistency",highlighted:"make repo-consistency"}}),ue=new q({props:{code:"make fix-copies",highlighted:"make fix-copies"}}),{c(){C=s("meta"),gt=h(),x=s("h1"),S=s("a"),Re=s("span"),v(Y.$$.fragment),To=h(),Le=s("span"),Co=l("Checks on a Pull Request"),At=h(),ve=s("p"),xo=l("When you open a pull request on \u{1F917} Transformers, a fair number of checks will be run to make sure the patch you are adding is not breaking anything existing. Those checks are of four types:"),Pt=h(),$=s("ul"),qe=s("li"),Do=l("regular tests"),Oo=h(),Se=s("li"),Io=l("documentation build"),Ro=h(),Ne=s("li"),Lo=l("code and documentation style"),qo=h(),je=s("li"),So=l("general repository consistency"),Tt=h(),_e=s("p"),No=l("In this document, we will take a stab at explaining what those various checks are and the reason behind them, as well as how to debug them locally if one of them fails on your PR."),Ct=h(),ke=s("p"),jo=l("Note that they all require you to have a dev install:"),xt=h(),v(K.$$.fragment),Dt=h(),be=s("p"),Mo=l("or for an editable install:"),Ot=h(),v(Q.$$.fragment),It=h(),we=s("p"),Bo=l("inside the Transformers repo."),Rt=h(),D=s("h2"),N=s("a"),Me=s("span"),v(V.$$.fragment),Ho=h(),Be=s("span"),Fo=l("Tests"),Lt=h(),P=s("p"),Wo=l("All the jobs that begin with "),He=s("code"),Go=l("ci/circleci: run_tests_"),Uo=l(" run parts of the Transformers testing suite. Each of those jobs focuses on a part of the library in a certain environment: for instance "),Fe=s("code"),Jo=l("ci/circleci: run_tests_pipelines_tf"),zo=l(" runs the pipelines test in an environment where TensorFlow only is installed."),qt=h(),Ee=s("p"),Yo=l("Note that to avoid running tests when there is no real change in the modules they are testing, only part of the test suite is run each time: a utility is run to determine the differences in the library between before and after the PR (what GitHub shows you in the \u201CFiles changes\u201D tab) and picks the tests impacted by that diff. That utility can be run locally with:"),St=h(),v(X.$$.fragment),Nt=h(),$e=s("p"),Ko=l("from the root of the Transformers repo. It will:"),jt=h(),g=s("ol"),We=s("li"),Qo=l("Check for each file in the diff if the changes are in the code or only in comments or docstrings. Only the files with real code changes are kept."),Vo=h(),Ge=s("li"),Xo=l("Build an internal map that gives for each file of the source code of the library all the files it recursively impacts. Module A is said to impact module B if module B imports module A. For the recursive impact, we need a chain of modules going from module A to module B in which each module imports the previous one."),Zo=h(),Ue=s("li"),el=l("Apply this map on the files gathered in step 1, which  gives us the list of model files impacted by the PR."),tl=h(),Je=s("li"),ol=l("Map each of those files to their corresponding test file(s) and get the list of tests to run."),Mt=h(),j=s("p"),ll=l("When executing the script locally, you should get the results of step 1, 3 and 4 printed and thus know which tests are run. The script will also create a file named "),ze=s("code"),il=l("test_list.txt"),sl=l(" which contains the list of tests to run, and you can run them locally with the following command:"),Bt=h(),v(Z.$$.fragment),Ht=h(),ge=s("p"),al=l("Just in case anything slipped through the cracks, the full test suite is also run daily."),Ft=h(),O=s("h2"),M=s("a"),Ye=s("span"),v(ee.$$.fragment),rl=h(),Ke=s("span"),nl=l("Documentation build"),Wt=h(),A=s("p"),cl=l("The "),Qe=s("code"),hl=l("build_pr_documentation"),fl=l(" job builds and generates a preview of the documentation to make sure everything looks okay once your PR is merged. A bot will add a link to preview the documentation in your PR. Any changes you make to the PR are automatically updated in the preview. If the documentation fails to build, click on "),Ve=s("strong"),dl=l("Details"),pl=l(" next to the failed job to see where things went wrong. Often, the error is as simple as a missing file in the "),Xe=s("code"),ul=l("toctree"),ml=l("."),Gt=h(),B=s("p"),yl=l("If you\u2019re interested in building or previewing the documentation locally, take a look at the "),te=s("a"),Ze=s("code"),vl=l("README.md"),_l=l(" in the docs folder."),Ut=h(),I=s("h2"),H=s("a"),et=s("span"),v(oe.$$.fragment),kl=h(),tt=s("span"),bl=l("Code and documentation style"),Jt=h(),p=s("p"),wl=l("Code formatting is applied to all the source files, the examples and the tests using "),ot=s("code"),El=l("black"),$l=l(" and "),lt=s("code"),gl=l("isort"),Al=l(". We also have a custom tool taking care of the formatting of docstrings and "),it=s("code"),Pl=l("rst"),Tl=l(" files ("),st=s("code"),Cl=l("utils/style_doc.py"),xl=l("), as well as the order of the lazy imports performed in the Transformers "),at=s("code"),Dl=l("__init__.py"),Ol=l(" files ("),rt=s("code"),Il=l("utils/custom_init_isort.py"),Rl=l("). All of this can be launched by executing"),zt=h(),v(le.$$.fragment),Yt=h(),T=s("p"),Ll=l("The CI checks those have been applied inside the "),nt=s("code"),ql=l("ci/circleci: check_code_quality"),Sl=l(" check. It also runs "),ct=s("code"),Nl=l("flake8"),jl=l(", that will have a basic look at your code and will complain if it finds an undefined variable, or one that is not used. To run that check locally, use"),Kt=h(),v(ie.$$.fragment),Qt=h(),Ae=s("p"),Ml=l("This can take a lot of time, so to run the same thing on only the files you modified in the current branch, run"),Vt=h(),v(se.$$.fragment),Xt=h(),Pe=s("p"),Bl=l("This last command will also run all the additional checks for the repository consistency. Let\u2019s have a look at them."),Zt=h(),R=s("h2"),F=s("a"),ht=s("span"),v(ae.$$.fragment),Hl=h(),ft=s("span"),Fl=l("Repository consistency"),eo=h(),W=s("p"),Wl=l("This regroups all the tests to make sure your PR leaves the repository in a good state, and is performed by the "),dt=s("code"),Gl=l("ci/circleci: check_repository_consistency"),Ul=l(" check. You can locally run that check by executing the following:"),to=h(),v(re.$$.fragment),oo=h(),Te=s("p"),Jl=l("This checks that:"),lo=h(),u=s("ul"),ne=s("li"),zl=l("All objects added to the init are documented (performed by "),pt=s("code"),Yl=l("utils/check_repo.py"),Kl=l(")"),Ql=h(),L=s("li"),Vl=l("All "),ut=s("code"),Xl=l("__init__.py"),Zl=l(" files have the same content in their two sections (performed by "),mt=s("code"),ei=l("utils/check_inits.py"),ti=l(")"),oi=h(),ce=s("li"),li=l("All code identified as a copy from another module is consistent with the original (performed by "),yt=s("code"),ii=l("utils/check_copies.py"),si=l(")"),ai=h(),he=s("li"),ri=l("All configuration classes have at least one valid checkpoint mentioned in their docstrings (performed by "),vt=s("code"),ni=l("utils/check_config_docstrings.py"),ci=l(")"),hi=h(),fe=s("li"),fi=l("The translations of the READMEs and the index of the doc have the same model list as the main README (performed by "),_t=s("code"),di=l("utils/check_copies.py"),pi=l(")"),ui=h(),de=s("li"),mi=l("The auto-generated tables in the documentation are up to date (performed by "),kt=s("code"),yi=l("utils/check_table.py"),vi=l(")"),_i=h(),pe=s("li"),ki=l("The library has all objects available even if not all optional dependencies are installed (performed by "),bt=s("code"),bi=l("utils/check_dummies.py"),wi=l(")"),io=h(),Ce=s("p"),Ei=l("Should this check fail, the first two items require manual fixing, the last four can be fixed automatically for you by running the command"),so=h(),v(ue.$$.fragment),ao=h(),xe=s("p"),$i=l("Additional checks concern PRs that add new models, mainly that:"),ro=h(),G=s("ul"),me=s("li"),gi=l("All models added are in an Auto-mapping (performed by "),wt=s("code"),Ai=l("utils/check_repo.py"),Pi=l(")"),Ti=h(),ye=s("li"),Ci=l("All models are properly tested (performed by "),Et=s("code"),xi=l("utils/check_repo.py"),Di=l(")"),this.h()},l(e){const n=Gs('[data-svelte="svelte-1phssyn"]',document.head);C=a(n,"META",{name:!0,content:!0}),n.forEach(o),gt=f(e),x=a(e,"H1",{class:!0});var co=r(x);S=a(co,"A",{id:!0,class:!0,href:!0});var Ii=r(S);Re=a(Ii,"SPAN",{});var Ri=r(Re);_(Y.$$.fragment,Ri),Ri.forEach(o),Ii.forEach(o),To=f(co),Le=a(co,"SPAN",{});var Li=r(Le);Co=i(Li,"Checks on a Pull Request"),Li.forEach(o),co.forEach(o),At=f(e),ve=a(e,"P",{});var qi=r(ve);xo=i(qi,"When you open a pull request on \u{1F917} Transformers, a fair number of checks will be run to make sure the patch you are adding is not breaking anything existing. Those checks are of four types:"),qi.forEach(o),Pt=f(e),$=a(e,"UL",{});var U=r($);qe=a(U,"LI",{});var Si=r(qe);Do=i(Si,"regular tests"),Si.forEach(o),Oo=f(U),Se=a(U,"LI",{});var Ni=r(Se);Io=i(Ni,"documentation build"),Ni.forEach(o),Ro=f(U),Ne=a(U,"LI",{});var ji=r(Ne);Lo=i(ji,"code and documentation style"),ji.forEach(o),qo=f(U),je=a(U,"LI",{});var Mi=r(je);So=i(Mi,"general repository consistency"),Mi.forEach(o),U.forEach(o),Tt=f(e),_e=a(e,"P",{});var Bi=r(_e);No=i(Bi,"In this document, we will take a stab at explaining what those various checks are and the reason behind them, as well as how to debug them locally if one of them fails on your PR."),Bi.forEach(o),Ct=f(e),ke=a(e,"P",{});var Hi=r(ke);jo=i(Hi,"Note that they all require you to have a dev install:"),Hi.forEach(o),xt=f(e),_(K.$$.fragment,e),Dt=f(e),be=a(e,"P",{});var Fi=r(be);Mo=i(Fi,"or for an editable install:"),Fi.forEach(o),Ot=f(e),_(Q.$$.fragment,e),It=f(e),we=a(e,"P",{});var Wi=r(we);Bo=i(Wi,"inside the Transformers repo."),Wi.forEach(o),Rt=f(e),D=a(e,"H2",{class:!0});var ho=r(D);N=a(ho,"A",{id:!0,class:!0,href:!0});var Gi=r(N);Me=a(Gi,"SPAN",{});var Ui=r(Me);_(V.$$.fragment,Ui),Ui.forEach(o),Gi.forEach(o),Ho=f(ho),Be=a(ho,"SPAN",{});var Ji=r(Be);Fo=i(Ji,"Tests"),Ji.forEach(o),ho.forEach(o),Lt=f(e),P=a(e,"P",{});var De=r(P);Wo=i(De,"All the jobs that begin with "),He=a(De,"CODE",{});var zi=r(He);Go=i(zi,"ci/circleci: run_tests_"),zi.forEach(o),Uo=i(De," run parts of the Transformers testing suite. Each of those jobs focuses on a part of the library in a certain environment: for instance "),Fe=a(De,"CODE",{});var Yi=r(Fe);Jo=i(Yi,"ci/circleci: run_tests_pipelines_tf"),Yi.forEach(o),zo=i(De," runs the pipelines test in an environment where TensorFlow only is installed."),De.forEach(o),qt=f(e),Ee=a(e,"P",{});var Ki=r(Ee);Yo=i(Ki,"Note that to avoid running tests when there is no real change in the modules they are testing, only part of the test suite is run each time: a utility is run to determine the differences in the library between before and after the PR (what GitHub shows you in the \u201CFiles changes\u201D tab) and picks the tests impacted by that diff. That utility can be run locally with:"),Ki.forEach(o),St=f(e),_(X.$$.fragment,e),Nt=f(e),$e=a(e,"P",{});var Qi=r($e);Ko=i(Qi,"from the root of the Transformers repo. It will:"),Qi.forEach(o),jt=f(e),g=a(e,"OL",{});var J=r(g);We=a(J,"LI",{});var Vi=r(We);Qo=i(Vi,"Check for each file in the diff if the changes are in the code or only in comments or docstrings. Only the files with real code changes are kept."),Vi.forEach(o),Vo=f(J),Ge=a(J,"LI",{});var Xi=r(Ge);Xo=i(Xi,"Build an internal map that gives for each file of the source code of the library all the files it recursively impacts. Module A is said to impact module B if module B imports module A. For the recursive impact, we need a chain of modules going from module A to module B in which each module imports the previous one."),Xi.forEach(o),Zo=f(J),Ue=a(J,"LI",{});var Zi=r(Ue);el=i(Zi,"Apply this map on the files gathered in step 1, which  gives us the list of model files impacted by the PR."),Zi.forEach(o),tl=f(J),Je=a(J,"LI",{});var es=r(Je);ol=i(es,"Map each of those files to their corresponding test file(s) and get the list of tests to run."),es.forEach(o),J.forEach(o),Mt=f(e),j=a(e,"P",{});var fo=r(j);ll=i(fo,"When executing the script locally, you should get the results of step 1, 3 and 4 printed and thus know which tests are run. The script will also create a file named "),ze=a(fo,"CODE",{});var ts=r(ze);il=i(ts,"test_list.txt"),ts.forEach(o),sl=i(fo," which contains the list of tests to run, and you can run them locally with the following command:"),fo.forEach(o),Bt=f(e),_(Z.$$.fragment,e),Ht=f(e),ge=a(e,"P",{});var os=r(ge);al=i(os,"Just in case anything slipped through the cracks, the full test suite is also run daily."),os.forEach(o),Ft=f(e),O=a(e,"H2",{class:!0});var po=r(O);M=a(po,"A",{id:!0,class:!0,href:!0});var ls=r(M);Ye=a(ls,"SPAN",{});var is=r(Ye);_(ee.$$.fragment,is),is.forEach(o),ls.forEach(o),rl=f(po),Ke=a(po,"SPAN",{});var ss=r(Ke);nl=i(ss,"Documentation build"),ss.forEach(o),po.forEach(o),Wt=f(e),A=a(e,"P",{});var z=r(A);cl=i(z,"The "),Qe=a(z,"CODE",{});var as=r(Qe);hl=i(as,"build_pr_documentation"),as.forEach(o),fl=i(z," job builds and generates a preview of the documentation to make sure everything looks okay once your PR is merged. A bot will add a link to preview the documentation in your PR. Any changes you make to the PR are automatically updated in the preview. If the documentation fails to build, click on "),Ve=a(z,"STRONG",{});var rs=r(Ve);dl=i(rs,"Details"),rs.forEach(o),pl=i(z," next to the failed job to see where things went wrong. Often, the error is as simple as a missing file in the "),Xe=a(z,"CODE",{});var ns=r(Xe);ul=i(ns,"toctree"),ns.forEach(o),ml=i(z,"."),z.forEach(o),Gt=f(e),B=a(e,"P",{});var uo=r(B);yl=i(uo,"If you\u2019re interested in building or previewing the documentation locally, take a look at the "),te=a(uo,"A",{href:!0,rel:!0});var cs=r(te);Ze=a(cs,"CODE",{});var hs=r(Ze);vl=i(hs,"README.md"),hs.forEach(o),cs.forEach(o),_l=i(uo," in the docs folder."),uo.forEach(o),Ut=f(e),I=a(e,"H2",{class:!0});var mo=r(I);H=a(mo,"A",{id:!0,class:!0,href:!0});var fs=r(H);et=a(fs,"SPAN",{});var ds=r(et);_(oe.$$.fragment,ds),ds.forEach(o),fs.forEach(o),kl=f(mo),tt=a(mo,"SPAN",{});var ps=r(tt);bl=i(ps,"Code and documentation style"),ps.forEach(o),mo.forEach(o),Jt=f(e),p=a(e,"P",{});var m=r(p);wl=i(m,"Code formatting is applied to all the source files, the examples and the tests using "),ot=a(m,"CODE",{});var us=r(ot);El=i(us,"black"),us.forEach(o),$l=i(m," and "),lt=a(m,"CODE",{});var ms=r(lt);gl=i(ms,"isort"),ms.forEach(o),Al=i(m,". We also have a custom tool taking care of the formatting of docstrings and "),it=a(m,"CODE",{});var ys=r(it);Pl=i(ys,"rst"),ys.forEach(o),Tl=i(m," files ("),st=a(m,"CODE",{});var vs=r(st);Cl=i(vs,"utils/style_doc.py"),vs.forEach(o),xl=i(m,"), as well as the order of the lazy imports performed in the Transformers "),at=a(m,"CODE",{});var _s=r(at);Dl=i(_s,"__init__.py"),_s.forEach(o),Ol=i(m," files ("),rt=a(m,"CODE",{});var ks=r(rt);Il=i(ks,"utils/custom_init_isort.py"),ks.forEach(o),Rl=i(m,"). All of this can be launched by executing"),m.forEach(o),zt=f(e),_(le.$$.fragment,e),Yt=f(e),T=a(e,"P",{});var Oe=r(T);Ll=i(Oe,"The CI checks those have been applied inside the "),nt=a(Oe,"CODE",{});var bs=r(nt);ql=i(bs,"ci/circleci: check_code_quality"),bs.forEach(o),Sl=i(Oe," check. It also runs "),ct=a(Oe,"CODE",{});var ws=r(ct);Nl=i(ws,"flake8"),ws.forEach(o),jl=i(Oe,", that will have a basic look at your code and will complain if it finds an undefined variable, or one that is not used. To run that check locally, use"),Oe.forEach(o),Kt=f(e),_(ie.$$.fragment,e),Qt=f(e),Ae=a(e,"P",{});var Es=r(Ae);Ml=i(Es,"This can take a lot of time, so to run the same thing on only the files you modified in the current branch, run"),Es.forEach(o),Vt=f(e),_(se.$$.fragment,e),Xt=f(e),Pe=a(e,"P",{});var $s=r(Pe);Bl=i($s,"This last command will also run all the additional checks for the repository consistency. Let\u2019s have a look at them."),$s.forEach(o),Zt=f(e),R=a(e,"H2",{class:!0});var yo=r(R);F=a(yo,"A",{id:!0,class:!0,href:!0});var gs=r(F);ht=a(gs,"SPAN",{});var As=r(ht);_(ae.$$.fragment,As),As.forEach(o),gs.forEach(o),Hl=f(yo),ft=a(yo,"SPAN",{});var Ps=r(ft);Fl=i(Ps,"Repository consistency"),Ps.forEach(o),yo.forEach(o),eo=f(e),W=a(e,"P",{});var vo=r(W);Wl=i(vo,"This regroups all the tests to make sure your PR leaves the repository in a good state, and is performed by the "),dt=a(vo,"CODE",{});var Ts=r(dt);Gl=i(Ts,"ci/circleci: check_repository_consistency"),Ts.forEach(o),Ul=i(vo," check. You can locally run that check by executing the following:"),vo.forEach(o),to=f(e),_(re.$$.fragment,e),oo=f(e),Te=a(e,"P",{});var Cs=r(Te);Jl=i(Cs,"This checks that:"),Cs.forEach(o),lo=f(e),u=a(e,"UL",{});var y=r(u);ne=a(y,"LI",{});var _o=r(ne);zl=i(_o,"All objects added to the init are documented (performed by "),pt=a(_o,"CODE",{});var xs=r(pt);Yl=i(xs,"utils/check_repo.py"),xs.forEach(o),Kl=i(_o,")"),_o.forEach(o),Ql=f(y),L=a(y,"LI",{});var Ie=r(L);Vl=i(Ie,"All "),ut=a(Ie,"CODE",{});var Ds=r(ut);Xl=i(Ds,"__init__.py"),Ds.forEach(o),Zl=i(Ie," files have the same content in their two sections (performed by "),mt=a(Ie,"CODE",{});var Os=r(mt);ei=i(Os,"utils/check_inits.py"),Os.forEach(o),ti=i(Ie,")"),Ie.forEach(o),oi=f(y),ce=a(y,"LI",{});var ko=r(ce);li=i(ko,"All code identified as a copy from another module is consistent with the original (performed by "),yt=a(ko,"CODE",{});var Is=r(yt);ii=i(Is,"utils/check_copies.py"),Is.forEach(o),si=i(ko,")"),ko.forEach(o),ai=f(y),he=a(y,"LI",{});var bo=r(he);ri=i(bo,"All configuration classes have at least one valid checkpoint mentioned in their docstrings (performed by "),vt=a(bo,"CODE",{});var Rs=r(vt);ni=i(Rs,"utils/check_config_docstrings.py"),Rs.forEach(o),ci=i(bo,")"),bo.forEach(o),hi=f(y),fe=a(y,"LI",{});var wo=r(fe);fi=i(wo,"The translations of the READMEs and the index of the doc have the same model list as the main README (performed by "),_t=a(wo,"CODE",{});var Ls=r(_t);di=i(Ls,"utils/check_copies.py"),Ls.forEach(o),pi=i(wo,")"),wo.forEach(o),ui=f(y),de=a(y,"LI",{});var Eo=r(de);mi=i(Eo,"The auto-generated tables in the documentation are up to date (performed by "),kt=a(Eo,"CODE",{});var qs=r(kt);yi=i(qs,"utils/check_table.py"),qs.forEach(o),vi=i(Eo,")"),Eo.forEach(o),_i=f(y),pe=a(y,"LI",{});var $o=r(pe);ki=i($o,"The library has all objects available even if not all optional dependencies are installed (performed by "),bt=a($o,"CODE",{});var Ss=r(bt);bi=i(Ss,"utils/check_dummies.py"),Ss.forEach(o),wi=i($o,")"),$o.forEach(o),y.forEach(o),io=f(e),Ce=a(e,"P",{});var Ns=r(Ce);Ei=i(Ns,"Should this check fail, the first two items require manual fixing, the last four can be fixed automatically for you by running the command"),Ns.forEach(o),so=f(e),_(ue.$$.fragment,e),ao=f(e),xe=a(e,"P",{});var js=r(xe);$i=i(js,"Additional checks concern PRs that add new models, mainly that:"),js.forEach(o),ro=f(e),G=a(e,"UL",{});var go=r(G);me=a(go,"LI",{});var Ao=r(me);gi=i(Ao,"All models added are in an Auto-mapping (performed by "),wt=a(Ao,"CODE",{});var Ms=r(wt);Ai=i(Ms,"utils/check_repo.py"),Ms.forEach(o),Pi=i(Ao,")"),Ao.forEach(o),Ti=f(go),ye=a(go,"LI",{});var Po=r(ye);Ci=i(Po,"All models are properly tested (performed by "),Et=a(Po,"CODE",{});var Bs=r(Et);xi=i(Bs,"utils/check_repo.py"),Bs.forEach(o),Di=i(Po,")"),Po.forEach(o),go.forEach(o),this.h()},h(){d(C,"name","hf:doc:metadata"),d(C,"content",JSON.stringify(Ys)),d(S,"id","checks-on-a-pull-request"),d(S,"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(S,"href","#checks-on-a-pull-request"),d(x,"class","relative group"),d(N,"id","tests"),d(N,"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(N,"href","#tests"),d(D,"class","relative group"),d(M,"id","documentation-build"),d(M,"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(M,"href","#documentation-build"),d(O,"class","relative group"),d(te,"href","https://github.com/huggingface/transformers/tree/main/docs"),d(te,"rel","nofollow"),d(H,"id","code-and-documentation-style"),d(H,"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(H,"href","#code-and-documentation-style"),d(I,"class","relative group"),d(F,"id","repository-consistency"),d(F,"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(F,"href","#repository-consistency"),d(R,"class","relative group")},m(e,n){t(document.head,C),c(e,gt,n),c(e,x,n),t(x,S),t(S,Re),k(Y,Re,null),t(x,To),t(x,Le),t(Le,Co),c(e,At,n),c(e,ve,n),t(ve,xo),c(e,Pt,n),c(e,$,n),t($,qe),t(qe,Do),t($,Oo),t($,Se),t(Se,Io),t($,Ro),t($,Ne),t(Ne,Lo),t($,qo),t($,je),t(je,So),c(e,Tt,n),c(e,_e,n),t(_e,No),c(e,Ct,n),c(e,ke,n),t(ke,jo),c(e,xt,n),k(K,e,n),c(e,Dt,n),c(e,be,n),t(be,Mo),c(e,Ot,n),k(Q,e,n),c(e,It,n),c(e,we,n),t(we,Bo),c(e,Rt,n),c(e,D,n),t(D,N),t(N,Me),k(V,Me,null),t(D,Ho),t(D,Be),t(Be,Fo),c(e,Lt,n),c(e,P,n),t(P,Wo),t(P,He),t(He,Go),t(P,Uo),t(P,Fe),t(Fe,Jo),t(P,zo),c(e,qt,n),c(e,Ee,n),t(Ee,Yo),c(e,St,n),k(X,e,n),c(e,Nt,n),c(e,$e,n),t($e,Ko),c(e,jt,n),c(e,g,n),t(g,We),t(We,Qo),t(g,Vo),t(g,Ge),t(Ge,Xo),t(g,Zo),t(g,Ue),t(Ue,el),t(g,tl),t(g,Je),t(Je,ol),c(e,Mt,n),c(e,j,n),t(j,ll),t(j,ze),t(ze,il),t(j,sl),c(e,Bt,n),k(Z,e,n),c(e,Ht,n),c(e,ge,n),t(ge,al),c(e,Ft,n),c(e,O,n),t(O,M),t(M,Ye),k(ee,Ye,null),t(O,rl),t(O,Ke),t(Ke,nl),c(e,Wt,n),c(e,A,n),t(A,cl),t(A,Qe),t(Qe,hl),t(A,fl),t(A,Ve),t(Ve,dl),t(A,pl),t(A,Xe),t(Xe,ul),t(A,ml),c(e,Gt,n),c(e,B,n),t(B,yl),t(B,te),t(te,Ze),t(Ze,vl),t(B,_l),c(e,Ut,n),c(e,I,n),t(I,H),t(H,et),k(oe,et,null),t(I,kl),t(I,tt),t(tt,bl),c(e,Jt,n),c(e,p,n),t(p,wl),t(p,ot),t(ot,El),t(p,$l),t(p,lt),t(lt,gl),t(p,Al),t(p,it),t(it,Pl),t(p,Tl),t(p,st),t(st,Cl),t(p,xl),t(p,at),t(at,Dl),t(p,Ol),t(p,rt),t(rt,Il),t(p,Rl),c(e,zt,n),k(le,e,n),c(e,Yt,n),c(e,T,n),t(T,Ll),t(T,nt),t(nt,ql),t(T,Sl),t(T,ct),t(ct,Nl),t(T,jl),c(e,Kt,n),k(ie,e,n),c(e,Qt,n),c(e,Ae,n),t(Ae,Ml),c(e,Vt,n),k(se,e,n),c(e,Xt,n),c(e,Pe,n),t(Pe,Bl),c(e,Zt,n),c(e,R,n),t(R,F),t(F,ht),k(ae,ht,null),t(R,Hl),t(R,ft),t(ft,Fl),c(e,eo,n),c(e,W,n),t(W,Wl),t(W,dt),t(dt,Gl),t(W,Ul),c(e,to,n),k(re,e,n),c(e,oo,n),c(e,Te,n),t(Te,Jl),c(e,lo,n),c(e,u,n),t(u,ne),t(ne,zl),t(ne,pt),t(pt,Yl),t(ne,Kl),t(u,Ql),t(u,L),t(L,Vl),t(L,ut),t(ut,Xl),t(L,Zl),t(L,mt),t(mt,ei),t(L,ti),t(u,oi),t(u,ce),t(ce,li),t(ce,yt),t(yt,ii),t(ce,si),t(u,ai),t(u,he),t(he,ri),t(he,vt),t(vt,ni),t(he,ci),t(u,hi),t(u,fe),t(fe,fi),t(fe,_t),t(_t,di),t(fe,pi),t(u,ui),t(u,de),t(de,mi),t(de,kt),t(kt,yi),t(de,vi),t(u,_i),t(u,pe),t(pe,ki),t(pe,bt),t(bt,bi),t(pe,wi),c(e,io,n),c(e,Ce,n),t(Ce,Ei),c(e,so,n),k(ue,e,n),c(e,ao,n),c(e,xe,n),t(xe,$i),c(e,ro,n),c(e,G,n),t(G,me),t(me,gi),t(me,wt),t(wt,Ai),t(me,Pi),t(G,Ti),t(G,ye),t(ye,Ci),t(ye,Et),t(Et,xi),t(ye,Di),no=!0},p:Us,i(e){no||(b(Y.$$.fragment,e),b(K.$$.fragment,e),b(Q.$$.fragment,e),b(V.$$.fragment,e),b(X.$$.fragment,e),b(Z.$$.fragment,e),b(ee.$$.fragment,e),b(oe.$$.fragment,e),b(le.$$.fragment,e),b(ie.$$.fragment,e),b(se.$$.fragment,e),b(ae.$$.fragment,e),b(re.$$.fragment,e),b(ue.$$.fragment,e),no=!0)},o(e){w(Y.$$.fragment,e),w(K.$$.fragment,e),w(Q.$$.fragment,e),w(V.$$.fragment,e),w(X.$$.fragment,e),w(Z.$$.fragment,e),w(ee.$$.fragment,e),w(oe.$$.fragment,e),w(le.$$.fragment,e),w(ie.$$.fragment,e),w(se.$$.fragment,e),w(ae.$$.fragment,e),w(re.$$.fragment,e),w(ue.$$.fragment,e),no=!1},d(e){o(C),e&&o(gt),e&&o(x),E(Y),e&&o(At),e&&o(ve),e&&o(Pt),e&&o($),e&&o(Tt),e&&o(_e),e&&o(Ct),e&&o(ke),e&&o(xt),E(K,e),e&&o(Dt),e&&o(be),e&&o(Ot),E(Q,e),e&&o(It),e&&o(we),e&&o(Rt),e&&o(D),E(V),e&&o(Lt),e&&o(P),e&&o(qt),e&&o(Ee),e&&o(St),E(X,e),e&&o(Nt),e&&o($e),e&&o(jt),e&&o(g),e&&o(Mt),e&&o(j),e&&o(Bt),E(Z,e),e&&o(Ht),e&&o(ge),e&&o(Ft),e&&o(O),E(ee),e&&o(Wt),e&&o(A),e&&o(Gt),e&&o(B),e&&o(Ut),e&&o(I),E(oe),e&&o(Jt),e&&o(p),e&&o(zt),E(le,e),e&&o(Yt),e&&o(T),e&&o(Kt),E(ie,e),e&&o(Qt),e&&o(Ae),e&&o(Vt),E(se,e),e&&o(Xt),e&&o(Pe),e&&o(Zt),e&&o(R),E(ae),e&&o(eo),e&&o(W),e&&o(to),E(re,e),e&&o(oo),e&&o(Te),e&&o(lo),e&&o(u),e&&o(io),e&&o(Ce),e&&o(so),E(ue,e),e&&o(ao),e&&o(xe),e&&o(ro),e&&o(G)}}}const Ys={local:"checks-on-a-pull-request",sections:[{local:"tests",title:"Tests"},{local:"documentation-build",title:"Documentation build"},{local:"code-and-documentation-style",title:"Code and documentation style"},{local:"repository-consistency",title:"Repository consistency"}],title:"Checks on a Pull Request"};function Ks(Oi){return Js(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zs extends Hs{constructor(C){super();Fs(this,C,Ks,zs,Ws,{})}}export{Zs as default,Ys as metadata};
