import{s as Vl,c as Xl,u as Zl,g as Ql,d as Kl,o as ei,n as yn}from"../chunks/scheduler.25b97de1.js";import{S as ql,i as Gl,r as g,u as f,v as h,d,t as p,w as u,g as n,m as Bl,s as r,h as o,j as b,n as Rl,f as s,c as a,k as v,a as c,y as t,o as ti,A as ri,x as i}from"../chunks/index.d9030fc9.js";import{T as Yl}from"../chunks/Tip.baa67368.js";import{D as $}from"../chunks/Docstring.4ef5a547.js";import{C as wn}from"../chunks/CodeBlock.b38ef023.js";import{E as Ol}from"../chunks/ExampleCodeBlock.5c766084.js";import{H as ha,E as ai}from"../chunks/index.676ef4be.js";function ni(E){let m,M,_,w,y;const C=E[1].default,x=Xl(C,E,E[2],null);return{c(){m=n("p"),M=Bl("Deprecated in "),_=Bl(E[0]),w=r(),x&&x.c(),this.h()},l(L){m=o(L,"P",{class:!0});var H=b(m);M=Rl(H,"Deprecated in "),_=Rl(H,E[0]),H.forEach(s),w=a(L),x&&x.l(L),this.h()},h(){v(m,"class","font-medium")},m(L,H){c(L,m,H),t(m,M),t(m,_),c(L,w,H),x&&x.m(L,H),y=!0},p(L,H){(!y||H&1)&&ti(_,L[0]),x&&x.p&&(!y||H&4)&&Zl(x,C,L,L[2],y?Kl(C,L[2],H,null):Ql(L[2]),null)},i(L){y||(d(x,L),y=!0)},o(L){p(x,L),y=!1},d(L){L&&(s(m),s(w)),x&&x.d(L)}}}function oi(E){let m,M;return m=new Yl({props:{warning:!0,$$slots:{default:[ni]},$$scope:{ctx:E}}}),{c(){g(m.$$.fragment)},l(_){f(m.$$.fragment,_)},m(_,w){h(m,_,w),M=!0},p(_,[w]){const y={};w&5&&(y.$$scope={dirty:w,ctx:_}),m.$set(y)},i(_){M||(d(m.$$.fragment,_),M=!0)},o(_){p(m.$$.fragment,_),M=!1},d(_){u(m,_)}}}function si(E,m,M){let{$$slots:_={},$$scope:w}=m,{version:y}=m;return E.$$set=C=>{"version"in C&&M(0,y=C.version),"$$scope"in C&&M(2,w=C.$$scope)},[y,_,w]}class li extends ql{constructor(m){super(),Gl(this,m,si,oi,Vl,{version:0})}}function ii(E){let m,M="Setting <code>WANDB_LOG_MODEL</code> as <code>bool</code> will be deprecated in version 5 of 🤗 Transformers.";return{c(){m=n("p"),m.innerHTML=M},l(_){m=o(_,"P",{"data-svelte-h":!0}),i(m)!=="svelte-fxlq1n"&&(m.innerHTML=M)},m(_,w){c(_,m,w)},p:yn,d(_){_&&s(m)}}}function ci(E){let m,M="Example:",_,w,y;return w=new wn({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(){m=n("p"),m.textContent=M,_=r(),g(w.$$.fragment)},l(C){m=o(C,"P",{"data-svelte-h":!0}),i(m)!=="svelte-11lpom8"&&(m.textContent=M),_=a(C),f(w.$$.fragment,C)},m(C,x){c(C,m,x),c(C,_,x),h(w,C,x),y=!0},p:yn,i(C){y||(d(w.$$.fragment,C),y=!0)},o(C){p(w.$$.fragment,C),y=!1},d(C){C&&(s(m),s(_)),u(w,C)}}}function mi(E){let m,M="Example:",_,w,y;return w=new wn({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(){m=n("p"),m.textContent=M,_=r(),g(w.$$.fragment)},l(C){m=o(C,"P",{"data-svelte-h":!0}),i(m)!=="svelte-11lpom8"&&(m.textContent=M),_=a(C),f(w.$$.fragment,C)},m(C,x){c(C,m,x),c(C,_,x),h(w,C,x),y=!0},p:yn,i(C){y||(d(w.$$.fragment,C),y=!0)},o(C){p(w.$$.fragment,C),y=!1},d(C){C&&(s(m),s(_)),u(w,C)}}}function di(E){let m,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(){m=n("p"),m.innerHTML=M},l(_){m=o(_,"P",{"data-svelte-h":!0}),i(m)!=="svelte-rhwh6p"&&(m.innerHTML=M)},m(_,w){c(_,m,w)},p:yn,d(_){_&&s(m)}}}function pi(E){let m,M,_,w,y,C,x,L="Callbacks可以用来自定义PyTorch [Trainer]中训练循环行为的对象（此功能尚未在TensorFlow中实现），该对象可以检查训练循环状态（用于进度报告、在TensorBoard或其他ML平台上记录日志等），并做出决策（例如提前停止）。",H,Ne,vs='Callbacks是“只读”的代码片段，除了它们返回的[TrainerControl]对象外，它们不能更改训练循环中的任何内容。对于需要更改训练循环的自定义，您应该继承[Trainer]并重载您需要的方法（有关示例，请参见<a href="trainer">trainer</a>）。',ua,De,_s="默认情况下，<code>TrainingArguments.report_to</code> 设置为”all”，然后[Trainer]将使用以下callbacks。",ba,Ue,Ts='<li><a href="/docs/transformers/main/zh/main_classes/callback#transformers.DefaultFlowCallback">DefaultFlowCallback</a>，它处理默认的日志记录、保存和评估行为</li> <li><a href="/docs/transformers/main/zh/main_classes/callback#transformers.PrinterCallback">PrinterCallback</a> 或 <a href="/docs/transformers/main/zh/main_classes/callback#transformers.ProgressCallback">ProgressCallback</a>，用于显示进度和打印日志（如果通过<code>TrainingArguments</code>停用tqdm，则使用第一个函数；否则使用第二个）。</li> <li><a href="/docs/transformers/main/zh/main_classes/callback#transformers.integrations.TensorBoardCallback">TensorBoardCallback</a>，如果TensorBoard可访问（通过PyTorch版本 &gt;= 1.4 或者 tensorboardX）。</li> <li><a href="/docs/transformers/main/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/main/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/main/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/main/zh/main_classes/callback#transformers.integrations.NeptuneCallback">NeptuneCallback</a>，如果安装了<a href="https://neptune.ai/" rel="nofollow">neptune</a>。</li> <li><a href="/docs/transformers/main/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/main/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/main/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/main/zh/main_classes/callback#transformers.integrations.DagsHubCallback">DagsHubCallback</a>，如果安装了<a href="https://dagshub.com/" rel="nofollow">dagshub</a>。</li> <li><a href="/docs/transformers/main/zh/main_classes/callback#transformers.integrations.FlyteCallback">FlyteCallback</a>，如果安装了<a href="https://flyte.org/" rel="nofollow">flyte</a>。</li> <li><a href="/docs/transformers/main/zh/main_classes/callback#transformers.integrations.DVCLiveCallback">DVCLiveCallback</a>，如果安装了<a href="https://dvc.org/doc/dvclive" rel="nofollow">dvclive</a>。</li> <li><a href="/docs/transformers/main/zh/main_classes/callback#transformers.integrations.SwanLabCallback">SwanLabCallback</a>，如果安装了<a href="http://swanlab.cn/" rel="nofollow">swanlab</a>。</li>',va,Je,$s="如果安装了一个软件包，但您不希望使用相关的集成，您可以将 <code>TrainingArguments.report_to</code> 更改为仅包含您想要使用的集成的列表（例如 <code>[&quot;azure_ml&quot;, &quot;wandb&quot;]</code>）。",_a,Pe,Cs='实现callbacks的主要类是<a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a>。它获取用于实例化<code>Trainer</code>的<code>TrainingArguments</code>，可以通过<a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerState">TrainerState</a>访问该Trainer的内部状态，并可以通过<a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerControl">TrainerControl</a>对训练循环执行一些操作。',Ta,We,$a,Fe,ks='这里是库里可用<a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a>的列表：',Ca,B,Be,xn,Ot,ws='A <a href="/docs/transformers/main/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>.',Mn,A,Re,Ln,Vt,ys="Setup the optional Comet integration.",En,qt,xs="Environment:",In,Gt,Ms=`<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>`,Hn,Yt,Ls=`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>.`,ka,K,Oe,jn,Xt,Es='A <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that handles the default flow of the training loop for logs, evaluation and checkpoints.',wa,ee,Ve,An,Zt,Is='A bare <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that just prints the logs.',ya,te,qe,Sn,Qt,Hs=`A <a href="/docs/transformers/main/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.`,xa,R,Ge,zn,Kt,js='A <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that handles early stopping.',Nn,er,As=`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/main/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.`,Ma,re,Ye,Dn,tr,Ss='A <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://www.tensorflow.org/tensorboard" rel="nofollow">TensorBoard</a>.',La,O,Xe,Un,rr,zs='A <a href="/docs/transformers/main/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>.',Jn,S,Ze,Pn,ar,Ns="Setup the optional Weights &amp; Biases (<em>wandb</em>) integration.",Wn,nr,Ds=`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:`,Fn,or,Us="Environment:",Bn,V,Qe,sr,Js=`<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.`,Rn,le,On,lr,Ps=`<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>`,Vn,ir,Ws=`<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>`,qn,cr,Fs=`<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>`,Ea,q,Ke,Gn,mr,Bs=`A <a href="/docs/transformers/main/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>.`,Yn,J,et,Xn,dr,Rs="Setup the optional MLflow integration.",Zn,pr,Os="Environment:",Qn,gr,Vs=`<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 useful 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>`,Ia,ae,tt,Kn,fr,qs='A <a href="/docs/transformers/main/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>.',Ha,ne,rt,eo,hr,Gs='A <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that tracks the CO2 emission of training.',ja,G,at,to,ur,Ys='TrainerCallback that sends the logs to <a href="https://app.neptune.ai" rel="nofollow">Neptune</a>.',ro,br,Xs=`For instructions and examples, see the <a href="https://docs.neptune.ai/integrations/transformers" rel="nofollow">Transformers integration
guide</a> in the Neptune documentation.`,Aa,N,nt,ao,vr,Zs='A <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that sends the logs to <a href="https://clear.ml/" rel="nofollow">ClearML</a>.',no,_r,Qs="Environment:",oo,Tr,Ks=`<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>`,Sa,Y,ot,so,$r,el='A <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that logs to <a href="https://dagshub.com/" rel="nofollow">DagsHub</a>. Extends <code>MLflowCallback</code>',lo,P,st,io,Cr,tl="Setup the DagsHub’s Logging integration.",co,kr,rl="Environment:",mo,wr,al=`<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>`,za,X,lt,po,yr,nl=`A <a href="/docs/transformers/main/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.`,go,ie,Na,D,it,fo,xr,ol='A <a href="/docs/transformers/main/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>.',ho,Mr,sl=`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>.`,uo,W,ct,bo,Lr,ll=`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>.`,vo,Er,il="Environment:",_o,Ir,cl=`<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>`,Da,Z,mt,To,Hr,ml='A <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> that logs metrics, media, model checkpoints to <a href="https://swanlab.cn/" rel="nofollow">SwanLab</a>.',$o,j,dt,Co,jr,dl="Setup the optional SwanLab (<em>swanlab</em>) integration.",ko,Ar,pl=`One can subclass and override this method to customize the setup if needed. Find more information
<a href="https://docs.swanlab.cn/guide_cloud/integration/integration-huggingface-transformers.html" rel="nofollow">here</a>.`,wo,Sr,gl=`You can also override the following environment variables. Find more information about environment
variables <a href="https://docs.swanlab.cn/en/api/environment-variable.html#environment-variables" rel="nofollow">here</a>`,yo,zr,fl="Environment:",xo,Nr,hl=`<li><p><strong>SWANLAB_API_KEY</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>):
Cloud API Key. During login, this environment variable is checked first. If it doesn’t exist, the system
checks if the user is already logged in. If not, the login process is initiated.</p> <ul><li>If a string is passed to the login interface, this environment variable is ignored.</li> <li>If the user is already logged in, this environment variable takes precedence over locally stored
login information.</li></ul></li> <li><p><strong>SWANLAB_PROJECT</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>):
Set this to a custom string to store results in a different project. If not specified, the name of the current
running directory is used.</p></li> <li><p><strong>SWANLAB_LOG_DIR</strong> (<code>str</code>, <em>optional</em>, defaults to <code>swanlog</code>):
This environment variable specifies the storage path for log files when running in local mode.
By default, logs are saved in a folder named swanlog under the working directory.</p></li> <li><p><strong>SWANLAB_MODE</strong> (<code>Literal[&quot;local&quot;, &quot;cloud&quot;, &quot;disabled&quot;]</code>, <em>optional</em>, defaults to <code>cloud</code>):
SwanLab’s parsing mode, which involves callbacks registered by the operator. Currently, there are three modes:
local, cloud, and disabled. Note: Case-sensitive. Find more information
<a href="https://docs.swanlab.cn/en/api/py-init.html#swanlab-init" rel="nofollow">here</a></p></li> <li><p><strong>SWANLAB_LOG_MODEL</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>):
SwanLab does not currently support the save mode functionality.This feature will be available in a future
release</p></li> <li><p><strong>SWANLAB_WEB_HOST</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>):
Web address for the SwanLab cloud environment for private version (its free)</p></li> <li><p><strong>SWANLAB_API_HOST</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>):
API address for the SwanLab cloud environment for private version (its free)</p></li>`,Ua,pt,Ja,T,gt,Mo,Dr,ul=`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:`,Lo,Ur,bl=`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,Jr,vl=`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/main/zh/main_classes/callback#transformers.PrinterCallback">PrinterCallback</a>.`,Io,ce,Ho,me,ft,jo,Pr,_l="Event called at the beginning of an epoch.",Ao,de,ht,So,Wr,Tl="Event called at the end of an epoch.",zo,pe,ut,No,Fr,$l="Event called after an evaluation phase.",Do,ge,bt,Uo,Br,Cl="Event called at the end of the initialization of the <code>Trainer</code>.",Jo,fe,vt,Po,Rr,kl="Event called after logging the last logs.",Wo,he,_t,Fo,Or,wl="Event called after the optimizer step but before gradients are zeroed out. Useful for monitoring gradients.",Bo,ue,Tt,Ro,Vr,yl="Event called before the optimizer step but after gradient clipping. Useful for monitoring gradients.",Oo,be,$t,Vo,qr,xl="Event called after a successful prediction.",qo,ve,Ct,Go,Gr,Ml="Event called after a prediction step.",Yo,_e,kt,Xo,Yr,Ll="Event called after a checkpoint save.",Zo,Te,wt,Qo,Xr,El=`Event called at the beginning of a training step. If using gradient accumulation, one training step might take
several inputs.`,Ko,$e,yt,es,Zr,Il=`Event called at the end of a training step. If using gradient accumulation, one training step might take
several inputs.`,ts,Ce,xt,rs,Qr,Hl="Event called at the end of an substep during gradient accumulation.",as,ke,Mt,ns,Kr,jl="Event called at the beginning of training.",os,we,Lt,ss,ea,Al="Event called at the end of training.",Pa,Et,Sl="以下是如何使用PyTorch注册自定义callback的示例：",Wa,It,zl="<code>Trainer</code>:",Fa,Ht,Ba,jt,Nl="注册callback的另一种方式是调用 <code>trainer.add_callback()</code>，如下所示：",Ra,At,Oa,St,Va,I,zt,ls,ta,Dl=`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/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a>.`,is,ye,cs,xe,Nt,ms,ra,Ul=`Calculates and stores the absolute value for logging,
eval, and save steps based on if it was a proportion
or not.`,ds,Me,Dt,ps,aa,Jl="Stores the initial training references needed in <code>self</code>",gs,Le,Ut,fs,na,Pl="Create an instance from the content of <code>json_path</code>.",hs,Ee,Jt,us,oa,Wl="Save the content of this instance in JSON format inside <code>json_path</code>.",qa,Pt,Ga,oe,Wt,bs,sa,Fl=`A class that handles the <code>Trainer</code> control flow. This class is used by the <a href="/docs/transformers/main/zh/main_classes/callback#transformers.TrainerCallback">TrainerCallback</a> to activate some
switches in the training loop.`,Ya,Ft,Xa,fa,Za;return y=new ha({props:{title:"Callbacks",local:"callbacks",headingTag:"h1"}}),We=new ha({props:{title:"可用的Callbacks",local:"transformers.integrations.CometCallback",headingTag:"h2"}}),Be=new $({props:{name:"class transformers.integrations.CometCallback",anchor:"transformers.integrations.CometCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L1025"}}),Re=new $({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/main/src/transformers/integrations/integration_utils.py#L1039"}}),Oe=new $({props:{name:"class transformers.DefaultFlowCallback",anchor:"transformers.DefaultFlowCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py#L574"}}),Ve=new $({props:{name:"class transformers.PrinterCallback",anchor:"transformers.PrinterCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py#L701"}}),qe=new $({props:{name:"class transformers.ProgressCallback",anchor:"transformers.ProgressCallback",parameters:[{name:"max_str_len",val:": int = 100"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py#L627"}}),Ge=new $({props:{name:"class transformers.EarlyStoppingCallback",anchor:"transformers.EarlyStoppingCallback",parameters:[{name:"early_stopping_patience",val:": int = 1"},{name:"early_stopping_threshold",val:": typing.Optional[float] = 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/main/src/transformers/trainer_callback.py#L712"}}),Ye=new $({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/main/src/transformers/integrations/integration_utils.py#L646"}}),Xe=new $({props:{name:"class transformers.integrations.WandbCallback",anchor:"transformers.integrations.WandbCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L779"}}),Ze=new $({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/main/src/transformers/integrations/integration_utils.py#L795"}}),le=new li({props:{version:"5.0",$$slots:{default:[ii]},$$scope:{ctx:E}}}),Ke=new $({props:{name:"class transformers.integrations.MLflowCallback",anchor:"transformers.integrations.MLflowCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L1192"}}),et=new $({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/main/src/transformers/integrations/integration_utils.py#L1211"}}),tt=new $({props:{name:"class transformers.integrations.AzureMLCallback",anchor:"transformers.integrations.AzureMLCallback",parameters:[{name:"azureml_run",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L1169"}}),rt=new $({props:{name:"class transformers.integrations.CodeCarbonCallback",anchor:"transformers.integrations.CodeCarbonCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L1703"}}),at=new $({props:{name:"class transformers.integrations.NeptuneCallback",anchor:"transformers.integrations.NeptuneCallback",parameters:[{name:"api_token",val:": typing.Optional[str] = None"},{name:"project",val:": typing.Optional[str] = None"},{name:"name",val:": typing.Optional[str] = None"},{name:"base_namespace",val:": str = 'finetuning'"},{name:"run",val:" = None"},{name:"log_parameters",val:": bool = True"},{name:"log_checkpoints",val:": typing.Optional[str] = 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/main/src/transformers/integrations/integration_utils.py#L1430"}}),nt=new $({props:{name:"class transformers.integrations.ClearMLCallback",anchor:"transformers.integrations.ClearMLCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L1737"}}),ot=new $({props:{name:"class transformers.integrations.DagsHubCallback",anchor:"transformers.integrations.DagsHubCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L1370"}}),st=new $({props:{name:"setup",anchor:"transformers.integrations.DagsHubCallback.setup",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L1384"}}),lt=new $({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/main/src/transformers/integrations/integration_utils.py#L1990"}}),ie=new Ol({props:{anchor:"transformers.integrations.FlyteCallback.example",$$slots:{default:[ci]},$$scope:{ctx:E}}}),it=new $({props:{name:"class transformers.integrations.DVCLiveCallback",anchor:"transformers.integrations.DVCLiveCallback",parameters:[{name:"live",val:": typing.Optional[typing.Any] = None"},{name:"log_model",val:": typing.Union[typing.Literal['all'], bool, NoneType] = 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/main/src/transformers/integrations/integration_utils.py#L2053"}}),ct=new $({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/main/src/transformers/integrations/integration_utils.py#L2094"}}),mt=new $({props:{name:"class transformers.integrations.SwanLabCallback",anchor:"transformers.integrations.SwanLabCallback",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L2158"}}),dt=new $({props:{name:"setup",anchor:"transformers.integrations.SwanLabCallback.setup",parameters:[{name:"args",val:""},{name:"state",val:""},{name:"model",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/integration_utils.py#L2172"}}),pt=new ha({props:{title:"TrainerCallback",local:"transformers.TrainerCallback",headingTag:"h2"}}),gt=new $({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/main/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/main/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/main/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/main/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/main/src/transformers/trainer_callback.py#L297"}}),ce=new Ol({props:{anchor:"transformers.TrainerCallback.example",$$slots:{default:[mi]},$$scope:{ctx:E}}}),ft=new $({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/main/src/transformers/trainer_callback.py#L368"}}),ht=new $({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/main/src/transformers/trainer_callback.py#L374"}}),ut=new $({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/main/src/transformers/trainer_callback.py#L412"}}),bt=new $({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/main/src/transformers/trainer_callback.py#L350"}}),vt=new $({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/main/src/transformers/trainer_callback.py#L430"}}),_t=new $({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/main/src/transformers/trainer_callback.py#L393"}}),Tt=new $({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/main/src/transformers/trainer_callback.py#L387"}}),$t=new $({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/main/src/transformers/trainer_callback.py#L418"}}),Ct=new $({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/main/src/transformers/trainer_callback.py#L436"}}),kt=new $({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/main/src/transformers/trainer_callback.py#L424"}}),wt=new $({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/main/src/transformers/trainer_callback.py#L380"}}),yt=new $({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/main/src/transformers/trainer_callback.py#L405"}}),xt=new $({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/main/src/transformers/trainer_callback.py#L399"}}),Mt=new $({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/main/src/transformers/trainer_callback.py#L356"}}),Lt=new $({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/main/src/transformers/trainer_callback.py#L362"}}),Ht=new wn({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}}),At=new wn({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}}),St=new ha({props:{title:"TrainerState",local:"transformers.TrainerState",headingTag:"h2"}}),zt=new $({props:{name:"class transformers.TrainerState",anchor:"transformers.TrainerState",parameters:[{name:"epoch",val:": typing.Optional[float] = 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:": typing.Optional[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:": typing.Optional[float] = None"},{name:"best_global_step",val:": typing.Optional[int] = None"},{name:"best_model_checkpoint",val:": typing.Optional[str] = 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:": typing.Optional[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_global_step",description:`<strong>best_global_step</strong> (<code>int</code>, <em>optional</em>) &#x2014;
When tracking the best model, the step at which the best metric was encountered.
Used for setting <code>best_model_checkpoint</code>.`,name:"best_global_step"},{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.
Relevant callbacks should implement a <code>state</code> and <code>from_state</code> function.`,name:"stateful_callbacks"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py#L35"}}),ye=new Yl({props:{$$slots:{default:[di]},$$scope:{ctx:E}}}),Nt=new $({props:{name:"compute_steps",anchor:"transformers.TrainerState.compute_steps",parameters:[{name:"args",val:""},{name:"max_steps",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py#L157"}}),Dt=new $({props:{name:"init_training_references",anchor:"transformers.TrainerState.init_training_references",parameters:[{name:"trainer",val:""},{name:"max_steps",val:""},{name:"num_train_epochs",val:""},{name:"trial",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py#L170"}}),Ut=new $({props:{name:"load_from_json",anchor:"transformers.TrainerState.load_from_json",parameters:[{name:"json_path",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py#L150"}}),Jt=new $({props:{name:"save_to_json",anchor:"transformers.TrainerState.save_to_json",parameters:[{name:"json_path",val:": str"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_callback.py#L144"}}),Pt=new ha({props:{title:"TrainerControl",local:"transformers.TrainerControl",headingTag:"h2"}}),Wt=new $({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/main/src/transformers/trainer_callback.py#L235"}}),Ft=new ai({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/zh/main_classes/callback.md"}}),{c(){m=n("meta"),M=r(),_=n("p"),w=r(),g(y.$$.fragment),C=r(),x=n("p"),x.textContent=L,H=r(),Ne=n("p"),Ne.innerHTML=vs,ua=r(),De=n("p"),De.innerHTML=_s,ba=r(),Ue=n("ul"),Ue.innerHTML=Ts,va=r(),Je=n("p"),Je.innerHTML=$s,_a=r(),Pe=n("p"),Pe.innerHTML=Cs,Ta=r(),g(We.$$.fragment),$a=r(),Fe=n("p"),Fe.innerHTML=ks,Ca=r(),B=n("div"),g(Be.$$.fragment),xn=r(),Ot=n("p"),Ot.innerHTML=ws,Mn=r(),A=n("div"),g(Re.$$.fragment),Ln=r(),Vt=n("p"),Vt.textContent=ys,En=r(),qt=n("p"),qt.textContent=xs,In=r(),Gt=n("ul"),Gt.innerHTML=Ms,Hn=r(),Yt=n("p"),Yt.innerHTML=Ls,ka=r(),K=n("div"),g(Oe.$$.fragment),jn=r(),Xt=n("p"),Xt.innerHTML=Es,wa=r(),ee=n("div"),g(Ve.$$.fragment),An=r(),Zt=n("p"),Zt.innerHTML=Is,ya=r(),te=n("div"),g(qe.$$.fragment),Sn=r(),Qt=n("p"),Qt.innerHTML=Hs,xa=r(),R=n("div"),g(Ge.$$.fragment),zn=r(),Kt=n("p"),Kt.innerHTML=js,Nn=r(),er=n("p"),er.innerHTML=As,Ma=r(),re=n("div"),g(Ye.$$.fragment),Dn=r(),tr=n("p"),tr.innerHTML=Ss,La=r(),O=n("div"),g(Xe.$$.fragment),Un=r(),rr=n("p"),rr.innerHTML=zs,Jn=r(),S=n("div"),g(Ze.$$.fragment),Pn=r(),ar=n("p"),ar.innerHTML=Ns,Wn=r(),nr=n("p"),nr.innerHTML=Ds,Fn=r(),or=n("p"),or.textContent=Us,Bn=r(),V=n("ul"),Qe=n("li"),sr=n("p"),sr.innerHTML=Js,Rn=r(),g(le.$$.fragment),On=r(),lr=n("li"),lr.innerHTML=Ps,Vn=r(),ir=n("li"),ir.innerHTML=Ws,qn=r(),cr=n("li"),cr.innerHTML=Fs,Ea=r(),q=n("div"),g(Ke.$$.fragment),Gn=r(),mr=n("p"),mr.innerHTML=Bs,Yn=r(),J=n("div"),g(et.$$.fragment),Xn=r(),dr=n("p"),dr.textContent=Rs,Zn=r(),pr=n("p"),pr.textContent=Os,Qn=r(),gr=n("ul"),gr.innerHTML=Vs,Ia=r(),ae=n("div"),g(tt.$$.fragment),Kn=r(),fr=n("p"),fr.innerHTML=qs,Ha=r(),ne=n("div"),g(rt.$$.fragment),eo=r(),hr=n("p"),hr.innerHTML=Gs,ja=r(),G=n("div"),g(at.$$.fragment),to=r(),ur=n("p"),ur.innerHTML=Ys,ro=r(),br=n("p"),br.innerHTML=Xs,Aa=r(),N=n("div"),g(nt.$$.fragment),ao=r(),vr=n("p"),vr.innerHTML=Zs,no=r(),_r=n("p"),_r.textContent=Qs,oo=r(),Tr=n("ul"),Tr.innerHTML=Ks,Sa=r(),Y=n("div"),g(ot.$$.fragment),so=r(),$r=n("p"),$r.innerHTML=el,lo=r(),P=n("div"),g(st.$$.fragment),io=r(),Cr=n("p"),Cr.textContent=tl,co=r(),kr=n("p"),kr.textContent=rl,mo=r(),wr=n("ul"),wr.innerHTML=al,za=r(),X=n("div"),g(lt.$$.fragment),po=r(),yr=n("p"),yr.innerHTML=nl,go=r(),g(ie.$$.fragment),Na=r(),D=n("div"),g(it.$$.fragment),fo=r(),xr=n("p"),xr.innerHTML=ol,ho=r(),Mr=n("p"),Mr.innerHTML=sl,uo=r(),W=n("div"),g(ct.$$.fragment),bo=r(),Lr=n("p"),Lr.innerHTML=ll,vo=r(),Er=n("p"),Er.textContent=il,_o=r(),Ir=n("ul"),Ir.innerHTML=cl,Da=r(),Z=n("div"),g(mt.$$.fragment),To=r(),Hr=n("p"),Hr.innerHTML=ml,$o=r(),j=n("div"),g(dt.$$.fragment),Co=r(),jr=n("p"),jr.innerHTML=dl,ko=r(),Ar=n("p"),Ar.innerHTML=pl,wo=r(),Sr=n("p"),Sr.innerHTML=gl,yo=r(),zr=n("p"),zr.textContent=fl,xo=r(),Nr=n("ul"),Nr.innerHTML=hl,Ua=r(),g(pt.$$.fragment),Ja=r(),T=n("div"),g(gt.$$.fragment),Mo=r(),Dr=n("p"),Dr.textContent=ul,Lo=r(),Ur=n("p"),Ur.innerHTML=bl,Eo=r(),Jr=n("p"),Jr.innerHTML=vl,Io=r(),g(ce.$$.fragment),Ho=r(),me=n("div"),g(ft.$$.fragment),jo=r(),Pr=n("p"),Pr.textContent=_l,Ao=r(),de=n("div"),g(ht.$$.fragment),So=r(),Wr=n("p"),Wr.textContent=Tl,zo=r(),pe=n("div"),g(ut.$$.fragment),No=r(),Fr=n("p"),Fr.textContent=$l,Do=r(),ge=n("div"),g(bt.$$.fragment),Uo=r(),Br=n("p"),Br.innerHTML=Cl,Jo=r(),fe=n("div"),g(vt.$$.fragment),Po=r(),Rr=n("p"),Rr.textContent=kl,Wo=r(),he=n("div"),g(_t.$$.fragment),Fo=r(),Or=n("p"),Or.textContent=wl,Bo=r(),ue=n("div"),g(Tt.$$.fragment),Ro=r(),Vr=n("p"),Vr.textContent=yl,Oo=r(),be=n("div"),g($t.$$.fragment),Vo=r(),qr=n("p"),qr.textContent=xl,qo=r(),ve=n("div"),g(Ct.$$.fragment),Go=r(),Gr=n("p"),Gr.textContent=Ml,Yo=r(),_e=n("div"),g(kt.$$.fragment),Xo=r(),Yr=n("p"),Yr.textContent=Ll,Zo=r(),Te=n("div"),g(wt.$$.fragment),Qo=r(),Xr=n("p"),Xr.textContent=El,Ko=r(),$e=n("div"),g(yt.$$.fragment),es=r(),Zr=n("p"),Zr.textContent=Il,ts=r(),Ce=n("div"),g(xt.$$.fragment),rs=r(),Qr=n("p"),Qr.textContent=Hl,as=r(),ke=n("div"),g(Mt.$$.fragment),ns=r(),Kr=n("p"),Kr.textContent=jl,os=r(),we=n("div"),g(Lt.$$.fragment),ss=r(),ea=n("p"),ea.textContent=Al,Pa=r(),Et=n("p"),Et.textContent=Sl,Wa=r(),It=n("p"),It.innerHTML=zl,Fa=r(),g(Ht.$$.fragment),Ba=r(),jt=n("p"),jt.innerHTML=Nl,Ra=r(),g(At.$$.fragment),Oa=r(),g(St.$$.fragment),Va=r(),I=n("div"),g(zt.$$.fragment),ls=r(),ta=n("p"),ta.innerHTML=Dl,is=r(),g(ye.$$.fragment),cs=r(),xe=n("div"),g(Nt.$$.fragment),ms=r(),ra=n("p"),ra.textContent=Ul,ds=r(),Me=n("div"),g(Dt.$$.fragment),ps=r(),aa=n("p"),aa.innerHTML=Jl,gs=r(),Le=n("div"),g(Ut.$$.fragment),fs=r(),na=n("p"),na.innerHTML=Pl,hs=r(),Ee=n("div"),g(Jt.$$.fragment),us=r(),oa=n("p"),oa.innerHTML=Wl,qa=r(),g(Pt.$$.fragment),Ga=r(),oe=n("div"),g(Wt.$$.fragment),bs=r(),sa=n("p"),sa.innerHTML=Fl,Ya=r(),g(Ft.$$.fragment),Xa=r(),fa=n("p"),this.h()},l(e){const l=ri("svelte-u9bgzb",document.head);m=o(l,"META",{name:!0,content:!0}),l.forEach(s),M=a(e),_=o(e,"P",{}),b(_).forEach(s),w=a(e),f(y.$$.fragment,e),C=a(e),x=o(e,"P",{"data-svelte-h":!0}),i(x)!=="svelte-ixc7mw"&&(x.textContent=L),H=a(e),Ne=o(e,"P",{"data-svelte-h":!0}),i(Ne)!=="svelte-1o90q5b"&&(Ne.innerHTML=vs),ua=a(e),De=o(e,"P",{"data-svelte-h":!0}),i(De)!=="svelte-w2h063"&&(De.innerHTML=_s),ba=a(e),Ue=o(e,"UL",{"data-svelte-h":!0}),i(Ue)!=="svelte-29ywe2"&&(Ue.innerHTML=Ts),va=a(e),Je=o(e,"P",{"data-svelte-h":!0}),i(Je)!=="svelte-cfm0j7"&&(Je.innerHTML=$s),_a=a(e),Pe=o(e,"P",{"data-svelte-h":!0}),i(Pe)!=="svelte-16d2yxx"&&(Pe.innerHTML=Cs),Ta=a(e),f(We.$$.fragment,e),$a=a(e),Fe=o(e,"P",{"data-svelte-h":!0}),i(Fe)!=="svelte-1qkta70"&&(Fe.innerHTML=ks),Ca=a(e),B=o(e,"DIV",{class:!0});var se=b(B);f(Be.$$.fragment,se),xn=a(se),Ot=o(se,"P",{"data-svelte-h":!0}),i(Ot)!=="svelte-1om7vn7"&&(Ot.innerHTML=ws),Mn=a(se),A=o(se,"DIV",{class:!0});var U=b(A);f(Re.$$.fragment,U),Ln=a(U),Vt=o(U,"P",{"data-svelte-h":!0}),i(Vt)!=="svelte-frc23a"&&(Vt.textContent=ys),En=a(U),qt=o(U,"P",{"data-svelte-h":!0}),i(qt)!=="svelte-1fkshtn"&&(qt.textContent=xs),In=a(U),Gt=o(U,"UL",{"data-svelte-h":!0}),i(Gt)!=="svelte-rt862w"&&(Gt.innerHTML=Ms),Hn=a(U),Yt=o(U,"P",{"data-svelte-h":!0}),i(Yt)!=="svelte-1baxs6u"&&(Yt.innerHTML=Ls),U.forEach(s),se.forEach(s),ka=a(e),K=o(e,"DIV",{class:!0});var Bt=b(K);f(Oe.$$.fragment,Bt),jn=a(Bt),Xt=o(Bt,"P",{"data-svelte-h":!0}),i(Xt)!=="svelte-gp0ssq"&&(Xt.innerHTML=Es),Bt.forEach(s),wa=a(e),ee=o(e,"DIV",{class:!0});var Rt=b(ee);f(Ve.$$.fragment,Rt),An=a(Rt),Zt=o(Rt,"P",{"data-svelte-h":!0}),i(Zt)!=="svelte-uq878j"&&(Zt.innerHTML=Is),Rt.forEach(s),ya=a(e),te=o(e,"DIV",{class:!0});var Qa=b(te);f(qe.$$.fragment,Qa),Sn=a(Qa),Qt=o(Qa,"P",{"data-svelte-h":!0}),i(Qt)!=="svelte-1jy6nd"&&(Qt.innerHTML=Hs),Qa.forEach(s),xa=a(e),R=o(e,"DIV",{class:!0});var la=b(R);f(Ge.$$.fragment,la),zn=a(la),Kt=o(la,"P",{"data-svelte-h":!0}),i(Kt)!=="svelte-bqp5vv"&&(Kt.innerHTML=js),Nn=a(la),er=o(la,"P",{"data-svelte-h":!0}),i(er)!=="svelte-13ureob"&&(er.innerHTML=As),la.forEach(s),Ma=a(e),re=o(e,"DIV",{class:!0});var Ka=b(re);f(Ye.$$.fragment,Ka),Dn=a(Ka),tr=o(Ka,"P",{"data-svelte-h":!0}),i(tr)!=="svelte-wkcw14"&&(tr.innerHTML=Ss),Ka.forEach(s),La=a(e),O=o(e,"DIV",{class:!0});var ia=b(O);f(Xe.$$.fragment,ia),Un=a(ia),rr=o(ia,"P",{"data-svelte-h":!0}),i(rr)!=="svelte-vfsdjb"&&(rr.innerHTML=zs),Jn=a(ia),S=o(ia,"DIV",{class:!0});var Q=b(S);f(Ze.$$.fragment,Q),Pn=a(Q),ar=o(Q,"P",{"data-svelte-h":!0}),i(ar)!=="svelte-op70zs"&&(ar.innerHTML=Ns),Wn=a(Q),nr=o(Q,"P",{"data-svelte-h":!0}),i(nr)!=="svelte-m2rt7w"&&(nr.innerHTML=Ds),Fn=a(Q),or=o(Q,"P",{"data-svelte-h":!0}),i(or)!=="svelte-1fkshtn"&&(or.textContent=Us),Bn=a(Q),V=o(Q,"UL",{});var Ie=b(V);Qe=o(Ie,"LI",{});var en=b(Qe);sr=o(en,"P",{"data-svelte-h":!0}),i(sr)!=="svelte-py3r3s"&&(sr.innerHTML=Js),Rn=a(en),f(le.$$.fragment,en),en.forEach(s),On=a(Ie),lr=o(Ie,"LI",{"data-svelte-h":!0}),i(lr)!=="svelte-dx3m30"&&(lr.innerHTML=Ps),Vn=a(Ie),ir=o(Ie,"LI",{"data-svelte-h":!0}),i(ir)!=="svelte-n1uh6c"&&(ir.innerHTML=Ws),qn=a(Ie),cr=o(Ie,"LI",{"data-svelte-h":!0}),i(cr)!=="svelte-ybo66z"&&(cr.innerHTML=Fs),Ie.forEach(s),Q.forEach(s),ia.forEach(s),Ea=a(e),q=o(e,"DIV",{class:!0});var ca=b(q);f(Ke.$$.fragment,ca),Gn=a(ca),mr=o(ca,"P",{"data-svelte-h":!0}),i(mr)!=="svelte-1g77vdj"&&(mr.innerHTML=Bs),Yn=a(ca),J=o(ca,"DIV",{class:!0});var He=b(J);f(et.$$.fragment,He),Xn=a(He),dr=o(He,"P",{"data-svelte-h":!0}),i(dr)!=="svelte-nmg16f"&&(dr.textContent=Rs),Zn=a(He),pr=o(He,"P",{"data-svelte-h":!0}),i(pr)!=="svelte-1fkshtn"&&(pr.textContent=Os),Qn=a(He),gr=o(He,"UL",{"data-svelte-h":!0}),i(gr)!=="svelte-njz5oe"&&(gr.innerHTML=Vs),He.forEach(s),ca.forEach(s),Ia=a(e),ae=o(e,"DIV",{class:!0});var tn=b(ae);f(tt.$$.fragment,tn),Kn=a(tn),fr=o(tn,"P",{"data-svelte-h":!0}),i(fr)!=="svelte-8m42bk"&&(fr.innerHTML=qs),tn.forEach(s),Ha=a(e),ne=o(e,"DIV",{class:!0});var rn=b(ne);f(rt.$$.fragment,rn),eo=a(rn),hr=o(rn,"P",{"data-svelte-h":!0}),i(hr)!=="svelte-xfsfl8"&&(hr.innerHTML=Gs),rn.forEach(s),ja=a(e),G=o(e,"DIV",{class:!0});var ma=b(G);f(at.$$.fragment,ma),to=a(ma),ur=o(ma,"P",{"data-svelte-h":!0}),i(ur)!=="svelte-4ag9j6"&&(ur.innerHTML=Ys),ro=a(ma),br=o(ma,"P",{"data-svelte-h":!0}),i(br)!=="svelte-1mhjcx0"&&(br.innerHTML=Xs),ma.forEach(s),Aa=a(e),N=o(e,"DIV",{class:!0});var je=b(N);f(nt.$$.fragment,je),ao=a(je),vr=o(je,"P",{"data-svelte-h":!0}),i(vr)!=="svelte-1pjr4jm"&&(vr.innerHTML=Zs),no=a(je),_r=o(je,"P",{"data-svelte-h":!0}),i(_r)!=="svelte-1fkshtn"&&(_r.textContent=Qs),oo=a(je),Tr=o(je,"UL",{"data-svelte-h":!0}),i(Tr)!=="svelte-15svthu"&&(Tr.innerHTML=Ks),je.forEach(s),Sa=a(e),Y=o(e,"DIV",{class:!0});var da=b(Y);f(ot.$$.fragment,da),so=a(da),$r=o(da,"P",{"data-svelte-h":!0}),i($r)!=="svelte-1guxmsr"&&($r.innerHTML=el),lo=a(da),P=o(da,"DIV",{class:!0});var Ae=b(P);f(st.$$.fragment,Ae),io=a(Ae),Cr=o(Ae,"P",{"data-svelte-h":!0}),i(Cr)!=="svelte-1wbmj3"&&(Cr.textContent=tl),co=a(Ae),kr=o(Ae,"P",{"data-svelte-h":!0}),i(kr)!=="svelte-1fkshtn"&&(kr.textContent=rl),mo=a(Ae),wr=o(Ae,"UL",{"data-svelte-h":!0}),i(wr)!=="svelte-dna85o"&&(wr.innerHTML=al),Ae.forEach(s),da.forEach(s),za=a(e),X=o(e,"DIV",{class:!0});var pa=b(X);f(lt.$$.fragment,pa),po=a(pa),yr=o(pa,"P",{"data-svelte-h":!0}),i(yr)!=="svelte-1ee0i6s"&&(yr.innerHTML=nl),go=a(pa),f(ie.$$.fragment,pa),pa.forEach(s),Na=a(e),D=o(e,"DIV",{class:!0});var Se=b(D);f(it.$$.fragment,Se),fo=a(Se),xr=o(Se,"P",{"data-svelte-h":!0}),i(xr)!=="svelte-1nahj0d"&&(xr.innerHTML=ol),ho=a(Se),Mr=o(Se,"P",{"data-svelte-h":!0}),i(Mr)!=="svelte-eu3kj7"&&(Mr.innerHTML=sl),uo=a(Se),W=o(Se,"DIV",{class:!0});var ze=b(W);f(ct.$$.fragment,ze),bo=a(ze),Lr=o(ze,"P",{"data-svelte-h":!0}),i(Lr)!=="svelte-jjkenj"&&(Lr.innerHTML=ll),vo=a(ze),Er=o(ze,"P",{"data-svelte-h":!0}),i(Er)!=="svelte-1fkshtn"&&(Er.textContent=il),_o=a(ze),Ir=o(ze,"UL",{"data-svelte-h":!0}),i(Ir)!=="svelte-crnavn"&&(Ir.innerHTML=cl),ze.forEach(s),Se.forEach(s),Da=a(e),Z=o(e,"DIV",{class:!0});var ga=b(Z);f(mt.$$.fragment,ga),To=a(ga),Hr=o(ga,"P",{"data-svelte-h":!0}),i(Hr)!=="svelte-1ofn6su"&&(Hr.innerHTML=ml),$o=a(ga),j=o(ga,"DIV",{class:!0});var F=b(j);f(dt.$$.fragment,F),Co=a(F),jr=o(F,"P",{"data-svelte-h":!0}),i(jr)!=="svelte-1pnk5m4"&&(jr.innerHTML=dl),ko=a(F),Ar=o(F,"P",{"data-svelte-h":!0}),i(Ar)!=="svelte-s781co"&&(Ar.innerHTML=pl),wo=a(F),Sr=o(F,"P",{"data-svelte-h":!0}),i(Sr)!=="svelte-g9rl62"&&(Sr.innerHTML=gl),yo=a(F),zr=o(F,"P",{"data-svelte-h":!0}),i(zr)!=="svelte-1fkshtn"&&(zr.textContent=fl),xo=a(F),Nr=o(F,"UL",{"data-svelte-h":!0}),i(Nr)!=="svelte-jaaggq"&&(Nr.innerHTML=hl),F.forEach(s),ga.forEach(s),Ua=a(e),f(pt.$$.fragment,e),Ja=a(e),T=o(e,"DIV",{class:!0});var k=b(T);f(gt.$$.fragment,k),Mo=a(k),Dr=o(k,"P",{"data-svelte-h":!0}),i(Dr)!=="svelte-14xg00o"&&(Dr.textContent=ul),Lo=a(k),Ur=o(k,"P",{"data-svelte-h":!0}),i(Ur)!=="svelte-1xprdvt"&&(Ur.innerHTML=bl),Eo=a(k),Jr=o(k,"P",{"data-svelte-h":!0}),i(Jr)!=="svelte-wuj1xo"&&(Jr.innerHTML=vl),Io=a(k),f(ce.$$.fragment,k),Ho=a(k),me=o(k,"DIV",{class:!0});var an=b(me);f(ft.$$.fragment,an),jo=a(an),Pr=o(an,"P",{"data-svelte-h":!0}),i(Pr)!=="svelte-106889p"&&(Pr.textContent=_l),an.forEach(s),Ao=a(k),de=o(k,"DIV",{class:!0});var nn=b(de);f(ht.$$.fragment,nn),So=a(nn),Wr=o(nn,"P",{"data-svelte-h":!0}),i(Wr)!=="svelte-oshcpj"&&(Wr.textContent=Tl),nn.forEach(s),zo=a(k),pe=o(k,"DIV",{class:!0});var on=b(pe);f(ut.$$.fragment,on),No=a(on),Fr=o(on,"P",{"data-svelte-h":!0}),i(Fr)!=="svelte-1o0xh73"&&(Fr.textContent=$l),on.forEach(s),Do=a(k),ge=o(k,"DIV",{class:!0});var sn=b(ge);f(bt.$$.fragment,sn),Uo=a(sn),Br=o(sn,"P",{"data-svelte-h":!0}),i(Br)!=="svelte-hzqkde"&&(Br.innerHTML=Cl),sn.forEach(s),Jo=a(k),fe=o(k,"DIV",{class:!0});var ln=b(fe);f(vt.$$.fragment,ln),Po=a(ln),Rr=o(ln,"P",{"data-svelte-h":!0}),i(Rr)!=="svelte-10eiwg0"&&(Rr.textContent=kl),ln.forEach(s),Wo=a(k),he=o(k,"DIV",{class:!0});var cn=b(he);f(_t.$$.fragment,cn),Fo=a(cn),Or=o(cn,"P",{"data-svelte-h":!0}),i(Or)!=="svelte-1mpbj2z"&&(Or.textContent=wl),cn.forEach(s),Bo=a(k),ue=o(k,"DIV",{class:!0});var mn=b(ue);f(Tt.$$.fragment,mn),Ro=a(mn),Vr=o(mn,"P",{"data-svelte-h":!0}),i(Vr)!=="svelte-qj3qgf"&&(Vr.textContent=yl),mn.forEach(s),Oo=a(k),be=o(k,"DIV",{class:!0});var dn=b(be);f($t.$$.fragment,dn),Vo=a(dn),qr=o(dn,"P",{"data-svelte-h":!0}),i(qr)!=="svelte-1df7x4n"&&(qr.textContent=xl),dn.forEach(s),qo=a(k),ve=o(k,"DIV",{class:!0});var pn=b(ve);f(Ct.$$.fragment,pn),Go=a(pn),Gr=o(pn,"P",{"data-svelte-h":!0}),i(Gr)!=="svelte-18swygp"&&(Gr.textContent=Ml),pn.forEach(s),Yo=a(k),_e=o(k,"DIV",{class:!0});var gn=b(_e);f(kt.$$.fragment,gn),Xo=a(gn),Yr=o(gn,"P",{"data-svelte-h":!0}),i(Yr)!=="svelte-19xp05v"&&(Yr.textContent=Ll),gn.forEach(s),Zo=a(k),Te=o(k,"DIV",{class:!0});var fn=b(Te);f(wt.$$.fragment,fn),Qo=a(fn),Xr=o(fn,"P",{"data-svelte-h":!0}),i(Xr)!=="svelte-7af61p"&&(Xr.textContent=El),fn.forEach(s),Ko=a(k),$e=o(k,"DIV",{class:!0});var hn=b($e);f(yt.$$.fragment,hn),es=a(hn),Zr=o(hn,"P",{"data-svelte-h":!0}),i(Zr)!=="svelte-8cdxjr"&&(Zr.textContent=Il),hn.forEach(s),ts=a(k),Ce=o(k,"DIV",{class:!0});var un=b(Ce);f(xt.$$.fragment,un),rs=a(un),Qr=o(un,"P",{"data-svelte-h":!0}),i(Qr)!=="svelte-sluvs0"&&(Qr.textContent=Hl),un.forEach(s),as=a(k),ke=o(k,"DIV",{class:!0});var bn=b(ke);f(Mt.$$.fragment,bn),ns=a(bn),Kr=o(bn,"P",{"data-svelte-h":!0}),i(Kr)!=="svelte-6bvy6d"&&(Kr.textContent=jl),bn.forEach(s),os=a(k),we=o(k,"DIV",{class:!0});var vn=b(we);f(Lt.$$.fragment,vn),ss=a(vn),ea=o(vn,"P",{"data-svelte-h":!0}),i(ea)!=="svelte-zzwxsv"&&(ea.textContent=Al),vn.forEach(s),k.forEach(s),Pa=a(e),Et=o(e,"P",{"data-svelte-h":!0}),i(Et)!=="svelte-87dqmt"&&(Et.textContent=Sl),Wa=a(e),It=o(e,"P",{"data-svelte-h":!0}),i(It)!=="svelte-17720zy"&&(It.innerHTML=zl),Fa=a(e),f(Ht.$$.fragment,e),Ba=a(e),jt=o(e,"P",{"data-svelte-h":!0}),i(jt)!=="svelte-u9gp17"&&(jt.innerHTML=Nl),Ra=a(e),f(At.$$.fragment,e),Oa=a(e),f(St.$$.fragment,e),Va=a(e),I=o(e,"DIV",{class:!0});var z=b(I);f(zt.$$.fragment,z),ls=a(z),ta=o(z,"P",{"data-svelte-h":!0}),i(ta)!=="svelte-1ecfz3"&&(ta.innerHTML=Dl),is=a(z),f(ye.$$.fragment,z),cs=a(z),xe=o(z,"DIV",{class:!0});var _n=b(xe);f(Nt.$$.fragment,_n),ms=a(_n),ra=o(_n,"P",{"data-svelte-h":!0}),i(ra)!=="svelte-754oj0"&&(ra.textContent=Ul),_n.forEach(s),ds=a(z),Me=o(z,"DIV",{class:!0});var Tn=b(Me);f(Dt.$$.fragment,Tn),ps=a(Tn),aa=o(Tn,"P",{"data-svelte-h":!0}),i(aa)!=="svelte-1mzjlie"&&(aa.innerHTML=Jl),Tn.forEach(s),gs=a(z),Le=o(z,"DIV",{class:!0});var $n=b(Le);f(Ut.$$.fragment,$n),fs=a($n),na=o($n,"P",{"data-svelte-h":!0}),i(na)!=="svelte-hbs6ga"&&(na.innerHTML=Pl),$n.forEach(s),hs=a(z),Ee=o(z,"DIV",{class:!0});var Cn=b(Ee);f(Jt.$$.fragment,Cn),us=a(Cn),oa=o(Cn,"P",{"data-svelte-h":!0}),i(oa)!=="svelte-dkslae"&&(oa.innerHTML=Wl),Cn.forEach(s),z.forEach(s),qa=a(e),f(Pt.$$.fragment,e),Ga=a(e),oe=o(e,"DIV",{class:!0});var kn=b(oe);f(Wt.$$.fragment,kn),bs=a(kn),sa=o(kn,"P",{"data-svelte-h":!0}),i(sa)!=="svelte-1o6cnzn"&&(sa.innerHTML=Fl),kn.forEach(s),Ya=a(e),f(Ft.$$.fragment,e),Xa=a(e),fa=o(e,"P",{}),b(fa).forEach(s),this.h()},h(){v(m,"name","hf:doc:metadata"),v(m,"content",gi),v(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(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(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(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($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(oe,"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,m),c(e,M,l),c(e,_,l),c(e,w,l),h(y,e,l),c(e,C,l),c(e,x,l),c(e,H,l),c(e,Ne,l),c(e,ua,l),c(e,De,l),c(e,ba,l),c(e,Ue,l),c(e,va,l),c(e,Je,l),c(e,_a,l),c(e,Pe,l),c(e,Ta,l),h(We,e,l),c(e,$a,l),c(e,Fe,l),c(e,Ca,l),c(e,B,l),h(Be,B,null),t(B,xn),t(B,Ot),t(B,Mn),t(B,A),h(Re,A,null),t(A,Ln),t(A,Vt),t(A,En),t(A,qt),t(A,In),t(A,Gt),t(A,Hn),t(A,Yt),c(e,ka,l),c(e,K,l),h(Oe,K,null),t(K,jn),t(K,Xt),c(e,wa,l),c(e,ee,l),h(Ve,ee,null),t(ee,An),t(ee,Zt),c(e,ya,l),c(e,te,l),h(qe,te,null),t(te,Sn),t(te,Qt),c(e,xa,l),c(e,R,l),h(Ge,R,null),t(R,zn),t(R,Kt),t(R,Nn),t(R,er),c(e,Ma,l),c(e,re,l),h(Ye,re,null),t(re,Dn),t(re,tr),c(e,La,l),c(e,O,l),h(Xe,O,null),t(O,Un),t(O,rr),t(O,Jn),t(O,S),h(Ze,S,null),t(S,Pn),t(S,ar),t(S,Wn),t(S,nr),t(S,Fn),t(S,or),t(S,Bn),t(S,V),t(V,Qe),t(Qe,sr),t(Qe,Rn),h(le,Qe,null),t(V,On),t(V,lr),t(V,Vn),t(V,ir),t(V,qn),t(V,cr),c(e,Ea,l),c(e,q,l),h(Ke,q,null),t(q,Gn),t(q,mr),t(q,Yn),t(q,J),h(et,J,null),t(J,Xn),t(J,dr),t(J,Zn),t(J,pr),t(J,Qn),t(J,gr),c(e,Ia,l),c(e,ae,l),h(tt,ae,null),t(ae,Kn),t(ae,fr),c(e,Ha,l),c(e,ne,l),h(rt,ne,null),t(ne,eo),t(ne,hr),c(e,ja,l),c(e,G,l),h(at,G,null),t(G,to),t(G,ur),t(G,ro),t(G,br),c(e,Aa,l),c(e,N,l),h(nt,N,null),t(N,ao),t(N,vr),t(N,no),t(N,_r),t(N,oo),t(N,Tr),c(e,Sa,l),c(e,Y,l),h(ot,Y,null),t(Y,so),t(Y,$r),t(Y,lo),t(Y,P),h(st,P,null),t(P,io),t(P,Cr),t(P,co),t(P,kr),t(P,mo),t(P,wr),c(e,za,l),c(e,X,l),h(lt,X,null),t(X,po),t(X,yr),t(X,go),h(ie,X,null),c(e,Na,l),c(e,D,l),h(it,D,null),t(D,fo),t(D,xr),t(D,ho),t(D,Mr),t(D,uo),t(D,W),h(ct,W,null),t(W,bo),t(W,Lr),t(W,vo),t(W,Er),t(W,_o),t(W,Ir),c(e,Da,l),c(e,Z,l),h(mt,Z,null),t(Z,To),t(Z,Hr),t(Z,$o),t(Z,j),h(dt,j,null),t(j,Co),t(j,jr),t(j,ko),t(j,Ar),t(j,wo),t(j,Sr),t(j,yo),t(j,zr),t(j,xo),t(j,Nr),c(e,Ua,l),h(pt,e,l),c(e,Ja,l),c(e,T,l),h(gt,T,null),t(T,Mo),t(T,Dr),t(T,Lo),t(T,Ur),t(T,Eo),t(T,Jr),t(T,Io),h(ce,T,null),t(T,Ho),t(T,me),h(ft,me,null),t(me,jo),t(me,Pr),t(T,Ao),t(T,de),h(ht,de,null),t(de,So),t(de,Wr),t(T,zo),t(T,pe),h(ut,pe,null),t(pe,No),t(pe,Fr),t(T,Do),t(T,ge),h(bt,ge,null),t(ge,Uo),t(ge,Br),t(T,Jo),t(T,fe),h(vt,fe,null),t(fe,Po),t(fe,Rr),t(T,Wo),t(T,he),h(_t,he,null),t(he,Fo),t(he,Or),t(T,Bo),t(T,ue),h(Tt,ue,null),t(ue,Ro),t(ue,Vr),t(T,Oo),t(T,be),h($t,be,null),t(be,Vo),t(be,qr),t(T,qo),t(T,ve),h(Ct,ve,null),t(ve,Go),t(ve,Gr),t(T,Yo),t(T,_e),h(kt,_e,null),t(_e,Xo),t(_e,Yr),t(T,Zo),t(T,Te),h(wt,Te,null),t(Te,Qo),t(Te,Xr),t(T,Ko),t(T,$e),h(yt,$e,null),t($e,es),t($e,Zr),t(T,ts),t(T,Ce),h(xt,Ce,null),t(Ce,rs),t(Ce,Qr),t(T,as),t(T,ke),h(Mt,ke,null),t(ke,ns),t(ke,Kr),t(T,os),t(T,we),h(Lt,we,null),t(we,ss),t(we,ea),c(e,Pa,l),c(e,Et,l),c(e,Wa,l),c(e,It,l),c(e,Fa,l),h(Ht,e,l),c(e,Ba,l),c(e,jt,l),c(e,Ra,l),h(At,e,l),c(e,Oa,l),h(St,e,l),c(e,Va,l),c(e,I,l),h(zt,I,null),t(I,ls),t(I,ta),t(I,is),h(ye,I,null),t(I,cs),t(I,xe),h(Nt,xe,null),t(xe,ms),t(xe,ra),t(I,ds),t(I,Me),h(Dt,Me,null),t(Me,ps),t(Me,aa),t(I,gs),t(I,Le),h(Ut,Le,null),t(Le,fs),t(Le,na),t(I,hs),t(I,Ee),h(Jt,Ee,null),t(Ee,us),t(Ee,oa),c(e,qa,l),h(Pt,e,l),c(e,Ga,l),c(e,oe,l),h(Wt,oe,null),t(oe,bs),t(oe,sa),c(e,Ya,l),h(Ft,e,l),c(e,Xa,l),c(e,fa,l),Za=!0},p(e,[l]){const se={};l&2&&(se.$$scope={dirty:l,ctx:e}),le.$set(se);const U={};l&2&&(U.$$scope={dirty:l,ctx:e}),ie.$set(U);const Bt={};l&2&&(Bt.$$scope={dirty:l,ctx:e}),ce.$set(Bt);const Rt={};l&2&&(Rt.$$scope={dirty:l,ctx:e}),ye.$set(Rt)},i(e){Za||(d(y.$$.fragment,e),d(We.$$.fragment,e),d(Be.$$.fragment,e),d(Re.$$.fragment,e),d(Oe.$$.fragment,e),d(Ve.$$.fragment,e),d(qe.$$.fragment,e),d(Ge.$$.fragment,e),d(Ye.$$.fragment,e),d(Xe.$$.fragment,e),d(Ze.$$.fragment,e),d(le.$$.fragment,e),d(Ke.$$.fragment,e),d(et.$$.fragment,e),d(tt.$$.fragment,e),d(rt.$$.fragment,e),d(at.$$.fragment,e),d(nt.$$.fragment,e),d(ot.$$.fragment,e),d(st.$$.fragment,e),d(lt.$$.fragment,e),d(ie.$$.fragment,e),d(it.$$.fragment,e),d(ct.$$.fragment,e),d(mt.$$.fragment,e),d(dt.$$.fragment,e),d(pt.$$.fragment,e),d(gt.$$.fragment,e),d(ce.$$.fragment,e),d(ft.$$.fragment,e),d(ht.$$.fragment,e),d(ut.$$.fragment,e),d(bt.$$.fragment,e),d(vt.$$.fragment,e),d(_t.$$.fragment,e),d(Tt.$$.fragment,e),d($t.$$.fragment,e),d(Ct.$$.fragment,e),d(kt.$$.fragment,e),d(wt.$$.fragment,e),d(yt.$$.fragment,e),d(xt.$$.fragment,e),d(Mt.$$.fragment,e),d(Lt.$$.fragment,e),d(Ht.$$.fragment,e),d(At.$$.fragment,e),d(St.$$.fragment,e),d(zt.$$.fragment,e),d(ye.$$.fragment,e),d(Nt.$$.fragment,e),d(Dt.$$.fragment,e),d(Ut.$$.fragment,e),d(Jt.$$.fragment,e),d(Pt.$$.fragment,e),d(Wt.$$.fragment,e),d(Ft.$$.fragment,e),Za=!0)},o(e){p(y.$$.fragment,e),p(We.$$.fragment,e),p(Be.$$.fragment,e),p(Re.$$.fragment,e),p(Oe.$$.fragment,e),p(Ve.$$.fragment,e),p(qe.$$.fragment,e),p(Ge.$$.fragment,e),p(Ye.$$.fragment,e),p(Xe.$$.fragment,e),p(Ze.$$.fragment,e),p(le.$$.fragment,e),p(Ke.$$.fragment,e),p(et.$$.fragment,e),p(tt.$$.fragment,e),p(rt.$$.fragment,e),p(at.$$.fragment,e),p(nt.$$.fragment,e),p(ot.$$.fragment,e),p(st.$$.fragment,e),p(lt.$$.fragment,e),p(ie.$$.fragment,e),p(it.$$.fragment,e),p(ct.$$.fragment,e),p(mt.$$.fragment,e),p(dt.$$.fragment,e),p(pt.$$.fragment,e),p(gt.$$.fragment,e),p(ce.$$.fragment,e),p(ft.$$.fragment,e),p(ht.$$.fragment,e),p(ut.$$.fragment,e),p(bt.$$.fragment,e),p(vt.$$.fragment,e),p(_t.$$.fragment,e),p(Tt.$$.fragment,e),p($t.$$.fragment,e),p(Ct.$$.fragment,e),p(kt.$$.fragment,e),p(wt.$$.fragment,e),p(yt.$$.fragment,e),p(xt.$$.fragment,e),p(Mt.$$.fragment,e),p(Lt.$$.fragment,e),p(Ht.$$.fragment,e),p(At.$$.fragment,e),p(St.$$.fragment,e),p(zt.$$.fragment,e),p(ye.$$.fragment,e),p(Nt.$$.fragment,e),p(Dt.$$.fragment,e),p(Ut.$$.fragment,e),p(Jt.$$.fragment,e),p(Pt.$$.fragment,e),p(Wt.$$.fragment,e),p(Ft.$$.fragment,e),Za=!1},d(e){e&&(s(M),s(_),s(w),s(C),s(x),s(H),s(Ne),s(ua),s(De),s(ba),s(Ue),s(va),s(Je),s(_a),s(Pe),s(Ta),s($a),s(Fe),s(Ca),s(B),s(ka),s(K),s(wa),s(ee),s(ya),s(te),s(xa),s(R),s(Ma),s(re),s(La),s(O),s(Ea),s(q),s(Ia),s(ae),s(Ha),s(ne),s(ja),s(G),s(Aa),s(N),s(Sa),s(Y),s(za),s(X),s(Na),s(D),s(Da),s(Z),s(Ua),s(Ja),s(T),s(Pa),s(Et),s(Wa),s(It),s(Fa),s(Ba),s(jt),s(Ra),s(Oa),s(Va),s(I),s(qa),s(Ga),s(oe),s(Ya),s(Xa),s(fa)),s(m),u(y,e),u(We,e),u(Be),u(Re),u(Oe),u(Ve),u(qe),u(Ge),u(Ye),u(Xe),u(Ze),u(le),u(Ke),u(et),u(tt),u(rt),u(at),u(nt),u(ot),u(st),u(lt),u(ie),u(it),u(ct),u(mt),u(dt),u(pt,e),u(gt),u(ce),u(ft),u(ht),u(ut),u(bt),u(vt),u(_t),u(Tt),u($t),u(Ct),u(kt),u(wt),u(yt),u(xt),u(Mt),u(Lt),u(Ht,e),u(At,e),u(St,e),u(zt),u(ye),u(Nt),u(Dt),u(Ut),u(Jt),u(Pt,e),u(Wt),u(Ft,e)}}}const gi='{"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 fi(E){return ei(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ci extends ql{constructor(m){super(),Gl(this,m,fi,pi,Vl,{})}}export{Ci as component};
