import{S as vl,i as hl,s as bl,e as o,k as f,w as v,t as l,M as _l,c as s,d as t,m,a,x as h,h as n,b as c,G as r,g,y as b,q as _,o as $,B as y,v as $l,L as yl}from"../../chunks/vendor-hf-doc-builder.js";import{T as El}from"../../chunks/Tip-hf-doc-builder.js";import{D as S}from"../../chunks/Docstring-hf-doc-builder.js";import{C as st}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ys}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as wl}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Rl(ir){let u,L,w,d,R,p,I,Q,De,Z,H,Ce,k,F,ee,re,Se,J,be,x,Le,_e,C,$e,E,q,te,oe,Fe,se,Y,Je,P,xe;return{c(){u=o("p"),L=l("\u{1F917} Transformers has following logging levels:"),w=f(),d=o("ul"),R=o("li"),p=l("50: "),I=o("code"),Q=l("transformers.logging.CRITICAL"),De=l(" or "),Z=o("code"),H=l("transformers.logging.FATAL"),Ce=f(),k=o("li"),F=l("40: "),ee=o("code"),re=l("transformers.logging.ERROR"),Se=f(),J=o("li"),be=l("30: "),x=o("code"),Le=l("transformers.logging.WARNING"),_e=l(" or "),C=o("code"),$e=l("transformers.logging.WARN"),E=f(),q=o("li"),te=l("20: "),oe=o("code"),Fe=l("transformers.logging.INFO"),se=f(),Y=o("li"),Je=l("10: "),P=o("code"),xe=l("transformers.logging.DEBUG")},l(N){u=s(N,"P",{});var U=a(u);L=n(U,"\u{1F917} Transformers has following logging levels:"),U.forEach(t),w=m(N),d=s(N,"UL",{});var A=a(d);R=s(A,"LI",{});var le=a(R);p=n(le,"50: "),I=s(le,"CODE",{});var ye=a(I);Q=n(ye,"transformers.logging.CRITICAL"),ye.forEach(t),De=n(le," or "),Z=s(le,"CODE",{});var gr=a(Z);H=n(gr,"transformers.logging.FATAL"),gr.forEach(t),le.forEach(t),Ce=m(A),k=s(A,"LI",{});var Ue=a(k);F=n(Ue,"40: "),ee=s(Ue,"CODE",{});var Ee=a(ee);re=n(Ee,"transformers.logging.ERROR"),Ee.forEach(t),Ue.forEach(t),Se=m(A),J=s(A,"LI",{});var ne=a(J);be=n(ne,"30: "),x=s(ne,"CODE",{});var fr=a(x);Le=n(fr,"transformers.logging.WARNING"),fr.forEach(t),_e=n(ne," or "),C=s(ne,"CODE",{});var Ve=a(C);$e=n(Ve,"transformers.logging.WARN"),Ve.forEach(t),ne.forEach(t),E=m(A),q=s(A,"LI",{});var M=a(q);te=n(M,"20: "),oe=s(M,"CODE",{});var ke=a(oe);Fe=n(ke,"transformers.logging.INFO"),ke.forEach(t),M.forEach(t),se=m(A),Y=s(A,"LI",{});var T=a(Y);Je=n(T,"10: "),P=s(T,"CODE",{});var mr=a(P);xe=n(mr,"transformers.logging.DEBUG"),mr.forEach(t),T.forEach(t),A.forEach(t)},m(N,U){g(N,u,U),r(u,L),g(N,w,U),g(N,d,U),r(d,R),r(R,p),r(R,I),r(I,Q),r(R,De),r(R,Z),r(Z,H),r(d,Ce),r(d,k),r(k,F),r(k,ee),r(ee,re),r(d,Se),r(d,J),r(J,be),r(J,x),r(x,Le),r(J,_e),r(J,C),r(C,$e),r(d,E),r(d,q),r(q,te),r(q,oe),r(oe,Fe),r(d,se),r(d,Y),r(Y,Je),r(Y,P),r(P,xe)},d(N){N&&t(u),N&&t(w),N&&t(d)}}}function Tl(ir){let u,L,w,d,R;return d=new st({props:{code:"JTIwJTIwJTIwJTIwJTVCTEVWRUxOQU1FJTdDRklMRU5BTUUlN0NMSU5FJTIwTlVNQkVSJTVEJTIwVElNRSUyMCUzRSUzRSUyME1FU1NBR0U=",highlighted:'    [LEVELNAME|<span class="hljs-type">FILENAME</span>|<span class="hljs-type">LINE</span> NUMBER] TIME &gt;&gt; MESSAGE'}}),{c(){u=o("p"),L=l("Enable explicit formatting for every HuggingFace Transformers\u2019s logger. The explicit formatter is as follows:"),w=f(),v(d.$$.fragment)},l(p){u=s(p,"P",{});var I=a(u);L=n(I,"Enable explicit formatting for every HuggingFace Transformers\u2019s logger. The explicit formatter is as follows:"),I.forEach(t),w=m(p),h(d.$$.fragment,p)},m(p,I){g(p,u,I),r(u,L),g(p,w,I),b(d,p,I),R=!0},p:yl,i(p){R||(_(d.$$.fragment,p),R=!0)},o(p){$(d.$$.fragment,p),R=!1},d(p){p&&t(u),p&&t(w),y(d,p)}}}function Il(ir){let u,L,w,d,R,p,I,Q,De,Z,H,Ce,k,F,ee,re,Se,J,be,x,Le,_e,C,$e,E,q,te,oe,Fe,se,Y,Je,P,xe,N,U,A,le,ye,gr,Ue,Ee,ne,fr,Ve,M,ke,T,mr,Rr,Gt,Wt,Tr,Zt,Ht,Ir,qt,Yt,Nr,jt,Xt,lt,Pe,nt,dr,zt,at,Me,it,j,Kt,cr,Qt,eo,pr,ro,to,gt,O,we,Ar,oo,so,Or,lo,no,ao,ur,Dr,io,go,fo,Re,Cr,mo,co,Sr,po,uo,vo,vr,Lr,ho,bo,_o,hr,Fr,$o,yo,ft,V,Eo,Jr,wo,Ro,br,To,Io,_r,No,Ao,mt,ae,Te,xr,Be,Oo,Ur,Do,dt,ie,Ge,Co,We,So,Vr,Lo,Fo,ct,ge,Ze,Jo,He,xo,kr,Uo,Vo,pt,fe,qe,ko,Ye,Po,Pr,Mo,Bo,ut,me,je,Go,Xe,Wo,Mr,Zo,Ho,vt,de,Ie,Br,ze,qo,Gr,Yo,ht,B,Ke,jo,Wr,Xo,zo,Ne,bt,ce,Qe,Ko,Zr,Qo,_t,G,er,es,Hr,rs,ts,qr,os,$t,pe,rr,ss,Yr,ls,yt,ue,tr,ns,jr,as,Et,X,or,is,Ae,gs,wt,W,sr,fs,Xr,ms,ds,zr,cs,Rt,ve,lr,ps,Kr,us,Tt,he,nr,vs,Qr,hs,It;return p=new ys({}),C=new st({props:{code:"aW1wb3J0JTIwdHJhbnNmb3JtZXJzJTBBJTBBdHJhbnNmb3JtZXJzLmxvZ2dpbmcuc2V0X3ZlcmJvc2l0eV9pbmZvKCk=",highlighted:`<span class="hljs-keyword">import</span> transformers

transformers.logging.set_verbosity_info()`}}),M=new st({props:{code:"VFJBTlNGT1JNRVJTX1ZFUkJPU0lUWSUzRGVycm9yJTIwLiUyRm15cHJvZ3JhbS5weQ==",highlighted:"TRANSFORMERS_VERBOSITY=error ./myprogram.py"}}),Pe=new st({props:{code:"VFJBTlNGT1JNRVJTX05PX0FEVklTT1JZX1dBUk5JTkdTJTNEMSUyMC4lMkZteXByb2dyYW0ucHk=",highlighted:"TRANSFORMERS_NO_ADVISORY_WARNINGS=1 ./myprogram.py"}}),Me=new st({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy51dGlscyUyMGltcG9ydCUyMGxvZ2dpbmclMEElMEFsb2dnaW5nLnNldF92ZXJib3NpdHlfaW5mbygpJTBBbG9nZ2VyJTIwJTNEJTIwbG9nZ2luZy5nZXRfbG9nZ2VyKCUyMnRyYW5zZm9ybWVycyUyMiklMEFsb2dnZXIuaW5mbyglMjJJTkZPJTIyKSUwQWxvZ2dlci53YXJuaW5nKCUyMldBUk4lMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers.utils <span class="hljs-keyword">import</span> logging

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