import{s as Ss,o as Os,n as wt}from"../chunks/scheduler.9991993c.js";import{S as Xs,i as qs,g as r,s as n,r as b,A as Ks,h as l,f as o,c as s,j as U,u as _,x as p,k,y as t,a as f,v,d as $,t as w,w as x}from"../chunks/index.7fc9a5e7.js";import{D as L}from"../chunks/Docstring.ef7d0149.js";import{C as xt}from"../chunks/CodeBlock.e11cba92.js";import{E as $t}from"../chunks/ExampleCodeBlock.0db1a011.js";import{H as _t,E as ea}from"../chunks/EditOnGithub.84ab7f0e.js";function ta(D){let c,T="To activate the underflow/overflow detection, initialize the object with the model :",j,u,g;return u=new xt({props:{code:"ZGVidWdfb3ZlcmZsb3clMjAlM0QlMjBEZWJ1Z1VuZGVyZmxvd092ZXJmbG93KG1vZGVsKQ==",highlighted:"debug_overflow = DebugUnderflowOverflow(model)",wrap:!1}}),{c(){c=r("p"),c.textContent=T,j=n(),b(u.$$.fragment)},l(a){c=l(a,"P",{"data-svelte-h":!0}),p(c)!=="svelte-e61xrj"&&(c.textContent=T),j=s(a),_(u.$$.fragment,a)},m(a,y){f(a,c,y),f(a,j,y),v(u,a,y),g=!0},p:wt,i(a){g||($(u.$$.fragment,a),g=!0)},o(a){w(u.$$.fragment,a),g=!1},d(a){a&&(o(c),o(j)),x(u,a)}}}function na(D){let c,T="mixed precision :",j,u,g;return u=new xt({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(){c=r("p"),c.textContent=T,j=n(),b(u.$$.fragment)},l(a){c=l(a,"P",{"data-svelte-h":!0}),p(c)!=="svelte-1705ugl"&&(c.textContent=T),j=s(a),_(u.$$.fragment,a)},m(a,y){f(a,c,y),f(a,j,y),v(u,a,y),g=!0},p:wt,i(a){g||($(u.$$.fragment,a),g=!0)},o(a){w(u.$$.fragment,a),g=!1},d(a){a&&(o(c),o(j)),x(u,a)}}}function sa(D){let c,T="By default the last 21 frames are printed. You can change the default to adjust for your needs. For example :",j,u,g;return u=new xt({props:{code:"ZGVidWdfb3ZlcmZsb3clMjAlM0QlMjBEZWJ1Z1VuZGVyZmxvd092ZXJmbG93KG1vZGVsJTJDJTIwbWF4X2ZyYW1lc190b19zYXZlJTNEMTAwKQ==",highlighted:'debug_overflow = DebugUnderflowOverflow(model, max_frames_to_save=<span class="hljs-number">100</span>)',wrap:!1}}),{c(){c=r("p"),c.textContent=T,j=n(),b(u.$$.fragment)},l(a){c=l(a,"P",{"data-svelte-h":!0}),p(c)!=="svelte-jxu20j"&&(c.textContent=T),j=s(a),_(u.$$.fragment,a)},m(a,y){f(a,c,y),f(a,j,y),v(u,a,y),g=!0},p:wt,i(a){g||($(u.$$.fragment,a),g=!0)},o(a){w(u.$$.fragment,a),g=!1},d(a){a&&(o(c),o(j)),x(u,a)}}}function aa(D){let c,T="given batch, and only do that for batches 1 and 3. Then you instantiate this class as :",j,u,g;return u=new xt({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(){c=r("p"),c.textContent=T,j=n(),b(u.$$.fragment)},l(a){c=l(a,"P",{"data-svelte-h":!0}),p(c)!=="svelte-1009pyu"&&(c.textContent=T),j=s(a),_(u.$$.fragment,a)},m(a,y){f(a,c,y),f(a,j,y),v(u,a,y),g=!0},p:wt,i(a){g||($(u.$$.fragment,a),g=!0)},o(a){w(u.$$.fragment,a),g=!1},d(a){a&&(o(c),o(j)),x(u,a)}}}function ra(D){let c,T="You can also specify the batch number after which to stop the training, with :",j,u,g;return u=new xt({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(){c=r("p"),c.textContent=T,j=n(),b(u.$$.fragment)},l(a){c=l(a,"P",{"data-svelte-h":!0}),p(c)!=="svelte-psjyqa"&&(c.textContent=T),j=s(a),_(u.$$.fragment,a)},m(a,y){f(a,c,y),f(a,j,y),v(u,a,y),g=!0},p:wt,i(a){g||($(u.$$.fragment,a),g=!0)},o(a){w(u.$$.fragment,a),g=!1},d(a){a&&(o(c),o(j)),x(u,a)}}}function la(D){let c,T,j,u,g,a,y,Kn="此页面列出了 <code>Trainer</code> 使用的所有实用函数。",jt,X,es="其中大多数仅在您研究库中Trainer的代码时有用。",Mt,q,yt,A,K,Rt,je,ts="Evaluation output (always contains labels), to be used to compute metrics.",Tt,H,ee,Yt,Me,ns="An enumeration.",Ct,I,te,St,ye,ss="Helper function for reproducible behavior during distributed training. See",Ot,Te,as='<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>',Ut,Z,ne,Xt,Ce,rs="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,E,se,qt,Ue,ls="Decorator to make all processes in distributed training wait for each local_master to do something.",Lt,ae,Jt,V,re,Kt,ke,os="Internal class that just calls the list of callbacks in order.",Dt,le,It,h,oe,en,Le,is="A class responsible for properly gathering tensors (or nested list/tuple of tensors) on the CPU by chunks.",tn,Je,ps=`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:`,nn,De,ds="<code>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1]</code>",sn,Ie,ms=`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:`,an,Pe,cs="<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>",rn,Ae,us="The first batch treated on each process will be",ln,He,fs="<li>P0: <code>[0, 1]</code></li> <li>P1: <code>[6, 7]</code></li> <li>P2: <code>[12, 13]</code></li>",on,Ze,hs=`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:`,pn,Ee,gs="<code>[0, 1, 6, 7, 12, 13]</code>",dn,Ve,bs=`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:`,mn,Ge,_s="<code>[0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15, 4, 5, 10, 11, 0, 1]</code>",cn,ze,vs="For some reason, that’s not going to roll their boat. This class is there to solve that problem.",un,z,ie,fn,Ne,$s=`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.`,hn,N,pe,gn,We,ws=`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).`,Pt,de,At,C,me,bn,Be,xs="This subclass of <code>argparse.ArgumentParser</code> uses type hints on dataclasses to generate arguments.",_n,Qe,js=`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.`,vn,P,ce,$n,Fe,Ms="Parse command-line args into instances of the specified dataclass types.",wn,Re,ys=`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`,xn,W,ue,jn,Ye,Ts=`Alternative helper method that does not use <code>argparse</code> at all, instead uses a dict and populating the dataclass
types.`,Mn,B,fe,yn,Se,Cs=`Alternative helper method that does not use <code>argparse</code> at all, instead loading a json file and populating the
dataclass types.`,Tn,Q,he,Cn,Oe,Us=`Alternative helper method that does not use <code>argparse</code> at all, instead loading a yaml file and populating the
dataclass types.`,Ht,ge,Zt,i,be,Un,Xe,ks=`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.`,kn,qe,Ls="There are 2 working modes:",Ln,Ke,Js="<li>Underflow/overflow detection (default)</li> <li>Specific batch absolute min/max tracing without detection</li>",Jn,et,Ds="Mode 1: Underflow/overflow detection",Dn,F,In,tt,Is=`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`,Pn,nt,Ps="<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>",An,st,As="For example, here is the header and the last few frames in detection report for <code>google/mt5-small</code> run in fp16",Hn,R,Zn,at,Hs=`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.`,En,rt,Zs=`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.`,Vn,lt,Es="The tracking is done in a forward hook, which gets invoked immediately after <code>forward</code> has completed.",Gn,Y,zn,ot,Vs=`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.`,Nn,it,Gs="Mode 2. Specific batch absolute min/max tracing without detection",Wn,pt,zs="The second work mode is per-batch tracing with the underflow/overflow detection feature turned off.",Bn,dt,Ns="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",Qn,S,Fn,mt,Ws="And now full batches 1 and 3 will be traced using the same format as explained above. Batches are 0-indexed.",Rn,ct,Bs=`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.`,Yn,ut,Qs="Early stopping:",Sn,O,On,ft,Fs="This feature is mainly useful in the tracing mode, but you can use it for any mode.",Xn,ht,Rs="<strong>Performance</strong>:",qn,gt,Ys="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.",Et,_e,Vt,vt,Gt;return g=new _t({props:{title:"Trainer的工具",local:"trainer的工具",headingTag:"h1"}}),q=new _t({props:{title:"工具",local:"transformers.EvalPrediction",headingTag:"h2"}}),K=new L({props:{name:"class transformers.EvalPrediction",anchor:"transformers.EvalPrediction",parameters:[{name:"predictions",val:": Union"},{name:"label_ids",val:": Union"},{name:"inputs",val:": Union = 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/vr_30950/src/transformers/trainer_utils.py#L152"}}),ee=new L({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/vr_30950/src/transformers/trainer_utils.py#L226"}}),te=new L({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/vr_30950/src/transformers/trainer_utils.py#L60"}}),ne=new L({props:{name:"transformers.set_seed",anchor:"transformers.set_seed",parameters:[{name:"seed",val:": int"},{name:"deterministic",val:": bool = False"}],parametersDescription:[{anchor:"transformers.set_seed.seed",description:`<strong>seed</strong> (<code>int</code>) &#x2014;
The seed to set.`,name:"seed"},{anchor:"transformers.set_seed.deterministic",description:`<strong>deterministic</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use deterministic algorithms where available. Can slow down training.`,name:"deterministic"}],source:"https://github.com/huggingface/transformers/blob/vr_30950/src/transformers/trainer_utils.py#L92"}}),se=new L({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/vr_30950/src/transformers/trainer_pt_utils.py#L255"}}),ae=new _t({props:{title:"Callbacks内部机制",local:"transformers.trainer_callback.CallbackHandler",headingTag:"h2"}}),re=new L({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/vr_30950/src/transformers/trainer_callback.py#L403"}}),le=new _t({props:{title:"分布式评估",local:"transformers.trainer_pt_utils.DistributedTensorGatherer",headingTag:"h2"}}),oe=new L({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/vr_30950/src/transformers/trainer_pt_utils.py#L436"}}),ie=new L({props:{name:"add_arrays",anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer.add_arrays",parameters:[{name:"arrays",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30950/src/transformers/trainer_pt_utils.py#L496"}}),pe=new L({props:{name:"finalize",anchor:"transformers.trainer_pt_utils.DistributedTensorGatherer.finalize",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30950/src/transformers/trainer_pt_utils.py#L532"}}),de=new _t({props:{title:"Trainer参数解析",local:"transformers.HfArgumentParser",headingTag:"h2"}}),me=new L({props:{name:"class transformers.HfArgumentParser",anchor:"transformers.HfArgumentParser",parameters:[{name:"dataclass_types",val:": Union"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30950/src/transformers/hf_argparser.py#L110"}}),ce=new L({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/vr_30950/src/transformers/hf_argparser.py#L266",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Tuple consisting of</p>
`}}),ue=new L({props:{name:"parse_dict",anchor:"transformers.HfArgumentParser.parse_dict",parameters:[{name:"args",val:": Dict"},{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/vr_30950/src/transformers/hf_argparser.py#L352",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>the dataclass instances in the same order as they were passed to the initializer.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Tuple consisting of</p>
`}}),fe=new L({props:{name:"parse_json_file",anchor:"transformers.HfArgumentParser.parse_json_file",parameters:[{name:"json_file",val:": Union"},{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/vr_30950/src/transformers/hf_argparser.py#L380",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>the dataclass instances in the same order as they were passed to the initializer.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Tuple consisting of</p>
`}}),he=new L({props:{name:"parse_yaml_file",anchor:"transformers.HfArgumentParser.parse_yaml_file",parameters:[{name:"yaml_file",val:": Union"},{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/vr_30950/src/transformers/hf_argparser.py#L404",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>the dataclass instances in the same order as they were passed to the initializer.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Tuple consisting of</p>
`}}),ge=new _t({props:{title:"Debug工具",local:"transformers.debug_utils.DebugUnderflowOverflow",headingTag:"h2"}}),be=new L({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/vr_30950/src/transformers/debug_utils.py#L27"}}),F=new $t({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example",$$slots:{default:[ta]},$$scope:{ctx:D}}}),R=new $t({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example-2",$$slots:{default:[na]},$$scope:{ctx:D}}}),Y=new $t({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example-3",$$slots:{default:[sa]},$$scope:{ctx:D}}}),S=new $t({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example-4",$$slots:{default:[aa]},$$scope:{ctx:D}}}),O=new $t({props:{anchor:"transformers.debug_utils.DebugUnderflowOverflow.example-5",$$slots:{default:[ra]},$$scope:{ctx:D}}}),_e=new ea({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/zh/internal/trainer_utils.md"}}),{c(){c=r("meta"),T=n(),j=r("p"),u=n(),b(g.$$.fragment),a=n(),y=r("p"),y.innerHTML=Kn,jt=n(),X=r("p"),X.textContent=es,Mt=n(),b(q.$$.fragment),yt=n(),A=r("div"),b(K.$$.fragment),Rt=n(),je=r("p"),je.textContent=ts,Tt=n(),H=r("div"),b(ee.$$.fragment),Yt=n(),Me=r("p"),Me.textContent=ns,Ct=n(),I=r("div"),b(te.$$.fragment),St=n(),ye=r("p"),ye.textContent=ss,Ot=n(),Te=r("ul"),Te.innerHTML=as,Ut=n(),Z=r("div"),b(ne.$$.fragment),Xt=n(),Ce=r("p"),Ce.innerHTML=rs,kt=n(),E=r("div"),b(se.$$.fragment),qt=n(),Ue=r("p"),Ue.textContent=ls,Lt=n(),b(ae.$$.fragment),Jt=n(),V=r("div"),b(re.$$.fragment),Kt=n(),ke=r("p"),ke.textContent=os,Dt=n(),b(le.$$.fragment),It=n(),h=r("div"),b(oe.$$.fragment),en=n(),Le=r("p"),Le.textContent=is,tn=n(),Je=r("p"),Je.textContent=ps,nn=n(),De=r("p"),De.innerHTML=ds,sn=n(),Ie=r("p"),Ie.textContent=ms,an=n(),Pe=r("ul"),Pe.innerHTML=cs,rn=n(),Ae=r("p"),Ae.textContent=us,ln=n(),He=r("ul"),He.innerHTML=fs,on=n(),Ze=r("p"),Ze.textContent=hs,pn=n(),Ee=r("p"),Ee.innerHTML=gs,dn=n(),Ve=r("p"),Ve.textContent=bs,mn=n(),Ge=r("p"),Ge.innerHTML=_s,cn=n(),ze=r("p"),ze.textContent=vs,un=n(),z=r("div"),b(ie.$$.fragment),fn=n(),Ne=r("p"),Ne.innerHTML=$s,hn=n(),N=r("div"),b(pe.$$.fragment),gn=n(),We=r("p"),We.textContent=ws,Pt=n(),b(de.$$.fragment),At=n(),C=r("div"),b(me.$$.fragment),bn=n(),Be=r("p"),Be.innerHTML=xs,_n=n(),Qe=r("p"),Qe.innerHTML=js,vn=n(),P=r("div"),b(ce.$$.fragment),$n=n(),Fe=r("p"),Fe.textContent=Ms,wn=n(),Re=r("p"),Re.innerHTML=ys,xn=n(),W=r("div"),b(ue.$$.fragment),jn=n(),Ye=r("p"),Ye.innerHTML=Ts,Mn=n(),B=r("div"),b(fe.$$.fragment),yn=n(),Se=r("p"),Se.innerHTML=Cs,Tn=n(),Q=r("div"),b(he.$$.fragment),Cn=n(),Oe=r("p"),Oe.innerHTML=Us,Ht=n(),b(ge.$$.fragment),Zt=n(),i=r("div"),b(be.$$.fragment),Un=n(),Xe=r("p"),Xe.innerHTML=ks,kn=n(),qe=r("p"),qe.textContent=Ls,Ln=n(),Ke=r("ol"),Ke.innerHTML=Js,Jn=n(),et=r("p"),et.textContent=Ds,Dn=n(),b(F.$$.fragment),In=n(),tt=r("p"),tt.innerHTML=Is,Pn=n(),nt=r("ol"),nt.innerHTML=Ps,An=n(),st=r("p"),st.innerHTML=As,Hn=n(),b(R.$$.fragment),Zn=n(),at=r("p"),at.innerHTML=Hs,En=n(),rt=r("p"),rt.textContent=Zs,Vn=n(),lt=r("p"),lt.innerHTML=Es,Gn=n(),b(Y.$$.fragment),zn=n(),ot=r("p"),ot.textContent=Vs,Nn=n(),it=r("p"),it.textContent=Gs,Wn=n(),pt=r("p"),pt.textContent=zs,Bn=n(),dt=r("p"),dt.innerHTML=Ns,Qn=n(),b(S.$$.fragment),Fn=n(),mt=r("p"),mt.textContent=Ws,Rn=n(),ct=r("p"),ct.textContent=Bs,Yn=n(),ut=r("p"),ut.textContent=Qs,Sn=n(),b(O.$$.fragment),On=n(),ft=r("p"),ft.textContent=Fs,Xn=n(),ht=r("p"),ht.innerHTML=Rs,qn=n(),gt=r("p"),gt.innerHTML=Ys,Et=n(),b(_e.$$.fragment),Vt=n(),vt=r("p"),this.h()},l(e){const d=Ks("svelte-u9bgzb",document.head);c=l(d,"META",{name:!0,content:!0}),d.forEach(o),T=s(e),j=l(e,"P",{}),U(j).forEach(o),u=s(e),_(g.$$.fragment,e),a=s(e),y=l(e,"P",{"data-svelte-h":!0}),p(y)!=="svelte-1vclv53"&&(y.innerHTML=Kn),jt=s(e),X=l(e,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1qoa5vj"&&(X.textContent=es),Mt=s(e),_(q.$$.fragment,e),yt=s(e),A=l(e,"DIV",{class:!0});var ve=U(A);_(K.$$.fragment,ve),Rt=s(ve),je=l(ve,"P",{"data-svelte-h":!0}),p(je)!=="svelte-b01y7t"&&(je.textContent=ts),ve.forEach(o),Tt=s(e),H=l(e,"DIV",{class:!0});var $e=U(H);_(ee.$$.fragment,$e),Yt=s($e),Me=l($e,"P",{"data-svelte-h":!0}),p(Me)!=="svelte-ofujqi"&&(Me.textContent=ns),$e.forEach(o),Ct=s(e),I=l(e,"DIV",{class:!0});var G=U(I);_(te.$$.fragment,G),St=s(G),ye=l(G,"P",{"data-svelte-h":!0}),p(ye)!=="svelte-ajn1jc"&&(ye.textContent=ss),Ot=s(G),Te=l(G,"UL",{"data-svelte-h":!0}),p(Te)!=="svelte-1q4p6e6"&&(Te.innerHTML=as),G.forEach(o),Ut=s(e),Z=l(e,"DIV",{class:!0});var we=U(Z);_(ne.$$.fragment,we),Xt=s(we),Ce=l(we,"P",{"data-svelte-h":!0}),p(Ce)!=="svelte-nlunew"&&(Ce.innerHTML=rs),we.forEach(o),kt=s(e),E=l(e,"DIV",{class:!0});var xe=U(E);_(se.$$.fragment,xe),qt=s(xe),Ue=l(xe,"P",{"data-svelte-h":!0}),p(Ue)!=="svelte-50krjz"&&(Ue.textContent=ls),xe.forEach(o),Lt=s(e),_(ae.$$.fragment,e),Jt=s(e),V=l(e,"DIV",{class:!0});var zt=U(V);_(re.$$.fragment,zt),Kt=s(zt),ke=l(zt,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-1xkzvlg"&&(ke.textContent=os),zt.forEach(o),Dt=s(e),_(le.$$.fragment,e),It=s(e),h=l(e,"DIV",{class:!0});var M=U(h);_(oe.$$.fragment,M),en=s(M),Le=l(M,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-1n8tp04"&&(Le.textContent=is),tn=s(M),Je=l(M,"P",{"data-svelte-h":!0}),p(Je)!=="svelte-1bmnzk6"&&(Je.textContent=ps),nn=s(M),De=l(M,"P",{"data-svelte-h":!0}),p(De)!=="svelte-1i3zlda"&&(De.innerHTML=ds),sn=s(M),Ie=l(M,"P",{"data-svelte-h":!0}),p(Ie)!=="svelte-poxoov"&&(Ie.textContent=ms),an=s(M),Pe=l(M,"UL",{"data-svelte-h":!0}),p(Pe)!=="svelte-eccldq"&&(Pe.innerHTML=cs),rn=s(M),Ae=l(M,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-dr8jii"&&(Ae.textContent=us),ln=s(M),He=l(M,"UL",{"data-svelte-h":!0}),p(He)!=="svelte-1umurgm"&&(He.innerHTML=fs),on=s(M),Ze=l(M,"P",{"data-svelte-h":!0}),p(Ze)!=="svelte-he1scd"&&(Ze.textContent=hs),pn=s(M),Ee=l(M,"P",{"data-svelte-h":!0}),p(Ee)!=="svelte-1qs6cxi"&&(Ee.innerHTML=gs),dn=s(M),Ve=l(M,"P",{"data-svelte-h":!0}),p(Ve)!=="svelte-x84c1n"&&(Ve.textContent=bs),mn=s(M),Ge=l(M,"P",{"data-svelte-h":!0}),p(Ge)!=="svelte-dcsxla"&&(Ge.innerHTML=_s),cn=s(M),ze=l(M,"P",{"data-svelte-h":!0}),p(ze)!=="svelte-fk4pq9"&&(ze.textContent=vs),un=s(M),z=l(M,"DIV",{class:!0});var Nt=U(z);_(ie.$$.fragment,Nt),fn=s(Nt),Ne=l(Nt,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-18bdjbi"&&(Ne.innerHTML=$s),Nt.forEach(o),hn=s(M),N=l(M,"DIV",{class:!0});var Wt=U(N);_(pe.$$.fragment,Wt),gn=s(Wt),We=l(Wt,"P",{"data-svelte-h":!0}),p(We)!=="svelte-cxa3v7"&&(We.textContent=ws),Wt.forEach(o),M.forEach(o),Pt=s(e),_(de.$$.fragment,e),At=s(e),C=l(e,"DIV",{class:!0});var J=U(C);_(me.$$.fragment,J),bn=s(J),Be=l(J,"P",{"data-svelte-h":!0}),p(Be)!=="svelte-ym76lw"&&(Be.innerHTML=xs),_n=s(J),Qe=l(J,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-lsn7j7"&&(Qe.innerHTML=js),vn=s(J),P=l(J,"DIV",{class:!0});var bt=U(P);_(ce.$$.fragment,bt),$n=s(bt),Fe=l(bt,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-p6utzx"&&(Fe.textContent=Ms),wn=s(bt),Re=l(bt,"P",{"data-svelte-h":!0}),p(Re)!=="svelte-e7yqwr"&&(Re.innerHTML=ys),bt.forEach(o),xn=s(J),W=l(J,"DIV",{class:!0});var Bt=U(W);_(ue.$$.fragment,Bt),jn=s(Bt),Ye=l(Bt,"P",{"data-svelte-h":!0}),p(Ye)!=="svelte-815dvz"&&(Ye.innerHTML=Ts),Bt.forEach(o),Mn=s(J),B=l(J,"DIV",{class:!0});var Qt=U(B);_(fe.$$.fragment,Qt),yn=s(Qt),Se=l(Qt,"P",{"data-svelte-h":!0}),p(Se)!=="svelte-1fm6x4h"&&(Se.innerHTML=Cs),Qt.forEach(o),Tn=s(J),Q=l(J,"DIV",{class:!0});var Ft=U(Q);_(he.$$.fragment,Ft),Cn=s(Ft),Oe=l(Ft,"P",{"data-svelte-h":!0}),p(Oe)!=="svelte-12wc0v2"&&(Oe.innerHTML=Us),Ft.forEach(o),J.forEach(o),Ht=s(e),_(ge.$$.fragment,e),Zt=s(e),i=l(e,"DIV",{class:!0});var m=U(i);_(be.$$.fragment,m),Un=s(m),Xe=l(m,"P",{"data-svelte-h":!0}),p(Xe)!=="svelte-7pufvy"&&(Xe.innerHTML=ks),kn=s(m),qe=l(m,"P",{"data-svelte-h":!0}),p(qe)!=="svelte-1sexrnb"&&(qe.textContent=Ls),Ln=s(m),Ke=l(m,"OL",{"data-svelte-h":!0}),p(Ke)!=="svelte-1klaood"&&(Ke.innerHTML=Js),Jn=s(m),et=l(m,"P",{"data-svelte-h":!0}),p(et)!=="svelte-4br128"&&(et.textContent=Ds),Dn=s(m),_(F.$$.fragment,m),In=s(m),tt=l(m,"P",{"data-svelte-h":!0}),p(tt)!=="svelte-1jokgs0"&&(tt.innerHTML=Is),Pn=s(m),nt=l(m,"OL",{"data-svelte-h":!0}),p(nt)!=="svelte-tujq3x"&&(nt.innerHTML=Ps),An=s(m),st=l(m,"P",{"data-svelte-h":!0}),p(st)!=="svelte-1o699wi"&&(st.innerHTML=As),Hn=s(m),_(R.$$.fragment,m),Zn=s(m),at=l(m,"P",{"data-svelte-h":!0}),p(at)!=="svelte-drqgcb"&&(at.innerHTML=Hs),En=s(m),rt=l(m,"P",{"data-svelte-h":!0}),p(rt)!=="svelte-y74rb4"&&(rt.textContent=Zs),Vn=s(m),lt=l(m,"P",{"data-svelte-h":!0}),p(lt)!=="svelte-1j494vd"&&(lt.innerHTML=Es),Gn=s(m),_(Y.$$.fragment,m),zn=s(m),ot=l(m,"P",{"data-svelte-h":!0}),p(ot)!=="svelte-10kqlwp"&&(ot.textContent=Vs),Nn=s(m),it=l(m,"P",{"data-svelte-h":!0}),p(it)!=="svelte-16tdr0"&&(it.textContent=Gs),Wn=s(m),pt=l(m,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-1hu51bp"&&(pt.textContent=zs),Bn=s(m),dt=l(m,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-1orvvp5"&&(dt.innerHTML=Ns),Qn=s(m),_(S.$$.fragment,m),Fn=s(m),mt=l(m,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-ev1hfq"&&(mt.textContent=Ws),Rn=s(m),ct=l(m,"P",{"data-svelte-h":!0}),p(ct)!=="svelte-1b66ig1"&&(ct.textContent=Bs),Yn=s(m),ut=l(m,"P",{"data-svelte-h":!0}),p(ut)!=="svelte-1hsaz31"&&(ut.textContent=Qs),Sn=s(m),_(O.$$.fragment,m),On=s(m),ft=l(m,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-yuienj"&&(ft.textContent=Fs),Xn=s(m),ht=l(m,"P",{"data-svelte-h":!0}),p(ht)!=="svelte-z6s5o1"&&(ht.innerHTML=Rs),qn=s(m),gt=l(m,"P",{"data-svelte-h":!0}),p(gt)!=="svelte-1ery8m7"&&(gt.innerHTML=Ys),m.forEach(o),Et=s(e),_(_e.$$.fragment,e),Vt=s(e),vt=l(e,"P",{}),U(vt).forEach(o),this.h()},h(){k(c,"name","hf:doc:metadata"),k(c,"content",oa),k(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(i,"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,c),f(e,T,d),f(e,j,d),f(e,u,d),v(g,e,d),f(e,a,d),f(e,y,d),f(e,jt,d),f(e,X,d),f(e,Mt,d),v(q,e,d),f(e,yt,d),f(e,A,d),v(K,A,null),t(A,Rt),t(A,je),f(e,Tt,d),f(e,H,d),v(ee,H,null),t(H,Yt),t(H,Me),f(e,Ct,d),f(e,I,d),v(te,I,null),t(I,St),t(I,ye),t(I,Ot),t(I,Te),f(e,Ut,d),f(e,Z,d),v(ne,Z,null),t(Z,Xt),t(Z,Ce),f(e,kt,d),f(e,E,d),v(se,E,null),t(E,qt),t(E,Ue),f(e,Lt,d),v(ae,e,d),f(e,Jt,d),f(e,V,d),v(re,V,null),t(V,Kt),t(V,ke),f(e,Dt,d),v(le,e,d),f(e,It,d),f(e,h,d),v(oe,h,null),t(h,en),t(h,Le),t(h,tn),t(h,Je),t(h,nn),t(h,De),t(h,sn),t(h,Ie),t(h,an),t(h,Pe),t(h,rn),t(h,Ae),t(h,ln),t(h,He),t(h,on),t(h,Ze),t(h,pn),t(h,Ee),t(h,dn),t(h,Ve),t(h,mn),t(h,Ge),t(h,cn),t(h,ze),t(h,un),t(h,z),v(ie,z,null),t(z,fn),t(z,Ne),t(h,hn),t(h,N),v(pe,N,null),t(N,gn),t(N,We),f(e,Pt,d),v(de,e,d),f(e,At,d),f(e,C,d),v(me,C,null),t(C,bn),t(C,Be),t(C,_n),t(C,Qe),t(C,vn),t(C,P),v(ce,P,null),t(P,$n),t(P,Fe),t(P,wn),t(P,Re),t(C,xn),t(C,W),v(ue,W,null),t(W,jn),t(W,Ye),t(C,Mn),t(C,B),v(fe,B,null),t(B,yn),t(B,Se),t(C,Tn),t(C,Q),v(he,Q,null),t(Q,Cn),t(Q,Oe),f(e,Ht,d),v(ge,e,d),f(e,Zt,d),f(e,i,d),v(be,i,null),t(i,Un),t(i,Xe),t(i,kn),t(i,qe),t(i,Ln),t(i,Ke),t(i,Jn),t(i,et),t(i,Dn),v(F,i,null),t(i,In),t(i,tt),t(i,Pn),t(i,nt),t(i,An),t(i,st),t(i,Hn),v(R,i,null),t(i,Zn),t(i,at),t(i,En),t(i,rt),t(i,Vn),t(i,lt),t(i,Gn),v(Y,i,null),t(i,zn),t(i,ot),t(i,Nn),t(i,it),t(i,Wn),t(i,pt),t(i,Bn),t(i,dt),t(i,Qn),v(S,i,null),t(i,Fn),t(i,mt),t(i,Rn),t(i,ct),t(i,Yn),t(i,ut),t(i,Sn),v(O,i,null),t(i,On),t(i,ft),t(i,Xn),t(i,ht),t(i,qn),t(i,gt),f(e,Et,d),v(_e,e,d),f(e,Vt,d),f(e,vt,d),Gt=!0},p(e,[d]){const ve={};d&2&&(ve.$$scope={dirty:d,ctx:e}),F.$set(ve);const $e={};d&2&&($e.$$scope={dirty:d,ctx:e}),R.$set($e);const G={};d&2&&(G.$$scope={dirty:d,ctx:e}),Y.$set(G);const we={};d&2&&(we.$$scope={dirty:d,ctx:e}),S.$set(we);const xe={};d&2&&(xe.$$scope={dirty:d,ctx:e}),O.$set(xe)},i(e){Gt||($(g.$$.fragment,e),$(q.$$.fragment,e),$(K.$$.fragment,e),$(ee.$$.fragment,e),$(te.$$.fragment,e),$(ne.$$.fragment,e),$(se.$$.fragment,e),$(ae.$$.fragment,e),$(re.$$.fragment,e),$(le.$$.fragment,e),$(oe.$$.fragment,e),$(ie.$$.fragment,e),$(pe.$$.fragment,e),$(de.$$.fragment,e),$(me.$$.fragment,e),$(ce.$$.fragment,e),$(ue.$$.fragment,e),$(fe.$$.fragment,e),$(he.$$.fragment,e),$(ge.$$.fragment,e),$(be.$$.fragment,e),$(F.$$.fragment,e),$(R.$$.fragment,e),$(Y.$$.fragment,e),$(S.$$.fragment,e),$(O.$$.fragment,e),$(_e.$$.fragment,e),Gt=!0)},o(e){w(g.$$.fragment,e),w(q.$$.fragment,e),w(K.$$.fragment,e),w(ee.$$.fragment,e),w(te.$$.fragment,e),w(ne.$$.fragment,e),w(se.$$.fragment,e),w(ae.$$.fragment,e),w(re.$$.fragment,e),w(le.$$.fragment,e),w(oe.$$.fragment,e),w(ie.$$.fragment,e),w(pe.$$.fragment,e),w(de.$$.fragment,e),w(me.$$.fragment,e),w(ce.$$.fragment,e),w(ue.$$.fragment,e),w(fe.$$.fragment,e),w(he.$$.fragment,e),w(ge.$$.fragment,e),w(be.$$.fragment,e),w(F.$$.fragment,e),w(R.$$.fragment,e),w(Y.$$.fragment,e),w(S.$$.fragment,e),w(O.$$.fragment,e),w(_e.$$.fragment,e),Gt=!1},d(e){e&&(o(T),o(j),o(u),o(a),o(y),o(jt),o(X),o(Mt),o(yt),o(A),o(Tt),o(H),o(Ct),o(I),o(Ut),o(Z),o(kt),o(E),o(Lt),o(Jt),o(V),o(Dt),o(It),o(h),o(Pt),o(At),o(C),o(Ht),o(Zt),o(i),o(Et),o(Vt),o(vt)),o(c),x(g,e),x(q,e),x(K),x(ee),x(te),x(ne),x(se),x(ae,e),x(re),x(le,e),x(oe),x(ie),x(pe),x(de,e),x(me),x(ce),x(ue),x(fe),x(he),x(ge,e),x(be),x(F),x(R),x(Y),x(S),x(O),x(_e,e)}}}const oa='{"title":"Trainer的工具","local":"trainer的工具","sections":[{"title":"工具","local":"transformers.EvalPrediction","sections":[],"depth":2},{"title":"Callbacks内部机制","local":"transformers.trainer_callback.CallbackHandler","sections":[],"depth":2},{"title":"分布式评估","local":"transformers.trainer_pt_utils.DistributedTensorGatherer","sections":[],"depth":2},{"title":"Trainer参数解析","local":"transformers.HfArgumentParser","sections":[],"depth":2},{"title":"Debug工具","local":"transformers.debug_utils.DebugUnderflowOverflow","sections":[],"depth":2}],"depth":1}';function ia(D){return Os(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ha extends Xs{constructor(c){super(),qs(this,c,ia,la,Ss,{})}}export{ha as component};
