import{s as Fa,o as Ra,n as Bt}from"../chunks/scheduler.9bc65507.js";import{S as Ya,i as Oa,g as n,s as a,u as _,A as Xa,h as s,f as l,c as r,j as b,v as w,y as i,k as f,o as t,a as m,w as $,d as x,t as y,x as j}from"../chunks/index.78c82d43.js";import{D as U}from"../chunks/Docstring.4e7352e2.js";import{C as Wt}from"../chunks/CodeBlock.73e038be.js";import{I as Lt}from"../chunks/IconCopyLink.bedaa44d.js";import{E as St}from"../chunks/ExampleCodeBlock.872b014d.js";function qa(D){let u,k="To activate the underflow/overflow detection, initialize the object with the model :",M,h,v;return h=new Wt({props:{code:"ZGVidWdfb3ZlcmZsb3clMjAlM0QlMjBEZWJ1Z1VuZGVyZmxvd092ZXJmbG93KG1vZGVsKQ==",highlighted:"debug_overflow = DebugUnderflowOverflow(model)",wrap:!1}}),{c(){u=n("p"),u.textContent=k,M=a(),_(h.$$.fragment)},l(o){u=s(o,"P",{"data-svelte-h":!0}),i(u)!=="svelte-e61xrj"&&(u.textContent=k),M=r(o),w(h.$$.fragment,o)},m(o,T){m(o,u,T),m(o,M,T),$(h,o,T),v=!0},p:Bt,i(o){v||(x(h.$$.fragment,o),v=!0)},o(o){y(h.$$.fragment,o),v=!1},d(o){o&&(l(u),l(M)),j(h,o)}}}function Ka(D){let u,k="mixed precision :",M,h,v;return h=new Wt({props:{code:"RGV0ZWN0ZWQlMjBpbmYlMkZuYW4lMjBkdXJpbmclMjBiYXRjaF9udW1iZXIlM0QwJTBBTGFzdCUyMDIxJTIwZm9yd2FyZCUyMGZyYW1lcyUzQSUwQWFicyUyMG1pbiUyMCUyMGFicyUyMG1heCUyMCUyMG1ldGFkYXRhJTBBJTVCLi4uJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZW5jb2Rlci5ibG9jay4yLmxheWVyLjEuRGVuc2VSZWx1RGVuc2Uud2lfMCUyMExpbmVhciUwQTIuMTdlLTA3JTIwNC41MGUlMkIwMCUyMHdlaWdodCUwQTEuNzllLTA2JTIwNC42NWUlMkIwMCUyMGlucHV0JTVCMCU1RCUwQTIuNjhlLTA2JTIwMy43MGUlMkIwMSUyMG91dHB1dCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGVuY29kZXIuYmxvY2suMi5sYXllci4xLkRlbnNlUmVsdURlbnNlLndpXzElMjBMaW5lYXIlMEE4LjA4ZS0wNyUyMDIuNjZlJTJCMDElMjB3ZWlnaHQlMEExLjc5ZS0wNiUyMDQuNjVlJTJCMDAlMjBpbnB1dCU1QjAlNUQlMEExLjI3ZS0wNCUyMDIuMzdlJTJCMDIlMjBvdXRwdXQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBlbmNvZGVyLmJsb2NrLjIubGF5ZXIuMS5EZW5zZVJlbHVEZW5zZS53byUyMExpbmVhciUwQTEuMDFlLTA2JTIwNi40NGUlMkIwMCUyMHdlaWdodCUwQTAuMDBlJTJCMDAlMjA5Ljc0ZSUyQjAzJTIwaW5wdXQlNUIwJTVEJTBBMy4xOGUtMDQlMjA2LjI3ZSUyQjA0JTIwb3V0cHV0JTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZW5jb2Rlci5ibG9jay4yLmxheWVyLjEuRGVuc2VSZWx1RGVuc2UlMjBUNURlbnNlR2F0ZWRHZWx1RGVuc2UlMEExLjc5ZS0wNiUyMDQuNjVlJTJCMDAlMjBpbnB1dCU1QjAlNUQlMEEzLjE4ZS0wNCUyMDYuMjdlJTJCMDQlMjBvdXRwdXQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBlbmNvZGVyLmJsb2NrLjIubGF5ZXIuMS5kcm9wb3V0JTIwRHJvcG91dCUwQTMuMThlLTA0JTIwNi4yN2UlMkIwNCUyMGlucHV0JTVCMCU1RCUwQTAuMDBlJTJCMDAlMjAlMjAlMjAlMjAlMjAlMjBpbmYlMjBvdXRwdXQ=",highlighted:`<span class="hljs-attribute">Detected</span> inf/nan during batch_number=<span class="hljs-number">0</span>
<span class="hljs-attribute">Last</span> <span class="hljs-number">21</span> forward frames:
<span class="hljs-attribute">abs</span> min  abs max  metadata<span class="hljs-meta">
[...]</span>
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wi_0 Linear
<span class="hljs-attribute">2</span>.<span class="hljs-number">17</span>e-<span class="hljs-number">07</span> <span class="hljs-number">4</span>.<span class="hljs-number">50</span>e+<span class="hljs-number">00</span> weight
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">2</span>.<span class="hljs-number">68</span>e-<span class="hljs-number">06</span> <span class="hljs-number">3</span>.<span class="hljs-number">70</span>e+<span class="hljs-number">01</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wi_1 Linear
<span class="hljs-attribute">8</span>.<span class="hljs-number">08</span>e-<span class="hljs-number">07</span> <span class="hljs-number">2</span>.<span class="hljs-number">66</span>e+<span class="hljs-number">01</span> weight
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">1</span>.<span class="hljs-number">27</span>e-<span class="hljs-number">04</span> <span class="hljs-number">2</span>.<span class="hljs-number">37</span>e+<span class="hljs-number">02</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wo Linear
<span class="hljs-attribute">1</span>.<span class="hljs-number">01</span>e-<span class="hljs-number">06</span> <span class="hljs-number">6</span>.<span class="hljs-number">44</span>e+<span class="hljs-number">00</span> weight
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span> <span class="hljs-number">9</span>.<span class="hljs-number">74</span>e+<span class="hljs-number">03</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense T5DenseGatedGeluDense
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.dropout Dropout
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span>      inf output`,wrap:!1}}),{c(){u=n("p"),u.textContent=k,M=a(),_(h.$$.fragment)},l(o){u=s(o,"P",{"data-svelte-h":!0}),i(u)!=="svelte-1705ugl"&&(u.textContent=k),M=r(o),w(h.$$.fragment,o)},m(o,T){m(o,u,T),m(o,M,T),$(h,o,T),v=!0},p:Bt,i(o){v||(x(h.$$.fragment,o),v=!0)},o(o){y(h.$$.fragment,o),v=!1},d(o){o&&(l(u),l(M)),j(h,o)}}}function er(D){let u,k="By default the last 21 frames are printed. You can change the default to adjust for your needs. For example :",M,h,v;return h=new Wt({props:{code:"ZGVidWdfb3ZlcmZsb3clMjAlM0QlMjBEZWJ1Z1VuZGVyZmxvd092ZXJmbG93KG1vZGVsJTJDJTIwbWF4X2ZyYW1lc190b19zYXZlJTNEMTAwKQ==",highlighted:'debug_overflow = DebugUnderflowOverflow(model, max_frames_to_save=<span class="hljs-number">100</span>)',wrap:!1}}),{c(){u=n("p"),u.textContent=k,M=a(),_(h.$$.fragment)},l(o){u=s(o,"P",{"data-svelte-h":!0}),i(u)!=="svelte-jxu20j"&&(u.textContent=k),M=r(o),w(h.$$.fragment,o)},m(o,T){m(o,u,T),m(o,M,T),$(h,o,T),v=!0},p:Bt,i(o){v||(x(h.$$.fragment,o),v=!0)},o(o){y(h.$$.fragment,o),v=!1},d(o){o&&(l(u),l(M)),j(h,o)}}}function tr(D){let u,k="given batch, and only do that for batches 1 and 3. Then you instantiate this class as :",M,h,v;return h=new Wt({props:{code:"ZGVidWdfb3ZlcmZsb3clMjAlM0QlMjBEZWJ1Z1VuZGVyZmxvd092ZXJmbG93KG1vZGVsJTJDJTIwdHJhY2VfYmF0Y2hfbnVtcyUzRCU1QjElMkMlMjAzJTVEKQ==",highlighted:'debug_overflow = DebugUnderflowOverflow(model, trace_batch_nums=[<span class="hljs-number">1</span>, <span class="hljs-number">3</span>])',wrap:!1}}),{c(){u=n("p"),u.textContent=k,M=a(),_(h.$$.fragment)},l(o){u=s(o,"P",{"data-svelte-h":!0}),i(u)!=="svelte-1009pyu"&&(u.textContent=k),M=r(o),w(h.$$.fragment,o)},m(o,T){m(o,u,T),m(o,M,T),$(h,o,T),v=!0},p:Bt,i(o){v||(x(h.$$.fragment,o),v=!0)},o(o){y(h.$$.fragment,o),v=!1},d(o){o&&(l(u),l(M)),j(h,o)}}}function nr(D){let u,k="You can also specify the batch number after which to stop the training, with :",M,h,v;return h=new Wt({props:{code:"ZGVidWdfb3ZlcmZsb3clMjAlM0QlMjBEZWJ1Z1VuZGVyZmxvd092ZXJmbG93KG1vZGVsJTJDJTIwdHJhY2VfYmF0Y2hfbnVtcyUzRCU1QjElMkMlMjAzJTVEJTJDJTIwYWJvcnRfYWZ0ZXJfYmF0Y2hfbnVtJTNEMyk=",highlighted:'debug_overflow = DebugUnderflowOverflow(model, trace_batch_nums=[<span class="hljs-number">1</span>, <span class="hljs-number">3</span>], abort_after_batch_num=<span class="hljs-number">3</span>)',wrap:!1}}),{c(){u=n("p"),u.textContent=k,M=a(),_(h.$$.fragment)},l(o){u=s(o,"P",{"data-svelte-h":!0}),i(u)!=="svelte-psjyqa"&&(u.textContent=k),M=r(o),w(h.$$.fragment,o)},m(o,T){m(o,u,T),m(o,M,T),$(h,o,T),v=!0},p:Bt,i(o){v||(x(h.$$.fragment,o),v=!0)},o(o){y(h.$$.fragment,o),v=!1},d(o){o&&(l(u),l(M)),j(h,o)}}}function sr(D){let u,k,M,h,v,o,T,le,Mn,Pe,Hs="Utilities for Trainer",Qt,oe,Es='This page lists all the utility functions used by <a href="/docs/transformers/v4.34.0/en/main_classes/trainer#transformers.Trainer">Trainer</a>.',Ft,ie,Zs="Most of those are only useful if you are studying the code of the Trainer in the library.",Rt,I,W,Jt,pe,Cn,De,Vs="Utilities",Yt,H,de,Tn,Le,Gs="Evaluation output (always contains labels), to be used to compute metrics.",Ot,E,ce,kn,Je,Ns="An enumeration.",Xt,L,ue,An,Ie,zs="Helper function for reproducible behavior during distributed training. See",Un,He,Ss='<li><a href="https://pytorch.org/docs/stable/notes/randomness.html" rel="nofollow">https://pytorch.org/docs/stable/notes/randomness.html</a> for pytorch</li> <li><a href="https://www.tensorflow.org/api_docs/python/tf/config/experimental/enable_op_determinism" rel="nofollow">https://www.tensorflow.org/api_docs/python/tf/config/experimental/enable_op_determinism</a> for tensorflow</li>',qt,Z,me,Pn,Ee,Bs="Helper function for reproducible behavior to set the seed in <code>random</code>, <code>numpy</code>, <code>torch</code> and/or <code>tf</code> (if installed).",Kt,V,he,Dn,Ze,Ws="Decorator to make all processes in distributed training wait for each local_master to do something.",en,G,Q,It,fe,Ln,Ve,Qs="Callbacks internals",tn,N,ge,Jn,Ge,Fs="Internal class that just calls the list of callbacks in order.",nn,z,F,Ht,be,In,Ne,Rs="Distributed Evaluation",sn,g,ve,Hn,ze,Ys="A class responsible for properly gathering tensors (or nested list/tuple of tensors) on the CPU by chunks.",En,Se,Os=`If our dataset has 16 samples with a batch size of 2 on 3 processes and we gather then transfer on CPU at every
step, our sampler will generate the following indices:`,Zn,Be,Xs="<code>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1]</code>",Vn,We,qs=`to get something of size a multiple of 3 (so that each process gets the same dataset length). Then process 0, 1 and
2 will be responsible of making predictions for the following samples:`,Gn,Qe,Ks="<li>P0: <code>[0, 1, 2, 3, 4, 5]</code></li> <li>P1: <code>[6, 7, 8, 9, 10, 11]</code></li> <li>P2: <code>[12, 13, 14, 15, 0, 1]</code></li>",Nn,Fe,ea="The first batch treated on each process will be",zn,Re,ta="<li>P0: <code>[0, 1]</code></li> <li>P1: <code>[6, 7]</code></li> <li>P2: <code>[12, 13]</code></li>",Sn,Ye,na=`So if we gather at the end of the first batch, we will get a tensor (nested list/tuple of tensor) corresponding to
the following indices:`,Bn,Oe,sa="<code>[0, 1, 6, 7, 12, 13]</code>",Wn,Xe,aa=`If we directly concatenate our results without taking any precautions, the user will then get the predictions for
the indices in this order at the end of the prediction loop:`,Qn,qe,ra="<code>[0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15, 4, 5, 10, 11, 0, 1]</code>",Fn,Ke,la="For some reason, that’s not going to roll their boat. This class is there to solve that problem.",Rn,R,_e,Yn,et,oa=`Add <code>arrays</code> to the internal storage, Will initialize the storage to the full size at the first arrays passed
so that if we’re bound to get an OOM, it happens at the beginning.`,On,Y,we,Xn,tt,ia=`Return the properly gathered arrays and truncate to the number of samples (since the sampler added some extras
to get each process a dataset of the same length).`,an,S,O,Et,$e,qn,nt,pa="Distributed Evaluation",rn,A,xe,Kn,st,da="This subclass of <code>argparse.ArgumentParser</code> uses type hints on dataclasses to generate arguments.",es,at,ca=`The class is designed to play well with the native argparse. In particular, you can add more (non-dataclass backed)
arguments to the parser after initialization and you’ll get the output back after parsing as an additional
namespace. Optional: To create sub argument groups use the <code>_argument_group_name</code> attribute in the dataclass.`,ts,J,ye,ns,rt,ua="Parse command-line args into instances of the specified dataclass types.",ss,lt,ma=`This relies on argparse’s <code>ArgumentParser.parse_known_args</code>. See the doc at:
docs.python.org/3.7/library/argparse.html#argparse.ArgumentParser.parse_args`,as,X,je,rs,ot,ha=`Alternative helper method that does not use <code>argparse</code> at all, instead uses a dict and populating the dataclass
types.`,ls,q,Me,os,it,fa=`Alternative helper method that does not use <code>argparse</code> at all, instead loading a json file and populating the
dataclass types.`,is,K,Ce,ps,pt,ga=`Alternative helper method that does not use <code>argparse</code> at all, instead loading a yaml file and populating the
dataclass types.`,ln,B,ee,Zt,Te,ds,dt,ba="Debug Utilities",on,p,ke,cs,ct,va=`This debug class helps detect and understand where the model starts getting very large or very small, and more
importantly <code>nan</code> or <code>inf</code> weight and activation elements.`,us,ut,_a="There are 2 working modes:",ms,mt,wa="<li>Underflow/overflow detection (default)</li> <li>Specific batch absolute min/max tracing without detection</li>",hs,ht,$a="Mode 1: Underflow/overflow detection",fs,te,gs,ft,xa=`then run the training as normal and if <code>nan</code> or <code>inf</code> gets detected in at least one of the weight, input or output
elements this module will throw an exception and will print <code>max_frames_to_save</code> frames that lead to this event,
each frame reporting`,bs,gt,ya="<li>the fully qualified module name plus the class name whose <code>forward</code> was run</li> <li>the absolute min and max value of all elements for each module weights, and the inputs and output</li>",vs,bt,ja="For example, here is the header and the last few frames in detection report for <code>google/mt5-small</code> run in fp16",_s,ne,ws,vt,Ma=`You can see here, that <code>T5DenseGatedGeluDense.forward</code> resulted in output activations, whose absolute max value was
around 62.7K, which is very close to fp16’s top limit of 64K. In the next frame we have <code>Dropout</code> which
renormalizes the weights, after it zeroed some of the elements, which pushes the absolute max value to more than
64K, and we get an overlow.`,$s,_t,Ca=`As you can see it’s the previous frames that we need to look into when the numbers start going into very large for
fp16 numbers.`,xs,wt,Ta="The tracking is done in a forward hook, which gets invoked immediately after <code>forward</code> has completed.",ys,se,js,$t,ka=`To validate that you have set up this debugging feature correctly, and you intend to use it in a training that
may take hours to complete, first run it with normal tracing enabled for one of a few batches as explained in
the next section.`,Ms,xt,Aa="Mode 2. Specific batch absolute min/max tracing without detection",Cs,yt,Ua="The second work mode is per-batch tracing with the underflow/overflow detection feature turned off.",Ts,jt,Pa="Let’s say you want to watch the absolute min and max values for all the ingredients of each <code>forward</code> call of a",ks,ae,As,Mt,Da="And now full batches 1 and 3 will be traced using the same format as explained above. Batches are 0-indexed.",Us,Ct,La=`This is helpful if you know that the program starts misbehaving after a certain batch number, so you can
fast-forward right to that area.`,Ps,Tt,Ja="Early stopping:",Ds,re,Ls,kt,Ia="This feature is mainly useful in the tracing mode, but you can use it for any mode.",Js,At,Ha="<strong>Performance</strong>:",Is,Ut,Ea="As this module measures absolute <code>min</code>/`<code>max</code> of each weight of the model on every forward it’ll slow the training\ndown. Therefore remember to turn it off once the debugging needs have been met.",pn,Vt,dn;return le=new Lt({}),pe=new Lt({}),de=new U({props:{name:"class transformers.EvalPrediction",anchor:"transformers.EvalPrediction",parameters:[{name:"predictions",val:": typing.Union[numpy.ndarray, typing.Tuple[numpy.ndarray]]"},{name:"label_ids",val:": typing.Union[numpy.ndarray, typing.Tuple[numpy.ndarray]]"},{name:"inputs",val:": typing.Union[numpy.ndarray, typing.Tuple[numpy.ndarray], NoneType] = None"}],parametersDescription:[{anchor:"transformers.EvalPrediction.predictions",description:"<strong>predictions</strong> (<code>np.ndarray</code>) &#x2014; Predictions of the model.",name:"predictions"},{anchor:"transformers.EvalPrediction.label_ids",description:"<strong>label_ids</strong> (<code>np.ndarray</code>) &#x2014; Targets to be matched.",name:"label_ids"},{anchor:"transformers.EvalPrediction.inputs",description:"<strong>inputs</strong> (<code>np.ndarray</code>, <em>optional</em>) &#x2014;",name:"inputs"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/trainer_utils.py#L108"}}),ce=new U({props:{name:"class transformers.IntervalStrategy",anchor:"transformers.IntervalStrategy",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/v4.34.0/src/transformers/trainer_utils.py#L182"}}),ue=new U({props:{name:"transformers.enable_full_determinism",anchor:"transformers.enable_full_determinism",parameters:[{name:"seed",val:": int"},{name:"warn_only",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/trainer_utils.py#L58"}}),me=new U({props:{name:"transformers.set_seed",anchor:"transformers.set_seed",parameters:[{name:"seed",val:": int"}],parametersDescription:[{anchor:"transformers.set_seed.seed",description:"<strong>seed</strong> (<code>int</code>) &#x2014; The seed to set.",name:"seed"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/trainer_utils.py#L85"}}),he=new U({props:{name:"transformers.torch_distributed_zero_first",anchor:"transformers.torch_distributed_zero_first",parameters:[{name:"local_rank",val:": int"}],parametersDescription:[{anchor:"transformers.torch_distributed_zero_first.local_rank",description:"<strong>local_rank</strong> (<code>int</code>) &#x2014; The rank of the local process.",name:"local_rank"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/trainer_pt_utils.py#L242"}}),fe=new Lt({}),ge=new U({props:{name:"class transformers.trainer_callback.CallbackHandler",anchor:"transformers.trainer_callback.CallbackHandler",parameters:[{name:"callbacks",val:""},{name:"model",val:""},{name:"tokenizer",val:""},{name:"optimizer",val:""},{name:"lr_scheduler",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/trainer_callback.py#L299"}}),be=new Lt({}),ve=new U({props:{name:"class transformers.trainer_pt_utils.DistributedTensorGatherer",anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer",parameters:[{name:"world_size",val:""},{name:"num_samples",val:""},{name:"make_multiple_of",val:" = None"},{name:"padding_index",val:" = -100"}],parametersDescription:[{anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer.world_size",description:`<strong>world_size</strong> (<code>int</code>) &#x2014;
The number of processes used in the distributed training.`,name:"world_size"},{anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer.num_samples",description:`<strong>num_samples</strong> (<code>int</code>) &#x2014;
The number of samples in our dataset.`,name:"num_samples"},{anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer.make_multiple_of",description:`<strong>make_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If passed, the class assumes the datasets passed to each process are made to be a multiple of this argument
(by adding samples).`,name:"make_multiple_of"},{anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer.padding_index",description:`<strong>padding_index</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
The padding index to use if the arrays don&#x2019;t all have the same sequence length.`,name:"padding_index"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/trainer_pt_utils.py#L371"}}),_e=new U({props:{name:"add_arrays",anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer.add_arrays",parameters:[{name:"arrays",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/trainer_pt_utils.py#L431"}}),we=new U({props:{name:"finalize",anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer.finalize",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/trainer_pt_utils.py#L467"}}),$e=new Lt({}),xe=new U({props:{name:"class transformers.HfArgumentParser",anchor:"transformers.HfArgumentParser",parameters:[{name:"dataclass_types",val:": typing.Union[DataClassType, typing.Iterable[DataClassType]]"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/hf_argparser.py#L109"}}),ye=new U({props:{name:"parse_args_into_dataclasses",anchor:"transformers.HfArgumentParser.parse_args_into_dataclasses",parameters:[{name:"args",val:" = None"},{name:"return_remaining_strings",val:" = False"},{name:"look_for_args_file",val:" = True"},{name:"args_filename",val:" = None"},{name:"args_file_flag",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/hf_argparser.py#L265",returnDescription:`
<ul>
<li>the dataclass instances in the same order as they were passed to the initializer.abspath</li>
<li>if applicable, an additional namespace for more (non-dataclass backed) arguments added to the parser
after initialization.</li>
<li>The potential list of remaining argument strings. (same as argparse.ArgumentParser.parse_known_args)</li>
</ul>
`,returnType:`
<p>Tuple consisting of</p>
`}}),je=new U({props:{name:"parse_dict",anchor:"transformers.HfArgumentParser.parse_dict",parameters:[{name:"args",val:": typing.Dict[str, typing.Any]"},{name:"allow_extra_keys",val:": bool = False"}],parametersDescription:[{anchor:"transformers.HfArgumentParser.parse_dict.args",description:`<strong>args</strong> (<code>dict</code>) &#x2014;
dict containing config values`,name:"args"},{anchor:"transformers.HfArgumentParser.parse_dict.allow_extra_keys",description:`<strong>allow_extra_keys</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Defaults to False. If False, will raise an exception if the dict contains keys that are not parsed.`,name:"allow_extra_keys"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/hf_argparser.py#L351",returnDescription:`
<ul>
<li>the dataclass instances in the same order as they were passed to the initializer.</li>
</ul>
`,returnType:`
<p>Tuple consisting of</p>
`}}),Me=new U({props:{name:"parse_json_file",anchor:"transformers.HfArgumentParser.parse_json_file",parameters:[{name:"json_file",val:": str"},{name:"allow_extra_keys",val:": bool = False"}],parametersDescription:[{anchor:"transformers.HfArgumentParser.parse_json_file.json_file",description:`<strong>json_file</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
File name of the json file to parse`,name:"json_file"},{anchor:"transformers.HfArgumentParser.parse_json_file.allow_extra_keys",description:`<strong>allow_extra_keys</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Defaults to False. If False, will raise an exception if the json file contains keys that are not
parsed.`,name:"allow_extra_keys"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/hf_argparser.py#L379",returnDescription:`
<ul>
<li>the dataclass instances in the same order as they were passed to the initializer.</li>
</ul>
`,returnType:`
<p>Tuple consisting of</p>
`}}),Ce=new U({props:{name:"parse_yaml_file",anchor:"transformers.HfArgumentParser.parse_yaml_file",parameters:[{name:"yaml_file",val:": str"},{name:"allow_extra_keys",val:": bool = False"}],parametersDescription:[{anchor:"transformers.HfArgumentParser.parse_yaml_file.yaml_file",description:`<strong>yaml_file</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
File name of the yaml file to parse`,name:"yaml_file"},{anchor:"transformers.HfArgumentParser.parse_yaml_file.allow_extra_keys",description:`<strong>allow_extra_keys</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Defaults to False. If False, will raise an exception if the json file contains keys that are not
parsed.`,name:"allow_extra_keys"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/hf_argparser.py#L401",returnDescription:`
<ul>
<li>the dataclass instances in the same order as they were passed to the initializer.</li>
</ul>
`,returnType:`
<p>Tuple consisting of</p>
`}}),Te=new Lt({}),ke=new U({props:{name:"class transformers.debug_utils.DebugUnderflowOverflow",anchor:"transformers.debug_utils.DebugUnderflowOverflow",parameters:[{name:"model",val:""},{name:"max_frames_to_save",val:" = 21"},{name:"trace_batch_nums",val:" = []"},{name:"abort_after_batch_num",val:" = None"}],parametersDescription:[{anchor:"transformers.debug_utils.DebugUnderflowOverflow.model",description:`<strong>model</strong> (<code>nn.Module</code>) &#x2014;
The model to debug.`,name:"model"},{anchor:"transformers.debug_utils.DebugUnderflowOverflow.max_frames_to_save",description:`<strong>max_frames_to_save</strong> (<code>int</code>, <em>optional</em>, defaults to 21) &#x2014;
How many frames back to record`,name:"max_frames_to_save"},{anchor:"transformers.debug_utils.DebugUnderflowOverflow.trace_batch_nums(List[int],",description:`<strong>trace_batch_nums(<code>List[int]</code>,</strong> <em>optional</em>, defaults to <code>[]</code>) &#x2014;
Which batch numbers to trace (turns detection off)`,name:"trace_batch_nums(List[int],"},{anchor:"transformers.debug_utils.DebugUnderflowOverflow.abort_after_batch_num",description:"<strong>abort_after_batch_num</strong>  (`int&#x201C;, <em>optional</em>) &#x2014;\nWhether to abort after a certain batch number has finished",name:"abort_after_batch_num"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/debug_utils.py#L27"}}),te=new St({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example",$$slots:{default:[qa]},$$scope:{ctx:D}}}),ne=new St({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example-2",$$slots:{default:[Ka]},$$scope:{ctx:D}}}),se=new St({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example-3",$$slots:{default:[er]},$$scope:{ctx:D}}}),ae=new St({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example-4",$$slots:{default:[tr]},$$scope:{ctx:D}}}),re=new St({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example-5",$$slots:{default:[nr]},$$scope:{ctx:D}}}),{c(){u=n("meta"),k=a(),M=n("p"),h=a(),v=n("h1"),o=n("a"),T=n("span"),_(le.$$.fragment),Mn=a(),Pe=n("span"),Pe.textContent=Hs,Qt=a(),oe=n("p"),oe.innerHTML=Es,Ft=a(),ie=n("p"),ie.textContent=Zs,Rt=a(),I=n("h2"),W=n("a"),Jt=n("span"),_(pe.$$.fragment),Cn=a(),De=n("span"),De.textContent=Vs,Yt=a(),H=n("div"),_(de.$$.fragment),Tn=a(),Le=n("p"),Le.textContent=Gs,Ot=a(),E=n("div"),_(ce.$$.fragment),kn=a(),Je=n("p"),Je.textContent=Ns,Xt=a(),L=n("div"),_(ue.$$.fragment),An=a(),Ie=n("p"),Ie.textContent=zs,Un=a(),He=n("ul"),He.innerHTML=Ss,qt=a(),Z=n("div"),_(me.$$.fragment),Pn=a(),Ee=n("p"),Ee.innerHTML=Bs,Kt=a(),V=n("div"),_(he.$$.fragment),Dn=a(),Ze=n("p"),Ze.textContent=Ws,en=a(),G=n("h2"),Q=n("a"),It=n("span"),_(fe.$$.fragment),Ln=a(),Ve=n("span"),Ve.textContent=Qs,tn=a(),N=n("div"),_(ge.$$.fragment),Jn=a(),Ge=n("p"),Ge.textContent=Fs,nn=a(),z=n("h2"),F=n("a"),Ht=n("span"),_(be.$$.fragment),In=a(),Ne=n("span"),Ne.textContent=Rs,sn=a(),g=n("div"),_(ve.$$.fragment),Hn=a(),ze=n("p"),ze.textContent=Ys,En=a(),Se=n("p"),Se.textContent=Os,Zn=a(),Be=n("p"),Be.innerHTML=Xs,Vn=a(),We=n("p"),We.textContent=qs,Gn=a(),Qe=n("ul"),Qe.innerHTML=Ks,Nn=a(),Fe=n("p"),Fe.textContent=ea,zn=a(),Re=n("ul"),Re.innerHTML=ta,Sn=a(),Ye=n("p"),Ye.textContent=na,Bn=a(),Oe=n("p"),Oe.innerHTML=sa,Wn=a(),Xe=n("p"),Xe.textContent=aa,Qn=a(),qe=n("p"),qe.innerHTML=ra,Fn=a(),Ke=n("p"),Ke.textContent=la,Rn=a(),R=n("div"),_(_e.$$.fragment),Yn=a(),et=n("p"),et.innerHTML=oa,On=a(),Y=n("div"),_(we.$$.fragment),Xn=a(),tt=n("p"),tt.textContent=ia,an=a(),S=n("h2"),O=n("a"),Et=n("span"),_($e.$$.fragment),qn=a(),nt=n("span"),nt.textContent=pa,rn=a(),A=n("div"),_(xe.$$.fragment),Kn=a(),st=n("p"),st.innerHTML=da,es=a(),at=n("p"),at.innerHTML=ca,ts=a(),J=n("div"),_(ye.$$.fragment),ns=a(),rt=n("p"),rt.textContent=ua,ss=a(),lt=n("p"),lt.innerHTML=ma,as=a(),X=n("div"),_(je.$$.fragment),rs=a(),ot=n("p"),ot.innerHTML=ha,ls=a(),q=n("div"),_(Me.$$.fragment),os=a(),it=n("p"),it.innerHTML=fa,is=a(),K=n("div"),_(Ce.$$.fragment),ps=a(),pt=n("p"),pt.innerHTML=ga,ln=a(),B=n("h2"),ee=n("a"),Zt=n("span"),_(Te.$$.fragment),ds=a(),dt=n("span"),dt.textContent=ba,on=a(),p=n("div"),_(ke.$$.fragment),cs=a(),ct=n("p"),ct.innerHTML=va,us=a(),ut=n("p"),ut.textContent=_a,ms=a(),mt=n("ol"),mt.innerHTML=wa,hs=a(),ht=n("p"),ht.textContent=$a,fs=a(),_(te.$$.fragment),gs=a(),ft=n("p"),ft.innerHTML=xa,bs=a(),gt=n("ol"),gt.innerHTML=ya,vs=a(),bt=n("p"),bt.innerHTML=ja,_s=a(),_(ne.$$.fragment),ws=a(),vt=n("p"),vt.innerHTML=Ma,$s=a(),_t=n("p"),_t.textContent=Ca,xs=a(),wt=n("p"),wt.innerHTML=Ta,ys=a(),_(se.$$.fragment),js=a(),$t=n("p"),$t.textContent=ka,Ms=a(),xt=n("p"),xt.textContent=Aa,Cs=a(),yt=n("p"),yt.textContent=Ua,Ts=a(),jt=n("p"),jt.innerHTML=Pa,ks=a(),_(ae.$$.fragment),As=a(),Mt=n("p"),Mt.textContent=Da,Us=a(),Ct=n("p"),Ct.textContent=La,Ps=a(),Tt=n("p"),Tt.textContent=Ja,Ds=a(),_(re.$$.fragment),Ls=a(),kt=n("p"),kt.textContent=Ia,Js=a(),At=n("p"),At.innerHTML=Ha,Is=a(),Ut=n("p"),Ut.innerHTML=Ea,pn=a(),Vt=n("p"),this.h()},l(e){const d=Xa("svelte-1phssyn",document.head);u=s(d,"META",{name:!0,content:!0}),d.forEach(l),k=r(e),M=s(e,"P",{}),b(M).forEach(l),h=r(e),v=s(e,"H1",{class:!0});var Ae=b(v);o=s(Ae,"A",{id:!0,class:!0,href:!0});var Gt=b(o);T=s(Gt,"SPAN",{});var Nt=b(T);w(le.$$.fragment,Nt),Nt.forEach(l),Gt.forEach(l),Mn=r(Ae),Pe=s(Ae,"SPAN",{"data-svelte-h":!0}),i(Pe)!=="svelte-1f0rg71"&&(Pe.textContent=Hs),Ae.forEach(l),Qt=r(e),oe=s(e,"P",{"data-svelte-h":!0}),i(oe)!=="svelte-1hr2d1"&&(oe.innerHTML=Es),Ft=r(e),ie=s(e,"P",{"data-svelte-h":!0}),i(ie)!=="svelte-13vwfn2"&&(ie.textContent=Zs),Rt=r(e),I=s(e,"H2",{class:!0});var Ue=b(I);W=s(Ue,"A",{id:!0,class:!0,href:!0});var zt=b(W);Jt=s(zt,"SPAN",{});var Za=b(Jt);w(pe.$$.fragment,Za),Za.forEach(l),zt.forEach(l),Cn=r(Ue),De=s(Ue,"SPAN",{"data-svelte-h":!0}),i(De)!=="svelte-z6eyrf"&&(De.textContent=Vs),Ue.forEach(l),Yt=r(e),H=s(e,"DIV",{class:!0});var cn=b(H);w(de.$$.fragment,cn),Tn=r(cn),Le=s(cn,"P",{"data-svelte-h":!0}),i(Le)!=="svelte-b01y7t"&&(Le.textContent=Gs),cn.forEach(l),Ot=r(e),E=s(e,"DIV",{class:!0});var un=b(E);w(ce.$$.fragment,un),kn=r(un),Je=s(un,"P",{"data-svelte-h":!0}),i(Je)!=="svelte-ofujqi"&&(Je.textContent=Ns),un.forEach(l),Xt=r(e),L=s(e,"DIV",{class:!0});var Pt=b(L);w(ue.$$.fragment,Pt),An=r(Pt),Ie=s(Pt,"P",{"data-svelte-h":!0}),i(Ie)!=="svelte-ajn1jc"&&(Ie.textContent=zs),Un=r(Pt),He=s(Pt,"UL",{"data-svelte-h":!0}),i(He)!=="svelte-1q4p6e6"&&(He.innerHTML=Ss),Pt.forEach(l),qt=r(e),Z=s(e,"DIV",{class:!0});var mn=b(Z);w(me.$$.fragment,mn),Pn=r(mn),Ee=s(mn,"P",{"data-svelte-h":!0}),i(Ee)!=="svelte-nlunew"&&(Ee.innerHTML=Bs),mn.forEach(l),Kt=r(e),V=s(e,"DIV",{class:!0});var hn=b(V);w(he.$$.fragment,hn),Dn=r(hn),Ze=s(hn,"P",{"data-svelte-h":!0}),i(Ze)!=="svelte-50krjz"&&(Ze.textContent=Ws),hn.forEach(l),en=r(e),G=s(e,"H2",{class:!0});var fn=b(G);Q=s(fn,"A",{id:!0,class:!0,href:!0});var Va=b(Q);It=s(Va,"SPAN",{});var Ga=b(It);w(fe.$$.fragment,Ga),Ga.forEach(l),Va.forEach(l),Ln=r(fn),Ve=s(fn,"SPAN",{"data-svelte-h":!0}),i(Ve)!=="svelte-iupvzl"&&(Ve.textContent=Qs),fn.forEach(l),tn=r(e),N=s(e,"DIV",{class:!0});var gn=b(N);w(ge.$$.fragment,gn),Jn=r(gn),Ge=s(gn,"P",{"data-svelte-h":!0}),i(Ge)!=="svelte-1xkzvlg"&&(Ge.textContent=Fs),gn.forEach(l),nn=r(e),z=s(e,"H2",{class:!0});var bn=b(z);F=s(bn,"A",{id:!0,class:!0,href:!0});var Na=b(F);Ht=s(Na,"SPAN",{});var za=b(Ht);w(be.$$.fragment,za),za.forEach(l),Na.forEach(l),In=r(bn),Ne=s(bn,"SPAN",{"data-svelte-h":!0}),i(Ne)!=="svelte-yt6nqq"&&(Ne.textContent=Rs),bn.forEach(l),sn=r(e),g=s(e,"DIV",{class:!0});var C=b(g);w(ve.$$.fragment,C),Hn=r(C),ze=s(C,"P",{"data-svelte-h":!0}),i(ze)!=="svelte-1n8tp04"&&(ze.textContent=Ys),En=r(C),Se=s(C,"P",{"data-svelte-h":!0}),i(Se)!=="svelte-1bmnzk6"&&(Se.textContent=Os),Zn=r(C),Be=s(C,"P",{"data-svelte-h":!0}),i(Be)!=="svelte-1i3zlda"&&(Be.innerHTML=Xs),Vn=r(C),We=s(C,"P",{"data-svelte-h":!0}),i(We)!=="svelte-poxoov"&&(We.textContent=qs),Gn=r(C),Qe=s(C,"UL",{"data-svelte-h":!0}),i(Qe)!=="svelte-eccldq"&&(Qe.innerHTML=Ks),Nn=r(C),Fe=s(C,"P",{"data-svelte-h":!0}),i(Fe)!=="svelte-dr8jii"&&(Fe.textContent=ea),zn=r(C),Re=s(C,"UL",{"data-svelte-h":!0}),i(Re)!=="svelte-1umurgm"&&(Re.innerHTML=ta),Sn=r(C),Ye=s(C,"P",{"data-svelte-h":!0}),i(Ye)!=="svelte-he1scd"&&(Ye.textContent=na),Bn=r(C),Oe=s(C,"P",{"data-svelte-h":!0}),i(Oe)!=="svelte-1qs6cxi"&&(Oe.innerHTML=sa),Wn=r(C),Xe=s(C,"P",{"data-svelte-h":!0}),i(Xe)!=="svelte-x84c1n"&&(Xe.textContent=aa),Qn=r(C),qe=s(C,"P",{"data-svelte-h":!0}),i(qe)!=="svelte-dcsxla"&&(qe.innerHTML=ra),Fn=r(C),Ke=s(C,"P",{"data-svelte-h":!0}),i(Ke)!=="svelte-fk4pq9"&&(Ke.textContent=la),Rn=r(C),R=s(C,"DIV",{class:!0});var vn=b(R);w(_e.$$.fragment,vn),Yn=r(vn),et=s(vn,"P",{"data-svelte-h":!0}),i(et)!=="svelte-18bdjbi"&&(et.innerHTML=oa),vn.forEach(l),On=r(C),Y=s(C,"DIV",{class:!0});var _n=b(Y);w(we.$$.fragment,_n),Xn=r(_n),tt=s(_n,"P",{"data-svelte-h":!0}),i(tt)!=="svelte-cxa3v7"&&(tt.textContent=ia),_n.forEach(l),C.forEach(l),an=r(e),S=s(e,"H2",{class:!0});var wn=b(S);O=s(wn,"A",{id:!0,class:!0,href:!0});var Sa=b(O);Et=s(Sa,"SPAN",{});var Ba=b(Et);w($e.$$.fragment,Ba),Ba.forEach(l),Sa.forEach(l),qn=r(wn),nt=s(wn,"SPAN",{"data-svelte-h":!0}),i(nt)!=="svelte-yt6nqq"&&(nt.textContent=pa),wn.forEach(l),rn=r(e),A=s(e,"DIV",{class:!0});var P=b(A);w(xe.$$.fragment,P),Kn=r(P),st=s(P,"P",{"data-svelte-h":!0}),i(st)!=="svelte-ym76lw"&&(st.innerHTML=da),es=r(P),at=s(P,"P",{"data-svelte-h":!0}),i(at)!=="svelte-lsn7j7"&&(at.innerHTML=ca),ts=r(P),J=s(P,"DIV",{class:!0});var Dt=b(J);w(ye.$$.fragment,Dt),ns=r(Dt),rt=s(Dt,"P",{"data-svelte-h":!0}),i(rt)!=="svelte-p6utzx"&&(rt.textContent=ua),ss=r(Dt),lt=s(Dt,"P",{"data-svelte-h":!0}),i(lt)!=="svelte-e7yqwr"&&(lt.innerHTML=ma),Dt.forEach(l),as=r(P),X=s(P,"DIV",{class:!0});var $n=b(X);w(je.$$.fragment,$n),rs=r($n),ot=s($n,"P",{"data-svelte-h":!0}),i(ot)!=="svelte-815dvz"&&(ot.innerHTML=ha),$n.forEach(l),ls=r(P),q=s(P,"DIV",{class:!0});var xn=b(q);w(Me.$$.fragment,xn),os=r(xn),it=s(xn,"P",{"data-svelte-h":!0}),i(it)!=="svelte-1fm6x4h"&&(it.innerHTML=fa),xn.forEach(l),is=r(P),K=s(P,"DIV",{class:!0});var yn=b(K);w(Ce.$$.fragment,yn),ps=r(yn),pt=s(yn,"P",{"data-svelte-h":!0}),i(pt)!=="svelte-12wc0v2"&&(pt.innerHTML=ga),yn.forEach(l),P.forEach(l),ln=r(e),B=s(e,"H2",{class:!0});var jn=b(B);ee=s(jn,"A",{id:!0,class:!0,href:!0});var Wa=b(ee);Zt=s(Wa,"SPAN",{});var Qa=b(Zt);w(Te.$$.fragment,Qa),Qa.forEach(l),Wa.forEach(l),ds=r(jn),dt=s(jn,"SPAN",{"data-svelte-h":!0}),i(dt)!=="svelte-eereus"&&(dt.textContent=ba),jn.forEach(l),on=r(e),p=s(e,"DIV",{class:!0});var c=b(p);w(ke.$$.fragment,c),cs=r(c),ct=s(c,"P",{"data-svelte-h":!0}),i(ct)!=="svelte-7pufvy"&&(ct.innerHTML=va),us=r(c),ut=s(c,"P",{"data-svelte-h":!0}),i(ut)!=="svelte-1sexrnb"&&(ut.textContent=_a),ms=r(c),mt=s(c,"OL",{"data-svelte-h":!0}),i(mt)!=="svelte-1klaood"&&(mt.innerHTML=wa),hs=r(c),ht=s(c,"P",{"data-svelte-h":!0}),i(ht)!=="svelte-4br128"&&(ht.textContent=$a),fs=r(c),w(te.$$.fragment,c),gs=r(c),ft=s(c,"P",{"data-svelte-h":!0}),i(ft)!=="svelte-1jokgs0"&&(ft.innerHTML=xa),bs=r(c),gt=s(c,"OL",{"data-svelte-h":!0}),i(gt)!=="svelte-tujq3x"&&(gt.innerHTML=ya),vs=r(c),bt=s(c,"P",{"data-svelte-h":!0}),i(bt)!=="svelte-1o699wi"&&(bt.innerHTML=ja),_s=r(c),w(ne.$$.fragment,c),ws=r(c),vt=s(c,"P",{"data-svelte-h":!0}),i(vt)!=="svelte-drqgcb"&&(vt.innerHTML=Ma),$s=r(c),_t=s(c,"P",{"data-svelte-h":!0}),i(_t)!=="svelte-y74rb4"&&(_t.textContent=Ca),xs=r(c),wt=s(c,"P",{"data-svelte-h":!0}),i(wt)!=="svelte-1j494vd"&&(wt.innerHTML=Ta),ys=r(c),w(se.$$.fragment,c),js=r(c),$t=s(c,"P",{"data-svelte-h":!0}),i($t)!=="svelte-10kqlwp"&&($t.textContent=ka),Ms=r(c),xt=s(c,"P",{"data-svelte-h":!0}),i(xt)!=="svelte-16tdr0"&&(xt.textContent=Aa),Cs=r(c),yt=s(c,"P",{"data-svelte-h":!0}),i(yt)!=="svelte-1hu51bp"&&(yt.textContent=Ua),Ts=r(c),jt=s(c,"P",{"data-svelte-h":!0}),i(jt)!=="svelte-1orvvp5"&&(jt.innerHTML=Pa),ks=r(c),w(ae.$$.fragment,c),As=r(c),Mt=s(c,"P",{"data-svelte-h":!0}),i(Mt)!=="svelte-ev1hfq"&&(Mt.textContent=Da),Us=r(c),Ct=s(c,"P",{"data-svelte-h":!0}),i(Ct)!=="svelte-1b66ig1"&&(Ct.textContent=La),Ps=r(c),Tt=s(c,"P",{"data-svelte-h":!0}),i(Tt)!=="svelte-1hsaz31"&&(Tt.textContent=Ja),Ds=r(c),w(re.$$.fragment,c),Ls=r(c),kt=s(c,"P",{"data-svelte-h":!0}),i(kt)!=="svelte-yuienj"&&(kt.textContent=Ia),Js=r(c),At=s(c,"P",{"data-svelte-h":!0}),i(At)!=="svelte-z6s5o1"&&(At.innerHTML=Ha),Is=r(c),Ut=s(c,"P",{"data-svelte-h":!0}),i(Ut)!=="svelte-1ery8m7"&&(Ut.innerHTML=Ea),c.forEach(l),pn=r(e),Vt=s(e,"P",{}),b(Vt).forEach(l),this.h()},h(){f(u,"name","hf:doc:metadata"),f(u,"content",JSON.stringify(ar)),f(o,"id","utilities-for-trainer"),f(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"),f(o,"href","#utilities-for-trainer"),f(v,"class","relative group"),f(W,"id","transformers.EvalPrediction"),f(W,"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"),f(W,"href","#transformers.EvalPrediction"),f(I,"class","relative group"),f(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Q,"id","transformers.trainer_callback.CallbackHandler"),f(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"),f(Q,"href","#transformers.trainer_callback.CallbackHandler"),f(G,"class","relative group"),f(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(F,"id","transformers.trainer_pt_utils.DistributedTensorGatherer"),f(F,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(F,"href","#transformers.trainer_pt_utils.DistributedTensorGatherer"),f(z,"class","relative group"),f(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(O,"id","transformers.HfArgumentParser"),f(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"),f(O,"href","#transformers.HfArgumentParser"),f(S,"class","relative group"),f(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ee,"id","transformers.debug_utils.DebugUnderflowOverflow"),f(ee,"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"),f(ee,"href","#transformers.debug_utils.DebugUnderflowOverflow"),f(B,"class","relative group"),f(p,"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,d){t(document.head,u),m(e,k,d),m(e,M,d),m(e,h,d),m(e,v,d),t(v,o),t(o,T),$(le,T,null),t(v,Mn),t(v,Pe),m(e,Qt,d),m(e,oe,d),m(e,Ft,d),m(e,ie,d),m(e,Rt,d),m(e,I,d),t(I,W),t(W,Jt),$(pe,Jt,null),t(I,Cn),t(I,De),m(e,Yt,d),m(e,H,d),$(de,H,null),t(H,Tn),t(H,Le),m(e,Ot,d),m(e,E,d),$(ce,E,null),t(E,kn),t(E,Je),m(e,Xt,d),m(e,L,d),$(ue,L,null),t(L,An),t(L,Ie),t(L,Un),t(L,He),m(e,qt,d),m(e,Z,d),$(me,Z,null),t(Z,Pn),t(Z,Ee),m(e,Kt,d),m(e,V,d),$(he,V,null),t(V,Dn),t(V,Ze),m(e,en,d),m(e,G,d),t(G,Q),t(Q,It),$(fe,It,null),t(G,Ln),t(G,Ve),m(e,tn,d),m(e,N,d),$(ge,N,null),t(N,Jn),t(N,Ge),m(e,nn,d),m(e,z,d),t(z,F),t(F,Ht),$(be,Ht,null),t(z,In),t(z,Ne),m(e,sn,d),m(e,g,d),$(ve,g,null),t(g,Hn),t(g,ze),t(g,En),t(g,Se),t(g,Zn),t(g,Be),t(g,Vn),t(g,We),t(g,Gn),t(g,Qe),t(g,Nn),t(g,Fe),t(g,zn),t(g,Re),t(g,Sn),t(g,Ye),t(g,Bn),t(g,Oe),t(g,Wn),t(g,Xe),t(g,Qn),t(g,qe),t(g,Fn),t(g,Ke),t(g,Rn),t(g,R),$(_e,R,null),t(R,Yn),t(R,et),t(g,On),t(g,Y),$(we,Y,null),t(Y,Xn),t(Y,tt),m(e,an,d),m(e,S,d),t(S,O),t(O,Et),$($e,Et,null),t(S,qn),t(S,nt),m(e,rn,d),m(e,A,d),$(xe,A,null),t(A,Kn),t(A,st),t(A,es),t(A,at),t(A,ts),t(A,J),$(ye,J,null),t(J,ns),t(J,rt),t(J,ss),t(J,lt),t(A,as),t(A,X),$(je,X,null),t(X,rs),t(X,ot),t(A,ls),t(A,q),$(Me,q,null),t(q,os),t(q,it),t(A,is),t(A,K),$(Ce,K,null),t(K,ps),t(K,pt),m(e,ln,d),m(e,B,d),t(B,ee),t(ee,Zt),$(Te,Zt,null),t(B,ds),t(B,dt),m(e,on,d),m(e,p,d),$(ke,p,null),t(p,cs),t(p,ct),t(p,us),t(p,ut),t(p,ms),t(p,mt),t(p,hs),t(p,ht),t(p,fs),$(te,p,null),t(p,gs),t(p,ft),t(p,bs),t(p,gt),t(p,vs),t(p,bt),t(p,_s),$(ne,p,null),t(p,ws),t(p,vt),t(p,$s),t(p,_t),t(p,xs),t(p,wt),t(p,ys),$(se,p,null),t(p,js),t(p,$t),t(p,Ms),t(p,xt),t(p,Cs),t(p,yt),t(p,Ts),t(p,jt),t(p,ks),$(ae,p,null),t(p,As),t(p,Mt),t(p,Us),t(p,Ct),t(p,Ps),t(p,Tt),t(p,Ds),$(re,p,null),t(p,Ls),t(p,kt),t(p,Js),t(p,At),t(p,Is),t(p,Ut),m(e,pn,d),m(e,Vt,d),dn=!0},p(e,[d]){const Ae={};d&2&&(Ae.$$scope={dirty:d,ctx:e}),te.$set(Ae);const Gt={};d&2&&(Gt.$$scope={dirty:d,ctx:e}),ne.$set(Gt);const Nt={};d&2&&(Nt.$$scope={dirty:d,ctx:e}),se.$set(Nt);const Ue={};d&2&&(Ue.$$scope={dirty:d,ctx:e}),ae.$set(Ue);const zt={};d&2&&(zt.$$scope={dirty:d,ctx:e}),re.$set(zt)},i(e){dn||(x(le.$$.fragment,e),x(pe.$$.fragment,e),x(de.$$.fragment,e),x(ce.$$.fragment,e),x(ue.$$.fragment,e),x(me.$$.fragment,e),x(he.$$.fragment,e),x(fe.$$.fragment,e),x(ge.$$.fragment,e),x(be.$$.fragment,e),x(ve.$$.fragment,e),x(_e.$$.fragment,e),x(we.$$.fragment,e),x($e.$$.fragment,e),x(xe.$$.fragment,e),x(ye.$$.fragment,e),x(je.$$.fragment,e),x(Me.$$.fragment,e),x(Ce.$$.fragment,e),x(Te.$$.fragment,e),x(ke.$$.fragment,e),x(te.$$.fragment,e),x(ne.$$.fragment,e),x(se.$$.fragment,e),x(ae.$$.fragment,e),x(re.$$.fragment,e),dn=!0)},o(e){y(le.$$.fragment,e),y(pe.$$.fragment,e),y(de.$$.fragment,e),y(ce.$$.fragment,e),y(ue.$$.fragment,e),y(me.$$.fragment,e),y(he.$$.fragment,e),y(fe.$$.fragment,e),y(ge.$$.fragment,e),y(be.$$.fragment,e),y(ve.$$.fragment,e),y(_e.$$.fragment,e),y(we.$$.fragment,e),y($e.$$.fragment,e),y(xe.$$.fragment,e),y(ye.$$.fragment,e),y(je.$$.fragment,e),y(Me.$$.fragment,e),y(Ce.$$.fragment,e),y(Te.$$.fragment,e),y(ke.$$.fragment,e),y(te.$$.fragment,e),y(ne.$$.fragment,e),y(se.$$.fragment,e),y(ae.$$.fragment,e),y(re.$$.fragment,e),dn=!1},d(e){e&&(l(k),l(M),l(h),l(v),l(Qt),l(oe),l(Ft),l(ie),l(Rt),l(I),l(Yt),l(H),l(Ot),l(E),l(Xt),l(L),l(qt),l(Z),l(Kt),l(V),l(en),l(G),l(tn),l(N),l(nn),l(z),l(sn),l(g),l(an),l(S),l(rn),l(A),l(ln),l(B),l(on),l(p),l(pn),l(Vt)),l(u),j(le),j(pe),j(de),j(ce),j(ue),j(me),j(he),j(fe),j(ge),j(be),j(ve),j(_e),j(we),j($e),j(xe),j(ye),j(je),j(Me),j(Ce),j(Te),j(ke),j(te),j(ne),j(se),j(ae),j(re)}}}const ar={local:"utilities-for-trainer",sections:[{local:"transformers.EvalPrediction",title:"Utilities"},{local:"transformers.trainer_callback.CallbackHandler",title:"Callbacks internals"},{local:"transformers.trainer_pt_utils.DistributedTensorGatherer",title:"Distributed Evaluation"},{local:"transformers.HfArgumentParser",title:"Distributed Evaluation"},{local:"transformers.debug_utils.DebugUnderflowOverflow",title:"Debug Utilities"}],title:"Utilities for Trainer"};function rr(D){return Ra(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ur extends Ya{constructor(u){super(),Oa(this,u,rr,sr,Fa,{})}}export{ur as component};
