import{s as sl,c as dl,u as ml,g as pl,d as gl,o as fl,n as an}from"../chunks/scheduler.9991993c.js";import{S as ll,i as il,r as g,u as f,v as h,d as m,t as p,w as u,g as o,m as al,s as r,h as s,j as v,n as nl,f as n,c as a,k as $,a as c,y as t,o as hl,A as ul,x as i}from"../chunks/index.ed60ef0f.js";import{T as cl}from"../chunks/Tip.8eaeb7b5.js";import{D as k}from"../chunks/Docstring.56b4a92a.js";import{C as rn}from"../chunks/CodeBlock.a73b7ee1.js";import{E as ol}from"../chunks/ExampleCodeBlock.09f43ac8.js";import{H as Zr,E as bl}from"../chunks/EditOnGithub.ba269039.js";function _l(E){let d,M,b,w,x;const T=E[1].default,y=dl(T,E,E[2],null);return{c(){d=o("p"),M=al("Deprecated in "),b=al(E[0]),w=r(),y&&y.c(),this.h()},l(L){d=s(L,"P",{class:!0});var I=v(d);M=nl(I,"Deprecated in "),b=nl(I,E[0]),I.forEach(n),w=a(L),y&&y.l(L),this.h()},h(){$(d,"class","font-medium")},m(L,I){c(L,d,I),t(d,M),t(d,b),c(L,w,I),y&&y.m(L,I),x=!0},p(L,I){(!x||I&1)&&hl(b,L[0]),y&&y.p&&(!x||I&4)&&ml(y,T,L,L[2],x?gl(T,L[2],I,null):pl(L[2]),null)},i(L){x||(m(y,L),x=!0)},o(L){p(y,L),x=!1},d(L){L&&(n(d),n(w)),y&&y.d(L)}}}function vl(E){let d,M;return d=new cl({props:{warning:!0,$$slots:{default:[_l]},$$scope:{ctx:E}}}),{c(){g(d.$$.fragment)},l(b){f(d.$$.fragment,b)},m(b,w){h(d,b,w),M=!0},p(b,[w]){const x={};w&5&&(x.$$scope={dirty:w,ctx:b}),d.$set(x)},i(b){M||(m(d.$$.fragment,b),M=!0)},o(b){p(d.$$.fragment,b),M=!1},d(b){u(d,b)}}}function Tl(E,d,M){let{$$slots:b={},$$scope:w}=d,{version:x}=d;return E.$$set=T=>{"version"in T&&M(0,x=T.version),"$$scope"in T&&M(2,w=T.$$scope)},[x,b,w]}class $l extends ll{constructor(d){super(),il(this,d,Tl,vl,sl,{version:0})}}function Cl(E){let d,M="Setting <code>WANDB_LOG_MODEL</code> as <code>bool</code> will be deprecated in version 5 of 🤗 Transformers.";return{c(){d=o("p"),d.innerHTML=M},l(b){d=s(b,"P",{"data-svelte-h":!0}),i(d)!=="svelte-fxlq1n"&&(d.innerHTML=M)},m(b,w){c(b,d,w)},p:an,d(b){b&&n(d)}}}function kl(E){let d,M="Example:",b,w,x;return w=new rn({props:{code:"JTIzJTIwTm90ZSUzQSUyMFRoaXMlMjBleGFtcGxlJTIwc2tpcHMlMjBvdmVyJTIwc29tZSUyMHNldHVwJTIwc3RlcHMlMjBmb3IlMjBicmV2aXR5LiUwQWZyb20lMjBmbHl0ZWtpdCUyMGltcG9ydCUyMGN1cnJlbnRfY29udGV4dCUyQyUyMHRhc2slMEElMEElMEElNDB0YXNrJTBBZGVmJTIwdHJhaW5faGZfdHJhbnNmb3JtZXIoKSUzQSUwQSUyMCUyMCUyMCUyMGNwJTIwJTNEJTIwY3VycmVudF9jb250ZXh0KCkuY2hlY2twb2ludCUwQSUyMCUyMCUyMCUyMHRyYWluZXIlMjAlM0QlMjBUcmFpbmVyKC4uLiUyQyUyMGNhbGxiYWNrcyUzRCU1QkZseXRlQ2FsbGJhY2soKSU1RCklMEElMjAlMjAlMjAlMjBvdXRwdXQlMjAlM0QlMjB0cmFpbmVyLnRyYWluKHJlc3VtZV9mcm9tX2NoZWNrcG9pbnQlM0RjcC5yZXN0b3JlKCkp",highlighted:`<span class="hljs-comment"># Note: This example skips over some setup steps for brevity.</span>
<span class="hljs-keyword">from</span> flytekit <span class="hljs-keyword">import</span> current_context, task


<span class="hljs-meta">@task</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">train_hf_transformer</span>():
    cp = current_context().checkpoint
    trainer = Trainer(..., callbacks=[FlyteCallback()])
    output = trainer.train(resume_from_checkpoint=cp.restore())`,wrap:!1}}),{c(){d=o("p"),d.textContent=M,b=r(),g(w.$$.fragment)},l(T){d=s(T,"P",{"data-svelte-h":!0}),i(d)!=="svelte-11lpom8"&&(d.textContent=M),b=a(T),f(w.$$.fragment,T)},m(T,y){c(T,d,y),c(T,b,y),h(w,T,y),x=!0},p:an,i(T){x||(m(w.$$.fragment,T),x=!0)},o(T){p(w.$$.fragment,T),x=!1},d(T){T&&(n(d),n(b)),u(w,T)}}}function wl(E){let d,M="Example:",b,w,x;return w=new rn({props:{code:"Y2xhc3MlMjBQcmludGVyQ2FsbGJhY2soVHJhaW5lckNhbGxiYWNrKSUzQSUwQSUyMCUyMCUyMCUyMGRlZiUyMG9uX2xvZyhzZWxmJTJDJTIwYXJncyUyQyUyMHN0YXRlJTJDJTIwY29udHJvbCUyQyUyMGxvZ3MlM0ROb25lJTJDJTIwKiprd2FyZ3MpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwXyUyMCUzRCUyMGxvZ3MucG9wKCUyMnRvdGFsX2Zsb3MlMjIlMkMlMjBOb25lKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGlmJTIwc3RhdGUuaXNfbG9jYWxfcHJvY2Vzc196ZXJvJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcHJpbnQobG9ncyk=",highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">PrinterCallback</span>(<span class="hljs-title class_ inherited__">TrainerCallback</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">on_log</span>(<span class="hljs-params">self, args, state, control, logs=<span class="hljs-literal">None</span>, **kwargs</span>):
        _ = logs.pop(<span class="hljs-string">&quot;total_flos&quot;</span>, <span class="hljs-literal">None</span>)
        <span class="hljs-keyword">if</span> state.is_local_process_zero:
            <span class="hljs-built_in">print</span>(logs)`,wrap:!1}}),{c(){d=o("p"),d.textContent=M,b=r(),g(w.$$.fragment)},l(T){d=s(T,"P",{"data-svelte-h":!0}),i(d)!=="svelte-11lpom8"&&(d.textContent=M),b=a(T),f(w.$$.fragment,T)},m(T,y){c(T,d,y),c(T,b,y),h(w,T,y),x=!0},p:an,i(T){x||(m(w.$$.fragment,T),x=!0)},o(T){p(w.$$.fragment,T),x=!1},d(T){T&&(n(d),n(b)),u(w,T)}}}function xl(E){let d,M=`In all this class, one step is to be understood as one update step. When using gradient accumulation, one update
step may require several forward and backward passes: if you use <code>gradient_accumulation_steps=n</code>, then one update
step requires going through <em>n</em> batches.`;return{c(){d=o("p"),d.innerHTML=M},l(b){d=s(b,"P",{"data-svelte-h":!0}),i(d)!=="svelte-rhwh6p"&&(d.innerHTML=M)},m(b,w){c(b,d,w)},p:an,d(b){b&&n(d)}}}function yl(E){let d,M,b,w,x,T,y,L="Callbacks可以用来自定义PyTorch [Trainer]中训练循环行为的对象（此功能尚未在TensorFlow中实现），该对象可以检查训练循环状态（用于进度报告、在TensorBoard或其他ML平台上记录日志等），并做出决策（例如提前停止）。",I,He,Po='Callbacks是“只读”的代码片段，除了它们返回的[TrainerControl]对象外，它们不能更改训练循环中的任何内容。对于需要更改训练循环的自定义，您应该继承[Trainer]并重载您需要的方法（有关示例，请参见<a href="trainer">trainer</a>）。',Qr,je,Fo="默认情况下，<code>TrainingArguments.report_to</code> 设置为”all”，然后[Trainer]将使用以下callbacks。",Kr,ze,Wo='<li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.DefaultFlowCallback">DefaultFlowCallback</a>，它处理默认的日志记录、保存和评估行为</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.PrinterCallback">PrinterCallback</a> 或 <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.ProgressCallback">ProgressCallback</a>，用于显示进度和打印日志（如果通过<code>TrainingArguments</code>停用tqdm，则使用第一个函数；否则使用第二个）。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.TensorBoardCallback">TensorBoardCallback</a>，如果TensorBoard可访问（通过PyTorch版本 &gt;= 1.4 或者 tensorboardX）。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.WandbCallback">WandbCallback</a>，如果安装了<a href="https://www.wandb.com/" rel="nofollow">wandb</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.CometCallback">CometCallback</a>，如果安装了<a href="https://www.comet.com/site/" rel="nofollow">comet_ml</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.MLflowCallback">MLflowCallback</a>，如果安装了<a href="https://www.mlflow.org/" rel="nofollow">mlflow</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.NeptuneCallback">NeptuneCallback</a>，如果安装了<a href="https://neptune.ai/" rel="nofollow">neptune</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.AzureMLCallback">AzureMLCallback</a>，如果安装了<a href="https://pypi.org/project/azureml-sdk/" rel="nofollow">azureml-sdk</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.CodeCarbonCallback">CodeCarbonCallback</a>，如果安装了<a href="https://pypi.org/project/codecarbon/" rel="nofollow">codecarbon</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.ClearMLCallback">ClearMLCallback</a>，如果安装了<a href="https://github.com/allegroai/clearml" rel="nofollow">clearml</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.DagsHubCallback">DagsHubCallback</a>，如果安装了<a href="https://dagshub.com/" rel="nofollow">dagshub</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.FlyteCallback">FlyteCallback</a>，如果安装了<a href="https://flyte.org/" rel="nofollow">flyte</a>。</li> <li><a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.integrations.DVCLiveCallback">DVCLiveCallback</a>，如果安装了<a href="https://dvc.org/doc/dvclive" rel="nofollow">dvclive</a>。</li>',ea,Je,Bo="如果安装了一个软件包，但您不希望使用相关的集成，您可以将 <code>TrainingArguments.report_to</code> 更改为仅包含您想要使用的集成的列表（例如 <code>[&quot;azure_ml&quot;, &quot;wandb&quot;]</code>）。",ta,Ue,Ro='实现callbacks的主要类是<a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a>。它获取用于实例化<code>Trainer</code>的<code>TrainingArguments</code>，可以通过<a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerState">TrainerState</a>访问该Trainer的内部状态，并可以通过<a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerControl">TrainerControl</a>对训练循环执行一些操作。',ra,De,aa,Ae,Vo='这里是库里可用<a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a>的列表：',na,P,Ne,nn,Dt,Go='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://www.comet.com/site/" rel="nofollow">Comet ML</a>.',on,j,Se,sn,At,qo="Setup the optional Comet integration.",ln,Nt,Yo="Environment:",cn,St,Oo=`<li><strong>COMET_MODE</strong> (<code>str</code>, <em>optional</em>, default to <code>get_or_create</code>):
Control whether to create and log to a new Comet experiment or append to an existing experiment.
It accepts the following values:<ul><li><code>get_or_create</code>: Decides automatically depending if
<code>COMET_EXPERIMENT_KEY</code> is set and whether an Experiment
with that key already exists or not.</li> <li><code>create</code>: Always create a new Comet Experiment.</li> <li><code>get</code>: Always try to append to an Existing Comet Experiment.
Requires <code>COMET_EXPERIMENT_KEY</code> to be set.</li> <li><code>ONLINE</code>: <strong>deprecated</strong>, used to create an online
Experiment. Use <code>COMET_START_ONLINE=1</code> instead.</li> <li><code>OFFLINE</code>: <strong>deprecated</strong>, used to created an offline
Experiment. Use <code>COMET_START_ONLINE=0</code> instead.</li> <li><code>DISABLED</code>: <strong>deprecated</strong>, used to disable Comet logging.
Use the <code>--report_to</code> flag to control the integrations used
for logging result instead.</li></ul></li> <li><strong>COMET_PROJECT_NAME</strong> (<code>str</code>, <em>optional</em>):
Comet project name for experiments.</li> <li><strong>COMET_LOG_ASSETS</strong> (<code>str</code>, <em>optional</em>, defaults to <code>TRUE</code>):
Whether or not to log training assets (tf event logs, checkpoints, etc), to Comet. Can be <code>TRUE</code>, or
<code>FALSE</code>.</li>`,dn,Pt,Xo=`For a number of configurable items in the environment, see
<a href="https://www.comet.com/docs/v2/guides/experiment-management/configure-sdk/#explore-comet-configuration-options" rel="nofollow">here</a>.`,oa,X,Pe,mn,Ft,Zo='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that handles the default flow of the training loop for logs, evaluation and checkpoints.',sa,Z,Fe,pn,Wt,Qo='A bare <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that just prints the logs.',la,Q,We,gn,Bt,Ko=`A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that displays the progress of training or evaluation.
You can modify <code>max_str_len</code> to control how long strings are truncated when logging.`,ia,F,Be,fn,Rt,es='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that handles early stopping.',hn,Vt,ts=`This callback depends on <code>TrainingArguments</code> argument <em>load_best_model_at_end</em> functionality to set best_metric
in <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerState">TrainerState</a>. Note that if the <code>TrainingArguments</code> argument <em>save_steps</em> differs from <em>eval_steps</em>, the
early stopping will not occur until the next save step.`,ca,K,Re,un,Gt,rs='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://www.tensorflow.org/tensorboard" rel="nofollow">TensorBoard</a>.',da,W,Ve,bn,qt,as='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that logs metrics, media, model checkpoints to <a href="https://www.wandb.com/" rel="nofollow">Weight and Biases</a>.',_n,z,Ge,vn,Yt,ns="Setup the optional Weights &amp; Biases (<em>wandb</em>) integration.",Tn,Ot,os=`One can subclass and override this method to customize the setup if needed. Find more information
<a href="https://docs.wandb.ai/guides/integrations/huggingface" rel="nofollow">here</a>. You can also override the following environment
variables:`,$n,Xt,ss="Environment:",Cn,B,qe,Zt,ls=`<strong>WANDB_LOG_MODEL</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;false&quot;</code>):
Whether to log model and checkpoints during training. Can be <code>&quot;end&quot;</code>, <code>&quot;checkpoint&quot;</code> or <code>&quot;false&quot;</code>. If set
to <code>&quot;end&quot;</code>, the model will be uploaded at the end of training. If set to <code>&quot;checkpoint&quot;</code>, the checkpoint
will be uploaded every <code>args.save_steps</code> . If set to <code>&quot;false&quot;</code>, the model will not be uploaded. Use along
with <code>load_best_model_at_end()</code> to upload best model.`,kn,ne,wn,Qt,is=`<p><strong>WANDB_WATCH</strong> (<code>str</code>, <em>optional</em> defaults to <code>&quot;false&quot;</code>):
Can be <code>&quot;gradients&quot;</code>, <code>&quot;all&quot;</code>, <code>&quot;parameters&quot;</code>, or <code>&quot;false&quot;</code>. Set to <code>&quot;all&quot;</code> to log gradients and
parameters.</p>`,xn,Kt,cs=`<p><strong>WANDB_PROJECT</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;huggingface&quot;</code>):
Set this to a custom string to store results in a different project.</p>`,yn,er,ds=`<p><strong>WANDB_DISABLED</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
Whether to disable wandb entirely. Set <code>WANDB_DISABLED=true</code> to disable.</p>`,ma,R,Ye,Mn,tr,ms=`A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://www.mlflow.org/" rel="nofollow">MLflow</a>. Can be disabled by setting
environment variable <code>DISABLE_MLFLOW_INTEGRATION = TRUE</code>.`,Ln,A,Oe,En,rr,ps="Setup the optional MLflow integration.",In,ar,gs="Environment:",Hn,nr,fs=`<li><strong>HF_MLFLOW_LOG_ARTIFACTS</strong> (<code>str</code>, <em>optional</em>):
Whether to use MLflow <code>.log_artifact()</code> facility to log artifacts. This only makes sense if logging to a
remote server, e.g. s3 or GCS. If set to <code>True</code> or <em>1</em>, will copy each saved checkpoint on each save in
<code>TrainingArguments</code>’s <code>output_dir</code> to the local or remote artifact storage. Using it without a remote
storage will just copy the files to your artifact location.</li> <li><strong>MLFLOW_TRACKING_URI</strong> (<code>str</code>, <em>optional</em>):
Whether to store runs at a specific path or remote server. Unset by default, which skips setting the
tracking URI entirely.</li> <li><strong>MLFLOW_EXPERIMENT_NAME</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>):
Whether to use an MLflow experiment_name under which to launch the run. Default to <code>None</code> which will point
to the <code>Default</code> experiment in MLflow. Otherwise, it is a case sensitive name of the experiment to be
activated. If an experiment with this name does not exist, a new experiment with this name is created.</li> <li><strong>MLFLOW_TAGS</strong> (<code>str</code>, <em>optional</em>):
A string dump of a dictionary of key/value pair to be added to the MLflow run as tags. Example:
<code>os.environ[&#39;MLFLOW_TAGS&#39;]=&#39;{&quot;release.candidate&quot;: &quot;RC1&quot;, &quot;release.version&quot;: &quot;2.2.0&quot;}&#39;</code>.</li> <li><strong>MLFLOW_NESTED_RUN</strong> (<code>str</code>, <em>optional</em>):
Whether to use MLflow nested runs. If set to <code>True</code> or <em>1</em>, will create a nested run inside the current
run.</li> <li><strong>MLFLOW_RUN_ID</strong> (<code>str</code>, <em>optional</em>):
Allow to reattach to an existing run which can be usefull when resuming training from a checkpoint. When
<code>MLFLOW_RUN_ID</code> environment variable is set, <code>start_run</code> attempts to resume a run with the specified run ID
and other parameters are ignored.</li> <li><strong>MLFLOW_FLATTEN_PARAMS</strong> (<code>str</code>, <em>optional</em>, defaults to <code>False</code>):
Whether to flatten the parameters dictionary before logging.</li> <li><strong>MLFLOW_MAX_LOG_PARAMS</strong> (<code>int</code>, <em>optional</em>):
Set the maximum number of parameters to log in the run.</li>`,pa,ee,Xe,jn,or,hs='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://pypi.org/project/azureml-sdk/" rel="nofollow">AzureML</a>.',ga,te,Ze,zn,sr,us='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that tracks the CO2 emission of training.',fa,V,Qe,Jn,lr,bs='TrainerCallback that sends the logs to <a href="https://app.neptune.ai" rel="nofollow">Neptune</a>.',Un,ir,_s=`For instructions and examples, see the <a href="https://docs.neptune.ai/integrations/transformers" rel="nofollow">Transformers integration
guide</a> in the Neptune documentation.`,ha,J,Ke,Dn,cr,vs='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://clear.ml/" rel="nofollow">ClearML</a>.',An,dr,Ts="Environment:",Nn,mr,$s=`<li><strong>CLEARML_PROJECT</strong> (<code>str</code>, <em>optional</em>, defaults to <code>HuggingFace Transformers</code>):
ClearML project name.</li> <li><strong>CLEARML_TASK</strong> (<code>str</code>, <em>optional</em>, defaults to <code>Trainer</code>):
ClearML task name.</li> <li><strong>CLEARML_LOG_MODEL</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
Whether to log models as artifacts during training.</li>`,ua,G,et,Sn,pr,Cs='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that logs to <a href="https://dagshub.com/" rel="nofollow">DagsHub</a>. Extends <code>MLflowCallback</code>',Pn,N,tt,Fn,gr,ks="Setup the DagsHub’s Logging integration.",Wn,fr,ws="Environment:",Bn,hr,xs=`<li><strong>HF_DAGSHUB_LOG_ARTIFACTS</strong> (<code>str</code>, <em>optional</em>):
Whether to save the data and model artifacts for the experiment. Default to <code>False</code>.</li>`,ba,q,rt,Rn,ur,ys=`A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://flyte.org/" rel="nofollow">Flyte</a>.
NOTE: This callback only works within a Flyte task.`,Vn,oe,_a,U,at,Gn,br,Ms='A <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://www.dvc.org/doc/dvclive" rel="nofollow">DVCLive</a>.',qn,_r,Ls=`Use the environment variables below in <code>setup</code> to configure the integration. To customize this callback beyond
those environment variables, see <a href="https://dvc.org/doc/dvclive/ml-frameworks/huggingface" rel="nofollow">here</a>.`,Yn,S,nt,On,vr,Es=`Setup the optional DVCLive integration. To customize this callback beyond the environment variables below, see
<a href="https://dvc.org/doc/dvclive/ml-frameworks/huggingface" rel="nofollow">here</a>.`,Xn,Tr,Is="Environment:",Zn,$r,Hs=`<li><strong>HF_DVCLIVE_LOG_MODEL</strong> (<code>str</code>, <em>optional</em>):
Whether to use <code>dvclive.Live.log_artifact()</code> to log checkpoints created by <code>Trainer</code>. If set to <code>True</code> or
<em>1</em>, the final checkpoint is logged at the end of training. If set to <code>all</code>, the entire
<code>TrainingArguments</code>’s <code>output_dir</code> is logged at each checkpoint.</li>`,va,ot,Ta,_,st,Qn,Cr,js=`A class for objects that will inspect the state of the training loop at some events and take some decisions. At
each of those events the following arguments are available:`,Kn,kr,zs=`The <code>control</code> object is the only one that can be changed by the callback, in which case the event that changes it
should return the modified version.`,eo,wr,Js=`The argument <code>args</code>, <code>state</code> and <code>control</code> are positionals for all events, all the others are grouped in <code>kwargs</code>.
You can unpack the ones you need in the signature of the event using them. As an example, see the code of the
simple <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.PrinterCallback">PrinterCallback</a>.`,to,se,ro,le,lt,ao,xr,Us="Event called at the beginning of an epoch.",no,ie,it,oo,yr,Ds="Event called at the end of an epoch.",so,ce,ct,lo,Mr,As="Event called after an evaluation phase.",io,de,dt,co,Lr,Ns="Event called at the end of the initialization of the <code>Trainer</code>.",mo,me,mt,po,Er,Ss="Event called after logging the last logs.",go,pe,pt,fo,Ir,Ps="Event called after the optimizer step but before gradients are zeroed out. Useful for monitoring gradients.",ho,ge,gt,uo,Hr,Fs="Event called before the optimizer step but after gradient clipping. Useful for monitoring gradients.",bo,fe,ft,_o,jr,Ws="Event called after a successful prediction.",vo,he,ht,To,zr,Bs="Event called after a prediction step.",$o,ue,ut,Co,Jr,Rs="Event called after a checkpoint save.",ko,be,bt,wo,Ur,Vs=`Event called at the beginning of a training step. If using gradient accumulation, one training step might take
several inputs.`,xo,_e,_t,yo,Dr,Gs=`Event called at the end of a training step. If using gradient accumulation, one training step might take
several inputs.`,Mo,ve,vt,Lo,Ar,qs="Event called at the end of an substep during gradient accumulation.",Eo,Te,Tt,Io,Nr,Ys="Event called at the beginning of training.",Ho,$e,$t,jo,Sr,Os="Event called at the end of training.",$a,Ct,Xs="以下是如何使用PyTorch注册自定义callback的示例：",Ca,kt,Zs="<code>Trainer</code>:",ka,wt,wa,xt,Qs="注册callback的另一种方式是调用 <code>trainer.add_callback()</code>，如下所示：",xa,yt,ya,Mt,Ma,H,Lt,zo,Pr,Ks=`A class containing the <code>Trainer</code> inner state that will be saved along the model and optimizer when checkpointing
and passed to the <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a>.`,Jo,Ce,Uo,ke,Et,Do,Fr,el="Create an instance from the content of <code>json_path</code>.",Ao,we,It,No,Wr,tl="Save the content of this instance in JSON format inside <code>json_path</code>.",La,Ht,Ea,re,jt,So,Br,rl=`A class that handles the <code>Trainer</code> control flow. This class is used by the <a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> to activate some
switches in the training loop.`,Ia,zt,Ha,Xr,ja;return x=new Zr({props:{title:"Callbacks",local:"callbacks",headingTag:"h1"}}),De=new Zr({props:{title:"可用的Callbacks",local:"transformers.integrations.CometCallback",headingTag:"h2"}}),Ne=new k({props:{name:"class transformers.integrations.CometCallback",anchor:"transformers.integrations.CometCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1008"}}),Se=new k({props:{name:"setup",anchor:"transformers.integrations.CometCallback.setup",parameters:[{name:"args",val:""},{name:"state",val:""},{name:"model",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1022"}}),Pe=new k({props:{name:"class transformers.DefaultFlowCallback",anchor:"transformers.DefaultFlowCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L537"}}),Fe=new k({props:{name:"class transformers.PrinterCallback",anchor:"transformers.PrinterCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L664"}}),We=new k({props:{name:"class transformers.ProgressCallback",anchor:"transformers.ProgressCallback",parameters:[{name:"max_str_len",val:": int = 100"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L590"}}),Be=new k({props:{name:"class transformers.EarlyStoppingCallback",anchor:"transformers.EarlyStoppingCallback",parameters:[{name:"early_stopping_patience",val:": int = 1"},{name:"early_stopping_threshold",val:": Optional = 0.0"}],parametersDescription:[{anchor:"transformers.EarlyStoppingCallback.early_stopping_patience",description:`<strong>early_stopping_patience</strong> (<code>int</code>) &#x2014;
Use with <code>metric_for_best_model</code> to stop training when the specified metric worsens for
<code>early_stopping_patience</code> evaluation calls.`,name:"early_stopping_patience"},{anchor:"transformers.EarlyStoppingCallback.early_stopping_threshold(float,",description:`<strong>early_stopping_threshold(<code>float</code>,</strong> <em>optional</em>) &#x2014;
Use with TrainingArguments <code>metric_for_best_model</code> and <code>early_stopping_patience</code> to denote how much the
specified metric must improve to satisfy early stopping conditions. \``,name:"early_stopping_threshold(float,"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L675"}}),Re=new k({props:{name:"class transformers.integrations.TensorBoardCallback",anchor:"transformers.integrations.TensorBoardCallback",parameters:[{name:"tb_writer",val:" = None"}],parametersDescription:[{anchor:"transformers.integrations.TensorBoardCallback.tb_writer",description:`<strong>tb_writer</strong> (<code>SummaryWriter</code>, <em>optional</em>) &#x2014;
The writer to use. Will instantiate one if not set.`,name:"tb_writer"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L629"}}),Ve=new k({props:{name:"class transformers.integrations.WandbCallback",anchor:"transformers.integrations.WandbCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L762"}}),Ge=new k({props:{name:"setup",anchor:"transformers.integrations.WandbCallback.setup",parameters:[{name:"args",val:""},{name:"state",val:""},{name:"model",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L778"}}),ne=new $l({props:{version:"5.0",$$slots:{default:[Cl]},$$scope:{ctx:E}}}),Ye=new k({props:{name:"class transformers.integrations.MLflowCallback",anchor:"transformers.integrations.MLflowCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1175"}}),Oe=new k({props:{name:"setup",anchor:"transformers.integrations.MLflowCallback.setup",parameters:[{name:"args",val:""},{name:"state",val:""},{name:"model",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1194"}}),Xe=new k({props:{name:"class transformers.integrations.AzureMLCallback",anchor:"transformers.integrations.AzureMLCallback",parameters:[{name:"azureml_run",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1152"}}),Ze=new k({props:{name:"class transformers.integrations.CodeCarbonCallback",anchor:"transformers.integrations.CodeCarbonCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1686"}}),Qe=new k({props:{name:"class transformers.integrations.NeptuneCallback",anchor:"transformers.integrations.NeptuneCallback",parameters:[{name:"api_token",val:": Optional = None"},{name:"project",val:": Optional = None"},{name:"name",val:": Optional = None"},{name:"base_namespace",val:": str = 'finetuning'"},{name:"run",val:" = None"},{name:"log_parameters",val:": bool = True"},{name:"log_checkpoints",val:": Optional = None"},{name:"**neptune_run_kwargs",val:""}],parametersDescription:[{anchor:"transformers.integrations.NeptuneCallback.api_token",description:`<strong>api_token</strong> (<code>str</code>, <em>optional</em>) &#x2014; Neptune API token obtained upon registration.
You can leave this argument out if you have saved your token to the <code>NEPTUNE_API_TOKEN</code> environment
variable (strongly recommended). See full setup instructions in the
<a href="https://docs.neptune.ai/setup/installation" rel="nofollow">docs</a>.`,name:"api_token"},{anchor:"transformers.integrations.NeptuneCallback.project",description:`<strong>project</strong> (<code>str</code>, <em>optional</em>) &#x2014; Name of an existing Neptune project, in the form &#x201C;workspace-name/project-name&#x201D;.
You can find and copy the name in Neptune from the project settings -&gt; Properties. If None (default), the
value of the <code>NEPTUNE_PROJECT</code> environment variable is used.`,name:"project"},{anchor:"transformers.integrations.NeptuneCallback.name",description:"<strong>name</strong> (<code>str</code>, <em>optional</em>) &#x2014; Custom name for the run.",name:"name"},{anchor:"transformers.integrations.NeptuneCallback.base_namespace",description:`<strong>base_namespace</strong> (<code>str</code>, <em>optional</em>, defaults to &#x201C;finetuning&#x201D;) &#x2014; In the Neptune run, the root namespace
that will contain all of the metadata logged by the callback.`,name:"base_namespace"},{anchor:"transformers.integrations.NeptuneCallback.log_parameters",description:`<strong>log_parameters</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If True, logs all Trainer arguments and model parameters provided by the Trainer.`,name:"log_parameters"},{anchor:"transformers.integrations.NeptuneCallback.log_checkpoints",description:`<strong>log_checkpoints</strong> (<code>str</code>, <em>optional</em>) &#x2014; If &#x201C;same&#x201D;, uploads checkpoints whenever they are saved by the Trainer.
If &#x201C;last&#x201D;, uploads only the most recently saved checkpoint. If &#x201C;best&#x201D;, uploads the best checkpoint (among
the ones saved by the Trainer). If <code>None</code>, does not upload checkpoints.`,name:"log_checkpoints"},{anchor:"transformers.integrations.NeptuneCallback.run",description:`<strong>run</strong> (<code>Run</code>, <em>optional</em>) &#x2014; Pass a Neptune run object if you want to continue logging to an existing run.
Read more about resuming runs in the <a href="https://docs.neptune.ai/logging/to_existing_object" rel="nofollow">docs</a>.`,name:"run"},{anchor:"transformers.integrations.NeptuneCallback.*neptune_run_kwargs",description:`*<strong>*neptune_run_kwargs</strong> (<em>optional</em>) &#x2014;
Additional keyword arguments to be passed directly to the
<a href="https://docs.neptune.ai/api/neptune#init_run" rel="nofollow"><code>neptune.init_run()</code></a> function when a new run is created.`,name:"*neptune_run_kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1413"}}),Ke=new k({props:{name:"class transformers.integrations.ClearMLCallback",anchor:"transformers.integrations.ClearMLCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1720"}}),et=new k({props:{name:"class transformers.integrations.DagsHubCallback",anchor:"transformers.integrations.DagsHubCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1353"}}),tt=new k({props:{name:"setup",anchor:"transformers.integrations.DagsHubCallback.setup",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1367"}}),rt=new k({props:{name:"class transformers.integrations.FlyteCallback",anchor:"transformers.integrations.FlyteCallback",parameters:[{name:"save_log_history",val:": bool = True"},{name:"sync_checkpoints",val:": bool = True"}],parametersDescription:[{anchor:"transformers.integrations.FlyteCallback.save_log_history",description:`<strong>save_log_history</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
When set to True, the training logs are saved as a Flyte Deck.`,name:"save_log_history"},{anchor:"transformers.integrations.FlyteCallback.sync_checkpoints",description:`<strong>sync_checkpoints</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
When set to True, checkpoints are synced with Flyte and can be used to resume training in the case of an
interruption.`,name:"sync_checkpoints"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L1973"}}),oe=new ol({props:{anchor:"transformers.integrations.FlyteCallback.example",$$slots:{default:[kl]},$$scope:{ctx:E}}}),at=new k({props:{name:"class transformers.integrations.DVCLiveCallback",anchor:"transformers.integrations.DVCLiveCallback",parameters:[{name:"live",val:": Optional = None"},{name:"log_model",val:": Union = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.integrations.DVCLiveCallback.live",description:`<strong>live</strong> (<code>dvclive.Live</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional Live instance. If None, a new instance will be created using **kwargs.`,name:"live"},{anchor:"transformers.integrations.DVCLiveCallback.log_model",description:`<strong>log_model</strong> (Union[Literal[&#x201C;all&#x201D;], bool], <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to use <code>dvclive.Live.log_artifact()</code> to log checkpoints created by <code>Trainer</code>. If set to <code>True</code>,
the final checkpoint is logged at the end of training. If set to <code>&quot;all&quot;</code>, the entire
<code>TrainingArguments</code>&#x2019;s <code>output_dir</code> is logged at each checkpoint.`,name:"log_model"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L2036"}}),nt=new k({props:{name:"setup",anchor:"transformers.integrations.DVCLiveCallback.setup",parameters:[{name:"args",val:""},{name:"state",val:""},{name:"model",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/integrations/integration_utils.py#L2077"}}),ot=new Zr({props:{title:"TrainerCallback",local:"transformers.TrainerCallback",headingTag:"h2"}}),st=new k({props:{name:"class transformers.TrainerCallback",anchor:"transformers.TrainerCallback",parameters:[],parametersDescription:[{anchor:"transformers.TrainerCallback.args",description:`<strong>args</strong> (<code>TrainingArguments</code>) &#x2014;
The training arguments used to instantiate the <code>Trainer</code>.`,name:"args"},{anchor:"transformers.TrainerCallback.state",description:`<strong>state</strong> (<a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerState">TrainerState</a>) &#x2014;
The current state of the <code>Trainer</code>.`,name:"state"},{anchor:"transformers.TrainerCallback.control",description:`<strong>control</strong> (<a href="/docs/transformers/pr_22105/zh/main_classes/callback#transformers.TrainerControl">TrainerControl</a>) &#x2014;
The object that is returned to the <code>Trainer</code> and can be used to make some decisions.`,name:"control"},{anchor:"transformers.TrainerCallback.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_22105/zh/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <code>torch.nn.Module</code>) &#x2014;
The model being trained.`,name:"model"},{anchor:"transformers.TrainerCallback.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_22105/zh/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer used for encoding the data. This is deprecated in favour of <code>processing_class</code>.`,name:"tokenizer"},{anchor:"transformers.TrainerCallback.processing_class",description:`<strong>processing_class</strong> ([<code>PreTrainedTokenizer</code> or <code>BaseImageProcessor</code> or <code>ProcessorMixin</code> or <code>FeatureExtractionMixin</code>]) &#x2014;
The processing class used for encoding the data. Can be a tokenizer, a processor, an image processor or a feature extractor.`,name:"processing_class"},{anchor:"transformers.TrainerCallback.optimizer",description:`<strong>optimizer</strong> (<code>torch.optim.Optimizer</code>) &#x2014;
The optimizer used for the training steps.`,name:"optimizer"},{anchor:"transformers.TrainerCallback.lr_scheduler",description:`<strong>lr_scheduler</strong> (<code>torch.optim.lr_scheduler.LambdaLR</code>) &#x2014;
The scheduler used for setting the learning rate.`,name:"lr_scheduler"},{anchor:"transformers.TrainerCallback.train_dataloader",description:`<strong>train_dataloader</strong> (<code>torch.utils.data.DataLoader</code>, <em>optional</em>) &#x2014;
The current dataloader used for training.`,name:"train_dataloader"},{anchor:"transformers.TrainerCallback.eval_dataloader",description:`<strong>eval_dataloader</strong> (<code>torch.utils.data.DataLoader</code>, <em>optional</em>) &#x2014;
The current dataloader used for evaluation.`,name:"eval_dataloader"},{anchor:"transformers.TrainerCallback.metrics",description:`<strong>metrics</strong> (<code>Dict[str, float]</code>) &#x2014;
The metrics computed by the last evaluation phase.</p>
<p>Those are only accessible in the event <code>on_evaluate</code>.`,name:"metrics"},{anchor:"transformers.TrainerCallback.logs",description:`<strong>logs</strong>  (<code>Dict[str, float]</code>) &#x2014;
The values to log.</p>
<p>Those are only accessible in the event <code>on_log</code>.`,name:"logs"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L260"}}),se=new ol({props:{anchor:"transformers.TrainerCallback.example",$$slots:{default:[wl]},$$scope:{ctx:E}}}),lt=new k({props:{name:"on_epoch_begin",anchor:"transformers.TrainerCallback.on_epoch_begin",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L331"}}),it=new k({props:{name:"on_epoch_end",anchor:"transformers.TrainerCallback.on_epoch_end",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L337"}}),ct=new k({props:{name:"on_evaluate",anchor:"transformers.TrainerCallback.on_evaluate",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L375"}}),dt=new k({props:{name:"on_init_end",anchor:"transformers.TrainerCallback.on_init_end",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L313"}}),mt=new k({props:{name:"on_log",anchor:"transformers.TrainerCallback.on_log",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L393"}}),pt=new k({props:{name:"on_optimizer_step",anchor:"transformers.TrainerCallback.on_optimizer_step",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L356"}}),gt=new k({props:{name:"on_pre_optimizer_step",anchor:"transformers.TrainerCallback.on_pre_optimizer_step",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L350"}}),ft=new k({props:{name:"on_predict",anchor:"transformers.TrainerCallback.on_predict",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"metrics",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L381"}}),ht=new k({props:{name:"on_prediction_step",anchor:"transformers.TrainerCallback.on_prediction_step",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L399"}}),ut=new k({props:{name:"on_save",anchor:"transformers.TrainerCallback.on_save",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L387"}}),bt=new k({props:{name:"on_step_begin",anchor:"transformers.TrainerCallback.on_step_begin",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L343"}}),_t=new k({props:{name:"on_step_end",anchor:"transformers.TrainerCallback.on_step_end",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L368"}}),vt=new k({props:{name:"on_substep_end",anchor:"transformers.TrainerCallback.on_substep_end",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L362"}}),Tt=new k({props:{name:"on_train_begin",anchor:"transformers.TrainerCallback.on_train_begin",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L319"}}),$t=new k({props:{name:"on_train_end",anchor:"transformers.TrainerCallback.on_train_end",parameters:[{name:"args",val:": TrainingArguments"},{name:"state",val:": TrainerState"},{name:"control",val:": TrainerControl"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L325"}}),wt=new rn({props:{code:"Y2xhc3MlMjBNeUNhbGxiYWNrKFRyYWluZXJDYWxsYmFjayklM0ElMEElMjAlMjAlMjAlMjAlMjJBJTIwY2FsbGJhY2slMjB0aGF0JTIwcHJpbnRzJTIwYSUyMG1lc3NhZ2UlMjBhdCUyMHRoZSUyMGJlZ2lubmluZyUyMG9mJTIwdHJhaW5pbmclMjIlMEElMEElMjAlMjAlMjAlMjBkZWYlMjBvbl90cmFpbl9iZWdpbihzZWxmJTJDJTIwYXJncyUyQyUyMHN0YXRlJTJDJTIwY29udHJvbCUyQyUyMCoqa3dhcmdzKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHByaW50KCUyMlN0YXJ0aW5nJTIwdHJhaW5pbmclMjIpJTBBJTBBJTBBdHJhaW5lciUyMCUzRCUyMFRyYWluZXIoJTBBJTIwJTIwJTIwJTIwbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBhcmdzJTJDJTBBJTIwJTIwJTIwJTIwdHJhaW5fZGF0YXNldCUzRHRyYWluX2RhdGFzZXQlMkMlMEElMjAlMjAlMjAlMjBldmFsX2RhdGFzZXQlM0RldmFsX2RhdGFzZXQlMkMlMEElMjAlMjAlMjAlMjBjYWxsYmFja3MlM0QlNUJNeUNhbGxiYWNrJTVEJTJDJTIwJTIwJTIzJTIwV2UlMjBjYW4lMjBlaXRoZXIlMjBwYXNzJTIwdGhlJTIwY2FsbGJhY2slMjBjbGFzcyUyMHRoaXMlMjB3YXklMjBvciUyMGFuJTIwaW5zdGFuY2UlMjBvZiUyMGl0JTIwKE15Q2FsbGJhY2soKSklMEEp",highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">MyCallback</span>(<span class="hljs-title class_ inherited__">TrainerCallback</span>):
    <span class="hljs-string">&quot;A callback that prints a message at the beginning of training&quot;</span>

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">on_train_begin</span>(<span class="hljs-params">self, args, state, control, **kwargs</span>):
        <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Starting training&quot;</span>)


trainer = Trainer(
    model,
    args,
    train_dataset=train_dataset,
    eval_dataset=eval_dataset,
    callbacks=[MyCallback],  <span class="hljs-comment"># We can either pass the callback class this way or an instance of it (MyCallback())</span>
)`,wrap:!1}}),yt=new rn({props:{code:"dHJhaW5lciUyMCUzRCUyMFRyYWluZXIoLi4uKSUwQXRyYWluZXIuYWRkX2NhbGxiYWNrKE15Q2FsbGJhY2spJTBBJTIzJTIwQWx0ZXJuYXRpdmVseSUyQyUyMHdlJTIwY2FuJTIwcGFzcyUyMGFuJTIwaW5zdGFuY2UlMjBvZiUyMHRoZSUyMGNhbGxiYWNrJTIwY2xhc3MlMEF0cmFpbmVyLmFkZF9jYWxsYmFjayhNeUNhbGxiYWNrKCkp",highlighted:`trainer = Trainer(...)
trainer.add_callback(MyCallback)
<span class="hljs-comment"># Alternatively, we can pass an instance of the callback class</span>
trainer.add_callback(MyCallback())`,wrap:!1}}),Mt=new Zr({props:{title:"TrainerState",local:"transformers.TrainerState",headingTag:"h2"}}),Lt=new k({props:{name:"class transformers.TrainerState",anchor:"transformers.TrainerState",parameters:[{name:"epoch",val:": Optional = None"},{name:"global_step",val:": int = 0"},{name:"max_steps",val:": int = 0"},{name:"logging_steps",val:": int = 500"},{name:"eval_steps",val:": int = 500"},{name:"save_steps",val:": int = 500"},{name:"train_batch_size",val:": int = None"},{name:"num_train_epochs",val:": int = 0"},{name:"num_input_tokens_seen",val:": int = 0"},{name:"total_flos",val:": float = 0"},{name:"log_history",val:": List = None"},{name:"best_metric",val:": Optional = None"},{name:"best_model_checkpoint",val:": Optional = None"},{name:"is_local_process_zero",val:": bool = True"},{name:"is_world_process_zero",val:": bool = True"},{name:"is_hyper_param_search",val:": bool = False"},{name:"trial_name",val:": str = None"},{name:"trial_params",val:": Dict = None"},{name:"stateful_callbacks",val:": List = None"}],parametersDescription:[{anchor:"transformers.TrainerState.epoch",description:`<strong>epoch</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Only set during training, will represent the epoch the training is at (the decimal part being the
percentage of the current epoch completed).`,name:"epoch"},{anchor:"transformers.TrainerState.global_step",description:`<strong>global_step</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
During training, represents the number of update steps completed.`,name:"global_step"},{anchor:"transformers.TrainerState.max_steps",description:`<strong>max_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The number of update steps to do during the current training.`,name:"max_steps"},{anchor:"transformers.TrainerState.logging_steps",description:`<strong>logging_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 500) &#x2014;
Log every X updates steps`,name:"logging_steps"},{anchor:"transformers.TrainerState.eval_steps",description:`<strong>eval_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Run an evaluation every X steps.`,name:"eval_steps"},{anchor:"transformers.TrainerState.save_steps",description:`<strong>save_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 500) &#x2014;
Save checkpoint every X updates steps.`,name:"save_steps"},{anchor:"transformers.TrainerState.train_batch_size",description:`<strong>train_batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The batch size for the training dataloader. Only needed when
<code>auto_find_batch_size</code> has been used.`,name:"train_batch_size"},{anchor:"transformers.TrainerState.num_input_tokens_seen",description:`<strong>num_input_tokens_seen</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
When tracking the inputs tokens, the number of tokens seen during training (number of input tokens, not the
number of prediction tokens).`,name:"num_input_tokens_seen"},{anchor:"transformers.TrainerState.total_flos",description:`<strong>total_flos</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The total number of floating operations done by the model since the beginning of training (stored as floats
to avoid overflow).`,name:"total_flos"},{anchor:"transformers.TrainerState.log_history",description:`<strong>log_history</strong> (<code>List[Dict[str, float]]</code>, <em>optional</em>) &#x2014;
The list of logs done since the beginning of training.`,name:"log_history"},{anchor:"transformers.TrainerState.best_metric",description:`<strong>best_metric</strong> (<code>float</code>, <em>optional</em>) &#x2014;
When tracking the best model, the value of the best metric encountered so far.`,name:"best_metric"},{anchor:"transformers.TrainerState.best_model_checkpoint",description:`<strong>best_model_checkpoint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
When tracking the best model, the value of the name of the checkpoint for the best model encountered so
far.`,name:"best_model_checkpoint"},{anchor:"transformers.TrainerState.is_local_process_zero",description:`<strong>is_local_process_zero</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not this process is the local (e.g., on one machine if training in a distributed fashion on
several machines) main process.`,name:"is_local_process_zero"},{anchor:"transformers.TrainerState.is_world_process_zero",description:`<strong>is_world_process_zero</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not this process is the global main process (when training in a distributed fashion on several
machines, this is only going to be <code>True</code> for one process).`,name:"is_world_process_zero"},{anchor:"transformers.TrainerState.is_hyper_param_search",description:`<strong>is_hyper_param_search</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether we are in the process of a hyper parameter search using Trainer.hyperparameter_search. This will
impact the way data will be logged in TensorBoard.`,name:"is_hyper_param_search"},{anchor:"transformers.TrainerState.stateful_callbacks",description:`<strong>stateful_callbacks</strong> (<code>List[StatefulTrainerCallback]</code>, <em>optional</em>) &#x2014;
Callbacks attached to the <code>Trainer</code> that should have their states be saved or restored.
Relevent callbacks should implement a <code>state</code> and <code>from_state</code> function.`,name:"stateful_callbacks"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L35"}}),Ce=new cl({props:{$$slots:{default:[xl]},$$scope:{ctx:E}}}),Et=new k({props:{name:"load_from_json",anchor:"transformers.TrainerState.load_from_json",parameters:[{name:"json_path",val:": str"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L146"}}),It=new k({props:{name:"save_to_json",anchor:"transformers.TrainerState.save_to_json",parameters:[{name:"json_path",val:": str"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L140"}}),Ht=new Zr({props:{title:"TrainerControl",local:"transformers.TrainerControl",headingTag:"h2"}}),jt=new k({props:{name:"class transformers.TrainerControl",anchor:"transformers.TrainerControl",parameters:[{name:"should_training_stop",val:": bool = False"},{name:"should_epoch_stop",val:": bool = False"},{name:"should_save",val:": bool = False"},{name:"should_evaluate",val:": bool = False"},{name:"should_log",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TrainerControl.should_training_stop",description:`<strong>should_training_stop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the training should be interrupted.</p>
<p>If <code>True</code>, this variable will not be set back to <code>False</code>. The training will just stop.`,name:"should_training_stop"},{anchor:"transformers.TrainerControl.should_epoch_stop",description:`<strong>should_epoch_stop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the current epoch should be interrupted.</p>
<p>If <code>True</code>, this variable will be set back to <code>False</code> at the beginning of the next epoch.`,name:"should_epoch_stop"},{anchor:"transformers.TrainerControl.should_save",description:`<strong>should_save</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should be saved at this step.</p>
<p>If <code>True</code>, this variable will be set back to <code>False</code> at the beginning of the next step.`,name:"should_save"},{anchor:"transformers.TrainerControl.should_evaluate",description:`<strong>should_evaluate</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should be evaluated at this step.</p>
<p>If <code>True</code>, this variable will be set back to <code>False</code> at the beginning of the next step.`,name:"should_evaluate"},{anchor:"transformers.TrainerControl.should_log",description:`<strong>should_log</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the logs should be reported at this step.</p>
<p>If <code>True</code>, this variable will be set back to <code>False</code> at the beginning of the next step.`,name:"should_log"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/trainer_callback.py#L198"}}),zt=new bl({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/zh/main_classes/callback.md"}}),{c(){d=o("meta"),M=r(),b=o("p"),w=r(),g(x.$$.fragment),T=r(),y=o("p"),y.textContent=L,I=r(),He=o("p"),He.innerHTML=Po,Qr=r(),je=o("p"),je.innerHTML=Fo,Kr=r(),ze=o("ul"),ze.innerHTML=Wo,ea=r(),Je=o("p"),Je.innerHTML=Bo,ta=r(),Ue=o("p"),Ue.innerHTML=Ro,ra=r(),g(De.$$.fragment),aa=r(),Ae=o("p"),Ae.innerHTML=Vo,na=r(),P=o("div"),g(Ne.$$.fragment),nn=r(),Dt=o("p"),Dt.innerHTML=Go,on=r(),j=o("div"),g(Se.$$.fragment),sn=r(),At=o("p"),At.textContent=qo,ln=r(),Nt=o("p"),Nt.textContent=Yo,cn=r(),St=o("ul"),St.innerHTML=Oo,dn=r(),Pt=o("p"),Pt.innerHTML=Xo,oa=r(),X=o("div"),g(Pe.$$.fragment),mn=r(),Ft=o("p"),Ft.innerHTML=Zo,sa=r(),Z=o("div"),g(Fe.$$.fragment),pn=r(),Wt=o("p"),Wt.innerHTML=Qo,la=r(),Q=o("div"),g(We.$$.fragment),gn=r(),Bt=o("p"),Bt.innerHTML=Ko,ia=r(),F=o("div"),g(Be.$$.fragment),fn=r(),Rt=o("p"),Rt.innerHTML=es,hn=r(),Vt=o("p"),Vt.innerHTML=ts,ca=r(),K=o("div"),g(Re.$$.fragment),un=r(),Gt=o("p"),Gt.innerHTML=rs,da=r(),W=o("div"),g(Ve.$$.fragment),bn=r(),qt=o("p"),qt.innerHTML=as,_n=r(),z=o("div"),g(Ge.$$.fragment),vn=r(),Yt=o("p"),Yt.innerHTML=ns,Tn=r(),Ot=o("p"),Ot.innerHTML=os,$n=r(),Xt=o("p"),Xt.textContent=ss,Cn=r(),B=o("ul"),qe=o("li"),Zt=o("p"),Zt.innerHTML=ls,kn=r(),g(ne.$$.fragment),wn=r(),Qt=o("li"),Qt.innerHTML=is,xn=r(),Kt=o("li"),Kt.innerHTML=cs,yn=r(),er=o("li"),er.innerHTML=ds,ma=r(),R=o("div"),g(Ye.$$.fragment),Mn=r(),tr=o("p"),tr.innerHTML=ms,Ln=r(),A=o("div"),g(Oe.$$.fragment),En=r(),rr=o("p"),rr.textContent=ps,In=r(),ar=o("p"),ar.textContent=gs,Hn=r(),nr=o("ul"),nr.innerHTML=fs,pa=r(),ee=o("div"),g(Xe.$$.fragment),jn=r(),or=o("p"),or.innerHTML=hs,ga=r(),te=o("div"),g(Ze.$$.fragment),zn=r(),sr=o("p"),sr.innerHTML=us,fa=r(),V=o("div"),g(Qe.$$.fragment),Jn=r(),lr=o("p"),lr.innerHTML=bs,Un=r(),ir=o("p"),ir.innerHTML=_s,ha=r(),J=o("div"),g(Ke.$$.fragment),Dn=r(),cr=o("p"),cr.innerHTML=vs,An=r(),dr=o("p"),dr.textContent=Ts,Nn=r(),mr=o("ul"),mr.innerHTML=$s,ua=r(),G=o("div"),g(et.$$.fragment),Sn=r(),pr=o("p"),pr.innerHTML=Cs,Pn=r(),N=o("div"),g(tt.$$.fragment),Fn=r(),gr=o("p"),gr.textContent=ks,Wn=r(),fr=o("p"),fr.textContent=ws,Bn=r(),hr=o("ul"),hr.innerHTML=xs,ba=r(),q=o("div"),g(rt.$$.fragment),Rn=r(),ur=o("p"),ur.innerHTML=ys,Vn=r(),g(oe.$$.fragment),_a=r(),U=o("div"),g(at.$$.fragment),Gn=r(),br=o("p"),br.innerHTML=Ms,qn=r(),_r=o("p"),_r.innerHTML=Ls,Yn=r(),S=o("div"),g(nt.$$.fragment),On=r(),vr=o("p"),vr.innerHTML=Es,Xn=r(),Tr=o("p"),Tr.textContent=Is,Zn=r(),$r=o("ul"),$r.innerHTML=Hs,va=r(),g(ot.$$.fragment),Ta=r(),_=o("div"),g(st.$$.fragment),Qn=r(),Cr=o("p"),Cr.textContent=js,Kn=r(),kr=o("p"),kr.innerHTML=zs,eo=r(),wr=o("p"),wr.innerHTML=Js,to=r(),g(se.$$.fragment),ro=r(),le=o("div"),g(lt.$$.fragment),ao=r(),xr=o("p"),xr.textContent=Us,no=r(),ie=o("div"),g(it.$$.fragment),oo=r(),yr=o("p"),yr.textContent=Ds,so=r(),ce=o("div"),g(ct.$$.fragment),lo=r(),Mr=o("p"),Mr.textContent=As,io=r(),de=o("div"),g(dt.$$.fragment),co=r(),Lr=o("p"),Lr.innerHTML=Ns,mo=r(),me=o("div"),g(mt.$$.fragment),po=r(),Er=o("p"),Er.textContent=Ss,go=r(),pe=o("div"),g(pt.$$.fragment),fo=r(),Ir=o("p"),Ir.textContent=Ps,ho=r(),ge=o("div"),g(gt.$$.fragment),uo=r(),Hr=o("p"),Hr.textContent=Fs,bo=r(),fe=o("div"),g(ft.$$.fragment),_o=r(),jr=o("p"),jr.textContent=Ws,vo=r(),he=o("div"),g(ht.$$.fragment),To=r(),zr=o("p"),zr.textContent=Bs,$o=r(),ue=o("div"),g(ut.$$.fragment),Co=r(),Jr=o("p"),Jr.textContent=Rs,ko=r(),be=o("div"),g(bt.$$.fragment),wo=r(),Ur=o("p"),Ur.textContent=Vs,xo=r(),_e=o("div"),g(_t.$$.fragment),yo=r(),Dr=o("p"),Dr.textContent=Gs,Mo=r(),ve=o("div"),g(vt.$$.fragment),Lo=r(),Ar=o("p"),Ar.textContent=qs,Eo=r(),Te=o("div"),g(Tt.$$.fragment),Io=r(),Nr=o("p"),Nr.textContent=Ys,Ho=r(),$e=o("div"),g($t.$$.fragment),jo=r(),Sr=o("p"),Sr.textContent=Os,$a=r(),Ct=o("p"),Ct.textContent=Xs,Ca=r(),kt=o("p"),kt.innerHTML=Zs,ka=r(),g(wt.$$.fragment),wa=r(),xt=o("p"),xt.innerHTML=Qs,xa=r(),g(yt.$$.fragment),ya=r(),g(Mt.$$.fragment),Ma=r(),H=o("div"),g(Lt.$$.fragment),zo=r(),Pr=o("p"),Pr.innerHTML=Ks,Jo=r(),g(Ce.$$.fragment),Uo=r(),ke=o("div"),g(Et.$$.fragment),Do=r(),Fr=o("p"),Fr.innerHTML=el,Ao=r(),we=o("div"),g(It.$$.fragment),No=r(),Wr=o("p"),Wr.innerHTML=tl,La=r(),g(Ht.$$.fragment),Ea=r(),re=o("div"),g(jt.$$.fragment),So=r(),Br=o("p"),Br.innerHTML=rl,Ia=r(),g(zt.$$.fragment),Ha=r(),Xr=o("p"),this.h()},l(e){const l=ul("svelte-u9bgzb",document.head);d=s(l,"META",{name:!0,content:!0}),l.forEach(n),M=a(e),b=s(e,"P",{}),v(b).forEach(n),w=a(e),f(x.$$.fragment,e),T=a(e),y=s(e,"P",{"data-svelte-h":!0}),i(y)!=="svelte-ixc7mw"&&(y.textContent=L),I=a(e),He=s(e,"P",{"data-svelte-h":!0}),i(He)!=="svelte-1o90q5b"&&(He.innerHTML=Po),Qr=a(e),je=s(e,"P",{"data-svelte-h":!0}),i(je)!=="svelte-w2h063"&&(je.innerHTML=Fo),Kr=a(e),ze=s(e,"UL",{"data-svelte-h":!0}),i(ze)!=="svelte-u78xcy"&&(ze.innerHTML=Wo),ea=a(e),Je=s(e,"P",{"data-svelte-h":!0}),i(Je)!=="svelte-cfm0j7"&&(Je.innerHTML=Bo),ta=a(e),Ue=s(e,"P",{"data-svelte-h":!0}),i(Ue)!=="svelte-1pdwua9"&&(Ue.innerHTML=Ro),ra=a(e),f(De.$$.fragment,e),aa=a(e),Ae=s(e,"P",{"data-svelte-h":!0}),i(Ae)!=="svelte-13outjo"&&(Ae.innerHTML=Vo),na=a(e),P=s(e,"DIV",{class:!0});var ae=v(P);f(Ne.$$.fragment,ae),nn=a(ae),Dt=s(ae,"P",{"data-svelte-h":!0}),i(Dt)!=="svelte-134mlcf"&&(Dt.innerHTML=Go),on=a(ae),j=s(ae,"DIV",{class:!0});var D=v(j);f(Se.$$.fragment,D),sn=a(D),At=s(D,"P",{"data-svelte-h":!0}),i(At)!=="svelte-frc23a"&&(At.textContent=qo),ln=a(D),Nt=s(D,"P",{"data-svelte-h":!0}),i(Nt)!=="svelte-1fkshtn"&&(Nt.textContent=Yo),cn=a(D),St=s(D,"UL",{"data-svelte-h":!0}),i(St)!=="svelte-rt862w"&&(St.innerHTML=Oo),dn=a(D),Pt=s(D,"P",{"data-svelte-h":!0}),i(Pt)!=="svelte-1baxs6u"&&(Pt.innerHTML=Xo),D.forEach(n),ae.forEach(n),oa=a(e),X=s(e,"DIV",{class:!0});var Jt=v(X);f(Pe.$$.fragment,Jt),mn=a(Jt),Ft=s(Jt,"P",{"data-svelte-h":!0}),i(Ft)!=="svelte-oz2n0i"&&(Ft.innerHTML=Zo),Jt.forEach(n),sa=a(e),Z=s(e,"DIV",{class:!0});var Ut=v(Z);f(Fe.$$.fragment,Ut),pn=a(Ut),Wt=s(Ut,"P",{"data-svelte-h":!0}),i(Wt)!=="svelte-motd6n"&&(Wt.innerHTML=Qo),Ut.forEach(n),la=a(e),Q=s(e,"DIV",{class:!0});var za=v(Q);f(We.$$.fragment,za),gn=a(za),Bt=s(za,"P",{"data-svelte-h":!0}),i(Bt)!=="svelte-rbon29"&&(Bt.innerHTML=Ko),za.forEach(n),ia=a(e),F=s(e,"DIV",{class:!0});var Rr=v(F);f(Be.$$.fragment,Rr),fn=a(Rr),Rt=s(Rr,"P",{"data-svelte-h":!0}),i(Rt)!=="svelte-1ikuyx3"&&(Rt.innerHTML=es),hn=a(Rr),Vt=s(Rr,"P",{"data-svelte-h":!0}),i(Vt)!=="svelte-1kjejon"&&(Vt.innerHTML=ts),Rr.forEach(n),ca=a(e),K=s(e,"DIV",{class:!0});var Ja=v(K);f(Re.$$.fragment,Ja),un=a(Ja),Gt=s(Ja,"P",{"data-svelte-h":!0}),i(Gt)!=="svelte-1fbxxyk"&&(Gt.innerHTML=rs),Ja.forEach(n),da=a(e),W=s(e,"DIV",{class:!0});var Vr=v(W);f(Ve.$$.fragment,Vr),bn=a(Vr),qt=s(Vr,"P",{"data-svelte-h":!0}),i(qt)!=="svelte-7f6fer"&&(qt.innerHTML=as),_n=a(Vr),z=s(Vr,"DIV",{class:!0});var Y=v(z);f(Ge.$$.fragment,Y),vn=a(Y),Yt=s(Y,"P",{"data-svelte-h":!0}),i(Yt)!=="svelte-op70zs"&&(Yt.innerHTML=ns),Tn=a(Y),Ot=s(Y,"P",{"data-svelte-h":!0}),i(Ot)!=="svelte-m2rt7w"&&(Ot.innerHTML=os),$n=a(Y),Xt=s(Y,"P",{"data-svelte-h":!0}),i(Xt)!=="svelte-1fkshtn"&&(Xt.textContent=ss),Cn=a(Y),B=s(Y,"UL",{});var xe=v(B);qe=s(xe,"LI",{});var Ua=v(qe);Zt=s(Ua,"P",{"data-svelte-h":!0}),i(Zt)!=="svelte-py3r3s"&&(Zt.innerHTML=ls),kn=a(Ua),f(ne.$$.fragment,Ua),Ua.forEach(n),wn=a(xe),Qt=s(xe,"LI",{"data-svelte-h":!0}),i(Qt)!=="svelte-dx3m30"&&(Qt.innerHTML=is),xn=a(xe),Kt=s(xe,"LI",{"data-svelte-h":!0}),i(Kt)!=="svelte-n1uh6c"&&(Kt.innerHTML=cs),yn=a(xe),er=s(xe,"LI",{"data-svelte-h":!0}),i(er)!=="svelte-ybo66z"&&(er.innerHTML=ds),xe.forEach(n),Y.forEach(n),Vr.forEach(n),ma=a(e),R=s(e,"DIV",{class:!0});var Gr=v(R);f(Ye.$$.fragment,Gr),Mn=a(Gr),tr=s(Gr,"P",{"data-svelte-h":!0}),i(tr)!=="svelte-x7p45v"&&(tr.innerHTML=ms),Ln=a(Gr),A=s(Gr,"DIV",{class:!0});var ye=v(A);f(Oe.$$.fragment,ye),En=a(ye),rr=s(ye,"P",{"data-svelte-h":!0}),i(rr)!=="svelte-nmg16f"&&(rr.textContent=ps),In=a(ye),ar=s(ye,"P",{"data-svelte-h":!0}),i(ar)!=="svelte-1fkshtn"&&(ar.textContent=gs),Hn=a(ye),nr=s(ye,"UL",{"data-svelte-h":!0}),i(nr)!=="svelte-140ydui"&&(nr.innerHTML=fs),ye.forEach(n),Gr.forEach(n),pa=a(e),ee=s(e,"DIV",{class:!0});var Da=v(ee);f(Xe.$$.fragment,Da),jn=a(Da),or=s(Da,"P",{"data-svelte-h":!0}),i(or)!=="svelte-17om5vo"&&(or.innerHTML=hs),Da.forEach(n),ga=a(e),te=s(e,"DIV",{class:!0});var Aa=v(te);f(Ze.$$.fragment,Aa),zn=a(Aa),sr=s(Aa,"P",{"data-svelte-h":!0}),i(sr)!=="svelte-q4lpsg"&&(sr.innerHTML=us),Aa.forEach(n),fa=a(e),V=s(e,"DIV",{class:!0});var qr=v(V);f(Qe.$$.fragment,qr),Jn=a(qr),lr=s(qr,"P",{"data-svelte-h":!0}),i(lr)!=="svelte-4ag9j6"&&(lr.innerHTML=bs),Un=a(qr),ir=s(qr,"P",{"data-svelte-h":!0}),i(ir)!=="svelte-1mhjcx0"&&(ir.innerHTML=_s),qr.forEach(n),ha=a(e),J=s(e,"DIV",{class:!0});var Me=v(J);f(Ke.$$.fragment,Me),Dn=a(Me),cr=s(Me,"P",{"data-svelte-h":!0}),i(cr)!=="svelte-13ipyqi"&&(cr.innerHTML=vs),An=a(Me),dr=s(Me,"P",{"data-svelte-h":!0}),i(dr)!=="svelte-1fkshtn"&&(dr.textContent=Ts),Nn=a(Me),mr=s(Me,"UL",{"data-svelte-h":!0}),i(mr)!=="svelte-15svthu"&&(mr.innerHTML=$s),Me.forEach(n),ua=a(e),G=s(e,"DIV",{class:!0});var Yr=v(G);f(et.$$.fragment,Yr),Sn=a(Yr),pr=s(Yr,"P",{"data-svelte-h":!0}),i(pr)!=="svelte-1mlybl3"&&(pr.innerHTML=Cs),Pn=a(Yr),N=s(Yr,"DIV",{class:!0});var Le=v(N);f(tt.$$.fragment,Le),Fn=a(Le),gr=s(Le,"P",{"data-svelte-h":!0}),i(gr)!=="svelte-1wbmj3"&&(gr.textContent=ks),Wn=a(Le),fr=s(Le,"P",{"data-svelte-h":!0}),i(fr)!=="svelte-1fkshtn"&&(fr.textContent=ws),Bn=a(Le),hr=s(Le,"UL",{"data-svelte-h":!0}),i(hr)!=="svelte-dna85o"&&(hr.innerHTML=xs),Le.forEach(n),Yr.forEach(n),ba=a(e),q=s(e,"DIV",{class:!0});var Or=v(q);f(rt.$$.fragment,Or),Rn=a(Or),ur=s(Or,"P",{"data-svelte-h":!0}),i(ur)!=="svelte-yy9qu0"&&(ur.innerHTML=ys),Vn=a(Or),f(oe.$$.fragment,Or),Or.forEach(n),_a=a(e),U=s(e,"DIV",{class:!0});var Ee=v(U);f(at.$$.fragment,Ee),Gn=a(Ee),br=s(Ee,"P",{"data-svelte-h":!0}),i(br)!=="svelte-b5fh9h"&&(br.innerHTML=Ms),qn=a(Ee),_r=s(Ee,"P",{"data-svelte-h":!0}),i(_r)!=="svelte-eu3kj7"&&(_r.innerHTML=Ls),Yn=a(Ee),S=s(Ee,"DIV",{class:!0});var Ie=v(S);f(nt.$$.fragment,Ie),On=a(Ie),vr=s(Ie,"P",{"data-svelte-h":!0}),i(vr)!=="svelte-jjkenj"&&(vr.innerHTML=Es),Xn=a(Ie),Tr=s(Ie,"P",{"data-svelte-h":!0}),i(Tr)!=="svelte-1fkshtn"&&(Tr.textContent=Is),Zn=a(Ie),$r=s(Ie,"UL",{"data-svelte-h":!0}),i($r)!=="svelte-crnavn"&&($r.innerHTML=Hs),Ie.forEach(n),Ee.forEach(n),va=a(e),f(ot.$$.fragment,e),Ta=a(e),_=s(e,"DIV",{class:!0});var C=v(_);f(st.$$.fragment,C),Qn=a(C),Cr=s(C,"P",{"data-svelte-h":!0}),i(Cr)!=="svelte-14xg00o"&&(Cr.textContent=js),Kn=a(C),kr=s(C,"P",{"data-svelte-h":!0}),i(kr)!=="svelte-1xprdvt"&&(kr.innerHTML=zs),eo=a(C),wr=s(C,"P",{"data-svelte-h":!0}),i(wr)!=="svelte-11ud3hg"&&(wr.innerHTML=Js),to=a(C),f(se.$$.fragment,C),ro=a(C),le=s(C,"DIV",{class:!0});var Na=v(le);f(lt.$$.fragment,Na),ao=a(Na),xr=s(Na,"P",{"data-svelte-h":!0}),i(xr)!=="svelte-106889p"&&(xr.textContent=Us),Na.forEach(n),no=a(C),ie=s(C,"DIV",{class:!0});var Sa=v(ie);f(it.$$.fragment,Sa),oo=a(Sa),yr=s(Sa,"P",{"data-svelte-h":!0}),i(yr)!=="svelte-oshcpj"&&(yr.textContent=Ds),Sa.forEach(n),so=a(C),ce=s(C,"DIV",{class:!0});var Pa=v(ce);f(ct.$$.fragment,Pa),lo=a(Pa),Mr=s(Pa,"P",{"data-svelte-h":!0}),i(Mr)!=="svelte-1o0xh73"&&(Mr.textContent=As),Pa.forEach(n),io=a(C),de=s(C,"DIV",{class:!0});var Fa=v(de);f(dt.$$.fragment,Fa),co=a(Fa),Lr=s(Fa,"P",{"data-svelte-h":!0}),i(Lr)!=="svelte-hzqkde"&&(Lr.innerHTML=Ns),Fa.forEach(n),mo=a(C),me=s(C,"DIV",{class:!0});var Wa=v(me);f(mt.$$.fragment,Wa),po=a(Wa),Er=s(Wa,"P",{"data-svelte-h":!0}),i(Er)!=="svelte-10eiwg0"&&(Er.textContent=Ss),Wa.forEach(n),go=a(C),pe=s(C,"DIV",{class:!0});var Ba=v(pe);f(pt.$$.fragment,Ba),fo=a(Ba),Ir=s(Ba,"P",{"data-svelte-h":!0}),i(Ir)!=="svelte-1mpbj2z"&&(Ir.textContent=Ps),Ba.forEach(n),ho=a(C),ge=s(C,"DIV",{class:!0});var Ra=v(ge);f(gt.$$.fragment,Ra),uo=a(Ra),Hr=s(Ra,"P",{"data-svelte-h":!0}),i(Hr)!=="svelte-qj3qgf"&&(Hr.textContent=Fs),Ra.forEach(n),bo=a(C),fe=s(C,"DIV",{class:!0});var Va=v(fe);f(ft.$$.fragment,Va),_o=a(Va),jr=s(Va,"P",{"data-svelte-h":!0}),i(jr)!=="svelte-1df7x4n"&&(jr.textContent=Ws),Va.forEach(n),vo=a(C),he=s(C,"DIV",{class:!0});var Ga=v(he);f(ht.$$.fragment,Ga),To=a(Ga),zr=s(Ga,"P",{"data-svelte-h":!0}),i(zr)!=="svelte-18swygp"&&(zr.textContent=Bs),Ga.forEach(n),$o=a(C),ue=s(C,"DIV",{class:!0});var qa=v(ue);f(ut.$$.fragment,qa),Co=a(qa),Jr=s(qa,"P",{"data-svelte-h":!0}),i(Jr)!=="svelte-19xp05v"&&(Jr.textContent=Rs),qa.forEach(n),ko=a(C),be=s(C,"DIV",{class:!0});var Ya=v(be);f(bt.$$.fragment,Ya),wo=a(Ya),Ur=s(Ya,"P",{"data-svelte-h":!0}),i(Ur)!=="svelte-7af61p"&&(Ur.textContent=Vs),Ya.forEach(n),xo=a(C),_e=s(C,"DIV",{class:!0});var Oa=v(_e);f(_t.$$.fragment,Oa),yo=a(Oa),Dr=s(Oa,"P",{"data-svelte-h":!0}),i(Dr)!=="svelte-8cdxjr"&&(Dr.textContent=Gs),Oa.forEach(n),Mo=a(C),ve=s(C,"DIV",{class:!0});var Xa=v(ve);f(vt.$$.fragment,Xa),Lo=a(Xa),Ar=s(Xa,"P",{"data-svelte-h":!0}),i(Ar)!=="svelte-sluvs0"&&(Ar.textContent=qs),Xa.forEach(n),Eo=a(C),Te=s(C,"DIV",{class:!0});var Za=v(Te);f(Tt.$$.fragment,Za),Io=a(Za),Nr=s(Za,"P",{"data-svelte-h":!0}),i(Nr)!=="svelte-6bvy6d"&&(Nr.textContent=Ys),Za.forEach(n),Ho=a(C),$e=s(C,"DIV",{class:!0});var Qa=v($e);f($t.$$.fragment,Qa),jo=a(Qa),Sr=s(Qa,"P",{"data-svelte-h":!0}),i(Sr)!=="svelte-zzwxsv"&&(Sr.textContent=Os),Qa.forEach(n),C.forEach(n),$a=a(e),Ct=s(e,"P",{"data-svelte-h":!0}),i(Ct)!=="svelte-87dqmt"&&(Ct.textContent=Xs),Ca=a(e),kt=s(e,"P",{"data-svelte-h":!0}),i(kt)!=="svelte-17720zy"&&(kt.innerHTML=Zs),ka=a(e),f(wt.$$.fragment,e),wa=a(e),xt=s(e,"P",{"data-svelte-h":!0}),i(xt)!=="svelte-u9gp17"&&(xt.innerHTML=Qs),xa=a(e),f(yt.$$.fragment,e),ya=a(e),f(Mt.$$.fragment,e),Ma=a(e),H=s(e,"DIV",{class:!0});var O=v(H);f(Lt.$$.fragment,O),zo=a(O),Pr=s(O,"P",{"data-svelte-h":!0}),i(Pr)!=="svelte-tjono7"&&(Pr.innerHTML=Ks),Jo=a(O),f(Ce.$$.fragment,O),Uo=a(O),ke=s(O,"DIV",{class:!0});var Ka=v(ke);f(Et.$$.fragment,Ka),Do=a(Ka),Fr=s(Ka,"P",{"data-svelte-h":!0}),i(Fr)!=="svelte-hbs6ga"&&(Fr.innerHTML=el),Ka.forEach(n),Ao=a(O),we=s(O,"DIV",{class:!0});var en=v(we);f(It.$$.fragment,en),No=a(en),Wr=s(en,"P",{"data-svelte-h":!0}),i(Wr)!=="svelte-dkslae"&&(Wr.innerHTML=tl),en.forEach(n),O.forEach(n),La=a(e),f(Ht.$$.fragment,e),Ea=a(e),re=s(e,"DIV",{class:!0});var tn=v(re);f(jt.$$.fragment,tn),So=a(tn),Br=s(tn,"P",{"data-svelte-h":!0}),i(Br)!=="svelte-1xsbg8b"&&(Br.innerHTML=rl),tn.forEach(n),Ia=a(e),f(zt.$$.fragment,e),Ha=a(e),Xr=s(e,"P",{}),v(Xr).forEach(n),this.h()},h(){$(d,"name","hf:doc:metadata"),$(d,"content",Ml),$(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(re,"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,l){t(document.head,d),c(e,M,l),c(e,b,l),c(e,w,l),h(x,e,l),c(e,T,l),c(e,y,l),c(e,I,l),c(e,He,l),c(e,Qr,l),c(e,je,l),c(e,Kr,l),c(e,ze,l),c(e,ea,l),c(e,Je,l),c(e,ta,l),c(e,Ue,l),c(e,ra,l),h(De,e,l),c(e,aa,l),c(e,Ae,l),c(e,na,l),c(e,P,l),h(Ne,P,null),t(P,nn),t(P,Dt),t(P,on),t(P,j),h(Se,j,null),t(j,sn),t(j,At),t(j,ln),t(j,Nt),t(j,cn),t(j,St),t(j,dn),t(j,Pt),c(e,oa,l),c(e,X,l),h(Pe,X,null),t(X,mn),t(X,Ft),c(e,sa,l),c(e,Z,l),h(Fe,Z,null),t(Z,pn),t(Z,Wt),c(e,la,l),c(e,Q,l),h(We,Q,null),t(Q,gn),t(Q,Bt),c(e,ia,l),c(e,F,l),h(Be,F,null),t(F,fn),t(F,Rt),t(F,hn),t(F,Vt),c(e,ca,l),c(e,K,l),h(Re,K,null),t(K,un),t(K,Gt),c(e,da,l),c(e,W,l),h(Ve,W,null),t(W,bn),t(W,qt),t(W,_n),t(W,z),h(Ge,z,null),t(z,vn),t(z,Yt),t(z,Tn),t(z,Ot),t(z,$n),t(z,Xt),t(z,Cn),t(z,B),t(B,qe),t(qe,Zt),t(qe,kn),h(ne,qe,null),t(B,wn),t(B,Qt),t(B,xn),t(B,Kt),t(B,yn),t(B,er),c(e,ma,l),c(e,R,l),h(Ye,R,null),t(R,Mn),t(R,tr),t(R,Ln),t(R,A),h(Oe,A,null),t(A,En),t(A,rr),t(A,In),t(A,ar),t(A,Hn),t(A,nr),c(e,pa,l),c(e,ee,l),h(Xe,ee,null),t(ee,jn),t(ee,or),c(e,ga,l),c(e,te,l),h(Ze,te,null),t(te,zn),t(te,sr),c(e,fa,l),c(e,V,l),h(Qe,V,null),t(V,Jn),t(V,lr),t(V,Un),t(V,ir),c(e,ha,l),c(e,J,l),h(Ke,J,null),t(J,Dn),t(J,cr),t(J,An),t(J,dr),t(J,Nn),t(J,mr),c(e,ua,l),c(e,G,l),h(et,G,null),t(G,Sn),t(G,pr),t(G,Pn),t(G,N),h(tt,N,null),t(N,Fn),t(N,gr),t(N,Wn),t(N,fr),t(N,Bn),t(N,hr),c(e,ba,l),c(e,q,l),h(rt,q,null),t(q,Rn),t(q,ur),t(q,Vn),h(oe,q,null),c(e,_a,l),c(e,U,l),h(at,U,null),t(U,Gn),t(U,br),t(U,qn),t(U,_r),t(U,Yn),t(U,S),h(nt,S,null),t(S,On),t(S,vr),t(S,Xn),t(S,Tr),t(S,Zn),t(S,$r),c(e,va,l),h(ot,e,l),c(e,Ta,l),c(e,_,l),h(st,_,null),t(_,Qn),t(_,Cr),t(_,Kn),t(_,kr),t(_,eo),t(_,wr),t(_,to),h(se,_,null),t(_,ro),t(_,le),h(lt,le,null),t(le,ao),t(le,xr),t(_,no),t(_,ie),h(it,ie,null),t(ie,oo),t(ie,yr),t(_,so),t(_,ce),h(ct,ce,null),t(ce,lo),t(ce,Mr),t(_,io),t(_,de),h(dt,de,null),t(de,co),t(de,Lr),t(_,mo),t(_,me),h(mt,me,null),t(me,po),t(me,Er),t(_,go),t(_,pe),h(pt,pe,null),t(pe,fo),t(pe,Ir),t(_,ho),t(_,ge),h(gt,ge,null),t(ge,uo),t(ge,Hr),t(_,bo),t(_,fe),h(ft,fe,null),t(fe,_o),t(fe,jr),t(_,vo),t(_,he),h(ht,he,null),t(he,To),t(he,zr),t(_,$o),t(_,ue),h(ut,ue,null),t(ue,Co),t(ue,Jr),t(_,ko),t(_,be),h(bt,be,null),t(be,wo),t(be,Ur),t(_,xo),t(_,_e),h(_t,_e,null),t(_e,yo),t(_e,Dr),t(_,Mo),t(_,ve),h(vt,ve,null),t(ve,Lo),t(ve,Ar),t(_,Eo),t(_,Te),h(Tt,Te,null),t(Te,Io),t(Te,Nr),t(_,Ho),t(_,$e),h($t,$e,null),t($e,jo),t($e,Sr),c(e,$a,l),c(e,Ct,l),c(e,Ca,l),c(e,kt,l),c(e,ka,l),h(wt,e,l),c(e,wa,l),c(e,xt,l),c(e,xa,l),h(yt,e,l),c(e,ya,l),h(Mt,e,l),c(e,Ma,l),c(e,H,l),h(Lt,H,null),t(H,zo),t(H,Pr),t(H,Jo),h(Ce,H,null),t(H,Uo),t(H,ke),h(Et,ke,null),t(ke,Do),t(ke,Fr),t(H,Ao),t(H,we),h(It,we,null),t(we,No),t(we,Wr),c(e,La,l),h(Ht,e,l),c(e,Ea,l),c(e,re,l),h(jt,re,null),t(re,So),t(re,Br),c(e,Ia,l),h(zt,e,l),c(e,Ha,l),c(e,Xr,l),ja=!0},p(e,[l]){const ae={};l&2&&(ae.$$scope={dirty:l,ctx:e}),ne.$set(ae);const D={};l&2&&(D.$$scope={dirty:l,ctx:e}),oe.$set(D);const Jt={};l&2&&(Jt.$$scope={dirty:l,ctx:e}),se.$set(Jt);const Ut={};l&2&&(Ut.$$scope={dirty:l,ctx:e}),Ce.$set(Ut)},i(e){ja||(m(x.$$.fragment,e),m(De.$$.fragment,e),m(Ne.$$.fragment,e),m(Se.$$.fragment,e),m(Pe.$$.fragment,e),m(Fe.$$.fragment,e),m(We.$$.fragment,e),m(Be.$$.fragment,e),m(Re.$$.fragment,e),m(Ve.$$.fragment,e),m(Ge.$$.fragment,e),m(ne.$$.fragment,e),m(Ye.$$.fragment,e),m(Oe.$$.fragment,e),m(Xe.$$.fragment,e),m(Ze.$$.fragment,e),m(Qe.$$.fragment,e),m(Ke.$$.fragment,e),m(et.$$.fragment,e),m(tt.$$.fragment,e),m(rt.$$.fragment,e),m(oe.$$.fragment,e),m(at.$$.fragment,e),m(nt.$$.fragment,e),m(ot.$$.fragment,e),m(st.$$.fragment,e),m(se.$$.fragment,e),m(lt.$$.fragment,e),m(it.$$.fragment,e),m(ct.$$.fragment,e),m(dt.$$.fragment,e),m(mt.$$.fragment,e),m(pt.$$.fragment,e),m(gt.$$.fragment,e),m(ft.$$.fragment,e),m(ht.$$.fragment,e),m(ut.$$.fragment,e),m(bt.$$.fragment,e),m(_t.$$.fragment,e),m(vt.$$.fragment,e),m(Tt.$$.fragment,e),m($t.$$.fragment,e),m(wt.$$.fragment,e),m(yt.$$.fragment,e),m(Mt.$$.fragment,e),m(Lt.$$.fragment,e),m(Ce.$$.fragment,e),m(Et.$$.fragment,e),m(It.$$.fragment,e),m(Ht.$$.fragment,e),m(jt.$$.fragment,e),m(zt.$$.fragment,e),ja=!0)},o(e){p(x.$$.fragment,e),p(De.$$.fragment,e),p(Ne.$$.fragment,e),p(Se.$$.fragment,e),p(Pe.$$.fragment,e),p(Fe.$$.fragment,e),p(We.$$.fragment,e),p(Be.$$.fragment,e),p(Re.$$.fragment,e),p(Ve.$$.fragment,e),p(Ge.$$.fragment,e),p(ne.$$.fragment,e),p(Ye.$$.fragment,e),p(Oe.$$.fragment,e),p(Xe.$$.fragment,e),p(Ze.$$.fragment,e),p(Qe.$$.fragment,e),p(Ke.$$.fragment,e),p(et.$$.fragment,e),p(tt.$$.fragment,e),p(rt.$$.fragment,e),p(oe.$$.fragment,e),p(at.$$.fragment,e),p(nt.$$.fragment,e),p(ot.$$.fragment,e),p(st.$$.fragment,e),p(se.$$.fragment,e),p(lt.$$.fragment,e),p(it.$$.fragment,e),p(ct.$$.fragment,e),p(dt.$$.fragment,e),p(mt.$$.fragment,e),p(pt.$$.fragment,e),p(gt.$$.fragment,e),p(ft.$$.fragment,e),p(ht.$$.fragment,e),p(ut.$$.fragment,e),p(bt.$$.fragment,e),p(_t.$$.fragment,e),p(vt.$$.fragment,e),p(Tt.$$.fragment,e),p($t.$$.fragment,e),p(wt.$$.fragment,e),p(yt.$$.fragment,e),p(Mt.$$.fragment,e),p(Lt.$$.fragment,e),p(Ce.$$.fragment,e),p(Et.$$.fragment,e),p(It.$$.fragment,e),p(Ht.$$.fragment,e),p(jt.$$.fragment,e),p(zt.$$.fragment,e),ja=!1},d(e){e&&(n(M),n(b),n(w),n(T),n(y),n(I),n(He),n(Qr),n(je),n(Kr),n(ze),n(ea),n(Je),n(ta),n(Ue),n(ra),n(aa),n(Ae),n(na),n(P),n(oa),n(X),n(sa),n(Z),n(la),n(Q),n(ia),n(F),n(ca),n(K),n(da),n(W),n(ma),n(R),n(pa),n(ee),n(ga),n(te),n(fa),n(V),n(ha),n(J),n(ua),n(G),n(ba),n(q),n(_a),n(U),n(va),n(Ta),n(_),n($a),n(Ct),n(Ca),n(kt),n(ka),n(wa),n(xt),n(xa),n(ya),n(Ma),n(H),n(La),n(Ea),n(re),n(Ia),n(Ha),n(Xr)),n(d),u(x,e),u(De,e),u(Ne),u(Se),u(Pe),u(Fe),u(We),u(Be),u(Re),u(Ve),u(Ge),u(ne),u(Ye),u(Oe),u(Xe),u(Ze),u(Qe),u(Ke),u(et),u(tt),u(rt),u(oe),u(at),u(nt),u(ot,e),u(st),u(se),u(lt),u(it),u(ct),u(dt),u(mt),u(pt),u(gt),u(ft),u(ht),u(ut),u(bt),u(_t),u(vt),u(Tt),u($t),u(wt,e),u(yt,e),u(Mt,e),u(Lt),u(Ce),u(Et),u(It),u(Ht,e),u(jt),u(zt,e)}}}const Ml='{"title":"Callbacks","local":"callbacks","sections":[{"title":"可用的Callbacks","local":"transformers.integrations.CometCallback","sections":[],"depth":2},{"title":"TrainerCallback","local":"transformers.TrainerCallback","sections":[],"depth":2},{"title":"TrainerState","local":"transformers.TrainerState","sections":[],"depth":2},{"title":"TrainerControl","local":"transformers.TrainerControl","sections":[],"depth":2}],"depth":1}';function Ll(E){return fl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Dl extends ll{constructor(d){super(),il(this,d,Ll,yl,sl,{})}}export{Dl as component};
