import{S as Zl,i as en,s as rn,e as l,k as g,w as p,t as o,M as tn,c as n,d as t,m as f,a,x as u,h as s,b as c,F as r,g as m,y as h,q as v,o as _,B as b}from"../../chunks/vendor-4833417e.js";import{T as on}from"../../chunks/Tip-fffd6df1.js";import{D as S}from"../../chunks/Docstring-4f315ed9.js";import{C as Ir}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as Ks}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function sn(Nr){let y,Y,w,d,A,G,ee,re,Le,U,z,Fe,W,L,te,oe,Pe,F,Ee,P,ke,$e,T,ye,E,J,se,le,xe,ne,K,Ve,M,Ge;return{c(){y=l("p"),Y=o("\u{1F917} Transformers has following logging levels:"),w=g(),d=l("ul"),A=l("li"),G=o("50: "),ee=l("code"),re=o("transformers.logging.CRITICAL"),Le=o(" or "),U=l("code"),z=o("transformers.logging.FATAL"),Fe=g(),W=l("li"),L=o("40: "),te=l("code"),oe=o("transformers.logging.ERROR"),Pe=g(),F=l("li"),Ee=o("30: "),P=l("code"),ke=o("transformers.logging.WARNING"),$e=o(" or "),T=l("code"),ye=o("transformers.logging.WARN"),E=g(),J=l("li"),se=o("20: "),le=l("code"),xe=o("transformers.logging.INFO"),ne=g(),K=l("li"),Ve=o("10: "),M=l("code"),Ge=o("transformers.logging.DEBUG")},l(O){y=n(O,"P",{});var k=a(y);Y=s(k,"\u{1F917} Transformers has following logging levels:"),k.forEach(t),w=f(O),d=n(O,"UL",{});var I=a(d);A=n(I,"LI",{});var ae=a(A);G=s(ae,"50: "),ee=n(ae,"CODE",{});var we=a(ee);re=s(we,"transformers.logging.CRITICAL"),we.forEach(t),Le=s(ae," or "),U=n(ae,"CODE",{});var dr=a(U);z=s(dr,"transformers.logging.FATAL"),dr.forEach(t),ae.forEach(t),Fe=f(I),W=n(I,"LI",{});var We=a(W);L=s(We,"40: "),te=n(We,"CODE",{});var Re=a(te);oe=s(Re,"transformers.logging.ERROR"),Re.forEach(t),We.forEach(t),Pe=f(I),F=n(I,"LI",{});var ie=a(F);Ee=s(ie,"30: "),P=n(ie,"CODE",{});var pr=a(P);ke=s(pr,"transformers.logging.WARNING"),pr.forEach(t),$e=s(ie," or "),T=n(ie,"CODE",{});var Me=a(T);ye=s(Me,"transformers.logging.WARN"),Me.forEach(t),ie.forEach(t),E=f(I),J=n(I,"LI",{});var B=a(J);se=s(B,"20: "),le=n(B,"CODE",{});var Be=a(le);xe=s(Be,"transformers.logging.INFO"),Be.forEach(t),B.forEach(t),ne=f(I),K=n(I,"LI",{});var $=a(K);Ve=s($,"10: "),M=n($,"CODE",{});var ur=a(M);Ge=s(ur,"transformers.logging.DEBUG"),ur.forEach(t),$.forEach(t),I.forEach(t)},m(O,k){m(O,y,k),r(y,Y),m(O,w,k),m(O,d,k),r(d,A),r(A,G),r(A,ee),r(ee,re),r(A,Le),r(A,U),r(U,z),r(d,Fe),r(d,W),r(W,L),r(W,te),r(te,oe),r(d,Pe),r(d,F),r(F,Ee),r(F,P),r(P,ke),r(F,$e),r(F,T),r(T,ye),r(d,E),r(d,J),r(J,se),r(J,le),r(le,xe),r(d,ne),r(d,K),r(K,Ve),r(K,M),r(M,Ge)},d(O){O&&t(y),O&&t(w),O&&t(d)}}}function ln(Nr){let y,Y,w,d,A,G,ee,re,Le,U,z,Fe,W,L,te,oe,Pe,F,Ee,P,ke,$e,T,ye,E,J,se,le,xe,ne,K,Ve,M,Ge,O,k,I,ae,we,dr,We,Re,ie,pr,Me,B,Be,$,ur,Dr,to,oo,Tr,so,lo,Cr,no,ao,Sr,io,go,ut,qe,ht,Oe,fo,Lr,mo,co,vt,je,_t,R,po,Fr,uo,ho,Pr,vo,_o,kr,bo,Eo,xr,$o,yo,Vr,wo,Ro,bt,He,Et,Q,Oo,hr,Ao,Io,vr,No,Do,$t,N,Ae,Gr,To,Co,Wr,So,Lo,Fo,_r,Mr,Po,ko,xo,Ie,Br,Vo,Go,qr,Wo,Mo,Bo,br,jr,qo,jo,Ho,Er,Hr,Yo,Uo,yt,x,zo,Yr,Jo,Ko,$r,Qo,Xo,yr,Zo,es,wt,ge,Ne,Ur,Ye,rs,zr,ts,Rt,fe,Ue,os,ze,ss,Jr,ls,ns,Ot,me,Je,as,Ke,is,Kr,gs,fs,At,ce,Qe,ms,Xe,cs,Qr,ds,ps,It,de,Ze,us,er,hs,Xr,vs,_s,Nt,pe,De,Zr,rr,bs,et,Es,Dt,q,tr,$s,rt,ys,ws,Te,Tt,ue,or,Rs,tt,Os,Ct,j,sr,As,ot,Is,Ns,st,Ds,St,he,lr,Ts,lt,Cs,Lt,ve,nr,Ss,nt,Ls,Ft,C,ar,Fs,at,Ps,ks,ir,xs,it,Vs,Pt,H,gr,Gs,gt,Ws,Ms,ft,Bs,kt,_e,fr,qs,mt,js,xt,be,mr,Hs,ct,Ys,Vt;return G=new Ks({}),T=new Ir({props:{code:`import transformers

transformers.logging.set_verbosity_info()`,highlighted:`<span class="hljs-keyword">import</span> transformers

transformers.logging.set_verbosity_info()`}}),B=new Ir({props:{code:"TRANSFORMERS_VERBOSITY=error ./myprogram.py",highlighted:"TRANSFORMERS_VERBOSITY=error ./myprogram.py"}}),qe=new Ir({props:{code:"TRANSFORMERS_NO_ADVISORY_WARNINGS=1 ./myprogram.py",highlighted:"TRANSFORMERS_NO_ADVISORY_WARNINGS=1 ./myprogram.py"}}),je=new Ir({props:{code:`from transformers.utils import logging

logging.set_verbosity_info()
logger = logging.get_logger(__name__)
logger.info("INFO")
logger.warning("WARN")`,highlighted:`<span class="hljs-keyword">from</span> transformers.utils <span class="hljs-keyword">import</span> logging

logging.set_verbosity_info()
logger = logging.get_logger(__name__)
logger.info(<span class="hljs-string">&quot;INFO&quot;</span>)
logger.warning(<span class="hljs-string">&quot;WARN&quot;</span>)`}}),He=new Ir({props:{code:`from transformers.utils import logging

if __name__ == "__main__":
    logging.set_verbosity_info()
    # leave it empy or use a string
    logger = logging.get_logger()
    logger.info("INFO")
    logger.warning("WARN")`,highlighted:`<span class="hljs-keyword">from</span> transformers.utils <span class="hljs-keyword">import</span> logging

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">&quot;__main__&quot;</span>:
    logging.set_verbosity_info()
    <span class="hljs-comment"># leave it empy or use a string</span>
    logger = logging.get_logger()
    logger.info(<span class="hljs-string">&quot;INFO&quot;</span>)
    logger.warning(<span class="hljs-string">&quot;WARN&quot;</span>)`}}),Ye=new Ks({}),Ue=new S({props:{name:"transformers.utils.logging.set_verbosity_error",anchor:"transformers.utils.logging.set_verbosity_error",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L184"}}),Je=new S({props:{name:"transformers.utils.logging.set_verbosity_warning",anchor:"transformers.utils.logging.set_verbosity_warning",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L174"}}),Qe=new S({props:{name:"transformers.utils.logging.set_verbosity_info",anchor:"transformers.utils.logging.set_verbosity_info",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L169"}}),Ze=new S({props:{name:"transformers.utils.logging.set_verbosity_debug",anchor:"transformers.utils.logging.set_verbosity_debug",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L179"}}),rr=new Ks({}),tr=new S({props:{name:"transformers.utils.logging.get_verbosity",anchor:"transformers.utils.logging.get_verbosity",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L127",returnDescription:`
<p>The logging level.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Te=new on({props:{$$slots:{default:[sn]},$$scope:{ctx:Nr}}}),or=new S({props:{name:"transformers.utils.logging.set_verbosity",anchor:"transformers.utils.logging.set_verbosity",parameters:[{name:"verbosity",val:": int"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L150",parametersDescription:[{anchor:"transformers.utils.logging.set_verbosity.verbosity",description:`<strong>verbosity</strong> (<code>int</code>) &#x2014;
Logging level, e.g., one of:</p>
<ul>
<li><code>transformers.logging.CRITICAL</code> or <code>transformers.logging.FATAL</code></li>
<li><code>transformers.logging.ERROR</code></li>
<li><code>transformers.logging.WARNING</code> or <code>transformers.logging.WARN</code></li>
<li><code>transformers.logging.INFO</code></li>
<li><code>transformers.logging.DEBUG</code></li>
</ul>`,name:"verbosity"}]}}),sr=new S({props:{name:"transformers.utils.logging.get_logger",anchor:"transformers.utils.logging.get_logger",parameters:[{name:"name",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L113"}}),lr=new S({props:{name:"transformers.utils.logging.enable_default_handler",anchor:"transformers.utils.logging.enable_default_handler",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L198"}}),nr=new S({props:{name:"transformers.utils.logging.disable_default_handler",anchor:"transformers.utils.logging.disable_default_handler",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L189"}}),ar=new S({props:{name:"transformers.utils.logging.enable_explicit_format",anchor:"transformers.utils.logging.enable_explicit_format",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L244"}}),ir=new Ir({props:{code:"    [LEVELNAME|FILENAME|LINE NUMBER] TIME >> MESSAGE",highlighted:'    [LEVELNAME|<span class="hljs-type">FILENAME</span>|<span class="hljs-type">LINE</span> NUMBER] TIME &gt;&gt; MESSAGE'}}),gr=new S({props:{name:"transformers.utils.logging.reset_format",anchor:"transformers.utils.logging.reset_format",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L259"}}),fr=new S({props:{name:"transformers.utils.logging.enable_progress_bar",anchor:"transformers.utils.logging.enable_progress_bar",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L335"}}),mr=new S({props:{name:"transformers.utils.logging.disable_progress_bar",anchor:"transformers.utils.logging.disable_progress_bar",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/utils/logging.py#L341"}}),{c(){y=l("meta"),Y=g(),w=l("h1"),d=l("a"),A=l("span"),p(G.$$.fragment),ee=g(),re=l("span"),Le=o("Logging"),U=g(),z=l("p"),Fe=o("\u{1F917} Transformers has a centralized logging system, so that you can setup the verbosity of the library easily."),W=g(),L=l("p"),te=o("Currently the default verbosity of the library is "),oe=l("code"),Pe=o("WARNING"),F=o("."),Ee=g(),P=l("p"),ke=o(`To change the level of verbosity, just use one of the direct setters. For instance, here is how to change the verbosity
to the INFO level.`),$e=g(),p(T.$$.fragment),ye=g(),E=l("p"),J=o("You can also use the environment variable "),se=l("code"),le=o("TRANSFORMERS_VERBOSITY"),xe=o(` to override the default verbosity. You can set it
to one of the following: `),ne=l("code"),K=o("debug"),Ve=o(", "),M=l("code"),Ge=o("info"),O=o(", "),k=l("code"),I=o("warning"),ae=o(", "),we=l("code"),dr=o("error"),We=o(", "),Re=l("code"),ie=o("critical"),pr=o(". For example:"),Me=g(),p(B.$$.fragment),Be=g(),$=l("p"),ur=o("Additionally, some "),Dr=l("code"),to=o("warnings"),oo=o(` can be disabled by setting the environment variable
`),Tr=l("code"),so=o("TRANSFORMERS_NO_ADVISORY_WARNINGS"),lo=o(" to a true value, like "),Cr=l("em"),no=o("1"),ao=o(`. This will disable any warning that is logged using
`),Sr=l("code"),io=o("logger.warning_advice()"),go=o(" For example:"),ut=g(),p(qe.$$.fragment),ht=g(),Oe=l("p"),fo=o("Here is an example of how to use "),Lr=l("code"),mo=o("logging"),co=o(" in a module:"),vt=g(),p(je.$$.fragment),_t=g(),R=l("p"),po=o("Above, a "),Fr=l("code"),uo=o("logger"),ho=o(" instance is created from "),Pr=l("code"),vo=o("logging.get_logger(__name__)"),_o=o(". If you want to use "),kr=l("code"),bo=o("logging"),Eo=o(" in a script, you shouldn\u2019t pass "),xr=l("code"),$o=o("__name__"),yo=o(" to "),Vr=l("code"),wo=o("logging.get_logger"),Ro=o(". For example:"),bt=g(),p(He.$$.fragment),Et=g(),Q=l("p"),Oo=o(`All the methods of this logging module are documented below, the main ones are
`),hr=l("a"),Ao=o("logging.get_verbosity()"),Io=o(` to get the current level of verbosity in the logger and
`),vr=l("a"),No=o("logging.set_verbosity()"),Do=o(` to set the verbosity to the level of your choice. In order (from the least
verbose to the most verbose), those levels (with their corresponding int values in parenthesis) are:`),$t=g(),N=l("ul"),Ae=l("li"),Gr=l("code"),To=o("transformers.logging.CRITICAL"),Co=o(" or "),Wr=l("code"),So=o("transformers.logging.FATAL"),Lo=o(` (int value, 50): only report the most
critical errors.`),Fo=g(),_r=l("li"),Mr=l("code"),Po=o("transformers.logging.ERROR"),ko=o(" (int value, 40): only report errors."),xo=g(),Ie=l("li"),Br=l("code"),Vo=o("transformers.logging.WARNING"),Go=o(" or "),qr=l("code"),Wo=o("transformers.logging.WARN"),Mo=o(` (int value, 30): only reports error and
warnings. This the default level used by the library.`),Bo=g(),br=l("li"),jr=l("code"),qo=o("transformers.logging.INFO"),jo=o(" (int value, 20): reports error, warnings and basic information."),Ho=g(),Er=l("li"),Hr=l("code"),Yo=o("transformers.logging.DEBUG"),Uo=o(" (int value, 10): report all information."),yt=g(),x=l("p"),zo=o("By default, "),Yr=l("code"),Jo=o("tqdm"),Ko=o(" progress bars will be displayed during model download. "),$r=l("a"),Qo=o("logging.disable_progress_bar()"),Xo=o(" and "),yr=l("a"),Zo=o("logging.enable_progress_bar()"),es=o(" can be used to suppress or unsuppress this behavior."),wt=g(),ge=l("h2"),Ne=l("a"),Ur=l("span"),p(Ye.$$.fragment),rs=g(),zr=l("span"),ts=o("Base setters"),Rt=g(),fe=l("div"),p(Ue.$$.fragment),os=g(),ze=l("p"),ss=o("Set the verbosity to the "),Jr=l("code"),ls=o("ERROR"),ns=o(" level."),Ot=g(),me=l("div"),p(Je.$$.fragment),as=g(),Ke=l("p"),is=o("Set the verbosity to the "),Kr=l("code"),gs=o("WARNING"),fs=o(" level."),At=g(),ce=l("div"),p(Qe.$$.fragment),ms=g(),Xe=l("p"),cs=o("Set the verbosity to the "),Qr=l("code"),ds=o("INFO"),ps=o(" level."),It=g(),de=l("div"),p(Ze.$$.fragment),us=g(),er=l("p"),hs=o("Set the verbosity to the "),Xr=l("code"),vs=o("DEBUG"),_s=o(" level."),Nt=g(),pe=l("h2"),De=l("a"),Zr=l("span"),p(rr.$$.fragment),bs=g(),et=l("span"),Es=o("Other functions"),Dt=g(),q=l("div"),p(tr.$$.fragment),$s=g(),rt=l("p"),ys=o("Return the current level for the \u{1F917} Transformers\u2019s root logger as an int."),ws=g(),p(Te.$$.fragment),Tt=g(),ue=l("div"),p(or.$$.fragment),Rs=g(),tt=l("p"),Os=o("Set the verbosity level for the \u{1F917} Transformers\u2019s root logger."),Ct=g(),j=l("div"),p(sr.$$.fragment),As=g(),ot=l("p"),Is=o("Return a logger with the specified name."),Ns=g(),st=l("p"),Ds=o("This function is not supposed to be directly accessed unless you are writing a custom transformers module."),St=g(),he=l("div"),p(lr.$$.fragment),Ts=g(),lt=l("p"),Cs=o("Enable the default handler of the HuggingFace Transformers\u2019s root logger."),Lt=g(),ve=l("div"),p(nr.$$.fragment),Ss=g(),nt=l("p"),Ls=o("Disable the default handler of the HuggingFace Transformers\u2019s root logger."),Ft=g(),C=l("div"),p(ar.$$.fragment),Fs=g(),at=l("p"),Ps=o("Enable explicit formatting for every HuggingFace Transformers\u2019s logger. The explicit formatter is as follows:"),ks=g(),p(ir.$$.fragment),xs=g(),it=l("p"),Vs=o("All handlers currently bound to the root logger are affected by this method."),Pt=g(),H=l("div"),p(gr.$$.fragment),Gs=g(),gt=l("p"),Ws=o("Resets the formatting for HuggingFace Transformers\u2019s loggers."),Ms=g(),ft=l("p"),Bs=o("All handlers currently bound to the root logger are affected by this method."),kt=g(),_e=l("div"),p(fr.$$.fragment),qs=g(),mt=l("p"),js=o("Enable tqdm progress bar."),xt=g(),be=l("div"),p(mr.$$.fragment),Hs=g(),ct=l("p"),Ys=o("Enable tqdm progress bar."),this.h()},l(e){const i=tn('[data-svelte="svelte-1phssyn"]',document.head);y=n(i,"META",{name:!0,content:!0}),i.forEach(t),Y=f(e),w=n(e,"H1",{class:!0});var cr=a(w);d=n(cr,"A",{id:!0,class:!0,href:!0});var Qs=a(d);A=n(Qs,"SPAN",{});var Xs=a(A);u(G.$$.fragment,Xs),Xs.forEach(t),Qs.forEach(t),ee=f(cr),re=n(cr,"SPAN",{});var Zs=a(re);Le=s(Zs,"Logging"),Zs.forEach(t),cr.forEach(t),U=f(e),z=n(e,"P",{});var el=a(z);Fe=s(el,"\u{1F917} Transformers has a centralized logging system, so that you can setup the verbosity of the library easily."),el.forEach(t),W=f(e),L=n(e,"P",{});var Gt=a(L);te=s(Gt,"Currently the default verbosity of the library is "),oe=n(Gt,"CODE",{});var rl=a(oe);Pe=s(rl,"WARNING"),rl.forEach(t),F=s(Gt,"."),Gt.forEach(t),Ee=f(e),P=n(e,"P",{});var tl=a(P);ke=s(tl,`To change the level of verbosity, just use one of the direct setters. For instance, here is how to change the verbosity
to the INFO level.`),tl.forEach(t),$e=f(e),u(T.$$.fragment,e),ye=f(e),E=n(e,"P",{});var D=a(E);J=s(D,"You can also use the environment variable "),se=n(D,"CODE",{});var ol=a(se);le=s(ol,"TRANSFORMERS_VERBOSITY"),ol.forEach(t),xe=s(D,` to override the default verbosity. You can set it
to one of the following: `),ne=n(D,"CODE",{});var sl=a(ne);K=s(sl,"debug"),sl.forEach(t),Ve=s(D,", "),M=n(D,"CODE",{});var ll=a(M);Ge=s(ll,"info"),ll.forEach(t),O=s(D,", "),k=n(D,"CODE",{});var nl=a(k);I=s(nl,"warning"),nl.forEach(t),ae=s(D,", "),we=n(D,"CODE",{});var al=a(we);dr=s(al,"error"),al.forEach(t),We=s(D,", "),Re=n(D,"CODE",{});var il=a(Re);ie=s(il,"critical"),il.forEach(t),pr=s(D,". For example:"),D.forEach(t),Me=f(e),u(B.$$.fragment,e),Be=f(e),$=n(e,"P",{});var X=a($);ur=s(X,"Additionally, some "),Dr=n(X,"CODE",{});var gl=a(Dr);to=s(gl,"warnings"),gl.forEach(t),oo=s(X,` can be disabled by setting the environment variable
`),Tr=n(X,"CODE",{});var fl=a(Tr);so=s(fl,"TRANSFORMERS_NO_ADVISORY_WARNINGS"),fl.forEach(t),lo=s(X," to a true value, like "),Cr=n(X,"EM",{});var ml=a(Cr);no=s(ml,"1"),ml.forEach(t),ao=s(X,`. This will disable any warning that is logged using
`),Sr=n(X,"CODE",{});var cl=a(Sr);io=s(cl,"logger.warning_advice()"),cl.forEach(t),go=s(X," For example:"),X.forEach(t),ut=f(e),u(qe.$$.fragment,e),ht=f(e),Oe=n(e,"P",{});var Wt=a(Oe);fo=s(Wt,"Here is an example of how to use "),Lr=n(Wt,"CODE",{});var dl=a(Lr);mo=s(dl,"logging"),dl.forEach(t),co=s(Wt," in a module:"),Wt.forEach(t),vt=f(e),u(je.$$.fragment,e),_t=f(e),R=n(e,"P",{});var V=a(R);po=s(V,"Above, a "),Fr=n(V,"CODE",{});var pl=a(Fr);uo=s(pl,"logger"),pl.forEach(t),ho=s(V," instance is created from "),Pr=n(V,"CODE",{});var ul=a(Pr);vo=s(ul,"logging.get_logger(__name__)"),ul.forEach(t),_o=s(V,". If you want to use "),kr=n(V,"CODE",{});var hl=a(kr);bo=s(hl,"logging"),hl.forEach(t),Eo=s(V," in a script, you shouldn\u2019t pass "),xr=n(V,"CODE",{});var vl=a(xr);$o=s(vl,"__name__"),vl.forEach(t),yo=s(V," to "),Vr=n(V,"CODE",{});var _l=a(Vr);wo=s(_l,"logging.get_logger"),_l.forEach(t),Ro=s(V,". For example:"),V.forEach(t),bt=f(e),u(He.$$.fragment,e),Et=f(e),Q=n(e,"P",{});var wr=a(Q);Oo=s(wr,`All the methods of this logging module are documented below, the main ones are
`),hr=n(wr,"A",{href:!0});var bl=a(hr);Ao=s(bl,"logging.get_verbosity()"),bl.forEach(t),Io=s(wr,` to get the current level of verbosity in the logger and
`),vr=n(wr,"A",{href:!0});var El=a(vr);No=s(El,"logging.set_verbosity()"),El.forEach(t),Do=s(wr,` to set the verbosity to the level of your choice. In order (from the least
verbose to the most verbose), those levels (with their corresponding int values in parenthesis) are:`),wr.forEach(t),$t=f(e),N=n(e,"UL",{});var Z=a(N);Ae=n(Z,"LI",{});var dt=a(Ae);Gr=n(dt,"CODE",{});var $l=a(Gr);To=s($l,"transformers.logging.CRITICAL"),$l.forEach(t),Co=s(dt," or "),Wr=n(dt,"CODE",{});var yl=a(Wr);So=s(yl,"transformers.logging.FATAL"),yl.forEach(t),Lo=s(dt,` (int value, 50): only report the most
critical errors.`),dt.forEach(t),Fo=f(Z),_r=n(Z,"LI",{});var Us=a(_r);Mr=n(Us,"CODE",{});var wl=a(Mr);Po=s(wl,"transformers.logging.ERROR"),wl.forEach(t),ko=s(Us," (int value, 40): only report errors."),Us.forEach(t),xo=f(Z),Ie=n(Z,"LI",{});var pt=a(Ie);Br=n(pt,"CODE",{});var Rl=a(Br);Vo=s(Rl,"transformers.logging.WARNING"),Rl.forEach(t),Go=s(pt," or "),qr=n(pt,"CODE",{});var Ol=a(qr);Wo=s(Ol,"transformers.logging.WARN"),Ol.forEach(t),Mo=s(pt,` (int value, 30): only reports error and
warnings. This the default level used by the library.`),pt.forEach(t),Bo=f(Z),br=n(Z,"LI",{});var zs=a(br);jr=n(zs,"CODE",{});var Al=a(jr);qo=s(Al,"transformers.logging.INFO"),Al.forEach(t),jo=s(zs," (int value, 20): reports error, warnings and basic information."),zs.forEach(t),Ho=f(Z),Er=n(Z,"LI",{});var Js=a(Er);Hr=n(Js,"CODE",{});var Il=a(Hr);Yo=s(Il,"transformers.logging.DEBUG"),Il.forEach(t),Uo=s(Js," (int value, 10): report all information."),Js.forEach(t),Z.forEach(t),yt=f(e),x=n(e,"P",{});var Ce=a(x);zo=s(Ce,"By default, "),Yr=n(Ce,"CODE",{});var Nl=a(Yr);Jo=s(Nl,"tqdm"),Nl.forEach(t),Ko=s(Ce," progress bars will be displayed during model download. "),$r=n(Ce,"A",{href:!0});var Dl=a($r);Qo=s(Dl,"logging.disable_progress_bar()"),Dl.forEach(t),Xo=s(Ce," and "),yr=n(Ce,"A",{href:!0});var Tl=a(yr);Zo=s(Tl,"logging.enable_progress_bar()"),Tl.forEach(t),es=s(Ce," can be used to suppress or unsuppress this behavior."),Ce.forEach(t),wt=f(e),ge=n(e,"H2",{class:!0});var Mt=a(ge);Ne=n(Mt,"A",{id:!0,class:!0,href:!0});var Cl=a(Ne);Ur=n(Cl,"SPAN",{});var Sl=a(Ur);u(Ye.$$.fragment,Sl),Sl.forEach(t),Cl.forEach(t),rs=f(Mt),zr=n(Mt,"SPAN",{});var Ll=a(zr);ts=s(Ll,"Base setters"),Ll.forEach(t),Mt.forEach(t),Rt=f(e),fe=n(e,"DIV",{class:!0});var Bt=a(fe);u(Ue.$$.fragment,Bt),os=f(Bt),ze=n(Bt,"P",{});var qt=a(ze);ss=s(qt,"Set the verbosity to the "),Jr=n(qt,"CODE",{});var Fl=a(Jr);ls=s(Fl,"ERROR"),Fl.forEach(t),ns=s(qt," level."),qt.forEach(t),Bt.forEach(t),Ot=f(e),me=n(e,"DIV",{class:!0});var jt=a(me);u(Je.$$.fragment,jt),as=f(jt),Ke=n(jt,"P",{});var Ht=a(Ke);is=s(Ht,"Set the verbosity to the "),Kr=n(Ht,"CODE",{});var Pl=a(Kr);gs=s(Pl,"WARNING"),Pl.forEach(t),fs=s(Ht," level."),Ht.forEach(t),jt.forEach(t),At=f(e),ce=n(e,"DIV",{class:!0});var Yt=a(ce);u(Qe.$$.fragment,Yt),ms=f(Yt),Xe=n(Yt,"P",{});var Ut=a(Xe);cs=s(Ut,"Set the verbosity to the "),Qr=n(Ut,"CODE",{});var kl=a(Qr);ds=s(kl,"INFO"),kl.forEach(t),ps=s(Ut," level."),Ut.forEach(t),Yt.forEach(t),It=f(e),de=n(e,"DIV",{class:!0});var zt=a(de);u(Ze.$$.fragment,zt),us=f(zt),er=n(zt,"P",{});var Jt=a(er);hs=s(Jt,"Set the verbosity to the "),Xr=n(Jt,"CODE",{});var xl=a(Xr);vs=s(xl,"DEBUG"),xl.forEach(t),_s=s(Jt," level."),Jt.forEach(t),zt.forEach(t),Nt=f(e),pe=n(e,"H2",{class:!0});var Kt=a(pe);De=n(Kt,"A",{id:!0,class:!0,href:!0});var Vl=a(De);Zr=n(Vl,"SPAN",{});var Gl=a(Zr);u(rr.$$.fragment,Gl),Gl.forEach(t),Vl.forEach(t),bs=f(Kt),et=n(Kt,"SPAN",{});var Wl=a(et);Es=s(Wl,"Other functions"),Wl.forEach(t),Kt.forEach(t),Dt=f(e),q=n(e,"DIV",{class:!0});var Rr=a(q);u(tr.$$.fragment,Rr),$s=f(Rr),rt=n(Rr,"P",{});var Ml=a(rt);ys=s(Ml,"Return the current level for the \u{1F917} Transformers\u2019s root logger as an int."),Ml.forEach(t),ws=f(Rr),u(Te.$$.fragment,Rr),Rr.forEach(t),Tt=f(e),ue=n(e,"DIV",{class:!0});var Qt=a(ue);u(or.$$.fragment,Qt),Rs=f(Qt),tt=n(Qt,"P",{});var Bl=a(tt);Os=s(Bl,"Set the verbosity level for the \u{1F917} Transformers\u2019s root logger."),Bl.forEach(t),Qt.forEach(t),Ct=f(e),j=n(e,"DIV",{class:!0});var Or=a(j);u(sr.$$.fragment,Or),As=f(Or),ot=n(Or,"P",{});var ql=a(ot);Is=s(ql,"Return a logger with the specified name."),ql.forEach(t),Ns=f(Or),st=n(Or,"P",{});var jl=a(st);Ds=s(jl,"This function is not supposed to be directly accessed unless you are writing a custom transformers module."),jl.forEach(t),Or.forEach(t),St=f(e),he=n(e,"DIV",{class:!0});var Xt=a(he);u(lr.$$.fragment,Xt),Ts=f(Xt),lt=n(Xt,"P",{});var Hl=a(lt);Cs=s(Hl,"Enable the default handler of the HuggingFace Transformers\u2019s root logger."),Hl.forEach(t),Xt.forEach(t),Lt=f(e),ve=n(e,"DIV",{class:!0});var Zt=a(ve);u(nr.$$.fragment,Zt),Ss=f(Zt),nt=n(Zt,"P",{});var Yl=a(nt);Ls=s(Yl,"Disable the default handler of the HuggingFace Transformers\u2019s root logger."),Yl.forEach(t),Zt.forEach(t),Ft=f(e),C=n(e,"DIV",{class:!0});var Se=a(C);u(ar.$$.fragment,Se),Fs=f(Se),at=n(Se,"P",{});var Ul=a(at);Ps=s(Ul,"Enable explicit formatting for every HuggingFace Transformers\u2019s logger. The explicit formatter is as follows:"),Ul.forEach(t),ks=f(Se),u(ir.$$.fragment,Se),xs=f(Se),it=n(Se,"P",{});var zl=a(it);Vs=s(zl,"All handlers currently bound to the root logger are affected by this method."),zl.forEach(t),Se.forEach(t),Pt=f(e),H=n(e,"DIV",{class:!0});var Ar=a(H);u(gr.$$.fragment,Ar),Gs=f(Ar),gt=n(Ar,"P",{});var Jl=a(gt);Ws=s(Jl,"Resets the formatting for HuggingFace Transformers\u2019s loggers."),Jl.forEach(t),Ms=f(Ar),ft=n(Ar,"P",{});var Kl=a(ft);Bs=s(Kl,"All handlers currently bound to the root logger are affected by this method."),Kl.forEach(t),Ar.forEach(t),kt=f(e),_e=n(e,"DIV",{class:!0});var eo=a(_e);u(fr.$$.fragment,eo),qs=f(eo),mt=n(eo,"P",{});var Ql=a(mt);js=s(Ql,"Enable tqdm progress bar."),Ql.forEach(t),eo.forEach(t),xt=f(e),be=n(e,"DIV",{class:!0});var ro=a(be);u(mr.$$.fragment,ro),Hs=f(ro),ct=n(ro,"P",{});var Xl=a(ct);Ys=s(Xl,"Enable tqdm progress bar."),Xl.forEach(t),ro.forEach(t),this.h()},h(){c(y,"name","hf:doc:metadata"),c(y,"content",JSON.stringify(nn)),c(d,"id","logging"),c(d,"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"),c(d,"href","#logging"),c(w,"class","relative group"),c(hr,"href","/docs/transformers/pr_15839/en/main_classes/logging#transformers.utils.logging.get_verbosity"),c(vr,"href","/docs/transformers/pr_15839/en/main_classes/logging#transformers.utils.logging.set_verbosity"),c($r,"href","/docs/transformers/pr_15839/en/main_classes/logging#transformers.utils.logging.disable_progress_bar"),c(yr,"href","/docs/transformers/pr_15839/en/main_classes/logging#transformers.utils.logging.enable_progress_bar"),c(Ne,"id","transformers.utils.logging.set_verbosity_error"),c(Ne,"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"),c(Ne,"href","#transformers.utils.logging.set_verbosity_error"),c(ge,"class","relative group"),c(fe,"class","docstring"),c(me,"class","docstring"),c(ce,"class","docstring"),c(de,"class","docstring"),c(De,"id","transformers.utils.logging.get_verbosity"),c(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"),c(De,"href","#transformers.utils.logging.get_verbosity"),c(pe,"class","relative group"),c(q,"class","docstring"),c(ue,"class","docstring"),c(j,"class","docstring"),c(he,"class","docstring"),c(ve,"class","docstring"),c(C,"class","docstring"),c(H,"class","docstring"),c(_e,"class","docstring"),c(be,"class","docstring")},m(e,i){r(document.head,y),m(e,Y,i),m(e,w,i),r(w,d),r(d,A),h(G,A,null),r(w,ee),r(w,re),r(re,Le),m(e,U,i),m(e,z,i),r(z,Fe),m(e,W,i),m(e,L,i),r(L,te),r(L,oe),r(oe,Pe),r(L,F),m(e,Ee,i),m(e,P,i),r(P,ke),m(e,$e,i),h(T,e,i),m(e,ye,i),m(e,E,i),r(E,J),r(E,se),r(se,le),r(E,xe),r(E,ne),r(ne,K),r(E,Ve),r(E,M),r(M,Ge),r(E,O),r(E,k),r(k,I),r(E,ae),r(E,we),r(we,dr),r(E,We),r(E,Re),r(Re,ie),r(E,pr),m(e,Me,i),h(B,e,i),m(e,Be,i),m(e,$,i),r($,ur),r($,Dr),r(Dr,to),r($,oo),r($,Tr),r(Tr,so),r($,lo),r($,Cr),r(Cr,no),r($,ao),r($,Sr),r(Sr,io),r($,go),m(e,ut,i),h(qe,e,i),m(e,ht,i),m(e,Oe,i),r(Oe,fo),r(Oe,Lr),r(Lr,mo),r(Oe,co),m(e,vt,i),h(je,e,i),m(e,_t,i),m(e,R,i),r(R,po),r(R,Fr),r(Fr,uo),r(R,ho),r(R,Pr),r(Pr,vo),r(R,_o),r(R,kr),r(kr,bo),r(R,Eo),r(R,xr),r(xr,$o),r(R,yo),r(R,Vr),r(Vr,wo),r(R,Ro),m(e,bt,i),h(He,e,i),m(e,Et,i),m(e,Q,i),r(Q,Oo),r(Q,hr),r(hr,Ao),r(Q,Io),r(Q,vr),r(vr,No),r(Q,Do),m(e,$t,i),m(e,N,i),r(N,Ae),r(Ae,Gr),r(Gr,To),r(Ae,Co),r(Ae,Wr),r(Wr,So),r(Ae,Lo),r(N,Fo),r(N,_r),r(_r,Mr),r(Mr,Po),r(_r,ko),r(N,xo),r(N,Ie),r(Ie,Br),r(Br,Vo),r(Ie,Go),r(Ie,qr),r(qr,Wo),r(Ie,Mo),r(N,Bo),r(N,br),r(br,jr),r(jr,qo),r(br,jo),r(N,Ho),r(N,Er),r(Er,Hr),r(Hr,Yo),r(Er,Uo),m(e,yt,i),m(e,x,i),r(x,zo),r(x,Yr),r(Yr,Jo),r(x,Ko),r(x,$r),r($r,Qo),r(x,Xo),r(x,yr),r(yr,Zo),r(x,es),m(e,wt,i),m(e,ge,i),r(ge,Ne),r(Ne,Ur),h(Ye,Ur,null),r(ge,rs),r(ge,zr),r(zr,ts),m(e,Rt,i),m(e,fe,i),h(Ue,fe,null),r(fe,os),r(fe,ze),r(ze,ss),r(ze,Jr),r(Jr,ls),r(ze,ns),m(e,Ot,i),m(e,me,i),h(Je,me,null),r(me,as),r(me,Ke),r(Ke,is),r(Ke,Kr),r(Kr,gs),r(Ke,fs),m(e,At,i),m(e,ce,i),h(Qe,ce,null),r(ce,ms),r(ce,Xe),r(Xe,cs),r(Xe,Qr),r(Qr,ds),r(Xe,ps),m(e,It,i),m(e,de,i),h(Ze,de,null),r(de,us),r(de,er),r(er,hs),r(er,Xr),r(Xr,vs),r(er,_s),m(e,Nt,i),m(e,pe,i),r(pe,De),r(De,Zr),h(rr,Zr,null),r(pe,bs),r(pe,et),r(et,Es),m(e,Dt,i),m(e,q,i),h(tr,q,null),r(q,$s),r(q,rt),r(rt,ys),r(q,ws),h(Te,q,null),m(e,Tt,i),m(e,ue,i),h(or,ue,null),r(ue,Rs),r(ue,tt),r(tt,Os),m(e,Ct,i),m(e,j,i),h(sr,j,null),r(j,As),r(j,ot),r(ot,Is),r(j,Ns),r(j,st),r(st,Ds),m(e,St,i),m(e,he,i),h(lr,he,null),r(he,Ts),r(he,lt),r(lt,Cs),m(e,Lt,i),m(e,ve,i),h(nr,ve,null),r(ve,Ss),r(ve,nt),r(nt,Ls),m(e,Ft,i),m(e,C,i),h(ar,C,null),r(C,Fs),r(C,at),r(at,Ps),r(C,ks),h(ir,C,null),r(C,xs),r(C,it),r(it,Vs),m(e,Pt,i),m(e,H,i),h(gr,H,null),r(H,Gs),r(H,gt),r(gt,Ws),r(H,Ms),r(H,ft),r(ft,Bs),m(e,kt,i),m(e,_e,i),h(fr,_e,null),r(_e,qs),r(_e,mt),r(mt,js),m(e,xt,i),m(e,be,i),h(mr,be,null),r(be,Hs),r(be,ct),r(ct,Ys),Vt=!0},p(e,[i]){const cr={};i&2&&(cr.$$scope={dirty:i,ctx:e}),Te.$set(cr)},i(e){Vt||(v(G.$$.fragment,e),v(T.$$.fragment,e),v(B.$$.fragment,e),v(qe.$$.fragment,e),v(je.$$.fragment,e),v(He.$$.fragment,e),v(Ye.$$.fragment,e),v(Ue.$$.fragment,e),v(Je.$$.fragment,e),v(Qe.$$.fragment,e),v(Ze.$$.fragment,e),v(rr.$$.fragment,e),v(tr.$$.fragment,e),v(Te.$$.fragment,e),v(or.$$.fragment,e),v(sr.$$.fragment,e),v(lr.$$.fragment,e),v(nr.$$.fragment,e),v(ar.$$.fragment,e),v(ir.$$.fragment,e),v(gr.$$.fragment,e),v(fr.$$.fragment,e),v(mr.$$.fragment,e),Vt=!0)},o(e){_(G.$$.fragment,e),_(T.$$.fragment,e),_(B.$$.fragment,e),_(qe.$$.fragment,e),_(je.$$.fragment,e),_(He.$$.fragment,e),_(Ye.$$.fragment,e),_(Ue.$$.fragment,e),_(Je.$$.fragment,e),_(Qe.$$.fragment,e),_(Ze.$$.fragment,e),_(rr.$$.fragment,e),_(tr.$$.fragment,e),_(Te.$$.fragment,e),_(or.$$.fragment,e),_(sr.$$.fragment,e),_(lr.$$.fragment,e),_(nr.$$.fragment,e),_(ar.$$.fragment,e),_(ir.$$.fragment,e),_(gr.$$.fragment,e),_(fr.$$.fragment,e),_(mr.$$.fragment,e),Vt=!1},d(e){t(y),e&&t(Y),e&&t(w),b(G),e&&t(U),e&&t(z),e&&t(W),e&&t(L),e&&t(Ee),e&&t(P),e&&t($e),b(T,e),e&&t(ye),e&&t(E),e&&t(Me),b(B,e),e&&t(Be),e&&t($),e&&t(ut),b(qe,e),e&&t(ht),e&&t(Oe),e&&t(vt),b(je,e),e&&t(_t),e&&t(R),e&&t(bt),b(He,e),e&&t(Et),e&&t(Q),e&&t($t),e&&t(N),e&&t(yt),e&&t(x),e&&t(wt),e&&t(ge),b(Ye),e&&t(Rt),e&&t(fe),b(Ue),e&&t(Ot),e&&t(me),b(Je),e&&t(At),e&&t(ce),b(Qe),e&&t(It),e&&t(de),b(Ze),e&&t(Nt),e&&t(pe),b(rr),e&&t(Dt),e&&t(q),b(tr),b(Te),e&&t(Tt),e&&t(ue),b(or),e&&t(Ct),e&&t(j),b(sr),e&&t(St),e&&t(he),b(lr),e&&t(Lt),e&&t(ve),b(nr),e&&t(Ft),e&&t(C),b(ar),b(ir),e&&t(Pt),e&&t(H),b(gr),e&&t(kt),e&&t(_e),b(fr),e&&t(xt),e&&t(be),b(mr)}}}const nn={local:"logging",sections:[{local:"transformers.utils.logging.set_verbosity_error",title:"Base setters"},{local:"transformers.utils.logging.get_verbosity",title:"Other functions"}],title:"Logging"};function an(Nr,y,Y){let{fw:w}=y;return Nr.$$set=d=>{"fw"in d&&Y(0,w=d.fw)},[w]}class un extends Zl{constructor(y){super();en(this,y,an,ln,rn,{fw:0})}}export{un as default,nn as metadata};
