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

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

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

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