import{s as Wr,o as Br,n as jr}from"../chunks/scheduler.c3dfb84c.js";import{S as Kr,i as Gr,e as r,s as n,c as s,h as Jr,a as o,d as i,b as a,f,g as l,j as g,k as h,l as t,m as k,n as c,t as d,o as m,p}from"../chunks/index.47c20be5.js";import{T as Vr}from"../chunks/Tip.34d6f74f.js";import{C as Qr,H as Yt,E as Xr}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.423d8c15.js";import{D as u}from"../chunks/Docstring.164b8e5f.js";function Yr(et){let T,q=`To use this method, you need to have provided a <code>model_init</code> when initializing your <a href="/docs/setfit/main/en/reference/trainer#setfit.Trainer">Trainer</a>: we need to
reinitialize the model at each new run.`;return{c(){T=r("p"),T.innerHTML=q},l(C){T=o(C,"P",{"data-svelte-h":!0}),g(T)!=="svelte-8a85g6"&&(T.innerHTML=q)},m(C,z){k(C,T,z)},p:jr,d(C){C&&i(T)}}}function Zr(et){let T,q=`To use this method, you need to have provided a <code>model_init</code> when initializing your <a href="/docs/setfit/main/en/reference/trainer#setfit.Trainer">Trainer</a>: we need to
reinitialize the model at each new run.`;return{c(){T=r("p"),T.innerHTML=q},l(C){T=o(C,"P",{"data-svelte-h":!0}),g(T)!=="svelte-8a85g6"&&(T.innerHTML=q)},m(C,z){k(C,T,z)},p:jr,d(C){C&&i(T)}}}function eo(et){let T,q,C,z,de,Zt,me,en,pe,tn,D,ge,Pn,tt,tr=`TrainingArguments is the subset of the arguments which relate to the training loop itself.
Note that training with SetFit consists of two phases behind the scenes: <strong>finetuning embeddings</strong> and
<strong>training a classification head</strong>. As a result, some of the training arguments can be tuples,
where the two values are used for each of the two phases, respectively. The second value is often only
used when training the model was loaded using <code>use_differentiable_head=True</code>.`,Hn,S,fe,Fn,nt,nr="Convert this instance to a dictionary.",On,E,he,zn,at,ar="Initialize a TrainingArguments instance from a dictionary.",Sn,R,ue,En,rt,rr="Create a shallow copy of this TrainingArguments instance.",Rn,ot,be,nn,_e,an,_,ve,Un,it,or="Trainer to train a SetFit model.",Vn,U,Te,jn,st,ir='Add a callback to the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>.',Wn,V,ye,Bn,lt,sr="Applies a dictionary of hyperparameters to both the trainer and the model",Kn,j,xe,Gn,ct,lr="Computes the metrics for a given classifier.",Jn,L,$e,Qn,dt,cr=`Launch a hyperparameter search using <code>optuna</code>. The optimized quantity is determined
by <code>compute_objective</code>, which defaults to a function returning the evaluation loss when no metric is provided,
the sum of all metrics otherwise.`,Xn,W,Yn,I,ke,Zn,mt,dr='Remove a callback from the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> and returns it.',ea,pt,mr="If the callback is not found, returns <code>None</code> (and no error is raised).",ta,N,we,na,gt,pr="Upload model checkpoint to the Hub using <code>huggingface_hub</code>.",aa,ft,gr='See the full list of parameters for your <code>huggingface_hub</code> version in the        <a href="https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.ModelHubMixin.push_to_hub" rel="nofollow">huggingface_hub documentation</a>.',ra,B,Ce,oa,ht,fr='Remove a callback from the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>.',ia,K,De,sa,ut,hr="Main training entry point.",la,G,Ae,ca,bt,ur="Method to perform the classifier phase: fitting a classifier head.",da,J,qe,ma,_t,br="Method to perform the embedding phase: finetuning the <code>SentenceTransformer</code> body.",rn,Le,on,v,Ie,pa,vt,_r="Trainer to compress a SetFit model with knowledge distillation.",ga,Q,Ne,fa,Tt,vr='Add a callback to the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>.',ha,X,Me,ua,yt,Tr="Applies a dictionary of hyperparameters to both the trainer and the model",ba,Y,Pe,_a,xt,yr="Computes the metrics for a given classifier.",va,M,He,Ta,$t,xr=`Launch a hyperparameter search using <code>optuna</code>. The optimized quantity is determined
by <code>compute_objective</code>, which defaults to a function returning the evaluation loss when no metric is provided,
the sum of all metrics otherwise.`,ya,Z,xa,P,Fe,$a,kt,$r='Remove a callback from the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> and returns it.',ka,wt,kr="If the callback is not found, returns <code>None</code> (and no error is raised).",wa,H,Oe,Ca,Ct,wr="Upload model checkpoint to the Hub using <code>huggingface_hub</code>.",Da,Dt,Cr='See the full list of parameters for your <code>huggingface_hub</code> version in the        <a href="https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.ModelHubMixin.push_to_hub" rel="nofollow">huggingface_hub documentation</a>.',Aa,ee,ze,qa,At,Dr='Remove a callback from the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>.',La,te,Se,Ia,qt,Ar="Main training entry point.",Na,ne,Ee,Ma,Lt,qr="Method to perform the classifier phase: fitting the student classifier head.",Pa,ae,Re,Ha,It,Lr="Method to perform the embedding phase: finetuning the <code>SentenceTransformer</code> body.",sn,Ue,ln,y,Ve,Fa,Nt,Ir="Trainer to train a SetFit ABSA model.",Oa,re,je,za,Mt,Nr='Add a callback to the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>.',Sa,oe,We,Ea,Pt,Mr="Computes the metrics for a given classifier.",Ra,F,Be,Ua,Ht,Pr='Remove a callback from the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> and returns it.',Va,Ft,Hr="If the callback is not found, returns <code>None</code> (and no error is raised).",ja,O,Ke,Wa,Ot,Fr="Upload model checkpoint to the Hub using <code>huggingface_hub</code>.",Ba,zt,Or='See the full list of parameters for your <code>huggingface_hub</code> version in the        <a href="https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.ModelHubMixin.push_to_hub" rel="nofollow">huggingface_hub documentation</a>.',Ka,ie,Ge,Ga,St,zr='Remove a callback from the current list of <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>.',Ja,se,Je,Qa,Et,Sr="Main training entry point.",Xa,le,Qe,Ya,Rt,Er="Train the aspect model only.",Za,ce,Xe,er,Ut,Rr="Train the polarity model only.",cn,Ye,dn,Xt,mn;return de=new Qr({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),me=new Yt({props:{title:"Trainer Classes",local:"trainer-classes",headingTag:"h1"}}),pe=new Yt({props:{title:"TrainingArguments",local:"setfit.TrainingArguments",headingTag:"h2"}}),ge=new u({props:{name:"class setfit.TrainingArguments",anchor:"setfit.TrainingArguments",parameters:[{name:"output_dir",val:": str = 'checkpoints'"},{name:"batch_size",val:": Union[int, Tuple[int, int]] = (16, 2)"},{name:"num_epochs",val:": Union[int, Tuple[int, int]] = (1, 16)"},{name:"max_steps",val:": int = -1"},{name:"sampling_strategy",val:": str = 'oversampling'"},{name:"num_iterations",val:": Optional[int] = None"},{name:"body_learning_rate",val:": Union[float, Tuple[float, float]] = (2e-05, 1e-05)"},{name:"head_learning_rate",val:": float = 0.01"},{name:"loss",val:": Callable = <class 'sentence_transformers.losses.CosineSimilarityLoss.CosineSimilarityLoss'>"},{name:"distance_metric",val:": Callable = <function BatchHardTripletLossDistanceFunction.cosine_distance at 0x7fb54b6584c0>"},{name:"margin",val:": float = 0.25"},{name:"end_to_end",val:": bool = False"},{name:"use_amp",val:": bool = False"},{name:"warmup_proportion",val:": float = 0.1"},{name:"l2_weight",val:": Optional[float] = 0.01"},{name:"max_length",val:": Optional[int] = None"},{name:"samples_per_label",val:": int = 2"},{name:"show_progress_bar",val:": bool = True"},{name:"seed",val:": int = 42"},{name:"report_to",val:": str = 'all'"},{name:"run_name",val:": Optional[str] = None"},{name:"logging_dir",val:": Optional[str] = None"},{name:"logging_strategy",val:": str = 'steps'"},{name:"logging_first_step",val:": bool = True"},{name:"logging_steps",val:": int = 50"},{name:"eval_strategy",val:": str = 'no'"},{name:"evaluation_strategy",val:": Optional[str] = None"},{name:"eval_steps",val:": Optional[int] = None"},{name:"eval_delay",val:": int = 0"},{name:"eval_max_steps",val:": int = -1"},{name:"save_strategy",val:": str = 'steps'"},{name:"save_steps",val:": int = 500"},{name:"save_total_limit",val:": Optional[int] = 1"},{name:"load_best_model_at_end",val:": bool = False"},{name:"metric_for_best_model",val:": Optional[str] = 'embedding_loss'"},{name:"greater_is_better",val:": bool = False"}],parametersDescription:[{anchor:"setfit.TrainingArguments.output_dir",description:`<strong>output_dir</strong> (<code>str</code>, defaults to <code>&quot;checkpoints&quot;</code>) &#x2014;
The output directory where the model predictions and checkpoints will be written.`,name:"output_dir"},{anchor:"setfit.TrainingArguments.batch_size",description:`<strong>batch_size</strong> (<code>Union[int, Tuple[int, int]]</code>, defaults to <code>(16, 2)</code>) &#x2014;
Set the batch sizes for the embedding and classifier training phases respectively,
or set both if an integer is provided.
Note that the batch size for the classifier is only used with a differentiable PyTorch head.`,name:"batch_size"},{anchor:"setfit.TrainingArguments.num_epochs",description:`<strong>num_epochs</strong> (<code>Union[int, Tuple[int, int]]</code>, defaults to <code>(1, 16)</code>) &#x2014;
Set the number of epochs the embedding and classifier training phases respectively,
or set both if an integer is provided.
Note that the number of epochs for the classifier is only used with a differentiable PyTorch head.`,name:"num_epochs"},{anchor:"setfit.TrainingArguments.max_steps",description:`<strong>max_steps</strong> (<code>int</code>, defaults to <code>-1</code>) &#x2014;
If set to a positive number, the total number of training steps to perform. Overrides <code>num_epochs</code>.
The training may stop before reaching the set number of steps when all data is exhausted.`,name:"max_steps"},{anchor:"setfit.TrainingArguments.sampling_strategy",description:`<strong>sampling_strategy</strong> (<code>str</code>, defaults to <code>&quot;oversampling&quot;</code>) &#x2014;
The sampling strategy of how to draw pairs in training. Possible values are:</p>
<ul>
<li><code>&quot;oversampling&quot;</code>: Draws even number of positive/ negative sentence pairs until every
sentence pair has been drawn.</li>
<li><code>&quot;undersampling&quot;</code>: Draws the minimum number of positive/ negative sentence pairs until
every sentence pair in the minority class has been drawn.</li>
<li><code>&quot;unique&quot;</code>: Draws every sentence pair combination (likely resulting in unbalanced
number of positive/ negative sentence pairs).</li>
</ul>
<p>The default is set to <code>&quot;oversampling&quot;</code>, ensuring all sentence pairs are drawn at least once.
Alternatively, setting <code>num_iterations</code> will override this argument and determine the number
of generated sentence pairs.`,name:"sampling_strategy"},{anchor:"setfit.TrainingArguments.num_iterations",description:`<strong>num_iterations</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If not set the <code>sampling_strategy</code> will determine the number of sentence pairs to generate.
This argument sets the number of iterations to generate sentence pairs for
and provides compatability with Setfit <v1.0.0. this argument is ignored if triplet loss used. it only used in conjunction with <code>CosineSimilarityLoss.</v1.0.0.>`,name:"num_iterations"},{anchor:"setfit.TrainingArguments.body_learning_rate",description:`<strong>body_learning_rate</strong> (<code>Union[float, Tuple[float, float]]</code>, defaults to <code>(2e-5, 1e-5)</code>) &#x2014;
Set the learning rate for the <code>SentenceTransformer</code> body for the embedding and classifier
training phases respectively, or set both if a float is provided.
Note that the body learning rate for the classifier is only used with a differentiable PyTorch
head <em>and</em> if <code>end_to_end=True</code>.`,name:"body_learning_rate"},{anchor:"setfit.TrainingArguments.head_learning_rate",description:`<strong>head_learning_rate</strong> (<code>float</code>, defaults to <code>1e-2</code>) &#x2014;
Set the learning rate for the head for the classifier training phase. Only used with a
differentiable PyTorch head.`,name:"head_learning_rate"},{anchor:"setfit.TrainingArguments.loss",description:`<strong>loss</strong> (<code>nn.Module</code>, defaults to <code>CosineSimilarityLoss</code>) &#x2014;
The loss function to use for contrastive training of the embedding training phase.`,name:"loss"},{anchor:"setfit.TrainingArguments.distance_metric",description:`<strong>distance_metric</strong> (<code>Callable</code>, defaults to <code>BatchHardTripletLossDistanceFunction.cosine_distance</code>) &#x2014;
Function that returns a distance between two embeddings.
It is set for the triplet loss and ignored for <code>CosineSimilarityLoss</code> and <code>SupConLoss</code>.`,name:"distance_metric"},{anchor:"setfit.TrainingArguments.margin",description:`<strong>margin</strong> (<code>float</code>, defaults to <code>0.25</code>) &#x2014;
Margin for the triplet loss.
Negative samples should be at least margin further apart from the anchor than the positive.
It is ignored for <code>CosineSimilarityLoss</code>, <code>BatchHardSoftMarginTripletLoss</code> and <code>SupConLoss</code>.`,name:"margin"},{anchor:"setfit.TrainingArguments.end_to_end",description:`<strong>end_to_end</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
If True, train the entire model end-to-end during the classifier training phase.
Otherwise, freeze the <code>SentenceTransformer</code> body and only train the head.
Only used with a differentiable PyTorch head.`,name:"end_to_end"},{anchor:"setfit.TrainingArguments.use_amp",description:`<strong>use_amp</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to use Automatic Mixed Precision (AMP) during the embedding training phase.
Only for Pytorch &gt;= 1.6.0`,name:"use_amp"},{anchor:"setfit.TrainingArguments.warmup_proportion",description:`<strong>warmup_proportion</strong> (<code>float</code>, defaults to <code>0.1</code>) &#x2014;
Proportion of the warmup in the total training steps.
Must be greater than or equal to 0.0 and less than or equal to 1.0.`,name:"warmup_proportion"},{anchor:"setfit.TrainingArguments.l2_weight",description:`<strong>l2_weight</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Optional l2 weight for both the model body and head, passed to the <code>AdamW</code> optimizer in the
classifier training phase if a differentiable PyTorch head is used.`,name:"l2_weight"},{anchor:"setfit.TrainingArguments.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum token length a tokenizer can generate. If not provided, the maximum length for
the <code>SentenceTransformer</code> body is used.`,name:"max_length"},{anchor:"setfit.TrainingArguments.samples_per_label",description:`<strong>samples_per_label</strong> (<code>int</code>, defaults to <code>2</code>) &#x2014; Number of consecutive, random and unique samples drawn per label.
This is only relevant for triplet loss and ignored for <code>CosineSimilarityLoss</code>.
Batch size should be a multiple of samples_per_label.`,name:"samples_per_label"},{anchor:"setfit.TrainingArguments.show_progress_bar",description:`<strong>show_progress_bar</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to display a progress bar for the training epochs and iterations.`,name:"show_progress_bar"},{anchor:"setfit.TrainingArguments.seed",description:`<strong>seed</strong> (<code>int</code>, defaults to <code>42</code>) &#x2014;
Random seed that will be set at the beginning of training. To ensure reproducibility across
runs, use the <code>model_init</code> argument to <a href="/docs/setfit/main/en/reference/trainer#setfit.Trainer">Trainer</a> to instantiate the model if it has some
randomly initialized parameters.`,name:"seed"},{anchor:"setfit.TrainingArguments.report_to",description:`<strong>report_to</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>, defaults to <code>&quot;all&quot;</code>) &#x2014;
The list of integrations to report the results and logs to. Supported platforms are <code>&quot;azure_ml&quot;</code>,
<code>&quot;comet_ml&quot;</code>, <code>&quot;mlflow&quot;</code>, <code>&quot;neptune&quot;</code>, <code>&quot;tensorboard&quot;</code>,<code>&quot;clearml&quot;</code> and <code>&quot;wandb&quot;</code>. Use <code>&quot;all&quot;</code> to report to
all integrations installed, <code>&quot;none&quot;</code> for no integrations.`,name:"report_to"},{anchor:"setfit.TrainingArguments.run_name",description:`<strong>run_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A descriptor for the run. Typically used for <a href="https://www.wandb.com/" rel="nofollow">wandb</a> and
<a href="https://www.mlflow.org/" rel="nofollow">mlflow</a> logging.`,name:"run_name"},{anchor:"setfit.TrainingArguments.logging_dir",description:`<strong>logging_dir</strong> (<code>str</code>, <em>optional</em>) &#x2014;
<a href="https://www.tensorflow.org/tensorboard" rel="nofollow">TensorBoard</a> log directory. Will default to
*runs/<strong>CURRENT_DATETIME_HOSTNAME*</strong>.`,name:"logging_dir"},{anchor:"setfit.TrainingArguments.logging_strategy",description:`<strong>logging_strategy</strong> (<code>str</code> or <code>IntervalStrategy</code>, <em>optional</em>, defaults to <code>&quot;steps&quot;</code>) &#x2014;
The logging strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No logging is done during training.</li>
<li><code>&quot;epoch&quot;</code>: Logging is done at the end of each epoch.</li>
<li><code>&quot;steps&quot;</code>: Logging is done every <code>logging_steps</code>.</li>
</ul>`,name:"logging_strategy"},{anchor:"setfit.TrainingArguments.logging_first_step",description:`<strong>logging_first_step</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to log and evaluate the first <code>global_step</code> or not.`,name:"logging_first_step"},{anchor:"setfit.TrainingArguments.logging_steps",description:`<strong>logging_steps</strong> (<code>int</code>, defaults to 50) &#x2014;
Number of update steps between two logs if <code>logging_strategy=&quot;steps&quot;</code>.`,name:"logging_steps"},{anchor:"setfit.TrainingArguments.eval_strategy",description:`<strong>eval_strategy</strong> (<code>str</code> or <code>IntervalStrategy</code>, <em>optional</em>, defaults to <code>&quot;no&quot;</code>) &#x2014;
The evaluation strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No evaluation is done during training.</li>
<li><code>&quot;steps&quot;</code>: Evaluation is done (and logged) every <code>eval_steps</code>.</li>
<li><code>&quot;epoch&quot;</code>: Evaluation is done at the end of each epoch.</li>
</ul>`,name:"eval_strategy"},{anchor:"setfit.TrainingArguments.eval_steps",description:`<strong>eval_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of update steps between two evaluations if <code>eval_strategy=&quot;steps&quot;</code>. Will default to the same
value as <code>logging_steps</code> if not set.`,name:"eval_steps"},{anchor:"setfit.TrainingArguments.eval_delay",description:`<strong>eval_delay</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Number of epochs or steps to wait for before the first evaluation can be performed, depending on the
eval_strategy.`,name:"eval_delay"},{anchor:"setfit.TrainingArguments.eval_max_steps",description:`<strong>eval_max_steps</strong> (<code>int</code>, defaults to <code>-1</code>) &#x2014;
If set to a positive number, the total number of evaluation steps to perform. The evaluation may stop
before reaching the set number of steps when all data is exhausted.`,name:"eval_max_steps"},{anchor:"setfit.TrainingArguments.save_strategy",description:`<strong>save_strategy</strong> (<code>str</code> or <code>IntervalStrategy</code>, <em>optional</em>, defaults to <code>&quot;steps&quot;</code>) &#x2014;
The checkpoint save strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: No save is done during training.</li>
<li><code>&quot;epoch&quot;</code>: Save is done at the end of each epoch.</li>
<li><code>&quot;steps&quot;</code>: Save is done every <code>save_steps</code>.</li>
</ul>`,name:"save_strategy"},{anchor:"setfit.TrainingArguments.save_steps",description:`<strong>save_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 500) &#x2014;
Number of updates steps before two checkpoint saves if <code>save_strategy=&quot;steps&quot;</code>.`,name:"save_steps"},{anchor:"setfit.TrainingArguments.save_total_limit",description:`<strong>save_total_limit</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
If a value is passed, will limit the total amount of checkpoints. Deletes the older checkpoints in
<code>output_dir</code>. Note, the best model is always preserved if the <code>eval_strategy</code> is not <code>&quot;no&quot;</code>.`,name:"save_total_limit"},{anchor:"setfit.TrainingArguments.load_best_model_at_end",description:`<strong>load_best_model_at_end</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to load the best model found during training at the end of training.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When set to <code>True</code>, the parameters <code>save_strategy</code> needs to be the same as <code>eval_strategy</code>, and in
the case it is &#x201C;steps&#x201D;, <code>save_steps</code> must be a round multiple of <code>eval_steps</code>.</p>

					</div>`,name:"load_best_model_at_end"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/training_args.py#L23"}}),fe=new u({props:{name:"to_dict",anchor:"setfit.TrainingArguments.to_dict",parameters:[],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/training_args.py#L319",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The dictionary variant of this dataclass.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),he=new u({props:{name:"from_dict",anchor:"setfit.TrainingArguments.from_dict",parameters:[{name:"arguments",val:": Dict[str, Any]"},{name:"ignore_extra",val:": bool = False"}],parametersDescription:[{anchor:"setfit.TrainingArguments.from_dict.arguments",description:"<strong>arguments</strong> (<code>Dict[str, Any]</code>) &#x2014; A dictionary of arguments.",name:"arguments"},{anchor:"setfit.TrainingArguments.from_dict.ignore_extra",description:`<strong>ignore_extra</strong> (<code>bool</code>, <em>optional</em>) &#x2014; Whether to ignore arguments that do not occur in the
TrainingArguments <strong>init</strong> signature. Defaults to False.`,name:"ignore_extra"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/training_args.py#L327",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The instantiated TrainingArguments instance.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>TrainingArguments</code></p>
`}}),ue=new u({props:{name:"copy",anchor:"setfit.TrainingArguments.copy",parameters:[],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/training_args.py#L343"}}),be=new u({props:{name:"update",anchor:"setfit.TrainingArguments.update",parameters:[{name:"arguments",val:": Dict[str, Any]"},{name:"ignore_extra",val:": bool = False"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/training_args.py#L347"}}),_e=new Yt({props:{title:"Trainer",local:"setfit.Trainer",headingTag:"h2"}}),ve=new u({props:{name:"class setfit.Trainer",anchor:"setfit.Trainer",parameters:[{name:"model",val:": typing.Optional[ForwardRef('SetFitModel')] = None"},{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"train_dataset",val:": typing.Optional[ForwardRef('Dataset')] = None"},{name:"eval_dataset",val:": typing.Optional[ForwardRef('Dataset')] = None"},{name:"model_init",val:": typing.Optional[typing.Callable[[], ForwardRef('SetFitModel')]] = None"},{name:"metric",val:": typing.Union[str, typing.Callable[[ForwardRef('Dataset'), ForwardRef('Dataset')], typing.Dict[str, float]]] = 'accuracy'"},{name:"metric_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callbacks",val:": typing.Optional[typing.List[transformers.trainer_callback.TrainerCallback]] = None"},{name:"column_mapping",val:": typing.Optional[typing.Dict[str, str]] = None"}],parametersDescription:[{anchor:"setfit.Trainer.model",description:`<strong>model</strong> (<code>SetFitModel</code>, <em>optional</em>) &#x2014;
The model to train. If not provided, a <code>model_init</code> must be passed.`,name:"model"},{anchor:"setfit.Trainer.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
The training arguments to use.`,name:"args"},{anchor:"setfit.Trainer.train_dataset",description:`<strong>train_dataset</strong> (<code>Dataset</code>) &#x2014;
The training dataset.`,name:"train_dataset"},{anchor:"setfit.Trainer.eval_dataset",description:`<strong>eval_dataset</strong> (<code>Dataset</code>, <em>optional</em>) &#x2014;
The evaluation dataset.`,name:"eval_dataset"},{anchor:"setfit.Trainer.model_init",description:`<strong>model_init</strong> (<code>Callable[[], SetFitModel]</code>, <em>optional</em>) &#x2014;
A function that instantiates the model to be used. If provided, each call to
<a href="/docs/setfit/main/en/reference/trainer#setfit.Trainer.train">Trainer.train()</a> will start from a new instance of the model as given by this
function when a <code>trial</code> is passed.`,name:"model_init"},{anchor:"setfit.Trainer.metric",description:`<strong>metric</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;accuracy&quot;</code>) &#x2014;
The metric to use for evaluation. If a string is provided, we treat it as the metric
name and load it with default settings. If a callable is provided, it must take two arguments
(<code>y_pred</code>, <code>y_test</code>) and return a dictionary with metric keys to values.`,name:"metric"},{anchor:"setfit.Trainer.metric_kwargs",description:`<strong>metric_kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Keyword arguments passed to the evaluation function if <code>metric</code> is an evaluation string like &#x201C;f1&#x201D;.
For example useful for providing an averaging strategy for computing f1 in a multi-label setting.`,name:"metric_kwargs"},{anchor:"setfit.Trainer.callbacks",description:`<strong>callbacks</strong> (<code>List[</code><a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a><code>]</code>, <em>optional</em>) &#x2014;
A list of callbacks to customize the training loop. Will add those to the list of default callbacks
detailed in <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback" rel="nofollow">here</a>.
If you want to remove one of the default callbacks used, use the <a href="/docs/setfit/main/en/reference/trainer#setfit.Trainer.remove_callback">Trainer.remove_callback()</a> method.`,name:"callbacks"},{anchor:"setfit.Trainer.column_mapping",description:`<strong>column_mapping</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A mapping from the column names in the dataset to the column names expected by the model.
The expected format is a dictionary with the following format:
<code>{&quot;text_column_name&quot;: &quot;text&quot;, &quot;label_column_name&quot;: &quot;label&quot;}</code>.`,name:"column_mapping"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L257"}}),Te=new u({props:{name:"add_callback",anchor:"setfit.Trainer.add_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.Trainer.add_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will instantiate a member of that class.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L367"}}),ye=new u({props:{name:"apply_hyperparameters",anchor:"setfit.Trainer.apply_hyperparameters",parameters:[{name:"params",val:": typing.Dict[str, typing.Any]"},{name:"final_model",val:": bool = False"}],parametersDescription:[{anchor:"setfit.Trainer.apply_hyperparameters.params",description:"<strong>params</strong> (<code>Dict[str, Any]</code>) &#x2014; The parameters, usually from <code>BestRun.hyperparameters</code>",name:"params"},{anchor:"setfit.Trainer.apply_hyperparameters.final_model",description:"<strong>final_model</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; If <code>True</code>, replace the <code>model_init()</code> function with a fixed model based on the parameters.",name:"final_model"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L405"}}),xe=new u({props:{name:"evaluate",anchor:"setfit.Trainer.evaluate",parameters:[{name:"dataset",val:": typing.Optional[datasets.arrow_dataset.Dataset] = None"},{name:"metric_key_prefix",val:": str = 'test'"}],parametersDescription:[{anchor:"setfit.Trainer.evaluate.dataset",description:`<strong>dataset</strong> (<code>Dataset</code>, <em>optional</em>) &#x2014;
The dataset to compute the metrics on. If not provided, will use the evaluation dataset passed via
the <code>eval_dataset</code> argument at <code>Trainer</code> initialization.`,name:"dataset"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L658",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The evaluation metrics.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, float]</code></p>
`}}),$e=new u({props:{name:"hyperparameter_search",anchor:"setfit.Trainer.hyperparameter_search",parameters:[{name:"hp_space",val:": typing.Optional[typing.Callable[[ForwardRef('optuna.Trial')], typing.Dict[str, float]]] = None"},{name:"compute_objective",val:": typing.Optional[typing.Callable[[typing.Dict[str, float]], float]] = None"},{name:"n_trials",val:": int = 10"},{name:"direction",val:": str = 'maximize'"},{name:"backend",val:": typing.Union[ForwardRef('str'), transformers.trainer_utils.HPSearchBackend, NoneType] = None"},{name:"hp_name",val:": typing.Optional[typing.Callable[[ForwardRef('optuna.Trial')], str]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.Trainer.hyperparameter_search.hp_space",description:`<strong>hp_space</strong> (<code>Callable[[&quot;optuna.Trial&quot;], Dict[str, float]]</code>, <em>optional</em>) &#x2014;
A function that defines the hyperparameter search space. Will default to
<code>default_hp_space_optuna</code>.`,name:"hp_space"},{anchor:"setfit.Trainer.hyperparameter_search.compute_objective",description:`<strong>compute_objective</strong> (<code>Callable[[Dict[str, float]], float]</code>, <em>optional</em>) &#x2014;
A function computing the objective to minimize or maximize from the metrics returned by the <code>evaluate</code>
method. Will default to <code>default_compute_objective</code> which uses the sum of metrics.`,name:"compute_objective"},{anchor:"setfit.Trainer.hyperparameter_search.n_trials",description:`<strong>n_trials</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
The number of trial runs to test.`,name:"n_trials"},{anchor:"setfit.Trainer.hyperparameter_search.direction",description:`<strong>direction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;maximize&quot;</code>) &#x2014;
Whether to optimize greater or lower objects. Can be <code>&quot;minimize&quot;</code> or <code>&quot;maximize&quot;</code>, you should pick
<code>&quot;minimize&quot;</code> when optimizing the validation loss, <code>&quot;maximize&quot;</code> when optimizing one or several metrics.`,name:"direction"},{anchor:"setfit.Trainer.hyperparameter_search.backend",description:`<strong>backend</strong> (<code>str</code> or <code>HPSearchBackend</code>, <em>optional</em>) &#x2014;
The backend to use for hyperparameter search. Only optuna is supported for now.
TODO: add support for ray and sigopt.`,name:"backend"},{anchor:"setfit.Trainer.hyperparameter_search.hp_name",description:`<strong>hp_name</strong> (<code>Callable[[&quot;optuna.Trial&quot;], str]]</code>, <em>optional</em>) &#x2014;
A function that defines the trial/run name. Will default to None.`,name:"hp_name"},{anchor:"setfit.Trainer.hyperparameter_search.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to <code>optuna.create_study</code>. For more
information see:</p>
<ul>
<li>the documentation of
<a href="https://optuna.readthedocs.io/en/stable/reference/generated/optuna.study.create_study.html" rel="nofollow">optuna.create_study</a></li>
</ul>`,name:"kwargs"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L720",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>All the information about the best run.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>trainer_utils.BestRun</code></p>
`}}),W=new Vr({props:{warning:!0,$$slots:{default:[Yr]},$$scope:{ctx:et}}}),ke=new u({props:{name:"pop_callback",anchor:"setfit.Trainer.pop_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.Trainer.pop_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will pop the first member of that class found in the list of callbacks.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L378",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The callback removed, if found.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback"
  rel="nofollow"
>TrainerCallback</a></p>
`}}),we=new u({props:{name:"push_to_hub",anchor:"setfit.Trainer.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.Trainer.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The full repository ID to push to, e.g. <code>&quot;tomaarsen/setfit-sst2&quot;</code>.`,name:"repo_id"},{anchor:"setfit.Trainer.push_to_hub.config",description:`<strong>config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Configuration object to be saved alongside the model weights.`,name:"config"},{anchor:"setfit.Trainer.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing.`,name:"commit_message"},{anchor:"setfit.Trainer.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,name:"private"},{anchor:"setfit.Trainer.push_to_hub.api_endpoint",description:`<strong>api_endpoint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The API endpoint to use when pushing the model to the hub.`,name:"api_endpoint"},{anchor:"setfit.Trainer.push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files.
If not set, will use the token set when logging in with
<code>transformers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"setfit.Trainer.push_to_hub.branch",description:`<strong>branch</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The git branch on which to push the model. This defaults to
the default branch as specified in your repository, which
defaults to <code>&quot;main&quot;</code>.`,name:"branch"},{anchor:"setfit.Trainer.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>boolean</code>, <em>optional</em>) &#x2014;
Whether or not to create a Pull Request from <code>branch</code> with that commit.
Defaults to <code>False</code>.`,name:"create_pr"},{anchor:"setfit.Trainer.push_to_hub.allow_patterns",description:`<strong>allow_patterns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
If provided, only files matching at least one pattern are pushed.`,name:"allow_patterns"},{anchor:"setfit.Trainer.push_to_hub.ignore_patterns",description:`<strong>ignore_patterns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
If provided, files matching any of the patterns are not pushed.`,name:"ignore_patterns"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L796",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The url of the commit of your model in the given repository.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>str</p>
`}}),Ce=new u({props:{name:"remove_callback",anchor:"setfit.Trainer.remove_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.Trainer.remove_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will remove the first member of that class found in the list of callbacks.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L394"}}),De=new u({props:{name:"train",anchor:"setfit.Trainer.train",parameters:[{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"trial",val:": typing.Union[ForwardRef('optuna.Trial'), typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.Trainer.train.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the training arguments for this training call.`,name:"args"},{anchor:"setfit.Trainer.train.trial",description:`<strong>trial</strong> (<code>optuna.Trial</code> or <code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The trial run or the hyperparameter dictionary for hyperparameter search.`,name:"trial"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L492"}}),Ae=new u({props:{name:"train_classifier",anchor:"setfit.Trainer.train_classifier",parameters:[{name:"x_train",val:": typing.List[str]"},{name:"y_train",val:": typing.Union[typing.List[int], typing.List[typing.List[int]]]"},{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"}],parametersDescription:[{anchor:"setfit.Trainer.train_classifier.x_train",description:"<strong>x_train</strong> (<code>List[str]</code>) &#x2014; A list of training sentences.",name:"x_train"},{anchor:"setfit.Trainer.train_classifier.y_train",description:"<strong>y_train</strong> (<code>Union[List[int], List[List[int]]]</code>) &#x2014; A list of labels corresponding to the training sentences.",name:"y_train"},{anchor:"setfit.Trainer.train_classifier.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the training arguments for this training call.`,name:"args"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L631"}}),qe=new u({props:{name:"train_embeddings",anchor:"setfit.Trainer.train_embeddings",parameters:[{name:"x_train",val:": typing.List[str]"},{name:"y_train",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], NoneType] = None"},{name:"x_eval",val:": typing.Optional[typing.List[str]] = None"},{name:"y_eval",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], NoneType] = None"},{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"}],parametersDescription:[{anchor:"setfit.Trainer.train_embeddings.x_train",description:"<strong>x_train</strong> (<code>List[str]</code>) &#x2014; A list of training sentences.",name:"x_train"},{anchor:"setfit.Trainer.train_embeddings.y_train",description:"<strong>y_train</strong> (<code>Union[List[int], List[List[int]]]</code>) &#x2014; A list of labels corresponding to the training sentences.",name:"y_train"},{anchor:"setfit.Trainer.train_embeddings.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the training arguments for this training call.`,name:"args"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L537"}}),Le=new Yt({props:{title:"DistillationTrainer",local:"setfit.DistillationTrainer",headingTag:"h2"}}),Ie=new u({props:{name:"class setfit.DistillationTrainer",anchor:"setfit.DistillationTrainer",parameters:[{name:"teacher_model",val:": SetFitModel"},{name:"student_model",val:": typing.Optional[ForwardRef('SetFitModel')] = None"},{name:"args",val:": TrainingArguments = None"},{name:"train_dataset",val:": typing.Optional[ForwardRef('Dataset')] = None"},{name:"eval_dataset",val:": typing.Optional[ForwardRef('Dataset')] = None"},{name:"model_init",val:": typing.Optional[typing.Callable[[], ForwardRef('SetFitModel')]] = None"},{name:"metric",val:": typing.Union[str, typing.Callable[[ForwardRef('Dataset'), ForwardRef('Dataset')], typing.Dict[str, float]]] = 'accuracy'"},{name:"column_mapping",val:": typing.Optional[typing.Dict[str, str]] = None"}],parametersDescription:[{anchor:"setfit.DistillationTrainer.teacher_model",description:`<strong>teacher_model</strong> (<code>SetFitModel</code>) &#x2014;
The teacher model to mimic.`,name:"teacher_model"},{anchor:"setfit.DistillationTrainer.student_model",description:`<strong>student_model</strong> (<code>SetFitModel</code>, <em>optional</em>) &#x2014;
The model to train. If not provided, a <code>model_init</code> must be passed.`,name:"student_model"},{anchor:"setfit.DistillationTrainer.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
The training arguments to use.`,name:"args"},{anchor:"setfit.DistillationTrainer.train_dataset",description:`<strong>train_dataset</strong> (<code>Dataset</code>) &#x2014;
The training dataset.`,name:"train_dataset"},{anchor:"setfit.DistillationTrainer.eval_dataset",description:`<strong>eval_dataset</strong> (<code>Dataset</code>, <em>optional</em>) &#x2014;
The evaluation dataset.`,name:"eval_dataset"},{anchor:"setfit.DistillationTrainer.model_init",description:`<strong>model_init</strong> (<code>Callable[[], SetFitModel]</code>, <em>optional</em>) &#x2014;
A function that instantiates the model to be used. If provided, each call to
<a href="/docs/setfit/main/en/reference/trainer#setfit.Trainer.train">train()</a> will start from a new instance of the model as given by this
function when a <code>trial</code> is passed.`,name:"model_init"},{anchor:"setfit.DistillationTrainer.metric",description:`<strong>metric</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;accuracy&quot;</code>) &#x2014;
The metric to use for evaluation. If a string is provided, we treat it as the metric
name and load it with default settings.
If a callable is provided, it must take two arguments (<code>y_pred</code>, <code>y_test</code>).`,name:"metric"},{anchor:"setfit.DistillationTrainer.column_mapping",description:`<strong>column_mapping</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A mapping from the column names in the dataset to the column names expected by the model.
The expected format is a dictionary with the following format:
<code>{&quot;text_column_name&quot;: &quot;text&quot;, &quot;label_column_name&quot;: &quot;label&quot;}</code>.`,name:"column_mapping"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer_distillation.py#L23"}}),Ne=new u({props:{name:"add_callback",anchor:"setfit.DistillationTrainer.add_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.DistillationTrainer.add_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will instantiate a member of that class.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L367"}}),Me=new u({props:{name:"apply_hyperparameters",anchor:"setfit.DistillationTrainer.apply_hyperparameters",parameters:[{name:"params",val:": typing.Dict[str, typing.Any]"},{name:"final_model",val:": bool = False"}],parametersDescription:[{anchor:"setfit.DistillationTrainer.apply_hyperparameters.params",description:"<strong>params</strong> (<code>Dict[str, Any]</code>) &#x2014; The parameters, usually from <code>BestRun.hyperparameters</code>",name:"params"},{anchor:"setfit.DistillationTrainer.apply_hyperparameters.final_model",description:"<strong>final_model</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; If <code>True</code>, replace the <code>model_init()</code> function with a fixed model based on the parameters.",name:"final_model"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L405"}}),Pe=new u({props:{name:"evaluate",anchor:"setfit.DistillationTrainer.evaluate",parameters:[{name:"dataset",val:": typing.Optional[datasets.arrow_dataset.Dataset] = None"},{name:"metric_key_prefix",val:": str = 'test'"}],parametersDescription:[{anchor:"setfit.DistillationTrainer.evaluate.dataset",description:`<strong>dataset</strong> (<code>Dataset</code>, <em>optional</em>) &#x2014;
The dataset to compute the metrics on. If not provided, will use the evaluation dataset passed via
the <code>eval_dataset</code> argument at <code>Trainer</code> initialization.`,name:"dataset"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L658",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The evaluation metrics.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, float]</code></p>
`}}),He=new u({props:{name:"hyperparameter_search",anchor:"setfit.DistillationTrainer.hyperparameter_search",parameters:[{name:"hp_space",val:": typing.Optional[typing.Callable[[ForwardRef('optuna.Trial')], typing.Dict[str, float]]] = None"},{name:"compute_objective",val:": typing.Optional[typing.Callable[[typing.Dict[str, float]], float]] = None"},{name:"n_trials",val:": int = 10"},{name:"direction",val:": str = 'maximize'"},{name:"backend",val:": typing.Union[ForwardRef('str'), transformers.trainer_utils.HPSearchBackend, NoneType] = None"},{name:"hp_name",val:": typing.Optional[typing.Callable[[ForwardRef('optuna.Trial')], str]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.DistillationTrainer.hyperparameter_search.hp_space",description:`<strong>hp_space</strong> (<code>Callable[[&quot;optuna.Trial&quot;], Dict[str, float]]</code>, <em>optional</em>) &#x2014;
A function that defines the hyperparameter search space. Will default to
<code>default_hp_space_optuna</code>.`,name:"hp_space"},{anchor:"setfit.DistillationTrainer.hyperparameter_search.compute_objective",description:`<strong>compute_objective</strong> (<code>Callable[[Dict[str, float]], float]</code>, <em>optional</em>) &#x2014;
A function computing the objective to minimize or maximize from the metrics returned by the <code>evaluate</code>
method. Will default to <code>default_compute_objective</code> which uses the sum of metrics.`,name:"compute_objective"},{anchor:"setfit.DistillationTrainer.hyperparameter_search.n_trials",description:`<strong>n_trials</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
The number of trial runs to test.`,name:"n_trials"},{anchor:"setfit.DistillationTrainer.hyperparameter_search.direction",description:`<strong>direction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;maximize&quot;</code>) &#x2014;
Whether to optimize greater or lower objects. Can be <code>&quot;minimize&quot;</code> or <code>&quot;maximize&quot;</code>, you should pick
<code>&quot;minimize&quot;</code> when optimizing the validation loss, <code>&quot;maximize&quot;</code> when optimizing one or several metrics.`,name:"direction"},{anchor:"setfit.DistillationTrainer.hyperparameter_search.backend",description:`<strong>backend</strong> (<code>str</code> or <code>HPSearchBackend</code>, <em>optional</em>) &#x2014;
The backend to use for hyperparameter search. Only optuna is supported for now.
TODO: add support for ray and sigopt.`,name:"backend"},{anchor:"setfit.DistillationTrainer.hyperparameter_search.hp_name",description:`<strong>hp_name</strong> (<code>Callable[[&quot;optuna.Trial&quot;], str]]</code>, <em>optional</em>) &#x2014;
A function that defines the trial/run name. Will default to None.`,name:"hp_name"},{anchor:"setfit.DistillationTrainer.hyperparameter_search.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to <code>optuna.create_study</code>. For more
information see:</p>
<ul>
<li>the documentation of
<a href="https://optuna.readthedocs.io/en/stable/reference/generated/optuna.study.create_study.html" rel="nofollow">optuna.create_study</a></li>
</ul>`,name:"kwargs"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L720",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>All the information about the best run.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>trainer_utils.BestRun</code></p>
`}}),Z=new Vr({props:{warning:!0,$$slots:{default:[Zr]},$$scope:{ctx:et}}}),Fe=new u({props:{name:"pop_callback",anchor:"setfit.DistillationTrainer.pop_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.DistillationTrainer.pop_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will pop the first member of that class found in the list of callbacks.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L378",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The callback removed, if found.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback"
  rel="nofollow"
>TrainerCallback</a></p>
`}}),Oe=new u({props:{name:"push_to_hub",anchor:"setfit.DistillationTrainer.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.DistillationTrainer.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The full repository ID to push to, e.g. <code>&quot;tomaarsen/setfit-sst2&quot;</code>.`,name:"repo_id"},{anchor:"setfit.DistillationTrainer.push_to_hub.config",description:`<strong>config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Configuration object to be saved alongside the model weights.`,name:"config"},{anchor:"setfit.DistillationTrainer.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing.`,name:"commit_message"},{anchor:"setfit.DistillationTrainer.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,name:"private"},{anchor:"setfit.DistillationTrainer.push_to_hub.api_endpoint",description:`<strong>api_endpoint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The API endpoint to use when pushing the model to the hub.`,name:"api_endpoint"},{anchor:"setfit.DistillationTrainer.push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files.
If not set, will use the token set when logging in with
<code>transformers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"setfit.DistillationTrainer.push_to_hub.branch",description:`<strong>branch</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The git branch on which to push the model. This defaults to
the default branch as specified in your repository, which
defaults to <code>&quot;main&quot;</code>.`,name:"branch"},{anchor:"setfit.DistillationTrainer.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>boolean</code>, <em>optional</em>) &#x2014;
Whether or not to create a Pull Request from <code>branch</code> with that commit.
Defaults to <code>False</code>.`,name:"create_pr"},{anchor:"setfit.DistillationTrainer.push_to_hub.allow_patterns",description:`<strong>allow_patterns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
If provided, only files matching at least one pattern are pushed.`,name:"allow_patterns"},{anchor:"setfit.DistillationTrainer.push_to_hub.ignore_patterns",description:`<strong>ignore_patterns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
If provided, files matching any of the patterns are not pushed.`,name:"ignore_patterns"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L796",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The url of the commit of your model in the given repository.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>str</p>
`}}),ze=new u({props:{name:"remove_callback",anchor:"setfit.DistillationTrainer.remove_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.DistillationTrainer.remove_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will remove the first member of that class found in the list of callbacks.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L394"}}),Se=new u({props:{name:"train",anchor:"setfit.DistillationTrainer.train",parameters:[{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"trial",val:": typing.Union[ForwardRef('optuna.Trial'), typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.DistillationTrainer.train.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the training arguments for this training call.`,name:"args"},{anchor:"setfit.DistillationTrainer.train.trial",description:`<strong>trial</strong> (<code>optuna.Trial</code> or <code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The trial run or the hyperparameter dictionary for hyperparameter search.`,name:"trial"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L492"}}),Ee=new u({props:{name:"train_classifier",anchor:"setfit.DistillationTrainer.train_classifier",parameters:[{name:"x_train",val:": typing.List[str]"},{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"}],parametersDescription:[{anchor:"setfit.DistillationTrainer.train_classifier.x_train",description:"<strong>x_train</strong> (<code>List[str]</code>) &#x2014; A list of training sentences.",name:"x_train"},{anchor:"setfit.DistillationTrainer.train_classifier.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the training arguments for this training call.`,name:"args"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer_distillation.py#L99"}}),Re=new u({props:{name:"train_embeddings",anchor:"setfit.DistillationTrainer.train_embeddings",parameters:[{name:"x_train",val:": typing.List[str]"},{name:"y_train",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], NoneType] = None"},{name:"x_eval",val:": typing.Optional[typing.List[str]] = None"},{name:"y_eval",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], NoneType] = None"},{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"}],parametersDescription:[{anchor:"setfit.DistillationTrainer.train_embeddings.x_train",description:"<strong>x_train</strong> (<code>List[str]</code>) &#x2014; A list of training sentences.",name:"x_train"},{anchor:"setfit.DistillationTrainer.train_embeddings.y_train",description:"<strong>y_train</strong> (<code>Union[List[int], List[List[int]]]</code>) &#x2014; A list of labels corresponding to the training sentences.",name:"y_train"},{anchor:"setfit.DistillationTrainer.train_embeddings.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the training arguments for this training call.`,name:"args"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/trainer.py#L537"}}),Ue=new Yt({props:{title:"AbsaTrainer",local:"setfit.AbsaTrainer",headingTag:"h2"}}),Ve=new u({props:{name:"class setfit.AbsaTrainer",anchor:"setfit.AbsaTrainer",parameters:[{name:"model",val:": AbsaModel"},{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"polarity_args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"train_dataset",val:": typing.Optional[ForwardRef('Dataset')] = None"},{name:"eval_dataset",val:": typing.Optional[ForwardRef('Dataset')] = None"},{name:"metric",val:": typing.Union[str, typing.Callable[[ForwardRef('Dataset'), ForwardRef('Dataset')], typing.Dict[str, float]]] = 'accuracy'"},{name:"metric_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callbacks",val:": typing.Optional[typing.List[transformers.trainer_callback.TrainerCallback]] = None"},{name:"column_mapping",val:": typing.Optional[typing.Dict[str, str]] = None"}],parametersDescription:[{anchor:"setfit.AbsaTrainer.model",description:`<strong>model</strong> (<code>AbsaModel</code>) &#x2014;
The AbsaModel model to train.`,name:"model"},{anchor:"setfit.AbsaTrainer.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
The training arguments to use. If <code>polarity_args</code> is not defined, then <code>args</code> is used for both
the aspect and the polarity model.`,name:"args"},{anchor:"setfit.AbsaTrainer.polarity_args",description:`<strong>polarity_args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
The training arguments to use for the polarity model. If not defined, <code>args</code> is used for both
the aspect and the polarity model.`,name:"polarity_args"},{anchor:"setfit.AbsaTrainer.train_dataset",description:`<strong>train_dataset</strong> (<code>Dataset</code>) &#x2014;
The training dataset. The dataset must have &#x201C;text&#x201D;, &#x201C;span&#x201D;, &#x201C;label&#x201D; and &#x201C;ordinal&#x201D; columns.`,name:"train_dataset"},{anchor:"setfit.AbsaTrainer.eval_dataset",description:`<strong>eval_dataset</strong> (<code>Dataset</code>, <em>optional</em>) &#x2014;
The evaluation dataset. The dataset must have &#x201C;text&#x201D;, &#x201C;span&#x201D;, &#x201C;label&#x201D; and &#x201C;ordinal&#x201D; columns.`,name:"eval_dataset"},{anchor:"setfit.AbsaTrainer.metric",description:`<strong>metric</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;accuracy&quot;</code>) &#x2014;
The metric to use for evaluation. If a string is provided, we treat it as the metric
name and load it with default settings.
If a callable is provided, it must take two arguments (<code>y_pred</code>, <code>y_test</code>).`,name:"metric"},{anchor:"setfit.AbsaTrainer.metric_kwargs",description:`<strong>metric_kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Keyword arguments passed to the evaluation function if <code>metric</code> is an evaluation string like &#x201C;f1&#x201D;.
For example useful for providing an averaging strategy for computing f1 in a multi-label setting.`,name:"metric_kwargs"},{anchor:"setfit.AbsaTrainer.callbacks",description:`<strong>callbacks</strong> (<code>List[</code><a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a><code>]</code>, <em>optional</em>) &#x2014;
A list of callbacks to customize the training loop. Will add those to the list of default callbacks
detailed in <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback" rel="nofollow">here</a>.
If you want to remove one of the default callbacks used, use the <a href="/docs/setfit/main/en/reference/trainer#setfit.Trainer.remove_callback">Trainer.remove_callback()</a> method.`,name:"callbacks"},{anchor:"setfit.AbsaTrainer.column_mapping",description:`<strong>column_mapping</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A mapping from the column names in the dataset to the column names expected by the model.
The expected format is a dictionary with the following format:
<code>{&quot;text_column_name&quot;: &quot;text&quot;, &quot;span_column_name&quot;: &quot;span&quot;, &quot;label_column_name: &quot;label&quot;, &quot;ordinal_column_name&quot;: &quot;ordinal&quot;}</code>.`,name:"column_mapping"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L20"}}),je=new u({props:{name:"add_callback",anchor:"setfit.AbsaTrainer.add_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.AbsaTrainer.add_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will instantiate a member of that class.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L238"}}),We=new u({props:{name:"evaluate",anchor:"setfit.AbsaTrainer.evaluate",parameters:[{name:"dataset",val:": typing.Optional[datasets.arrow_dataset.Dataset] = None"}],parametersDescription:[{anchor:"setfit.AbsaTrainer.evaluate.dataset",description:`<strong>dataset</strong> (<code>Dataset</code>, <em>optional</em>) &#x2014;
The dataset to compute the metrics on. If not provided, will use the evaluation dataset passed via
the <code>eval_dataset</code> argument at <code>Trainer</code> initialization.`,name:"dataset"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L316",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The evaluation metrics.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Dict[str, float]]</code></p>
`}}),Be=new u({props:{name:"pop_callback",anchor:"setfit.AbsaTrainer.pop_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.AbsaTrainer.pop_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will pop the first member of that class found in the list of callbacks.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L250",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The callbacks removed from the
aspect and polarity trainers, if found.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Tuple[</code><a
  href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback"
  rel="nofollow"
>TrainerCallback</a>, <a
  href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback"
  rel="nofollow"
>TrainerCallback</a><code>]</code></p>
`}}),Ke=new u({props:{name:"push_to_hub",anchor:"setfit.AbsaTrainer.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"polarity_repo_id",val:": typing.Optional[str] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.AbsaTrainer.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The full repository ID to push to, e.g. <code>&quot;tomaarsen/setfit-aspect&quot;</code>.`,name:"repo_id"},{anchor:"setfit.AbsaTrainer.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The full repository ID to push to, e.g. <code>&quot;tomaarsen/setfit-sst2&quot;</code>.`,name:"repo_id"},{anchor:"setfit.AbsaTrainer.push_to_hub.config",description:`<strong>config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Configuration object to be saved alongside the model weights.`,name:"config"},{anchor:"setfit.AbsaTrainer.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing.`,name:"commit_message"},{anchor:"setfit.AbsaTrainer.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to make the repo private. If <code>None</code> (default), the repo will be public unless the organization&#x2019;s default is private. This value is ignored if the repo already exists.`,name:"private"},{anchor:"setfit.AbsaTrainer.push_to_hub.api_endpoint",description:`<strong>api_endpoint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The API endpoint to use when pushing the model to the hub.`,name:"api_endpoint"},{anchor:"setfit.AbsaTrainer.push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files.
If not set, will use the token set when logging in with
<code>transformers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"setfit.AbsaTrainer.push_to_hub.branch",description:`<strong>branch</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The git branch on which to push the model. This defaults to
the default branch as specified in your repository, which
defaults to <code>&quot;main&quot;</code>.`,name:"branch"},{anchor:"setfit.AbsaTrainer.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>boolean</code>, <em>optional</em>) &#x2014;
Whether or not to create a Pull Request from <code>branch</code> with that commit.
Defaults to <code>False</code>.`,name:"create_pr"},{anchor:"setfit.AbsaTrainer.push_to_hub.allow_patterns",description:`<strong>allow_patterns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
If provided, only files matching at least one pattern are pushed.`,name:"allow_patterns"},{anchor:"setfit.AbsaTrainer.push_to_hub.ignore_patterns",description:`<strong>ignore_patterns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
If provided, files matching any of the patterns are not pushed.`,name:"ignore_patterns"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L279"}}),Ge=new u({props:{name:"remove_callback",anchor:"setfit.AbsaTrainer.remove_callback",parameters:[{name:"callback",val:": typing.Union[type, transformers.trainer_callback.TrainerCallback]"}],parametersDescription:[{anchor:"setfit.AbsaTrainer.remove_callback.callback",description:`<strong>callback</strong> (<code>type</code> or <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a> class or an instance of a <a href="https://huggingface.co/docs/transformers/main/en/main_classes/callback#transformers.TrainerCallback" rel="nofollow">TrainerCallback</a>. In the
first case, will remove the first member of that class found in the list of callbacks.`,name:"callback"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L267"}}),Je=new u({props:{name:"train",anchor:"setfit.AbsaTrainer.train",parameters:[{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"polarity_args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"trial",val:": typing.Union[ForwardRef('optuna.Trial'), typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.AbsaTrainer.train.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the aspect training arguments for this training call.`,name:"args"},{anchor:"setfit.AbsaTrainer.train.polarity_args",description:`<strong>polarity_args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the polarity training arguments for this training call.`,name:"polarity_args"},{anchor:"setfit.AbsaTrainer.train.trial",description:`<strong>trial</strong> (<code>optuna.Trial</code> or <code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The trial run or the hyperparameter dictionary for hyperparameter search.`,name:"trial"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L183"}}),Qe=new u({props:{name:"train_aspect",anchor:"setfit.AbsaTrainer.train_aspect",parameters:[{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"trial",val:": typing.Union[ForwardRef('optuna.Trial'), typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.AbsaTrainer.train_aspect.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the aspect training arguments for this training call.`,name:"args"},{anchor:"setfit.AbsaTrainer.train_aspect.trial",description:`<strong>trial</strong> (<code>optuna.Trial</code> or <code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The trial run or the hyperparameter dictionary for hyperparameter search.`,name:"trial"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L204"}}),Xe=new u({props:{name:"train_polarity",anchor:"setfit.AbsaTrainer.train_polarity",parameters:[{name:"args",val:": typing.Optional[setfit.training_args.TrainingArguments] = None"},{name:"trial",val:": typing.Union[ForwardRef('optuna.Trial'), typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"setfit.AbsaTrainer.train_polarity.args",description:`<strong>args</strong> (<code>TrainingArguments</code>, <em>optional</em>) &#x2014;
Temporarily change the aspect training arguments for this training call.`,name:"args"},{anchor:"setfit.AbsaTrainer.train_polarity.trial",description:`<strong>trial</strong> (<code>optuna.Trial</code> or <code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The trial run or the hyperparameter dictionary for hyperparameter search.`,name:"trial"}],source:"https://github.com/huggingface/setfit/blob/main/src/setfit/span/trainer.py#L221"}}),Ye=new Xr({props:{source:"https://github.com/huggingface/setfit/blob/main/docs/source/en/reference/trainer.mdx"}}),{c(){T=r("meta"),q=n(),C=r("p"),z=n(),s(de.$$.fragment),Zt=n(),s(me.$$.fragment),en=n(),s(pe.$$.fragment),tn=n(),D=r("div"),s(ge.$$.fragment),Pn=n(),tt=r("p"),tt.innerHTML=tr,Hn=n(),S=r("div"),s(fe.$$.fragment),Fn=n(),nt=r("p"),nt.textContent=nr,On=n(),E=r("div"),s(he.$$.fragment),zn=n(),at=r("p"),at.textContent=ar,Sn=n(),R=r("div"),s(ue.$$.fragment),En=n(),rt=r("p"),rt.textContent=rr,Rn=n(),ot=r("div"),s(be.$$.fragment),nn=n(),s(_e.$$.fragment),an=n(),_=r("div"),s(ve.$$.fragment),Un=n(),it=r("p"),it.textContent=or,Vn=n(),U=r("div"),s(Te.$$.fragment),jn=n(),st=r("p"),st.innerHTML=ir,Wn=n(),V=r("div"),s(ye.$$.fragment),Bn=n(),lt=r("p"),lt.textContent=sr,Kn=n(),j=r("div"),s(xe.$$.fragment),Gn=n(),ct=r("p"),ct.textContent=lr,Jn=n(),L=r("div"),s($e.$$.fragment),Qn=n(),dt=r("p"),dt.innerHTML=cr,Xn=n(),s(W.$$.fragment),Yn=n(),I=r("div"),s(ke.$$.fragment),Zn=n(),mt=r("p"),mt.innerHTML=dr,ea=n(),pt=r("p"),pt.innerHTML=mr,ta=n(),N=r("div"),s(we.$$.fragment),na=n(),gt=r("p"),gt.innerHTML=pr,aa=n(),ft=r("p"),ft.innerHTML=gr,ra=n(),B=r("div"),s(Ce.$$.fragment),oa=n(),ht=r("p"),ht.innerHTML=fr,ia=n(),K=r("div"),s(De.$$.fragment),sa=n(),ut=r("p"),ut.textContent=hr,la=n(),G=r("div"),s(Ae.$$.fragment),ca=n(),bt=r("p"),bt.textContent=ur,da=n(),J=r("div"),s(qe.$$.fragment),ma=n(),_t=r("p"),_t.innerHTML=br,rn=n(),s(Le.$$.fragment),on=n(),v=r("div"),s(Ie.$$.fragment),pa=n(),vt=r("p"),vt.textContent=_r,ga=n(),Q=r("div"),s(Ne.$$.fragment),fa=n(),Tt=r("p"),Tt.innerHTML=vr,ha=n(),X=r("div"),s(Me.$$.fragment),ua=n(),yt=r("p"),yt.textContent=Tr,ba=n(),Y=r("div"),s(Pe.$$.fragment),_a=n(),xt=r("p"),xt.textContent=yr,va=n(),M=r("div"),s(He.$$.fragment),Ta=n(),$t=r("p"),$t.innerHTML=xr,ya=n(),s(Z.$$.fragment),xa=n(),P=r("div"),s(Fe.$$.fragment),$a=n(),kt=r("p"),kt.innerHTML=$r,ka=n(),wt=r("p"),wt.innerHTML=kr,wa=n(),H=r("div"),s(Oe.$$.fragment),Ca=n(),Ct=r("p"),Ct.innerHTML=wr,Da=n(),Dt=r("p"),Dt.innerHTML=Cr,Aa=n(),ee=r("div"),s(ze.$$.fragment),qa=n(),At=r("p"),At.innerHTML=Dr,La=n(),te=r("div"),s(Se.$$.fragment),Ia=n(),qt=r("p"),qt.textContent=Ar,Na=n(),ne=r("div"),s(Ee.$$.fragment),Ma=n(),Lt=r("p"),Lt.textContent=qr,Pa=n(),ae=r("div"),s(Re.$$.fragment),Ha=n(),It=r("p"),It.innerHTML=Lr,sn=n(),s(Ue.$$.fragment),ln=n(),y=r("div"),s(Ve.$$.fragment),Fa=n(),Nt=r("p"),Nt.textContent=Ir,Oa=n(),re=r("div"),s(je.$$.fragment),za=n(),Mt=r("p"),Mt.innerHTML=Nr,Sa=n(),oe=r("div"),s(We.$$.fragment),Ea=n(),Pt=r("p"),Pt.textContent=Mr,Ra=n(),F=r("div"),s(Be.$$.fragment),Ua=n(),Ht=r("p"),Ht.innerHTML=Pr,Va=n(),Ft=r("p"),Ft.innerHTML=Hr,ja=n(),O=r("div"),s(Ke.$$.fragment),Wa=n(),Ot=r("p"),Ot.innerHTML=Fr,Ba=n(),zt=r("p"),zt.innerHTML=Or,Ka=n(),ie=r("div"),s(Ge.$$.fragment),Ga=n(),St=r("p"),St.innerHTML=zr,Ja=n(),se=r("div"),s(Je.$$.fragment),Qa=n(),Et=r("p"),Et.textContent=Sr,Xa=n(),le=r("div"),s(Qe.$$.fragment),Ya=n(),Rt=r("p"),Rt.textContent=Er,Za=n(),ce=r("div"),s(Xe.$$.fragment),er=n(),Ut=r("p"),Ut.textContent=Rr,cn=n(),s(Ye.$$.fragment),dn=n(),Xt=r("p"),this.h()},l(e){const b=Jr("svelte-u9bgzb",document.head);T=o(b,"META",{name:!0,content:!0}),b.forEach(i),q=a(e),C=o(e,"P",{}),f(C).forEach(i),z=a(e),l(de.$$.fragment,e),Zt=a(e),l(me.$$.fragment,e),en=a(e),l(pe.$$.fragment,e),tn=a(e),D=o(e,"DIV",{class:!0});var A=f(D);l(ge.$$.fragment,A),Pn=a(A),tt=o(A,"P",{"data-svelte-h":!0}),g(tt)!=="svelte-p0sds8"&&(tt.innerHTML=tr),Hn=a(A),S=o(A,"DIV",{class:!0});var Ze=f(S);l(fe.$$.fragment,Ze),Fn=a(Ze),nt=o(Ze,"P",{"data-svelte-h":!0}),g(nt)!=="svelte-11pk1us"&&(nt.textContent=nr),Ze.forEach(i),On=a(A),E=o(A,"DIV",{class:!0});var pn=f(E);l(he.$$.fragment,pn),zn=a(pn),at=o(pn,"P",{"data-svelte-h":!0}),g(at)!=="svelte-1071ny1"&&(at.textContent=ar),pn.forEach(i),Sn=a(A),R=o(A,"DIV",{class:!0});var gn=f(R);l(ue.$$.fragment,gn),En=a(gn),rt=o(gn,"P",{"data-svelte-h":!0}),g(rt)!=="svelte-7okfju"&&(rt.textContent=rr),gn.forEach(i),Rn=a(A),ot=o(A,"DIV",{class:!0});var Ur=f(ot);l(be.$$.fragment,Ur),Ur.forEach(i),A.forEach(i),nn=a(e),l(_e.$$.fragment,e),an=a(e),_=o(e,"DIV",{class:!0});var x=f(_);l(ve.$$.fragment,x),Un=a(x),it=o(x,"P",{"data-svelte-h":!0}),g(it)!=="svelte-gptbkh"&&(it.textContent=or),Vn=a(x),U=o(x,"DIV",{class:!0});var fn=f(U);l(Te.$$.fragment,fn),jn=a(fn),st=o(fn,"P",{"data-svelte-h":!0}),g(st)!=="svelte-rzpskg"&&(st.innerHTML=ir),fn.forEach(i),Wn=a(x),V=o(x,"DIV",{class:!0});var hn=f(V);l(ye.$$.fragment,hn),Bn=a(hn),lt=o(hn,"P",{"data-svelte-h":!0}),g(lt)!=="svelte-1gb5peh"&&(lt.textContent=sr),hn.forEach(i),Kn=a(x),j=o(x,"DIV",{class:!0});var un=f(j);l(xe.$$.fragment,un),Gn=a(un),ct=o(un,"P",{"data-svelte-h":!0}),g(ct)!=="svelte-bomxx4"&&(ct.textContent=lr),un.forEach(i),Jn=a(x),L=o(x,"DIV",{class:!0});var Vt=f(L);l($e.$$.fragment,Vt),Qn=a(Vt),dt=o(Vt,"P",{"data-svelte-h":!0}),g(dt)!=="svelte-1swdj1s"&&(dt.innerHTML=cr),Xn=a(Vt),l(W.$$.fragment,Vt),Vt.forEach(i),Yn=a(x),I=o(x,"DIV",{class:!0});var jt=f(I);l(ke.$$.fragment,jt),Zn=a(jt),mt=o(jt,"P",{"data-svelte-h":!0}),g(mt)!=="svelte-1vc4ru1"&&(mt.innerHTML=dr),ea=a(jt),pt=o(jt,"P",{"data-svelte-h":!0}),g(pt)!=="svelte-1ojzwr1"&&(pt.innerHTML=mr),jt.forEach(i),ta=a(x),N=o(x,"DIV",{class:!0});var Wt=f(N);l(we.$$.fragment,Wt),na=a(Wt),gt=o(Wt,"P",{"data-svelte-h":!0}),g(gt)!=="svelte-f2unia"&&(gt.innerHTML=pr),aa=a(Wt),ft=o(Wt,"P",{"data-svelte-h":!0}),g(ft)!=="svelte-1mz0ik2"&&(ft.innerHTML=gr),Wt.forEach(i),ra=a(x),B=o(x,"DIV",{class:!0});var bn=f(B);l(Ce.$$.fragment,bn),oa=a(bn),ht=o(bn,"P",{"data-svelte-h":!0}),g(ht)!=="svelte-e530fy"&&(ht.innerHTML=fr),bn.forEach(i),ia=a(x),K=o(x,"DIV",{class:!0});var _n=f(K);l(De.$$.fragment,_n),sa=a(_n),ut=o(_n,"P",{"data-svelte-h":!0}),g(ut)!=="svelte-1cilnet"&&(ut.textContent=hr),_n.forEach(i),la=a(x),G=o(x,"DIV",{class:!0});var vn=f(G);l(Ae.$$.fragment,vn),ca=a(vn),bt=o(vn,"P",{"data-svelte-h":!0}),g(bt)!=="svelte-5vymxn"&&(bt.textContent=ur),vn.forEach(i),da=a(x),J=o(x,"DIV",{class:!0});var Tn=f(J);l(qe.$$.fragment,Tn),ma=a(Tn),_t=o(Tn,"P",{"data-svelte-h":!0}),g(_t)!=="svelte-1pad1d1"&&(_t.innerHTML=br),Tn.forEach(i),x.forEach(i),rn=a(e),l(Le.$$.fragment,e),on=a(e),v=o(e,"DIV",{class:!0});var $=f(v);l(Ie.$$.fragment,$),pa=a($),vt=o($,"P",{"data-svelte-h":!0}),g(vt)!=="svelte-hai2sx"&&(vt.textContent=_r),ga=a($),Q=o($,"DIV",{class:!0});var yn=f(Q);l(Ne.$$.fragment,yn),fa=a(yn),Tt=o(yn,"P",{"data-svelte-h":!0}),g(Tt)!=="svelte-rzpskg"&&(Tt.innerHTML=vr),yn.forEach(i),ha=a($),X=o($,"DIV",{class:!0});var xn=f(X);l(Me.$$.fragment,xn),ua=a(xn),yt=o(xn,"P",{"data-svelte-h":!0}),g(yt)!=="svelte-1gb5peh"&&(yt.textContent=Tr),xn.forEach(i),ba=a($),Y=o($,"DIV",{class:!0});var $n=f(Y);l(Pe.$$.fragment,$n),_a=a($n),xt=o($n,"P",{"data-svelte-h":!0}),g(xt)!=="svelte-bomxx4"&&(xt.textContent=yr),$n.forEach(i),va=a($),M=o($,"DIV",{class:!0});var Bt=f(M);l(He.$$.fragment,Bt),Ta=a(Bt),$t=o(Bt,"P",{"data-svelte-h":!0}),g($t)!=="svelte-1swdj1s"&&($t.innerHTML=xr),ya=a(Bt),l(Z.$$.fragment,Bt),Bt.forEach(i),xa=a($),P=o($,"DIV",{class:!0});var Kt=f(P);l(Fe.$$.fragment,Kt),$a=a(Kt),kt=o(Kt,"P",{"data-svelte-h":!0}),g(kt)!=="svelte-1vc4ru1"&&(kt.innerHTML=$r),ka=a(Kt),wt=o(Kt,"P",{"data-svelte-h":!0}),g(wt)!=="svelte-1ojzwr1"&&(wt.innerHTML=kr),Kt.forEach(i),wa=a($),H=o($,"DIV",{class:!0});var Gt=f(H);l(Oe.$$.fragment,Gt),Ca=a(Gt),Ct=o(Gt,"P",{"data-svelte-h":!0}),g(Ct)!=="svelte-f2unia"&&(Ct.innerHTML=wr),Da=a(Gt),Dt=o(Gt,"P",{"data-svelte-h":!0}),g(Dt)!=="svelte-1mz0ik2"&&(Dt.innerHTML=Cr),Gt.forEach(i),Aa=a($),ee=o($,"DIV",{class:!0});var kn=f(ee);l(ze.$$.fragment,kn),qa=a(kn),At=o(kn,"P",{"data-svelte-h":!0}),g(At)!=="svelte-e530fy"&&(At.innerHTML=Dr),kn.forEach(i),La=a($),te=o($,"DIV",{class:!0});var wn=f(te);l(Se.$$.fragment,wn),Ia=a(wn),qt=o(wn,"P",{"data-svelte-h":!0}),g(qt)!=="svelte-1cilnet"&&(qt.textContent=Ar),wn.forEach(i),Na=a($),ne=o($,"DIV",{class:!0});var Cn=f(ne);l(Ee.$$.fragment,Cn),Ma=a(Cn),Lt=o(Cn,"P",{"data-svelte-h":!0}),g(Lt)!=="svelte-ww7918"&&(Lt.textContent=qr),Cn.forEach(i),Pa=a($),ae=o($,"DIV",{class:!0});var Dn=f(ae);l(Re.$$.fragment,Dn),Ha=a(Dn),It=o(Dn,"P",{"data-svelte-h":!0}),g(It)!=="svelte-1pad1d1"&&(It.innerHTML=Lr),Dn.forEach(i),$.forEach(i),sn=a(e),l(Ue.$$.fragment,e),ln=a(e),y=o(e,"DIV",{class:!0});var w=f(y);l(Ve.$$.fragment,w),Fa=a(w),Nt=o(w,"P",{"data-svelte-h":!0}),g(Nt)!=="svelte-tfv6dy"&&(Nt.textContent=Ir),Oa=a(w),re=o(w,"DIV",{class:!0});var An=f(re);l(je.$$.fragment,An),za=a(An),Mt=o(An,"P",{"data-svelte-h":!0}),g(Mt)!=="svelte-rzpskg"&&(Mt.innerHTML=Nr),An.forEach(i),Sa=a(w),oe=o(w,"DIV",{class:!0});var qn=f(oe);l(We.$$.fragment,qn),Ea=a(qn),Pt=o(qn,"P",{"data-svelte-h":!0}),g(Pt)!=="svelte-bomxx4"&&(Pt.textContent=Mr),qn.forEach(i),Ra=a(w),F=o(w,"DIV",{class:!0});var Jt=f(F);l(Be.$$.fragment,Jt),Ua=a(Jt),Ht=o(Jt,"P",{"data-svelte-h":!0}),g(Ht)!=="svelte-1vc4ru1"&&(Ht.innerHTML=Pr),Va=a(Jt),Ft=o(Jt,"P",{"data-svelte-h":!0}),g(Ft)!=="svelte-1ojzwr1"&&(Ft.innerHTML=Hr),Jt.forEach(i),ja=a(w),O=o(w,"DIV",{class:!0});var Qt=f(O);l(Ke.$$.fragment,Qt),Wa=a(Qt),Ot=o(Qt,"P",{"data-svelte-h":!0}),g(Ot)!=="svelte-f2unia"&&(Ot.innerHTML=Fr),Ba=a(Qt),zt=o(Qt,"P",{"data-svelte-h":!0}),g(zt)!=="svelte-1mz0ik2"&&(zt.innerHTML=Or),Qt.forEach(i),Ka=a(w),ie=o(w,"DIV",{class:!0});var Ln=f(ie);l(Ge.$$.fragment,Ln),Ga=a(Ln),St=o(Ln,"P",{"data-svelte-h":!0}),g(St)!=="svelte-e530fy"&&(St.innerHTML=zr),Ln.forEach(i),Ja=a(w),se=o(w,"DIV",{class:!0});var In=f(se);l(Je.$$.fragment,In),Qa=a(In),Et=o(In,"P",{"data-svelte-h":!0}),g(Et)!=="svelte-1cilnet"&&(Et.textContent=Sr),In.forEach(i),Xa=a(w),le=o(w,"DIV",{class:!0});var Nn=f(le);l(Qe.$$.fragment,Nn),Ya=a(Nn),Rt=o(Nn,"P",{"data-svelte-h":!0}),g(Rt)!=="svelte-1ukqc2q"&&(Rt.textContent=Er),Nn.forEach(i),Za=a(w),ce=o(w,"DIV",{class:!0});var Mn=f(ce);l(Xe.$$.fragment,Mn),er=a(Mn),Ut=o(Mn,"P",{"data-svelte-h":!0}),g(Ut)!=="svelte-1uh2o4y"&&(Ut.textContent=Rr),Mn.forEach(i),w.forEach(i),cn=a(e),l(Ye.$$.fragment,e),dn=a(e),Xt=o(e,"P",{}),f(Xt).forEach(i),this.h()},h(){h(T,"name","hf:doc:metadata"),h(T,"content",to),h(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(J,"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"),h(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(y,"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,b){t(document.head,T),k(e,q,b),k(e,C,b),k(e,z,b),c(de,e,b),k(e,Zt,b),c(me,e,b),k(e,en,b),c(pe,e,b),k(e,tn,b),k(e,D,b),c(ge,D,null),t(D,Pn),t(D,tt),t(D,Hn),t(D,S),c(fe,S,null),t(S,Fn),t(S,nt),t(D,On),t(D,E),c(he,E,null),t(E,zn),t(E,at),t(D,Sn),t(D,R),c(ue,R,null),t(R,En),t(R,rt),t(D,Rn),t(D,ot),c(be,ot,null),k(e,nn,b),c(_e,e,b),k(e,an,b),k(e,_,b),c(ve,_,null),t(_,Un),t(_,it),t(_,Vn),t(_,U),c(Te,U,null),t(U,jn),t(U,st),t(_,Wn),t(_,V),c(ye,V,null),t(V,Bn),t(V,lt),t(_,Kn),t(_,j),c(xe,j,null),t(j,Gn),t(j,ct),t(_,Jn),t(_,L),c($e,L,null),t(L,Qn),t(L,dt),t(L,Xn),c(W,L,null),t(_,Yn),t(_,I),c(ke,I,null),t(I,Zn),t(I,mt),t(I,ea),t(I,pt),t(_,ta),t(_,N),c(we,N,null),t(N,na),t(N,gt),t(N,aa),t(N,ft),t(_,ra),t(_,B),c(Ce,B,null),t(B,oa),t(B,ht),t(_,ia),t(_,K),c(De,K,null),t(K,sa),t(K,ut),t(_,la),t(_,G),c(Ae,G,null),t(G,ca),t(G,bt),t(_,da),t(_,J),c(qe,J,null),t(J,ma),t(J,_t),k(e,rn,b),c(Le,e,b),k(e,on,b),k(e,v,b),c(Ie,v,null),t(v,pa),t(v,vt),t(v,ga),t(v,Q),c(Ne,Q,null),t(Q,fa),t(Q,Tt),t(v,ha),t(v,X),c(Me,X,null),t(X,ua),t(X,yt),t(v,ba),t(v,Y),c(Pe,Y,null),t(Y,_a),t(Y,xt),t(v,va),t(v,M),c(He,M,null),t(M,Ta),t(M,$t),t(M,ya),c(Z,M,null),t(v,xa),t(v,P),c(Fe,P,null),t(P,$a),t(P,kt),t(P,ka),t(P,wt),t(v,wa),t(v,H),c(Oe,H,null),t(H,Ca),t(H,Ct),t(H,Da),t(H,Dt),t(v,Aa),t(v,ee),c(ze,ee,null),t(ee,qa),t(ee,At),t(v,La),t(v,te),c(Se,te,null),t(te,Ia),t(te,qt),t(v,Na),t(v,ne),c(Ee,ne,null),t(ne,Ma),t(ne,Lt),t(v,Pa),t(v,ae),c(Re,ae,null),t(ae,Ha),t(ae,It),k(e,sn,b),c(Ue,e,b),k(e,ln,b),k(e,y,b),c(Ve,y,null),t(y,Fa),t(y,Nt),t(y,Oa),t(y,re),c(je,re,null),t(re,za),t(re,Mt),t(y,Sa),t(y,oe),c(We,oe,null),t(oe,Ea),t(oe,Pt),t(y,Ra),t(y,F),c(Be,F,null),t(F,Ua),t(F,Ht),t(F,Va),t(F,Ft),t(y,ja),t(y,O),c(Ke,O,null),t(O,Wa),t(O,Ot),t(O,Ba),t(O,zt),t(y,Ka),t(y,ie),c(Ge,ie,null),t(ie,Ga),t(ie,St),t(y,Ja),t(y,se),c(Je,se,null),t(se,Qa),t(se,Et),t(y,Xa),t(y,le),c(Qe,le,null),t(le,Ya),t(le,Rt),t(y,Za),t(y,ce),c(Xe,ce,null),t(ce,er),t(ce,Ut),k(e,cn,b),c(Ye,e,b),k(e,dn,b),k(e,Xt,b),mn=!0},p(e,[b]){const A={};b&2&&(A.$$scope={dirty:b,ctx:e}),W.$set(A);const Ze={};b&2&&(Ze.$$scope={dirty:b,ctx:e}),Z.$set(Ze)},i(e){mn||(d(de.$$.fragment,e),d(me.$$.fragment,e),d(pe.$$.fragment,e),d(ge.$$.fragment,e),d(fe.$$.fragment,e),d(he.$$.fragment,e),d(ue.$$.fragment,e),d(be.$$.fragment,e),d(_e.$$.fragment,e),d(ve.$$.fragment,e),d(Te.$$.fragment,e),d(ye.$$.fragment,e),d(xe.$$.fragment,e),d($e.$$.fragment,e),d(W.$$.fragment,e),d(ke.$$.fragment,e),d(we.$$.fragment,e),d(Ce.$$.fragment,e),d(De.$$.fragment,e),d(Ae.$$.fragment,e),d(qe.$$.fragment,e),d(Le.$$.fragment,e),d(Ie.$$.fragment,e),d(Ne.$$.fragment,e),d(Me.$$.fragment,e),d(Pe.$$.fragment,e),d(He.$$.fragment,e),d(Z.$$.fragment,e),d(Fe.$$.fragment,e),d(Oe.$$.fragment,e),d(ze.$$.fragment,e),d(Se.$$.fragment,e),d(Ee.$$.fragment,e),d(Re.$$.fragment,e),d(Ue.$$.fragment,e),d(Ve.$$.fragment,e),d(je.$$.fragment,e),d(We.$$.fragment,e),d(Be.$$.fragment,e),d(Ke.$$.fragment,e),d(Ge.$$.fragment,e),d(Je.$$.fragment,e),d(Qe.$$.fragment,e),d(Xe.$$.fragment,e),d(Ye.$$.fragment,e),mn=!0)},o(e){m(de.$$.fragment,e),m(me.$$.fragment,e),m(pe.$$.fragment,e),m(ge.$$.fragment,e),m(fe.$$.fragment,e),m(he.$$.fragment,e),m(ue.$$.fragment,e),m(be.$$.fragment,e),m(_e.$$.fragment,e),m(ve.$$.fragment,e),m(Te.$$.fragment,e),m(ye.$$.fragment,e),m(xe.$$.fragment,e),m($e.$$.fragment,e),m(W.$$.fragment,e),m(ke.$$.fragment,e),m(we.$$.fragment,e),m(Ce.$$.fragment,e),m(De.$$.fragment,e),m(Ae.$$.fragment,e),m(qe.$$.fragment,e),m(Le.$$.fragment,e),m(Ie.$$.fragment,e),m(Ne.$$.fragment,e),m(Me.$$.fragment,e),m(Pe.$$.fragment,e),m(He.$$.fragment,e),m(Z.$$.fragment,e),m(Fe.$$.fragment,e),m(Oe.$$.fragment,e),m(ze.$$.fragment,e),m(Se.$$.fragment,e),m(Ee.$$.fragment,e),m(Re.$$.fragment,e),m(Ue.$$.fragment,e),m(Ve.$$.fragment,e),m(je.$$.fragment,e),m(We.$$.fragment,e),m(Be.$$.fragment,e),m(Ke.$$.fragment,e),m(Ge.$$.fragment,e),m(Je.$$.fragment,e),m(Qe.$$.fragment,e),m(Xe.$$.fragment,e),m(Ye.$$.fragment,e),mn=!1},d(e){e&&(i(q),i(C),i(z),i(Zt),i(en),i(tn),i(D),i(nn),i(an),i(_),i(rn),i(on),i(v),i(sn),i(ln),i(y),i(cn),i(dn),i(Xt)),i(T),p(de,e),p(me,e),p(pe,e),p(ge),p(fe),p(he),p(ue),p(be),p(_e,e),p(ve),p(Te),p(ye),p(xe),p($e),p(W),p(ke),p(we),p(Ce),p(De),p(Ae),p(qe),p(Le,e),p(Ie),p(Ne),p(Me),p(Pe),p(He),p(Z),p(Fe),p(Oe),p(ze),p(Se),p(Ee),p(Re),p(Ue,e),p(Ve),p(je),p(We),p(Be),p(Ke),p(Ge),p(Je),p(Qe),p(Xe),p(Ye,e)}}}const to='{"title":"Trainer Classes","local":"trainer-classes","sections":[{"title":"TrainingArguments","local":"setfit.TrainingArguments","sections":[],"depth":2},{"title":"Trainer","local":"setfit.Trainer","sections":[],"depth":2},{"title":"DistillationTrainer","local":"setfit.DistillationTrainer","sections":[],"depth":2},{"title":"AbsaTrainer","local":"setfit.AbsaTrainer","sections":[],"depth":2}],"depth":1}';function no(et){return Br(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class lo extends Kr{constructor(T){super(),Gr(this,T,no,eo,Wr,{})}}export{lo as component};
