import{S as kr,i as Dr,s as Sr,e as s,k as f,w as u,t as p,M as Tr,c as a,d as t,m,a as n,x as d,h as c,b as o,F as r,g as i,y as h,L as xr,q as _,o as v,B as g}from"../../chunks/vendor-4833417e.js";import{D as w}from"../../chunks/Docstring-4f315ed9.js";import{I as Le}from"../../chunks/IconCopyLink-4b81c553.js";function Ar(it){let b,ie,y,E,ce,C,ft,ue,mt,Ie,z,pt,de,ct,ut,ze,fe,dt,Me,N,M,he,G,ht,_e,_t,Ue,P,H,vt,ve,gt,Ve,k,F,$t,D,yt,ge,Et,bt,U,wt,$e,Nt,Pt,kt,Be,S,R,Dt,T,St,ye,Tt,xt,V,At,Ee,Lt,It,zt,Oe,x,B,be,J,Mt,we,Ut,qe,K,Q,je,W,X,Ce,Y,Z,Ge,ee,te,He,re,se,Fe,A,O,Ne,ae,Vt,Pe,Bt,Re,$,ne,Ot,ke,qt,jt,De,Ct,Gt,Se,Ht,Je,L,q,Te,le,Ft,xe,Rt,Ke,I,oe,Jt,Ae,Kt,Qe;return C=new Le({}),G=new Le({}),H=new w({props:{name:"class transformers.file_utils.ExplicitEnum",anchor:"transformers.file_utils.ExplicitEnum",parameters:[{name:"value",val:""},{name:"names",val:" = None"},{name:"module",val:" = None"},{name:"qualname",val:" = None"},{name:"type",val:" = None"},{name:"start",val:" = 1"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L2710"}}),F=new w({props:{name:"class transformers.file_utils.PaddingStrategy",anchor:"transformers.file_utils.PaddingStrategy",parameters:[{name:"value",val:""},{name:"names",val:" = None"},{name:"module",val:" = None"},{name:"qualname",val:" = None"},{name:"type",val:" = None"},{name:"start",val:" = 1"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L2722"}}),R=new w({props:{name:"class transformers.TensorType",anchor:"transformers.TensorType",parameters:[{name:"value",val:""},{name:"names",val:" = None"},{name:"module",val:" = None"},{name:"qualname",val:" = None"},{name:"type",val:" = None"},{name:"start",val:" = 1"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L2733"}}),J=new Le({}),Q=new w({props:{name:"transformers.add_start_docstrings",anchor:"transformers.add_start_docstrings",parameters:[{name:"*docstr",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L863"}}),X=new w({props:{name:"transformers.file_utils.add_start_docstrings_to_model_forward",anchor:"transformers.file_utils.add_start_docstrings_to_model_forward",parameters:[{name:"*docstr",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L871"}}),Z=new w({props:{name:"transformers.add_end_docstrings",anchor:"transformers.add_end_docstrings",parameters:[{name:"*docstr",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L893"}}),te=new w({props:{name:"transformers.file_utils.add_code_sample_docstrings",anchor:"transformers.file_utils.add_code_sample_docstrings",parameters:[{name:"*docstr",val:""},{name:"processor_class",val:" = None"},{name:"checkpoint",val:" = None"},{name:"output_type",val:" = None"},{name:"config_class",val:" = None"},{name:"mask",val:" = '[MASK]'"},{name:"model_cls",val:" = None"},{name:"modality",val:" = None"},{name:"expected_output",val:" = ''"},{name:"expected_loss",val:" = ''"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L1673"}}),se=new w({props:{name:"transformers.file_utils.replace_return_docstrings",anchor:"transformers.file_utils.replace_return_docstrings",parameters:[{name:"output_type",val:" = None"},{name:"config_class",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L1748"}}),ae=new Le({}),ne=new w({props:{name:"class transformers.file_utils.cached_property",anchor:"transformers.file_utils.cached_property",parameters:[{name:"fget",val:" = None"},{name:"fset",val:" = None"},{name:"fdel",val:" = None"},{name:"doc",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L2466"}}),le=new Le({}),oe=new w({props:{name:"class transformers._LazyModule",anchor:"transformers._LazyModule",parameters:[{name:"name",val:""},{name:"module_file",val:""},{name:"import_structure",val:""},{name:"module_spec",val:" = None"},{name:"extra_objects",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/file_utils.py#L2745"}}),{c(){b=s("meta"),ie=f(),y=s("h1"),E=s("a"),ce=s("span"),u(C.$$.fragment),ft=f(),ue=s("span"),mt=p("General Utilities"),Ie=f(),z=s("p"),pt=p("This page lists all of Transformers general utility functions that are found in the file "),de=s("code"),ct=p("file_utils.py"),ut=p("."),ze=f(),fe=s("p"),dt=p("Most of those are only useful if you are studying the general code in the library."),Me=f(),N=s("h2"),M=s("a"),he=s("span"),u(G.$$.fragment),ht=f(),_e=s("span"),_t=p("Enums and namedtuples"),Ue=f(),P=s("div"),u(H.$$.fragment),vt=f(),ve=s("p"),gt=p("Enum with more explicit error message for missing values."),Ve=f(),k=s("div"),u(F.$$.fragment),$t=f(),D=s("p"),yt=p("Possible values for the "),ge=s("code"),Et=p("padding"),bt=p(" argument in "),U=s("a"),wt=p("PreTrainedTokenizerBase."),$e=s("strong"),Nt=p("call"),Pt=p("()"),kt=p(`. Useful for tab-completion in an
IDE.`),Be=f(),S=s("div"),u(R.$$.fragment),Dt=f(),T=s("p"),St=p("Possible values for the "),ye=s("code"),Tt=p("return_tensors"),xt=p(" argument in "),V=s("a"),At=p("PreTrainedTokenizerBase."),Ee=s("strong"),Lt=p("call"),It=p("()"),zt=p(`. Useful for
tab-completion in an IDE.`),Oe=f(),x=s("h2"),B=s("a"),be=s("span"),u(J.$$.fragment),Mt=f(),we=s("span"),Ut=p("Special Decorators"),qe=f(),K=s("div"),u(Q.$$.fragment),je=f(),W=s("div"),u(X.$$.fragment),Ce=f(),Y=s("div"),u(Z.$$.fragment),Ge=f(),ee=s("div"),u(te.$$.fragment),He=f(),re=s("div"),u(se.$$.fragment),Fe=f(),A=s("h2"),O=s("a"),Ne=s("span"),u(ae.$$.fragment),Vt=f(),Pe=s("span"),Bt=p("Special Properties"),Re=f(),$=s("div"),u(ne.$$.fragment),Ot=f(),ke=s("p"),qt=p("Descriptor that mimics @property but caches output in member variable."),jt=f(),De=s("p"),Ct=p("From tensorflow_datasets"),Gt=f(),Se=s("p"),Ht=p("Built-in in functools from Python 3.8."),Je=f(),L=s("h2"),q=s("a"),Te=s("span"),u(le.$$.fragment),Ft=f(),xe=s("span"),Rt=p("Other Utilities"),Ke=f(),I=s("div"),u(oe.$$.fragment),Jt=f(),Ae=s("p"),Kt=p("Module class that surfaces all objects but only performs associated imports when the objects are requested."),this.h()},l(e){const l=Tr('[data-svelte="svelte-1phssyn"]',document.head);b=a(l,"META",{name:!0,content:!0}),l.forEach(t),ie=m(e),y=a(e,"H1",{class:!0});var We=n(y);E=a(We,"A",{id:!0,class:!0,href:!0});var Qt=n(E);ce=a(Qt,"SPAN",{});var Wt=n(ce);d(C.$$.fragment,Wt),Wt.forEach(t),Qt.forEach(t),ft=m(We),ue=a(We,"SPAN",{});var Xt=n(ue);mt=c(Xt,"General Utilities"),Xt.forEach(t),We.forEach(t),Ie=m(e),z=a(e,"P",{});var Xe=n(z);pt=c(Xe,"This page lists all of Transformers general utility functions that are found in the file "),de=a(Xe,"CODE",{});var Yt=n(de);ct=c(Yt,"file_utils.py"),Yt.forEach(t),ut=c(Xe,"."),Xe.forEach(t),ze=m(e),fe=a(e,"P",{});var Zt=n(fe);dt=c(Zt,"Most of those are only useful if you are studying the general code in the library."),Zt.forEach(t),Me=m(e),N=a(e,"H2",{class:!0});var Ye=n(N);M=a(Ye,"A",{id:!0,class:!0,href:!0});var er=n(M);he=a(er,"SPAN",{});var tr=n(he);d(G.$$.fragment,tr),tr.forEach(t),er.forEach(t),ht=m(Ye),_e=a(Ye,"SPAN",{});var rr=n(_e);_t=c(rr,"Enums and namedtuples"),rr.forEach(t),Ye.forEach(t),Ue=m(e),P=a(e,"DIV",{class:!0});var Ze=n(P);d(H.$$.fragment,Ze),vt=m(Ze),ve=a(Ze,"P",{});var sr=n(ve);gt=c(sr,"Enum with more explicit error message for missing values."),sr.forEach(t),Ze.forEach(t),Ve=m(e),k=a(e,"DIV",{class:!0});var et=n(k);d(F.$$.fragment,et),$t=m(et),D=a(et,"P",{});var me=n(D);yt=c(me,"Possible values for the "),ge=a(me,"CODE",{});var ar=n(ge);Et=c(ar,"padding"),ar.forEach(t),bt=c(me," argument in "),U=a(me,"A",{href:!0});var tt=n(U);wt=c(tt,"PreTrainedTokenizerBase."),$e=a(tt,"STRONG",{});var nr=n($e);Nt=c(nr,"call"),nr.forEach(t),Pt=c(tt,"()"),tt.forEach(t),kt=c(me,`. Useful for tab-completion in an
IDE.`),me.forEach(t),et.forEach(t),Be=m(e),S=a(e,"DIV",{class:!0});var rt=n(S);d(R.$$.fragment,rt),Dt=m(rt),T=a(rt,"P",{});var pe=n(T);St=c(pe,"Possible values for the "),ye=a(pe,"CODE",{});var lr=n(ye);Tt=c(lr,"return_tensors"),lr.forEach(t),xt=c(pe," argument in "),V=a(pe,"A",{href:!0});var st=n(V);At=c(st,"PreTrainedTokenizerBase."),Ee=a(st,"STRONG",{});var or=n(Ee);Lt=c(or,"call"),or.forEach(t),It=c(st,"()"),st.forEach(t),zt=c(pe,`. Useful for
tab-completion in an IDE.`),pe.forEach(t),rt.forEach(t),Oe=m(e),x=a(e,"H2",{class:!0});var at=n(x);B=a(at,"A",{id:!0,class:!0,href:!0});var ir=n(B);be=a(ir,"SPAN",{});var fr=n(be);d(J.$$.fragment,fr),fr.forEach(t),ir.forEach(t),Mt=m(at),we=a(at,"SPAN",{});var mr=n(we);Ut=c(mr,"Special Decorators"),mr.forEach(t),at.forEach(t),qe=m(e),K=a(e,"DIV",{class:!0});var pr=n(K);d(Q.$$.fragment,pr),pr.forEach(t),je=m(e),W=a(e,"DIV",{class:!0});var cr=n(W);d(X.$$.fragment,cr),cr.forEach(t),Ce=m(e),Y=a(e,"DIV",{class:!0});var ur=n(Y);d(Z.$$.fragment,ur),ur.forEach(t),Ge=m(e),ee=a(e,"DIV",{class:!0});var dr=n(ee);d(te.$$.fragment,dr),dr.forEach(t),He=m(e),re=a(e,"DIV",{class:!0});var hr=n(re);d(se.$$.fragment,hr),hr.forEach(t),Fe=m(e),A=a(e,"H2",{class:!0});var nt=n(A);O=a(nt,"A",{id:!0,class:!0,href:!0});var _r=n(O);Ne=a(_r,"SPAN",{});var vr=n(Ne);d(ae.$$.fragment,vr),vr.forEach(t),_r.forEach(t),Vt=m(nt),Pe=a(nt,"SPAN",{});var gr=n(Pe);Bt=c(gr,"Special Properties"),gr.forEach(t),nt.forEach(t),Re=m(e),$=a(e,"DIV",{class:!0});var j=n($);d(ne.$$.fragment,j),Ot=m(j),ke=a(j,"P",{});var $r=n(ke);qt=c($r,"Descriptor that mimics @property but caches output in member variable."),$r.forEach(t),jt=m(j),De=a(j,"P",{});var yr=n(De);Ct=c(yr,"From tensorflow_datasets"),yr.forEach(t),Gt=m(j),Se=a(j,"P",{});var Er=n(Se);Ht=c(Er,"Built-in in functools from Python 3.8."),Er.forEach(t),j.forEach(t),Je=m(e),L=a(e,"H2",{class:!0});var lt=n(L);q=a(lt,"A",{id:!0,class:!0,href:!0});var br=n(q);Te=a(br,"SPAN",{});var wr=n(Te);d(le.$$.fragment,wr),wr.forEach(t),br.forEach(t),Ft=m(lt),xe=a(lt,"SPAN",{});var Nr=n(xe);Rt=c(Nr,"Other Utilities"),Nr.forEach(t),lt.forEach(t),Ke=m(e),I=a(e,"DIV",{class:!0});var ot=n(I);d(oe.$$.fragment,ot),Jt=m(ot),Ae=a(ot,"P",{});var Pr=n(Ae);Kt=c(Pr,"Module class that surfaces all objects but only performs associated imports when the objects are requested."),Pr.forEach(t),ot.forEach(t),this.h()},h(){o(b,"name","hf:doc:metadata"),o(b,"content",JSON.stringify(Lr)),o(E,"id","general-utilities"),o(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"),o(E,"href","#general-utilities"),o(y,"class","relative group"),o(M,"id","transformers.file_utils.ExplicitEnum"),o(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"),o(M,"href","#transformers.file_utils.ExplicitEnum"),o(N,"class","relative group"),o(P,"class","docstring"),o(U,"href","/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),o(k,"class","docstring"),o(V,"href","/docs/transformers/pr_15839/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),o(S,"class","docstring"),o(B,"id","transformers.add_start_docstrings"),o(B,"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"),o(B,"href","#transformers.add_start_docstrings"),o(x,"class","relative group"),o(K,"class","docstring"),o(W,"class","docstring"),o(Y,"class","docstring"),o(ee,"class","docstring"),o(re,"class","docstring"),o(O,"id","transformers.file_utils.cached_property"),o(O,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),o(O,"href","#transformers.file_utils.cached_property"),o(A,"class","relative group"),o($,"class","docstring"),o(q,"id","transformers._LazyModule"),o(q,"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"),o(q,"href","#transformers._LazyModule"),o(L,"class","relative group"),o(I,"class","docstring")},m(e,l){r(document.head,b),i(e,ie,l),i(e,y,l),r(y,E),r(E,ce),h(C,ce,null),r(y,ft),r(y,ue),r(ue,mt),i(e,Ie,l),i(e,z,l),r(z,pt),r(z,de),r(de,ct),r(z,ut),i(e,ze,l),i(e,fe,l),r(fe,dt),i(e,Me,l),i(e,N,l),r(N,M),r(M,he),h(G,he,null),r(N,ht),r(N,_e),r(_e,_t),i(e,Ue,l),i(e,P,l),h(H,P,null),r(P,vt),r(P,ve),r(ve,gt),i(e,Ve,l),i(e,k,l),h(F,k,null),r(k,$t),r(k,D),r(D,yt),r(D,ge),r(ge,Et),r(D,bt),r(D,U),r(U,wt),r(U,$e),r($e,Nt),r(U,Pt),r(D,kt),i(e,Be,l),i(e,S,l),h(R,S,null),r(S,Dt),r(S,T),r(T,St),r(T,ye),r(ye,Tt),r(T,xt),r(T,V),r(V,At),r(V,Ee),r(Ee,Lt),r(V,It),r(T,zt),i(e,Oe,l),i(e,x,l),r(x,B),r(B,be),h(J,be,null),r(x,Mt),r(x,we),r(we,Ut),i(e,qe,l),i(e,K,l),h(Q,K,null),i(e,je,l),i(e,W,l),h(X,W,null),i(e,Ce,l),i(e,Y,l),h(Z,Y,null),i(e,Ge,l),i(e,ee,l),h(te,ee,null),i(e,He,l),i(e,re,l),h(se,re,null),i(e,Fe,l),i(e,A,l),r(A,O),r(O,Ne),h(ae,Ne,null),r(A,Vt),r(A,Pe),r(Pe,Bt),i(e,Re,l),i(e,$,l),h(ne,$,null),r($,Ot),r($,ke),r(ke,qt),r($,jt),r($,De),r(De,Ct),r($,Gt),r($,Se),r(Se,Ht),i(e,Je,l),i(e,L,l),r(L,q),r(q,Te),h(le,Te,null),r(L,Ft),r(L,xe),r(xe,Rt),i(e,Ke,l),i(e,I,l),h(oe,I,null),r(I,Jt),r(I,Ae),r(Ae,Kt),Qe=!0},p:xr,i(e){Qe||(_(C.$$.fragment,e),_(G.$$.fragment,e),_(H.$$.fragment,e),_(F.$$.fragment,e),_(R.$$.fragment,e),_(J.$$.fragment,e),_(Q.$$.fragment,e),_(X.$$.fragment,e),_(Z.$$.fragment,e),_(te.$$.fragment,e),_(se.$$.fragment,e),_(ae.$$.fragment,e),_(ne.$$.fragment,e),_(le.$$.fragment,e),_(oe.$$.fragment,e),Qe=!0)},o(e){v(C.$$.fragment,e),v(G.$$.fragment,e),v(H.$$.fragment,e),v(F.$$.fragment,e),v(R.$$.fragment,e),v(J.$$.fragment,e),v(Q.$$.fragment,e),v(X.$$.fragment,e),v(Z.$$.fragment,e),v(te.$$.fragment,e),v(se.$$.fragment,e),v(ae.$$.fragment,e),v(ne.$$.fragment,e),v(le.$$.fragment,e),v(oe.$$.fragment,e),Qe=!1},d(e){t(b),e&&t(ie),e&&t(y),g(C),e&&t(Ie),e&&t(z),e&&t(ze),e&&t(fe),e&&t(Me),e&&t(N),g(G),e&&t(Ue),e&&t(P),g(H),e&&t(Ve),e&&t(k),g(F),e&&t(Be),e&&t(S),g(R),e&&t(Oe),e&&t(x),g(J),e&&t(qe),e&&t(K),g(Q),e&&t(je),e&&t(W),g(X),e&&t(Ce),e&&t(Y),g(Z),e&&t(Ge),e&&t(ee),g(te),e&&t(He),e&&t(re),g(se),e&&t(Fe),e&&t(A),g(ae),e&&t(Re),e&&t($),g(ne),e&&t(Je),e&&t(L),g(le),e&&t(Ke),e&&t(I),g(oe)}}}const Lr={local:"general-utilities",sections:[{local:"transformers.file_utils.ExplicitEnum",title:"Enums and namedtuples"},{local:"transformers.add_start_docstrings",title:"Special Decorators"},{local:"transformers.file_utils.cached_property",title:"Special Properties"},{local:"transformers._LazyModule",title:"Other Utilities"}],title:"General Utilities"};function Ir(it,b,ie){let{fw:y}=b;return it.$$set=E=>{"fw"in E&&ie(0,y=E.fw)},[y]}class Vr extends kr{constructor(b){super();Dr(this,b,Ir,Ar,Sr,{fw:0})}}export{Vr as default,Lr as metadata};
