import{s as xs,n as Gs,o as Fs}from"../chunks/scheduler.25b97de1.js";import{S as Ss,i as Rs,g as p,s as l,r as i,A as zs,h as r,f as e,c as n,j as As,u as m,x as o,k as Ns,y as Es,a as t,v as c,d as M,t as y,w as h}from"../chunks/index.d9030fc9.js";import{C as T}from"../chunks/CodeBlock.e6cd0d95.js";import{H as Cs,E as Ds}from"../chunks/EditOnGithub.91d95064.js";function Ls(bs){let J,z,S,E,u,D,j,gs='🤗 Transformers provides a <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> class optimized for training 🤗 Transformers models, making it easier to start training without manually writing your own training loop. The <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> provides API for hyperparameter search. This doc shows how to enable it in example.',L,U,P,w,_s=`<a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> supports four hyperparameter search backends currently:
<a href="https://optuna.org/" rel="nofollow">optuna</a>, <a href="https://sigopt.com/" rel="nofollow">sigopt</a>, <a href="https://docs.ray.io/en/latest/tune/index.html" rel="nofollow">raytune</a> and <a href="https://wandb.ai/site/sweeps" rel="nofollow">wandb</a>.`,K,d,$s="you should install them before using them as the hyperparameter search backend",O,f,ss,I,as,C,qs="Define the hyperparameter search space, different backends need different format.",es,b,Ws='For sigopt, see sigopt <a href="https://docs.sigopt.com/ai-module-api-references/api_reference/objects/object_parameter" rel="nofollow">object_parameter</a>, it’s like following:',ts,g,ls,_,ks='For optuna, see optuna <a href="https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/002_configurations.html#sphx-glr-tutorial-10-key-features-002-configurations-py" rel="nofollow">object_parameter</a>, it’s like following:',ns,$,ps,q,vs='Optuna provides multi-objective HPO. You can pass <code>direction</code> in <code>hyperparameter_search</code> and define your own compute_objective to return multiple objective values. The Pareto Front (<code>List[BestRun]</code>) will be returned in hyperparameter_search, you should refer to the test case <code>TrainerHyperParameterMultiObjectOptunaIntegrationTest</code> in <a href="https://github.com/huggingface/transformers/blob/main/tests/trainer/test_trainer.py" rel="nofollow">test_trainer</a>. It’s like following',rs,W,is,k,Bs='For raytune, see raytune <a href="https://docs.ray.io/en/latest/tune/api/search_space.html" rel="nofollow">object_parameter</a>, it’s like following:',ms,v,os,B,Xs='For wandb, see wandb <a href="https://docs.wandb.ai/guides/sweeps/configuration" rel="nofollow">object_parameter</a>, it’s like following:',cs,X,Ms,Y,Ys='Define a <code>model_init</code> function and pass it to the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, as an example:',ys,Z,hs,V,Zs='Create a <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> with your <code>model_init</code> function, training arguments, training and test datasets, and evaluation function:',Js,H,Ts,Q,Vs="Call hyperparameter search, get the best trial parameters, backend could be <code>&quot;optuna&quot;</code>/<code>&quot;sigopt&quot;</code>/<code>&quot;wandb&quot;</code>/<code>&quot;ray&quot;</code>. direction can be<code>&quot;minimize&quot;</code> or <code>&quot;maximize&quot;</code>, which indicates whether to optimize greater or lower objective.",us,A,Hs="You could define your own compute_objective function, if not defined, the default compute_objective will be called, and the sum of eval metric like f1 is returned as objective value.",js,N,Us,x,ws,G,Qs="Currently, Hyperparameter search for DDP is enabled for optuna and sigopt. Only the rank-zero process will generate the search trial and pass the argument to other ranks.",ds,F,fs,R,Is;return u=new Cs({props:{title:"Hyperparameter Search using Trainer API",local:"hyperparameter-search-using-trainer-api",headingTag:"h1"}}),U=new Cs({props:{title:"Hyperparameter Search backend",local:"hyperparameter-search-backend",headingTag:"h2"}}),f=new T({props:{code:"cGlwJTIwaW5zdGFsbCUyMG9wdHVuYSUyRnNpZ29wdCUyRndhbmRiJTJGcmF5JTVCdHVuZSU1RA==",highlighted:"pip install optuna/sigopt/wandb/ray[tune]",wrap:!1}}),I=new Cs({props:{title:"How to enable Hyperparameter search in example",local:"how-to-enable-hyperparameter-search-in-example",headingTag:"h2"}}),g=new T({props:{code:"ZGVmJTIwc2lnb3B0X2hwX3NwYWNlKHRyaWFsKSUzQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QiUyMmJvdW5kcyUyMiUzQSUyMCU3QiUyMm1pbiUyMiUzQSUyMDFlLTYlMkMlMjAlMjJtYXglMjIlM0ElMjAxZS00JTdEJTJDJTIwJTIybmFtZSUyMiUzQSUyMCUyMmxlYXJuaW5nX3JhdGUlMjIlMkMlMjAlMjJ0eXBlJTIyJTNBJTIwJTIyZG91YmxlJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyY2F0ZWdvcmljYWxfdmFsdWVzJTIyJTNBJTIwJTVCJTIyMTYlMjIlMkMlMjAlMjIzMiUyMiUyQyUyMCUyMjY0JTIyJTJDJTIwJTIyMTI4JTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybmFtZSUyMiUzQSUyMCUyMnBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnR5cGUlMjIlM0ElMjAlMjJjYXRlZ29yaWNhbCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3RCUyQyUwQSUyMCUyMCUyMCUyMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">sigopt_hp_space</span>(<span class="hljs-params">trial</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> [
<span class="hljs-meta">... </span>        {<span class="hljs-string">&quot;bounds&quot;</span>: {<span class="hljs-string">&quot;min&quot;</span>: <span class="hljs-number">1e-6</span>, <span class="hljs-string">&quot;max&quot;</span>: <span class="hljs-number">1e-4</span>}, <span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;learning_rate&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;double&quot;</span>},
<span class="hljs-meta">... </span>        {
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;categorical_values&quot;</span>: [<span class="hljs-string">&quot;16&quot;</span>, <span class="hljs-string">&quot;32&quot;</span>, <span class="hljs-string">&quot;64&quot;</span>, <span class="hljs-string">&quot;128&quot;</span>],
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;per_device_train_batch_size&quot;</span>,
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;categorical&quot;</span>,
<span class="hljs-meta">... </span>        },
<span class="hljs-meta">... </span>    ]`,wrap:!1}}),$=new T({props:{code:"ZGVmJTIwb3B0dW5hX2hwX3NwYWNlKHRyaWFsKSUzQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmxlYXJuaW5nX3JhdGUlMjIlM0ElMjB0cmlhbC5zdWdnZXN0X2Zsb2F0KCUyMmxlYXJuaW5nX3JhdGUlMjIlMkMlMjAxZS02JTJDJTIwMWUtNCUyQyUyMGxvZyUzRFRydWUpJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTIyJTNBJTIwdHJpYWwuc3VnZ2VzdF9jYXRlZ29yaWNhbCglMjJwZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlMjIlMkMlMjAlNUIxNiUyQyUyMDMyJTJDJTIwNjQlMkMlMjAxMjglNUQpJTJDJTBBJTIwJTIwJTIwJTIwJTdE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">optuna_hp_space</span>(<span class="hljs-params">trial</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;learning_rate&quot;</span>: trial.suggest_float(<span class="hljs-string">&quot;learning_rate&quot;</span>, <span class="hljs-number">1e-6</span>, <span class="hljs-number">1e-4</span>, log=<span class="hljs-literal">True</span>),
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;per_device_train_batch_size&quot;</span>: trial.suggest_categorical(<span class="hljs-string">&quot;per_device_train_batch_size&quot;</span>, [<span class="hljs-number">16</span>, <span class="hljs-number">32</span>, <span class="hljs-number">64</span>, <span class="hljs-number">128</span>]),
<span class="hljs-meta">... </span>    }`,wrap:!1}}),W=new T({props:{code:"YmVzdF90cmlhbHMlMjAlM0QlMjB0cmFpbmVyLmh5cGVycGFyYW1ldGVyX3NlYXJjaCglMEElMjAlMjAlMjAlMjBkaXJlY3Rpb24lM0QlNUIlMjJtaW5pbWl6ZSUyMiUyQyUyMCUyMm1heGltaXplJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwYmFja2VuZCUzRCUyMm9wdHVuYSUyMiUyQyUwQSUyMCUyMCUyMCUyMGhwX3NwYWNlJTNEb3B0dW5hX2hwX3NwYWNlJTJDJTBBJTIwJTIwJTIwJTIwbl90cmlhbHMlM0QyMCUyQyUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfb2JqZWN0aXZlJTNEY29tcHV0ZV9vYmplY3RpdmUlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>best_trials = trainer.hyperparameter_search(
<span class="hljs-meta">... </span>    direction=[<span class="hljs-string">&quot;minimize&quot;</span>, <span class="hljs-string">&quot;maximize&quot;</span>],
<span class="hljs-meta">... </span>    backend=<span class="hljs-string">&quot;optuna&quot;</span>,
<span class="hljs-meta">... </span>    hp_space=optuna_hp_space,
<span class="hljs-meta">... </span>    n_trials=<span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    compute_objective=compute_objective,
<span class="hljs-meta">... </span>)`,wrap:!1}}),v=new T({props:{code:"ZGVmJTIwcmF5X2hwX3NwYWNlKHRyaWFsKSUzQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmxlYXJuaW5nX3JhdGUlMjIlM0ElMjB0dW5lLmxvZ3VuaWZvcm0oMWUtNiUyQyUyMDFlLTQpJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTIyJTNBJTIwdHVuZS5jaG9pY2UoJTVCMTYlMkMlMjAzMiUyQyUyMDY0JTJDJTIwMTI4JTVEKSUyQyUwQSUyMCUyMCUyMCUyMCU3RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">ray_hp_space</span>(<span class="hljs-params">trial</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;learning_rate&quot;</span>: tune.loguniform(<span class="hljs-number">1e-6</span>, <span class="hljs-number">1e-4</span>),
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;per_device_train_batch_size&quot;</span>: tune.choice([<span class="hljs-number">16</span>, <span class="hljs-number">32</span>, <span class="hljs-number">64</span>, <span class="hljs-number">128</span>]),
<span class="hljs-meta">... </span>    }`,wrap:!1}}),X=new T({props:{code:"ZGVmJTIwd2FuZGJfaHBfc3BhY2UodHJpYWwpJTNBJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybWV0aG9kJTIyJTNBJTIwJTIycmFuZG9tJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIybWV0cmljJTIyJTNBJTIwJTdCJTIybmFtZSUyMiUzQSUyMCUyMm9iamVjdGl2ZSUyMiUyQyUyMCUyMmdvYWwlMjIlM0ElMjAlMjJtaW5pbWl6ZSUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnBhcmFtZXRlcnMlMjIlM0ElMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJsZWFybmluZ19yYXRlJTIyJTNBJTIwJTdCJTIyZGlzdHJpYnV0aW9uJTIyJTNBJTIwJTIydW5pZm9ybSUyMiUyQyUyMCUyMm1pbiUyMiUzQSUyMDFlLTYlMkMlMjAlMjJtYXglMjIlM0ElMjAxZS00JTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTIyJTNBJTIwJTdCJTIydmFsdWVzJTIyJTNBJTIwJTVCMTYlMkMlMjAzMiUyQyUyMDY0JTJDJTIwMTI4JTVEJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">wandb_hp_space</span>(<span class="hljs-params">trial</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> {
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;method&quot;</span>: <span class="hljs-string">&quot;random&quot;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;metric&quot;</span>: {<span class="hljs-string">&quot;name&quot;</span>: <span class="hljs-string">&quot;objective&quot;</span>, <span class="hljs-string">&quot;goal&quot;</span>: <span class="hljs-string">&quot;minimize&quot;</span>},
<span class="hljs-meta">... </span>        <span class="hljs-string">&quot;parameters&quot;</span>: {
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;learning_rate&quot;</span>: {<span class="hljs-string">&quot;distribution&quot;</span>: <span class="hljs-string">&quot;uniform&quot;</span>, <span class="hljs-string">&quot;min&quot;</span>: <span class="hljs-number">1e-6</span>, <span class="hljs-string">&quot;max&quot;</span>: <span class="hljs-number">1e-4</span>},
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;per_device_train_batch_size&quot;</span>: {<span class="hljs-string">&quot;values&quot;</span>: [<span class="hljs-number">16</span>, <span class="hljs-number">32</span>, <span class="hljs-number">64</span>, <span class="hljs-number">128</span>]},
<span class="hljs-meta">... </span>        },
<span class="hljs-meta">... </span>    }`,wrap:!1}}),Z=new T({props:{code:"ZGVmJTIwbW9kZWxfaW5pdCh0cmlhbCklM0ElMEElMjAlMjAlMjAlMjByZXR1cm4lMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtb2RlbF9hcmdzLm1vZGVsX25hbWVfb3JfcGF0aCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGZyb21fdGYlM0Rib29sKCUyMi5ja3B0JTIyJTIwaW4lMjBtb2RlbF9hcmdzLm1vZGVsX25hbWVfb3JfcGF0aCklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBjb25maWclM0Rjb25maWclMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBjYWNoZV9kaXIlM0Rtb2RlbF9hcmdzLmNhY2hlX2RpciUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldmlzaW9uJTNEbW9kZWxfYXJncy5tb2RlbF9yZXZpc2lvbiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHRva2VuJTNEVHJ1ZSUyMGlmJTIwbW9kZWxfYXJncy51c2VfYXV0aF90b2tlbiUyMGVsc2UlMjBOb25lJTJDJTBBJTIwJTIwJTIwJTIwKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">model_init</span>(<span class="hljs-params">trial</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> AutoModelForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>        model_args.model_name_or_path,
<span class="hljs-meta">... </span>        from_tf=<span class="hljs-built_in">bool</span>(<span class="hljs-string">&quot;.ckpt&quot;</span> <span class="hljs-keyword">in</span> model_args.model_name_or_path),
<span class="hljs-meta">... </span>        config=config,
<span class="hljs-meta">... </span>        cache_dir=model_args.cache_dir,
<span class="hljs-meta">... </span>        revision=model_args.model_revision,
<span class="hljs-meta">... </span>        token=<span class="hljs-literal">True</span> <span class="hljs-keyword">if</span> model_args.use_auth_token <span class="hljs-keyword">else</span> <span class="hljs-literal">None</span>,
<span class="hljs-meta">... </span>    )`,wrap:!1}}),H=new T({props:{code:"dHJhaW5lciUyMCUzRCUyMFRyYWluZXIoJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0ROb25lJTJDJTBBJTIwJTIwJTIwJTIwYXJncyUzRHRyYWluaW5nX2FyZ3MlMkMlMEElMjAlMjAlMjAlMjB0cmFpbl9kYXRhc2V0JTNEc21hbGxfdHJhaW5fZGF0YXNldCUyQyUwQSUyMCUyMCUyMCUyMGV2YWxfZGF0YXNldCUzRHNtYWxsX2V2YWxfZGF0YXNldCUyQyUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfbWV0cmljcyUzRGNvbXB1dGVfbWV0cmljcyUyQyUwQSUyMCUyMCUyMCUyMHByb2Nlc3NpbmdfY2xhc3MlM0R0b2tlbml6ZXIlMkMlMEElMjAlMjAlMjAlMjBtb2RlbF9pbml0JTNEbW9kZWxfaW5pdCUyQyUwQSUyMCUyMCUyMCUyMGRhdGFfY29sbGF0b3IlM0RkYXRhX2NvbGxhdG9yJTJDJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>trainer = Trainer(
<span class="hljs-meta">... </span>    model=<span class="hljs-literal">None</span>,
<span class="hljs-meta">... </span>    args=training_args,
<span class="hljs-meta">... </span>    train_dataset=small_train_dataset,
<span class="hljs-meta">... </span>    eval_dataset=small_eval_dataset,
<span class="hljs-meta">... </span>    compute_metrics=compute_metrics,
<span class="hljs-meta">... </span>    processing_class=tokenizer,
<span class="hljs-meta">... </span>    model_init=model_init,
<span class="hljs-meta">... </span>    data_collator=data_collator,
<span class="hljs-meta">... </span>)`,wrap:!1}}),N=new T({props:{code:"YmVzdF90cmlhbCUyMCUzRCUyMHRyYWluZXIuaHlwZXJwYXJhbWV0ZXJfc2VhcmNoKCUwQSUyMCUyMCUyMCUyMGRpcmVjdGlvbiUzRCUyMm1heGltaXplJTIyJTJDJTBBJTIwJTIwJTIwJTIwYmFja2VuZCUzRCUyMm9wdHVuYSUyMiUyQyUwQSUyMCUyMCUyMCUyMGhwX3NwYWNlJTNEb3B0dW5hX2hwX3NwYWNlJTJDJTBBJTIwJTIwJTIwJTIwbl90cmlhbHMlM0QyMCUyQyUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfb2JqZWN0aXZlJTNEY29tcHV0ZV9vYmplY3RpdmUlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>best_trial = trainer.hyperparameter_search(
<span class="hljs-meta">... </span>    direction=<span class="hljs-string">&quot;maximize&quot;</span>,
<span class="hljs-meta">... </span>    backend=<span class="hljs-string">&quot;optuna&quot;</span>,
<span class="hljs-meta">... </span>    hp_space=optuna_hp_space,
<span class="hljs-meta">... </span>    n_trials=<span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    compute_objective=compute_objective,
<span class="hljs-meta">... </span>)`,wrap:!1}}),x=new Cs({props:{title:"Hyperparameter search For DDP finetune",local:"hyperparameter-search-for-ddp-finetune",headingTag:"h2"}}),F=new Ds({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/hpo_train.md"}}),{c(){J=p("meta"),z=l(),S=p("p"),E=l(),i(u.$$.fragment),D=l(),j=p("p"),j.innerHTML=gs,L=l(),i(U.$$.fragment),P=l(),w=p("p"),w.innerHTML=_s,K=l(),d=p("p"),d.textContent=$s,O=l(),i(f.$$.fragment),ss=l(),i(I.$$.fragment),as=l(),C=p("p"),C.textContent=qs,es=l(),b=p("p"),b.innerHTML=Ws,ts=l(),i(g.$$.fragment),ls=l(),_=p("p"),_.innerHTML=ks,ns=l(),i($.$$.fragment),ps=l(),q=p("p"),q.innerHTML=vs,rs=l(),i(W.$$.fragment),is=l(),k=p("p"),k.innerHTML=Bs,ms=l(),i(v.$$.fragment),os=l(),B=p("p"),B.innerHTML=Xs,cs=l(),i(X.$$.fragment),Ms=l(),Y=p("p"),Y.innerHTML=Ys,ys=l(),i(Z.$$.fragment),hs=l(),V=p("p"),V.innerHTML=Zs,Js=l(),i(H.$$.fragment),Ts=l(),Q=p("p"),Q.innerHTML=Vs,us=l(),A=p("p"),A.textContent=Hs,js=l(),i(N.$$.fragment),Us=l(),i(x.$$.fragment),ws=l(),G=p("p"),G.textContent=Qs,ds=l(),i(F.$$.fragment),fs=l(),R=p("p"),this.h()},l(s){const a=zs("svelte-u9bgzb",document.head);J=r(a,"META",{name:!0,content:!0}),a.forEach(e),z=n(s),S=r(s,"P",{}),As(S).forEach(e),E=n(s),m(u.$$.fragment,s),D=n(s),j=r(s,"P",{"data-svelte-h":!0}),o(j)!=="svelte-1dk3250"&&(j.innerHTML=gs),L=n(s),m(U.$$.fragment,s),P=n(s),w=r(s,"P",{"data-svelte-h":!0}),o(w)!=="svelte-jhxq6g"&&(w.innerHTML=_s),K=n(s),d=r(s,"P",{"data-svelte-h":!0}),o(d)!=="svelte-ttiwiu"&&(d.textContent=$s),O=n(s),m(f.$$.fragment,s),ss=n(s),m(I.$$.fragment,s),as=n(s),C=r(s,"P",{"data-svelte-h":!0}),o(C)!=="svelte-1jwax0f"&&(C.textContent=qs),es=n(s),b=r(s,"P",{"data-svelte-h":!0}),o(b)!=="svelte-dng8fq"&&(b.innerHTML=Ws),ts=n(s),m(g.$$.fragment,s),ls=n(s),_=r(s,"P",{"data-svelte-h":!0}),o(_)!=="svelte-1o2m9k6"&&(_.innerHTML=ks),ns=n(s),m($.$$.fragment,s),ps=n(s),q=r(s,"P",{"data-svelte-h":!0}),o(q)!=="svelte-e3s4e6"&&(q.innerHTML=vs),rs=n(s),m(W.$$.fragment,s),is=n(s),k=r(s,"P",{"data-svelte-h":!0}),o(k)!=="svelte-1fs958e"&&(k.innerHTML=Bs),ms=n(s),m(v.$$.fragment,s),os=n(s),B=r(s,"P",{"data-svelte-h":!0}),o(B)!=="svelte-uzyw2c"&&(B.innerHTML=Xs),cs=n(s),m(X.$$.fragment,s),Ms=n(s),Y=r(s,"P",{"data-svelte-h":!0}),o(Y)!=="svelte-r45o8p"&&(Y.innerHTML=Ys),ys=n(s),m(Z.$$.fragment,s),hs=n(s),V=r(s,"P",{"data-svelte-h":!0}),o(V)!=="svelte-1ozcn5o"&&(V.innerHTML=Zs),Js=n(s),m(H.$$.fragment,s),Ts=n(s),Q=r(s,"P",{"data-svelte-h":!0}),o(Q)!=="svelte-rd47zq"&&(Q.innerHTML=Vs),us=n(s),A=r(s,"P",{"data-svelte-h":!0}),o(A)!=="svelte-v9khww"&&(A.textContent=Hs),js=n(s),m(N.$$.fragment,s),Us=n(s),m(x.$$.fragment,s),ws=n(s),G=r(s,"P",{"data-svelte-h":!0}),o(G)!=="svelte-1ib1l1l"&&(G.textContent=Qs),ds=n(s),m(F.$$.fragment,s),fs=n(s),R=r(s,"P",{}),As(R).forEach(e),this.h()},h(){Ns(J,"name","hf:doc:metadata"),Ns(J,"content",Ps)},m(s,a){Es(document.head,J),t(s,z,a),t(s,S,a),t(s,E,a),c(u,s,a),t(s,D,a),t(s,j,a),t(s,L,a),c(U,s,a),t(s,P,a),t(s,w,a),t(s,K,a),t(s,d,a),t(s,O,a),c(f,s,a),t(s,ss,a),c(I,s,a),t(s,as,a),t(s,C,a),t(s,es,a),t(s,b,a),t(s,ts,a),c(g,s,a),t(s,ls,a),t(s,_,a),t(s,ns,a),c($,s,a),t(s,ps,a),t(s,q,a),t(s,rs,a),c(W,s,a),t(s,is,a),t(s,k,a),t(s,ms,a),c(v,s,a),t(s,os,a),t(s,B,a),t(s,cs,a),c(X,s,a),t(s,Ms,a),t(s,Y,a),t(s,ys,a),c(Z,s,a),t(s,hs,a),t(s,V,a),t(s,Js,a),c(H,s,a),t(s,Ts,a),t(s,Q,a),t(s,us,a),t(s,A,a),t(s,js,a),c(N,s,a),t(s,Us,a),c(x,s,a),t(s,ws,a),t(s,G,a),t(s,ds,a),c(F,s,a),t(s,fs,a),t(s,R,a),Is=!0},p:Gs,i(s){Is||(M(u.$$.fragment,s),M(U.$$.fragment,s),M(f.$$.fragment,s),M(I.$$.fragment,s),M(g.$$.fragment,s),M($.$$.fragment,s),M(W.$$.fragment,s),M(v.$$.fragment,s),M(X.$$.fragment,s),M(Z.$$.fragment,s),M(H.$$.fragment,s),M(N.$$.fragment,s),M(x.$$.fragment,s),M(F.$$.fragment,s),Is=!0)},o(s){y(u.$$.fragment,s),y(U.$$.fragment,s),y(f.$$.fragment,s),y(I.$$.fragment,s),y(g.$$.fragment,s),y($.$$.fragment,s),y(W.$$.fragment,s),y(v.$$.fragment,s),y(X.$$.fragment,s),y(Z.$$.fragment,s),y(H.$$.fragment,s),y(N.$$.fragment,s),y(x.$$.fragment,s),y(F.$$.fragment,s),Is=!1},d(s){s&&(e(z),e(S),e(E),e(D),e(j),e(L),e(P),e(w),e(K),e(d),e(O),e(ss),e(as),e(C),e(es),e(b),e(ts),e(ls),e(_),e(ns),e(ps),e(q),e(rs),e(is),e(k),e(ms),e(os),e(B),e(cs),e(Ms),e(Y),e(ys),e(hs),e(V),e(Js),e(Ts),e(Q),e(us),e(A),e(js),e(Us),e(ws),e(G),e(ds),e(fs),e(R)),e(J),h(u,s),h(U,s),h(f,s),h(I,s),h(g,s),h($,s),h(W,s),h(v,s),h(X,s),h(Z,s),h(H,s),h(N,s),h(x,s),h(F,s)}}}const Ps='{"title":"Hyperparameter Search using Trainer API","local":"hyperparameter-search-using-trainer-api","sections":[{"title":"Hyperparameter Search backend","local":"hyperparameter-search-backend","sections":[],"depth":2},{"title":"How to enable Hyperparameter search in example","local":"how-to-enable-hyperparameter-search-in-example","sections":[],"depth":2},{"title":"Hyperparameter search For DDP finetune","local":"hyperparameter-search-for-ddp-finetune","sections":[],"depth":2}],"depth":1}';function Ks(bs){return Fs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ta extends Ss{constructor(J){super(),Rs(this,J,Ks,Ls,xs,{})}}export{ta as component};
