import{S as it,i as dt,s as pt,e as r,k as f,w,t as p,M as mt,c as n,d as a,m as b,a as l,x as v,h as m,b as u,G as t,g as _,y as $,q as T,o as M,B as J,v as ht,L as Ae}from"../../chunks/vendor-hf-doc-builder.js";import{D as ct}from"../../chunks/Docstring-hf-doc-builder.js";import{C as De}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ke}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Xe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ut(Z){let s,h;return s=new De({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9tZXRyaWMlMEElMEFyb3VnZV9tZXRyaWMlMjAlM0QlMjBsb2FkX21ldHJpYyglMjJyb3VnZSUyMiklMEElMEElMEFkZWYlMjByb3VnZV9mbihwcmVkaWN0aW9ucyUyQyUyMGxhYmVscyklM0ElMEElMjAlMjAlMjAlMjBkZWNvZGVkX3ByZWRpY3Rpb25zJTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShwcmVkaWN0aW9ucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUyMCUyMCUyMCUyMGRlY29kZWRfbGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShsYWJlbHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEElMjAlMjAlMjAlMjByZXN1bHQlMjAlM0QlMjByb3VnZV9tZXRyaWMuY29tcHV0ZShwcmVkaWN0aW9ucyUzRGRlY29kZWRfcHJlZGljdGlvbnMlMkMlMjByZWZlcmVuY2VzJTNEZGVjb2RlZF9sYWJlbHMpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwJTdCa2V5JTNBJTIwdmFsdWUubWlkLmZtZWFzdXJlJTIwKiUyMDEwMCUyMGZvciUyMGtleSUyQyUyMHZhbHVlJTIwaW4lMjByZXN1bHQuaXRlbXMoKSU3RA==",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_metric

rouge_metric = load_metric(<span class="hljs-string">&quot;rouge&quot;</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">rouge_fn</span>(<span class="hljs-params">predictions, labels</span>):
    decoded_predictions = tokenizer.batch_decode(predictions, skip_special_tokens=<span class="hljs-literal">True</span>)
    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=<span class="hljs-literal">True</span>)
    result = rouge_metric.compute(predictions=decoded_predictions, references=decoded_labels)
    <span class="hljs-keyword">return</span> {key: value.mid.fmeasure * <span class="hljs-number">100</span> <span class="hljs-keyword">for</span> key, value <span class="hljs-keyword">in</span> result.items()}`}}),{c(){w(s.$$.fragment)},l(o){v(s.$$.fragment,o)},m(o,d){$(s,o,d),h=!0},p:Ae,i(o){h||(T(s.$$.fragment,o),h=!0)},o(o){M(s.$$.fragment,o),h=!1},d(o){J(s,o)}}}function ft(Z){let s,h,o,d,E;return d=new De({props:{code:"JTdCJ3JvdWdlMSclM0ElMjAzNy40MTk5JTJDJTIwJ3JvdWdlMiclM0ElMjAxMy45NzY4JTJDJTIwJ3JvdWdlTCclM0ElMjAzNC4zNjElMkMlMjAncm91Z2VMc3VtJyUzQSUyMDM1LjA3ODE=",highlighted:'{&#x27;rouge1&#x27;: <span class="hljs-number">37.4199</span>, &#x27;rouge2&#x27;: <span class="hljs-number">13.9768</span>, &#x27;rougeL&#x27;: <span class="hljs-number">34.361</span>, &#x27;rougeLsum&#x27;: <span class="hljs-number">35.0781</span>'}}),{c(){s=r("p"),h=p("The above function will return a dict containing values which will be logged like any other Keras metric:"),o=f(),w(d.$$.fragment)},l(c){s=n(c,"P",{});var x=l(s);h=m(x,"The above function will return a dict containing values which will be logged like any other Keras metric:"),x.forEach(a),o=b(c),v(d.$$.fragment,c)},m(c,x){_(c,s,x),t(s,h),_(c,o,x),$(d,c,x),E=!0},p:Ae,i(c){E||(T(d.$$.fragment,c),E=!0)},o(c){M(d.$$.fragment,c),E=!1},d(c){c&&a(s),c&&a(o),J(d,c)}}}function bt(Z){let s,h;return s=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5rZXJhc19jYWxsYmFja3MlMjBpbXBvcnQlMjBQdXNoVG9IdWJDYWxsYmFjayUwQSUwQXB1c2hfdG9faHViX2NhbGxiYWNrJTIwJTNEJTIwUHVzaFRvSHViQ2FsbGJhY2soJTBBJTIwJTIwJTIwJTIwb3V0cHV0X2RpciUzRCUyMi4lMkZtb2RlbF9zYXZlJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyJTJDJTBBJTIwJTIwJTIwJTIwaHViX21vZGVsX2lkJTNEJTIyZ3B0NS03eGxhcmdlJTIyJTJDJTBBKSUwQSUwQW1vZGVsLmZpdCh0cmFpbl9kYXRhc2V0JTJDJTIwY2FsbGJhY2tzJTNEJTVCcHVzaF90b19odWJfY2FsbGJhY2slNUQp",highlighted:`<span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> PushToHubCallback

push_to_hub_callback = PushToHubCallback(
    output_dir=<span class="hljs-string">&quot;./model_save&quot;</span>,
    tokenizer=tokenizer,
    hub_model_id=<span class="hljs-string">&quot;gpt5-7xlarge&quot;</span>,
)

model.fit(train_dataset, callbacks=[push_to_hub_callback])`}}),{c(){w(s.$$.fragment)},l(o){v(s.$$.fragment,o)},m(o,d){$(s,o,d),h=!0},p:Ae,i(o){h||(T(s.$$.fragment,o),h=!0)},o(o){M(s.$$.fragment,o),h=!1},d(o){J(s,o)}}}function gt(Z){let s,h,o,d,E,c,x,R,be,ce,A,ge,ie,j,z,Y,B,_e,q,ke,de,g,G,ye,k,we,L,ve,$e,O,Te,Me,Q,Je,Ee,ee,xe,Ce,We,te,je,Ie,H,Ne,V,pe,I,U,ae,S,Ze,oe,ze,me,y,K,He,N,Ve,se,Ue,Pe,re,Be,Ge,Se,P,he;return c=new Ke({}),B=new Ke({}),G=new ct({props:{name:"class transformers.KerasMetricCallback",anchor:"transformers.KerasMetricCallback",parameters:[{name:"metric_fn",val:": typing.Callable"},{name:"eval_dataset",val:": typing.Union[tensorflow.python.data.ops.dataset_ops.DatasetV2, numpy.ndarray, tensorflow.python.framework.ops.Tensor, tuple, dict]"},{name:"output_cols",val:": typing.Optional[typing.List[str]] = None"},{name:"label_cols",val:": typing.Optional[typing.List[str]] = None"},{name:"batch_size",val:": typing.Optional[int] = None"},{name:"predict_with_generate",val:": bool = False"},{name:"use_xla_generation",val:": bool = False"},{name:"generate_kwargs",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"transformers.KerasMetricCallback.metric_fn",description:`<strong>metric_fn</strong> (<code>Callable</code>) &#x2014;
Metric function provided by the user. It will be called with two arguments - <code>predictions</code> and <code>labels</code>.
These contain the model&#x2019;s outputs and matching labels from the dataset. It should return a dict mapping
metric names to numerical values.`,name:"metric_fn"},{anchor:"transformers.KerasMetricCallback.eval_dataset",description:`<strong>eval_dataset</strong> (<code>tf.data.Dataset</code> or <code>dict</code> or <code>tuple</code> or <code>np.ndarray</code> or <code>tf.Tensor</code>) &#x2014;
Validation data to be used to generate predictions for the <code>metric_fn</code>.`,name:"eval_dataset"},{anchor:"transformers.KerasMetricCallback.output_cols",description:"<strong>output_cols</strong> (`List[str], <em>optional</em>) &#x2014;\nA list of columns to be retained from the model output as the predictions. Defaults to all.",name:"output_cols"},{anchor:"transformers.KerasMetricCallback.label_cols",description:`<strong>label_cols</strong> (&#x2019;<code>List[str]</code>, <em>optional</em>&#x2019;) &#x2014;
A list of columns to be retained from the input dataset as the labels. Will be autodetected if this is not
supplied.`,name:"label_cols"},{anchor:"transformers.KerasMetricCallback.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Batch size. Only used when the data is not a pre-batched <code>tf.data.Dataset</code>.`,name:"batch_size"},{anchor:"transformers.KerasMetricCallback.predict_with_generate",description:`<strong>predict_with_generate</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether we should use <code>model.generate()</code> to get outputs for the model.`,name:"predict_with_generate"},{anchor:"transformers.KerasMetricCallback.use_xla_generation",description:`<strong>use_xla_generation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If we&#x2019;re generating, whether to compile model generation with XLA. This can massively increase the speed of
generation (up to 100X speedup) but will require a new XLA compilation for each input shape. When using XLA
generation, it&#x2019;s a good idea to pad your inputs to the same size, or to use the <code>pad_to_multiple_of</code>
argument in your <code>tokenizer</code> or <code>DataCollator</code>, which will reduce the number of unique input shapes and
save a lot of compilation time. This option has no effect is <code>predict_with_generate</code> is <code>False</code>.`,name:"use_xla_generation"},{anchor:"transformers.KerasMetricCallback.generate_kwargs",description:`<strong>generate_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Keyword arguments to pass to <code>model.generate()</code> when generating. Has no effect if <code>predict_with_generate</code>
is <code>False</code>.`,name:"generate_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/keras_callbacks.py#L21"}}),H=new Xe({props:{anchor:"transformers.KerasMetricCallback.example",$$slots:{default:[ut]},$$scope:{ctx:Z}}}),V=new Xe({props:{anchor:"transformers.KerasMetricCallback.example-2",$$slots:{default:[ft]},$$scope:{ctx:Z}}}),S=new Ke({}),K=new ct({props:{name:"class transformers.PushToHubCallback",anchor:"transformers.PushToHubCallback",parameters:[{name:"output_dir",val:": typing.Union[str, pathlib.Path]"},{name:"save_strategy",val:": typing.Union[str, transformers.trainer_utils.IntervalStrategy] = 'epoch'"},{name:"save_steps",val:": typing.Optional[int] = None"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils_base.PreTrainedTokenizerBase] = None"},{name:"hub_model_id",val:": typing.Optional[str] = None"},{name:"hub_token",val:": typing.Optional[str] = None"},{name:"checkpoint",val:": bool = False"},{name:"**model_card_args",val:""}],parametersDescription:[{anchor:"transformers.PushToHubCallback.output_dir",description:`<strong>output_dir</strong> (<code>str</code>) &#x2014;
The output directory where the model predictions and checkpoints will be written and synced with the
repository on the Hub.`,name:"output_dir"},{anchor:"transformers.PushToHubCallback.save_strategy",description:`<strong>save_strategy</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/trainer_utils#transformers.IntervalStrategy">IntervalStrategy</a>, <em>optional</em>, defaults to <code>&quot;epoch&quot;</code>) &#x2014;
The checkpoint save strategy to adopt during training. Possible values are:</p>
<ul>
<li><code>&quot;no&quot;</code>: Save is done at the end of 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:"transformers.PushToHubCallback.save_steps",description:`<strong>save_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of steps between saves when using the &#x201C;steps&#x201D; <code>save_strategy</code>.`,name:"save_steps"},{anchor:"transformers.PushToHubCallback.tokenizer",description:`<strong>tokenizer</strong> (<code>PreTrainedTokenizerBase</code>, <em>optional</em>) &#x2014;
The tokenizer used by the model. If supplied, will be uploaded to the repo alongside the weights.`,name:"tokenizer"},{anchor:"transformers.PushToHubCallback.hub_model_id",description:`<strong>hub_model_id</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the repository to keep in sync with the local <code>output_dir</code>. It can be a simple model ID in
which case the model will be pushed in your namespace. Otherwise it should be the whole repository name,
for instance <code>&quot;user_name/model&quot;</code>, which allows you to push to an organization you are a member of with
<code>&quot;organization_name/model&quot;</code>.</p>
<p>Will default to the name of <code>output_dir</code>.`,name:"hub_model_id"},{anchor:"transformers.PushToHubCallback.hub_token",description:`<strong>hub_token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use to push the model to the Hub. Will default to the token in the cache folder obtained with
<code>huggingface-cli login</code>.`,name:"hub_token"},{anchor:"transformers.PushToHubCallback.checkpoint",description:`<strong>checkpoint</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to save full training checkpoints (including epoch and optimizer state) to allow training to be
resumed. Only usable when <code>save_strategy</code> is <code>&quot;epoch&quot;</code>.`,name:"checkpoint"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/keras_callbacks.py#L268"}}),P=new Xe({props:{anchor:"transformers.PushToHubCallback.example",$$slots:{default:[bt]},$$scope:{ctx:Z}}}),{c(){s=r("meta"),h=f(),o=r("h1"),d=r("a"),E=r("span"),w(c.$$.fragment),x=f(),R=r("span"),be=p("Keras callbacks"),ce=f(),A=r("p"),ge=p(`When training a Transformers model with Keras, there are some library-specific callbacks available to automate common
tasks:`),ie=f(),j=r("h2"),z=r("a"),Y=r("span"),w(B.$$.fragment),_e=f(),q=r("span"),ke=p("KerasMetricCallback"),de=f(),g=r("div"),w(G.$$.fragment),ye=f(),k=r("p"),we=p(`Callback to compute metrics at the end of every epoch. Unlike normal Keras metrics, these do not need to be
compilable by TF. It is particularly useful for common NLP metrics like BLEU and ROUGE that require string
operations or generation loops that cannot be compiled. Predictions (or generations) will be computed on the
`),L=r("code"),ve=p("eval_dataset"),$e=p(" before being passed to the "),O=r("code"),Te=p("metric_fn"),Me=p(" in "),Q=r("code"),Je=p("np.ndarray"),Ee=p(" format. The "),ee=r("code"),xe=p("metric_fn"),Ce=p(` should compute
metrics and return a dict mapping metric names to metric values.`),We=f(),te=r("p"),je=p(`We provide an example of a suitable metric_fn that computes ROUGE scores for a summarization model below. Note that
this example skips some post-processing for readability and simplicity, and should probably not be used as-is!`),Ie=f(),w(H.$$.fragment),Ne=f(),w(V.$$.fragment),pe=f(),I=r("h2"),U=r("a"),ae=r("span"),w(S.$$.fragment),Ze=f(),oe=r("span"),ze=p("PushToHubCallback"),me=f(),y=r("div"),w(K.$$.fragment),He=f(),N=r("p"),Ve=p(`Callback that will save and push the model to the Hub regularly. By default, it pushes once per epoch, but this can
be changed with the `),se=r("code"),Ue=p("save_strategy"),Pe=p(` argument. Pushed models can be accessed like any other model on the hub, such
as with the `),re=r("code"),Be=p("from_pretrained"),Ge=p(" method."),Se=f(),w(P.$$.fragment),this.h()},l(e){const i=mt('[data-svelte="svelte-1phssyn"]',document.head);s=n(i,"META",{name:!0,content:!0}),i.forEach(a),h=b(e),o=n(e,"H1",{class:!0});var X=l(o);d=n(X,"A",{id:!0,class:!0,href:!0});var ne=l(d);E=n(ne,"SPAN",{});var le=l(E);v(c.$$.fragment,le),le.forEach(a),ne.forEach(a),x=b(X),R=n(X,"SPAN",{});var Fe=l(R);be=m(Fe,"Keras callbacks"),Fe.forEach(a),X.forEach(a),ce=b(e),A=n(e,"P",{});var Re=l(A);ge=m(Re,`When training a Transformers model with Keras, there are some library-specific callbacks available to automate common
tasks:`),Re.forEach(a),ie=b(e),j=n(e,"H2",{class:!0});var ue=l(j);z=n(ue,"A",{id:!0,class:!0,href:!0});var Ye=l(z);Y=n(Ye,"SPAN",{});var qe=l(Y);v(B.$$.fragment,qe),qe.forEach(a),Ye.forEach(a),_e=b(ue),q=n(ue,"SPAN",{});var Le=l(q);ke=m(Le,"KerasMetricCallback"),Le.forEach(a),ue.forEach(a),de=b(e),g=n(e,"DIV",{class:!0});var C=l(g);v(G.$$.fragment,C),ye=b(C),k=n(C,"P",{});var W=l(k);we=m(W,`Callback to compute metrics at the end of every epoch. Unlike normal Keras metrics, these do not need to be
compilable by TF. It is particularly useful for common NLP metrics like BLEU and ROUGE that require string
operations or generation loops that cannot be compiled. Predictions (or generations) will be computed on the
`),L=n(W,"CODE",{});var Oe=l(L);ve=m(Oe,"eval_dataset"),Oe.forEach(a),$e=m(W," before being passed to the "),O=n(W,"CODE",{});var Qe=l(O);Te=m(Qe,"metric_fn"),Qe.forEach(a),Me=m(W," in "),Q=n(W,"CODE",{});var et=l(Q);Je=m(et,"np.ndarray"),et.forEach(a),Ee=m(W," format. The "),ee=n(W,"CODE",{});var tt=l(ee);xe=m(tt,"metric_fn"),tt.forEach(a),Ce=m(W,` should compute
metrics and return a dict mapping metric names to metric values.`),W.forEach(a),We=b(C),te=n(C,"P",{});var at=l(te);je=m(at,`We provide an example of a suitable metric_fn that computes ROUGE scores for a summarization model below. Note that
this example skips some post-processing for readability and simplicity, and should probably not be used as-is!`),at.forEach(a),Ie=b(C),v(H.$$.fragment,C),Ne=b(C),v(V.$$.fragment,C),C.forEach(a),pe=b(e),I=n(e,"H2",{class:!0});var fe=l(I);U=n(fe,"A",{id:!0,class:!0,href:!0});var ot=l(U);ae=n(ot,"SPAN",{});var st=l(ae);v(S.$$.fragment,st),st.forEach(a),ot.forEach(a),Ze=b(fe),oe=n(fe,"SPAN",{});var rt=l(oe);ze=m(rt,"PushToHubCallback"),rt.forEach(a),fe.forEach(a),me=b(e),y=n(e,"DIV",{class:!0});var D=l(y);v(K.$$.fragment,D),He=b(D),N=n(D,"P",{});var F=l(N);Ve=m(F,`Callback that will save and push the model to the Hub regularly. By default, it pushes once per epoch, but this can
be changed with the `),se=n(F,"CODE",{});var nt=l(se);Ue=m(nt,"save_strategy"),nt.forEach(a),Pe=m(F,` argument. Pushed models can be accessed like any other model on the hub, such
as with the `),re=n(F,"CODE",{});var lt=l(re);Be=m(lt,"from_pretrained"),lt.forEach(a),Ge=m(F," method."),F.forEach(a),Se=b(D),v(P.$$.fragment,D),D.forEach(a),this.h()},h(){u(s,"name","hf:doc:metadata"),u(s,"content",JSON.stringify(_t)),u(d,"id","keras-callbacks"),u(d,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(d,"href","#keras-callbacks"),u(o,"class","relative group"),u(z,"id","transformers.KerasMetricCallback"),u(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(z,"href","#transformers.KerasMetricCallback"),u(j,"class","relative group"),u(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(U,"id","transformers.PushToHubCallback"),u(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(U,"href","#transformers.PushToHubCallback"),u(I,"class","relative group"),u(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,i){t(document.head,s),_(e,h,i),_(e,o,i),t(o,d),t(d,E),$(c,E,null),t(o,x),t(o,R),t(R,be),_(e,ce,i),_(e,A,i),t(A,ge),_(e,ie,i),_(e,j,i),t(j,z),t(z,Y),$(B,Y,null),t(j,_e),t(j,q),t(q,ke),_(e,de,i),_(e,g,i),$(G,g,null),t(g,ye),t(g,k),t(k,we),t(k,L),t(L,ve),t(k,$e),t(k,O),t(O,Te),t(k,Me),t(k,Q),t(Q,Je),t(k,Ee),t(k,ee),t(ee,xe),t(k,Ce),t(g,We),t(g,te),t(te,je),t(g,Ie),$(H,g,null),t(g,Ne),$(V,g,null),_(e,pe,i),_(e,I,i),t(I,U),t(U,ae),$(S,ae,null),t(I,Ze),t(I,oe),t(oe,ze),_(e,me,i),_(e,y,i),$(K,y,null),t(y,He),t(y,N),t(N,Ve),t(N,se),t(se,Ue),t(N,Pe),t(N,re),t(re,Be),t(N,Ge),t(y,Se),$(P,y,null),he=!0},p(e,[i]){const X={};i&2&&(X.$$scope={dirty:i,ctx:e}),H.$set(X);const ne={};i&2&&(ne.$$scope={dirty:i,ctx:e}),V.$set(ne);const le={};i&2&&(le.$$scope={dirty:i,ctx:e}),P.$set(le)},i(e){he||(T(c.$$.fragment,e),T(B.$$.fragment,e),T(G.$$.fragment,e),T(H.$$.fragment,e),T(V.$$.fragment,e),T(S.$$.fragment,e),T(K.$$.fragment,e),T(P.$$.fragment,e),he=!0)},o(e){M(c.$$.fragment,e),M(B.$$.fragment,e),M(G.$$.fragment,e),M(H.$$.fragment,e),M(V.$$.fragment,e),M(S.$$.fragment,e),M(K.$$.fragment,e),M(P.$$.fragment,e),he=!1},d(e){a(s),e&&a(h),e&&a(o),J(c),e&&a(ce),e&&a(A),e&&a(ie),e&&a(j),J(B),e&&a(de),e&&a(g),J(G),J(H),J(V),e&&a(pe),e&&a(I),J(S),e&&a(me),e&&a(y),J(K),J(P)}}}const _t={local:"keras-callbacks",sections:[{local:"transformers.KerasMetricCallback",title:"KerasMetricCallback"},{local:"transformers.PushToHubCallback",title:"PushToHubCallback"}],title:"Keras callbacks"};function kt(Z){return ht(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Mt extends it{constructor(s){super();dt(this,s,kt,gt,pt,{})}}export{Mt as default,_t as metadata};
