import{S as Ra,i as Ba,s as Ma,e as a,k as l,w as h,t as s,M as za,c as o,d as r,m as p,a as n,x as u,h as i,b as m,G as e,g as c,y as g,L as Ga,q as v,o as b,B as _,v as Za}from"../../chunks/vendor-hf-doc-builder.js";import{D as P}from"../../chunks/Docstring-hf-doc-builder.js";import{I as Vt}from"../../chunks/IconCopyLink-hf-doc-builder.js";function Ka(ia){let x,ot,F,V,Le,G,Ht,Oe,Nt,nt,be,Wt,st,_e,Jt,it,S,H,Ce,Z,jt,Ie,Ut,lt,A,K,Qt,X,Rt,$e,Bt,Mt,pt,k,Y,zt,Te,Gt,mt,w,ee,Zt,te,Kt,qe,Xt,Yt,er,re,tr,Ve,rr,ar,dt,L,N,He,ae,or,Ne,nr,ct,f,oe,sr,We,ir,lr,O,Je,pr,mr,je,dr,cr,Ue,fr,hr,W,Qe,ur,gr,Re,vr,br,_r,J,ne,$r,C,Pr,Pe,yr,wr,Be,Dr,Er,xr,j,se,Fr,ie,Sr,ye,Ar,kr,Lr,U,le,Or,Me,Cr,ft,D,pe,Ir,ze,Tr,qr,Q,me,Vr,de,Hr,we,Nr,Wr,ht,E,ce,Jr,Ge,jr,Ur,R,fe,Qr,Ze,Rr,ut,y,he,Br,Ke,Mr,zr,Xe,Gr,Zr,B,ue,Kr,Ye,Xr,gt,I,M,et,ge,Yr,tt,ea,vt,T,ve,ta,q,ra,De,aa,oa,rt,na,sa,bt;return G=new Vt({}),Z=new Vt({}),K=new P({props:{name:"class transformers.pipelines.ArgumentHandler",anchor:"transformers.pipelines.ArgumentHandler",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L425"}}),Y=new P({props:{name:"class transformers.pipelines.ZeroShotClassificationArgumentHandler",anchor:"transformers.pipelines.ZeroShotClassificationArgumentHandler",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/zero_shot_classification.py#L14"}}),ee=new P({props:{name:"class transformers.pipelines.QuestionAnsweringArgumentHandler",anchor:"transformers.pipelines.QuestionAnsweringArgumentHandler",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/question_answering.py#L150"}}),ae=new Vt({}),oe=new P({props:{name:"class transformers.PipelineDataFormat",anchor:"transformers.PipelineDataFormat",parameters:[{name:"output_path",val:": typing.Optional[str]"},{name:"input_path",val:": typing.Optional[str]"},{name:"column",val:": typing.Optional[str]"},{name:"overwrite",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PipelineDataFormat.output_path",description:"<strong>output_path</strong> (<code>str</code>, <em>optional</em>) &#x2014; Where to save the outgoing data.",name:"output_path"},{anchor:"transformers.PipelineDataFormat.input_path",description:"<strong>input_path</strong> (<code>str</code>, <em>optional</em>) &#x2014; Where to look for the input data.",name:"input_path"},{anchor:"transformers.PipelineDataFormat.column",description:"<strong>column</strong> (<code>str</code>, <em>optional</em>) &#x2014; The column to read.",name:"column"},{anchor:"transformers.PipelineDataFormat.overwrite",description:`<strong>overwrite</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to overwrite the <code>output_path</code>.`,name:"overwrite"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L435"}}),ne=new P({props:{name:"from_str",anchor:"transformers.PipelineDataFormat.from_str",parameters:[{name:"format",val:": str"},{name:"output_path",val:": typing.Optional[str]"},{name:"input_path",val:": typing.Optional[str]"},{name:"column",val:": typing.Optional[str]"},{name:"overwrite",val:" = False"}],parametersDescription:[{anchor:"transformers.PipelineDataFormat.from_str.format",description:`<strong>format</strong> (<code>str</code>) &#x2014;
The format of the desired pipeline. Acceptable values are <code>&quot;json&quot;</code>, <code>&quot;csv&quot;</code> or <code>&quot;pipe&quot;</code>.`,name:"format"},{anchor:"transformers.PipelineDataFormat.from_str.output_path",description:`<strong>output_path</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Where to save the outgoing data.`,name:"output_path"},{anchor:"transformers.PipelineDataFormat.from_str.input_path",description:`<strong>input_path</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Where to look for the input data.`,name:"input_path"},{anchor:"transformers.PipelineDataFormat.from_str.column",description:`<strong>column</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The column to read.`,name:"column"},{anchor:"transformers.PipelineDataFormat.from_str.overwrite",description:`<strong>overwrite</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to overwrite the <code>output_path</code>.`,name:"overwrite"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L512",returnDescription:`
<p>The proper data format.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/internal/pipelines_utils#transformers.PipelineDataFormat"
>PipelineDataFormat</a></p>
`}}),se=new P({props:{name:"save",anchor:"transformers.PipelineDataFormat.save",parameters:[{name:"data",val:": typing.Union[dict, typing.List[dict]]"}],parametersDescription:[{anchor:"transformers.PipelineDataFormat.save.data",description:"<strong>data</strong> (<code>dict</code> or list of <code>dict</code>) &#x2014; The data to store.",name:"data"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L484"}}),le=new P({props:{name:"save_binary",anchor:"transformers.PipelineDataFormat.save_binary",parameters:[{name:"data",val:": typing.Union[dict, typing.List[dict]]"}],parametersDescription:[{anchor:"transformers.PipelineDataFormat.save_binary.data",description:"<strong>data</strong> (<code>dict</code> or list of <code>dict</code>) &#x2014; The data to store.",name:"data"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L494",returnDescription:`
<p>Path where the data has been saved.</p>
`,returnType:`
<p><code>str</code></p>
`}}),pe=new P({props:{name:"class transformers.CsvPipelineDataFormat",anchor:"transformers.CsvPipelineDataFormat",parameters:[{name:"output_path",val:": typing.Optional[str]"},{name:"input_path",val:": typing.Optional[str]"},{name:"column",val:": typing.Optional[str]"},{name:"overwrite",val:" = False"}],parametersDescription:[{anchor:"transformers.CsvPipelineDataFormat.output_path",description:"<strong>output_path</strong> (<code>str</code>, <em>optional</em>) &#x2014; Where to save the outgoing data.",name:"output_path"},{anchor:"transformers.CsvPipelineDataFormat.input_path",description:"<strong>input_path</strong> (<code>str</code>, <em>optional</em>) &#x2014; Where to look for the input data.",name:"input_path"},{anchor:"transformers.CsvPipelineDataFormat.column",description:"<strong>column</strong> (<code>str</code>, <em>optional</em>) &#x2014; The column to read.",name:"column"},{anchor:"transformers.CsvPipelineDataFormat.overwrite",description:`<strong>overwrite</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to overwrite the <code>output_path</code>.`,name:"overwrite"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L548"}}),me=new P({props:{name:"save",anchor:"transformers.CsvPipelineDataFormat.save",parameters:[{name:"data",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.CsvPipelineDataFormat.save.data",description:"<strong>data</strong> (<code>List[dict]</code>) &#x2014; The data to store.",name:"data"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L578"}}),ce=new P({props:{name:"class transformers.JsonPipelineDataFormat",anchor:"transformers.JsonPipelineDataFormat",parameters:[{name:"output_path",val:": typing.Optional[str]"},{name:"input_path",val:": typing.Optional[str]"},{name:"column",val:": typing.Optional[str]"},{name:"overwrite",val:" = False"}],parametersDescription:[{anchor:"transformers.JsonPipelineDataFormat.output_path",description:"<strong>output_path</strong> (<code>str</code>, <em>optional</em>) &#x2014; Where to save the outgoing data.",name:"output_path"},{anchor:"transformers.JsonPipelineDataFormat.input_path",description:"<strong>input_path</strong> (<code>str</code>, <em>optional</em>) &#x2014; Where to look for the input data.",name:"input_path"},{anchor:"transformers.JsonPipelineDataFormat.column",description:"<strong>column</strong> (<code>str</code>, <em>optional</em>) &#x2014; The column to read.",name:"column"},{anchor:"transformers.JsonPipelineDataFormat.overwrite",description:`<strong>overwrite</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to overwrite the <code>output_path</code>.`,name:"overwrite"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L592"}}),fe=new P({props:{name:"save",anchor:"transformers.JsonPipelineDataFormat.save",parameters:[{name:"data",val:": dict"}],parametersDescription:[{anchor:"transformers.JsonPipelineDataFormat.save.data",description:"<strong>data</strong> (<code>dict</code>) &#x2014; The data to store.",name:"data"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L623"}}),he=new P({props:{name:"class transformers.PipedPipelineDataFormat",anchor:"transformers.PipedPipelineDataFormat",parameters:[{name:"output_path",val:": typing.Optional[str]"},{name:"input_path",val:": typing.Optional[str]"},{name:"column",val:": typing.Optional[str]"},{name:"overwrite",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PipedPipelineDataFormat.output_path",description:"<strong>output_path</strong> (<code>str</code>, <em>optional</em>) &#x2014; Where to save the outgoing data.",name:"output_path"},{anchor:"transformers.PipedPipelineDataFormat.input_path",description:"<strong>input_path</strong> (<code>str</code>, <em>optional</em>) &#x2014; Where to look for the input data.",name:"input_path"},{anchor:"transformers.PipedPipelineDataFormat.column",description:"<strong>column</strong> (<code>str</code>, <em>optional</em>) &#x2014; The column to read.",name:"column"},{anchor:"transformers.PipedPipelineDataFormat.overwrite",description:`<strong>overwrite</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to overwrite the <code>output_path</code>.`,name:"overwrite"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L634"}}),ue=new P({props:{name:"save",anchor:"transformers.PipedPipelineDataFormat.save",parameters:[{name:"data",val:": dict"}],parametersDescription:[{anchor:"transformers.PipedPipelineDataFormat.save.data",description:"<strong>data</strong> (<code>dict</code>) &#x2014; The data to store.",name:"data"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L663"}}),ge=new Vt({}),ve=new P({props:{name:"class transformers.pipelines.PipelineException",anchor:"transformers.pipelines.PipelineException",parameters:[{name:"task",val:": str"},{name:"model",val:": str"},{name:"reason",val:": str"}],parametersDescription:[{anchor:"transformers.pipelines.PipelineException.task",description:"<strong>task</strong> (<code>str</code>) &#x2014; The task of the pipeline.",name:"task"},{anchor:"transformers.pipelines.PipelineException.model",description:"<strong>model</strong> (<code>str</code>) &#x2014; The model used by the pipeline.",name:"model"},{anchor:"transformers.pipelines.PipelineException.reason",description:"<strong>reason</strong> (<code>str</code>) &#x2014; The error message to display.",name:"reason"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L408"}}),{c(){x=a("meta"),ot=l(),F=a("h1"),V=a("a"),Le=a("span"),h(G.$$.fragment),Ht=l(),Oe=a("span"),Nt=s("Utilities for pipelines"),nt=l(),be=a("p"),Wt=s("This page lists all the utility functions the library provides for pipelines."),st=l(),_e=a("p"),Jt=s("Most of those are only useful if you are studying the code of the models in the library."),it=l(),S=a("h2"),H=a("a"),Ce=a("span"),h(Z.$$.fragment),jt=l(),Ie=a("span"),Ut=s("Argument handling"),lt=l(),A=a("div"),h(K.$$.fragment),Qt=l(),X=a("p"),Rt=s("Base interface for handling arguments for each "),$e=a("a"),Bt=s("Pipeline"),Mt=s("."),pt=l(),k=a("div"),h(Y.$$.fragment),zt=l(),Te=a("p"),Gt=s(`Handles arguments for zero-shot for text classification by turning each possible label into an NLI
premise/hypothesis pair.`),mt=l(),w=a("div"),h(ee.$$.fragment),Zt=l(),te=a("p"),Kt=s(`QuestionAnsweringPipeline requires the user to provide multiple arguments (i.e. question & context) to be mapped to
internal `),qe=a("code"),Xt=s("SquadExample"),Yt=s("."),er=l(),re=a("p"),tr=s("QuestionAnsweringArgumentHandler manages all the possible to create a "),Ve=a("code"),rr=s("SquadExample"),ar=s(` from the command-line
supplied arguments.`),dt=l(),L=a("h2"),N=a("a"),He=a("span"),h(ae.$$.fragment),or=l(),Ne=a("span"),nr=s("Data format"),ct=l(),f=a("div"),h(oe.$$.fragment),sr=l(),We=a("p"),ir=s(`Base class for all the pipeline supported data format both for reading and writing. Supported data formats
currently includes:`),lr=l(),O=a("ul"),Je=a("li"),pr=s("JSON"),mr=l(),je=a("li"),dr=s("CSV"),cr=l(),Ue=a("li"),fr=s("stdin/stdout (pipe)"),hr=l(),W=a("p"),Qe=a("code"),ur=s("PipelineDataFormat"),gr=s(` also includes some utilities to work with multi-columns like mapping from datasets columns to
pipelines keyword arguments through the `),Re=a("code"),vr=s("dataset_kwarg_1=dataset_column_1"),br=s(" format."),_r=l(),J=a("div"),h(ne.$$.fragment),$r=l(),C=a("p"),Pr=s("Creates an instance of the right subclass of "),Pe=a("a"),yr=s("PipelineDataFormat"),wr=s(" depending on "),Be=a("code"),Dr=s("format"),Er=s("."),xr=l(),j=a("div"),h(se.$$.fragment),Fr=l(),ie=a("p"),Sr=s("Save the provided data object with the representation for the current "),ye=a("a"),Ar=s("PipelineDataFormat"),kr=s("."),Lr=l(),U=a("div"),h(le.$$.fragment),Or=l(),Me=a("p"),Cr=s("Save the provided data object as a pickle-formatted binary data on the disk."),ft=l(),D=a("div"),h(pe.$$.fragment),Ir=l(),ze=a("p"),Tr=s("Support for pipelines using CSV data format."),qr=l(),Q=a("div"),h(me.$$.fragment),Vr=l(),de=a("p"),Hr=s("Save the provided data object with the representation for the current "),we=a("a"),Nr=s("PipelineDataFormat"),Wr=s("."),ht=l(),E=a("div"),h(ce.$$.fragment),Jr=l(),Ge=a("p"),jr=s("Support for pipelines using JSON file format."),Ur=l(),R=a("div"),h(fe.$$.fragment),Qr=l(),Ze=a("p"),Rr=s("Save the provided data object in a json file."),ut=l(),y=a("div"),h(he.$$.fragment),Br=l(),Ke=a("p"),Mr=s("Read data from piped input to the python process. For multi columns data, columns should separated by"),zr=l(),Xe=a("p"),Gr=s("If columns are provided, then the output will be a dictionary with {column_x: value_x}"),Zr=l(),B=a("div"),h(ue.$$.fragment),Kr=l(),Ye=a("p"),Xr=s("Print the data."),gt=l(),I=a("h2"),M=a("a"),et=a("span"),h(ge.$$.fragment),Yr=l(),tt=a("span"),ea=s("Utilities"),vt=l(),T=a("div"),h(ve.$$.fragment),ta=l(),q=a("p"),ra=s("Raised by a "),De=a("a"),aa=s("Pipeline"),oa=s(" when handling "),rt=a("strong"),na=s("call"),sa=s("."),this.h()},l(t){const d=za('[data-svelte="svelte-1phssyn"]',document.head);x=o(d,"META",{name:!0,content:!0}),d.forEach(r),ot=p(t),F=o(t,"H1",{class:!0});var _t=n(F);V=o(_t,"A",{id:!0,class:!0,href:!0});var la=n(V);Le=o(la,"SPAN",{});var pa=n(Le);u(G.$$.fragment,pa),pa.forEach(r),la.forEach(r),Ht=p(_t),Oe=o(_t,"SPAN",{});var ma=n(Oe);Nt=i(ma,"Utilities for pipelines"),ma.forEach(r),_t.forEach(r),nt=p(t),be=o(t,"P",{});var da=n(be);Wt=i(da,"This page lists all the utility functions the library provides for pipelines."),da.forEach(r),st=p(t),_e=o(t,"P",{});var ca=n(_e);Jt=i(ca,"Most of those are only useful if you are studying the code of the models in the library."),ca.forEach(r),it=p(t),S=o(t,"H2",{class:!0});var $t=n(S);H=o($t,"A",{id:!0,class:!0,href:!0});var fa=n(H);Ce=o(fa,"SPAN",{});var ha=n(Ce);u(Z.$$.fragment,ha),ha.forEach(r),fa.forEach(r),jt=p($t),Ie=o($t,"SPAN",{});var ua=n(Ie);Ut=i(ua,"Argument handling"),ua.forEach(r),$t.forEach(r),lt=p(t),A=o(t,"DIV",{class:!0});var Pt=n(A);u(K.$$.fragment,Pt),Qt=p(Pt),X=o(Pt,"P",{});var yt=n(X);Rt=i(yt,"Base interface for handling arguments for each "),$e=o(yt,"A",{href:!0});var ga=n($e);Bt=i(ga,"Pipeline"),ga.forEach(r),Mt=i(yt,"."),yt.forEach(r),Pt.forEach(r),pt=p(t),k=o(t,"DIV",{class:!0});var wt=n(k);u(Y.$$.fragment,wt),zt=p(wt),Te=o(wt,"P",{});var va=n(Te);Gt=i(va,`Handles arguments for zero-shot for text classification by turning each possible label into an NLI
premise/hypothesis pair.`),va.forEach(r),wt.forEach(r),mt=p(t),w=o(t,"DIV",{class:!0});var Ee=n(w);u(ee.$$.fragment,Ee),Zt=p(Ee),te=o(Ee,"P",{});var Dt=n(te);Kt=i(Dt,`QuestionAnsweringPipeline requires the user to provide multiple arguments (i.e. question & context) to be mapped to
internal `),qe=o(Dt,"CODE",{});var ba=n(qe);Xt=i(ba,"SquadExample"),ba.forEach(r),Yt=i(Dt,"."),Dt.forEach(r),er=p(Ee),re=o(Ee,"P",{});var Et=n(re);tr=i(Et,"QuestionAnsweringArgumentHandler manages all the possible to create a "),Ve=o(Et,"CODE",{});var _a=n(Ve);rr=i(_a,"SquadExample"),_a.forEach(r),ar=i(Et,` from the command-line
supplied arguments.`),Et.forEach(r),Ee.forEach(r),dt=p(t),L=o(t,"H2",{class:!0});var xt=n(L);N=o(xt,"A",{id:!0,class:!0,href:!0});var $a=n(N);He=o($a,"SPAN",{});var Pa=n(He);u(ae.$$.fragment,Pa),Pa.forEach(r),$a.forEach(r),or=p(xt),Ne=o(xt,"SPAN",{});var ya=n(Ne);nr=i(ya,"Data format"),ya.forEach(r),xt.forEach(r),ct=p(t),f=o(t,"DIV",{class:!0});var $=n(f);u(oe.$$.fragment,$),sr=p($),We=o($,"P",{});var wa=n(We);ir=i(wa,`Base class for all the pipeline supported data format both for reading and writing. Supported data formats
currently includes:`),wa.forEach(r),lr=p($),O=o($,"UL",{});var xe=n(O);Je=o(xe,"LI",{});var Da=n(Je);pr=i(Da,"JSON"),Da.forEach(r),mr=p(xe),je=o(xe,"LI",{});var Ea=n(je);dr=i(Ea,"CSV"),Ea.forEach(r),cr=p(xe),Ue=o(xe,"LI",{});var xa=n(Ue);fr=i(xa,"stdin/stdout (pipe)"),xa.forEach(r),xe.forEach(r),hr=p($),W=o($,"P",{});var at=n(W);Qe=o(at,"CODE",{});var Fa=n(Qe);ur=i(Fa,"PipelineDataFormat"),Fa.forEach(r),gr=i(at,` also includes some utilities to work with multi-columns like mapping from datasets columns to
pipelines keyword arguments through the `),Re=o(at,"CODE",{});var Sa=n(Re);vr=i(Sa,"dataset_kwarg_1=dataset_column_1"),Sa.forEach(r),br=i(at," format."),at.forEach(r),_r=p($),J=o($,"DIV",{class:!0});var Ft=n(J);u(ne.$$.fragment,Ft),$r=p(Ft),C=o(Ft,"P",{});var Fe=n(C);Pr=i(Fe,"Creates an instance of the right subclass of "),Pe=o(Fe,"A",{href:!0});var Aa=n(Pe);yr=i(Aa,"PipelineDataFormat"),Aa.forEach(r),wr=i(Fe," depending on "),Be=o(Fe,"CODE",{});var ka=n(Be);Dr=i(ka,"format"),ka.forEach(r),Er=i(Fe,"."),Fe.forEach(r),Ft.forEach(r),xr=p($),j=o($,"DIV",{class:!0});var St=n(j);u(se.$$.fragment,St),Fr=p(St),ie=o(St,"P",{});var At=n(ie);Sr=i(At,"Save the provided data object with the representation for the current "),ye=o(At,"A",{href:!0});var La=n(ye);Ar=i(La,"PipelineDataFormat"),La.forEach(r),kr=i(At,"."),At.forEach(r),St.forEach(r),Lr=p($),U=o($,"DIV",{class:!0});var kt=n(U);u(le.$$.fragment,kt),Or=p(kt),Me=o(kt,"P",{});var Oa=n(Me);Cr=i(Oa,"Save the provided data object as a pickle-formatted binary data on the disk."),Oa.forEach(r),kt.forEach(r),$.forEach(r),ft=p(t),D=o(t,"DIV",{class:!0});var Se=n(D);u(pe.$$.fragment,Se),Ir=p(Se),ze=o(Se,"P",{});var Ca=n(ze);Tr=i(Ca,"Support for pipelines using CSV data format."),Ca.forEach(r),qr=p(Se),Q=o(Se,"DIV",{class:!0});var Lt=n(Q);u(me.$$.fragment,Lt),Vr=p(Lt),de=o(Lt,"P",{});var Ot=n(de);Hr=i(Ot,"Save the provided data object with the representation for the current "),we=o(Ot,"A",{href:!0});var Ia=n(we);Nr=i(Ia,"PipelineDataFormat"),Ia.forEach(r),Wr=i(Ot,"."),Ot.forEach(r),Lt.forEach(r),Se.forEach(r),ht=p(t),E=o(t,"DIV",{class:!0});var Ae=n(E);u(ce.$$.fragment,Ae),Jr=p(Ae),Ge=o(Ae,"P",{});var Ta=n(Ge);jr=i(Ta,"Support for pipelines using JSON file format."),Ta.forEach(r),Ur=p(Ae),R=o(Ae,"DIV",{class:!0});var Ct=n(R);u(fe.$$.fragment,Ct),Qr=p(Ct),Ze=o(Ct,"P",{});var qa=n(Ze);Rr=i(qa,"Save the provided data object in a json file."),qa.forEach(r),Ct.forEach(r),Ae.forEach(r),ut=p(t),y=o(t,"DIV",{class:!0});var z=n(y);u(he.$$.fragment,z),Br=p(z),Ke=o(z,"P",{});var Va=n(Ke);Mr=i(Va,"Read data from piped input to the python process. For multi columns data, columns should separated by"),Va.forEach(r),zr=p(z),Xe=o(z,"P",{});var Ha=n(Xe);Gr=i(Ha,"If columns are provided, then the output will be a dictionary with {column_x: value_x}"),Ha.forEach(r),Zr=p(z),B=o(z,"DIV",{class:!0});var It=n(B);u(ue.$$.fragment,It),Kr=p(It),Ye=o(It,"P",{});var Na=n(Ye);Xr=i(Na,"Print the data."),Na.forEach(r),It.forEach(r),z.forEach(r),gt=p(t),I=o(t,"H2",{class:!0});var Tt=n(I);M=o(Tt,"A",{id:!0,class:!0,href:!0});var Wa=n(M);et=o(Wa,"SPAN",{});var Ja=n(et);u(ge.$$.fragment,Ja),Ja.forEach(r),Wa.forEach(r),Yr=p(Tt),tt=o(Tt,"SPAN",{});var ja=n(tt);ea=i(ja,"Utilities"),ja.forEach(r),Tt.forEach(r),vt=p(t),T=o(t,"DIV",{class:!0});var qt=n(T);u(ve.$$.fragment,qt),ta=p(qt),q=o(qt,"P",{});var ke=n(q);ra=i(ke,"Raised by a "),De=o(ke,"A",{href:!0});var Ua=n(De);aa=i(Ua,"Pipeline"),Ua.forEach(r),oa=i(ke," when handling "),rt=o(ke,"STRONG",{});var Qa=n(rt);na=i(Qa,"call"),Qa.forEach(r),sa=i(ke,"."),ke.forEach(r),qt.forEach(r),this.h()},h(){m(x,"name","hf:doc:metadata"),m(x,"content",JSON.stringify(Xa)),m(V,"id","utilities-for-pipelines"),m(V,"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"),m(V,"href","#utilities-for-pipelines"),m(F,"class","relative group"),m(H,"id","transformers.pipelines.ArgumentHandler"),m(H,"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"),m(H,"href","#transformers.pipelines.ArgumentHandler"),m(S,"class","relative group"),m($e,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.Pipeline"),m(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(N,"id","transformers.PipelineDataFormat"),m(N,"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"),m(N,"href","#transformers.PipelineDataFormat"),m(L,"class","relative group"),m(Pe,"href","/docs/transformers/main/en/internal/pipelines_utils#transformers.PipelineDataFormat"),m(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ye,"href","/docs/transformers/main/en/internal/pipelines_utils#transformers.PipelineDataFormat"),m(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(we,"href","/docs/transformers/main/en/internal/pipelines_utils#transformers.PipelineDataFormat"),m(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(R,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(M,"id","transformers.pipelines.PipelineException"),m(M,"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"),m(M,"href","#transformers.pipelines.PipelineException"),m(I,"class","relative group"),m(De,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.Pipeline"),m(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,d){e(document.head,x),c(t,ot,d),c(t,F,d),e(F,V),e(V,Le),g(G,Le,null),e(F,Ht),e(F,Oe),e(Oe,Nt),c(t,nt,d),c(t,be,d),e(be,Wt),c(t,st,d),c(t,_e,d),e(_e,Jt),c(t,it,d),c(t,S,d),e(S,H),e(H,Ce),g(Z,Ce,null),e(S,jt),e(S,Ie),e(Ie,Ut),c(t,lt,d),c(t,A,d),g(K,A,null),e(A,Qt),e(A,X),e(X,Rt),e(X,$e),e($e,Bt),e(X,Mt),c(t,pt,d),c(t,k,d),g(Y,k,null),e(k,zt),e(k,Te),e(Te,Gt),c(t,mt,d),c(t,w,d),g(ee,w,null),e(w,Zt),e(w,te),e(te,Kt),e(te,qe),e(qe,Xt),e(te,Yt),e(w,er),e(w,re),e(re,tr),e(re,Ve),e(Ve,rr),e(re,ar),c(t,dt,d),c(t,L,d),e(L,N),e(N,He),g(ae,He,null),e(L,or),e(L,Ne),e(Ne,nr),c(t,ct,d),c(t,f,d),g(oe,f,null),e(f,sr),e(f,We),e(We,ir),e(f,lr),e(f,O),e(O,Je),e(Je,pr),e(O,mr),e(O,je),e(je,dr),e(O,cr),e(O,Ue),e(Ue,fr),e(f,hr),e(f,W),e(W,Qe),e(Qe,ur),e(W,gr),e(W,Re),e(Re,vr),e(W,br),e(f,_r),e(f,J),g(ne,J,null),e(J,$r),e(J,C),e(C,Pr),e(C,Pe),e(Pe,yr),e(C,wr),e(C,Be),e(Be,Dr),e(C,Er),e(f,xr),e(f,j),g(se,j,null),e(j,Fr),e(j,ie),e(ie,Sr),e(ie,ye),e(ye,Ar),e(ie,kr),e(f,Lr),e(f,U),g(le,U,null),e(U,Or),e(U,Me),e(Me,Cr),c(t,ft,d),c(t,D,d),g(pe,D,null),e(D,Ir),e(D,ze),e(ze,Tr),e(D,qr),e(D,Q),g(me,Q,null),e(Q,Vr),e(Q,de),e(de,Hr),e(de,we),e(we,Nr),e(de,Wr),c(t,ht,d),c(t,E,d),g(ce,E,null),e(E,Jr),e(E,Ge),e(Ge,jr),e(E,Ur),e(E,R),g(fe,R,null),e(R,Qr),e(R,Ze),e(Ze,Rr),c(t,ut,d),c(t,y,d),g(he,y,null),e(y,Br),e(y,Ke),e(Ke,Mr),e(y,zr),e(y,Xe),e(Xe,Gr),e(y,Zr),e(y,B),g(ue,B,null),e(B,Kr),e(B,Ye),e(Ye,Xr),c(t,gt,d),c(t,I,d),e(I,M),e(M,et),g(ge,et,null),e(I,Yr),e(I,tt),e(tt,ea),c(t,vt,d),c(t,T,d),g(ve,T,null),e(T,ta),e(T,q),e(q,ra),e(q,De),e(De,aa),e(q,oa),e(q,rt),e(rt,na),e(q,sa),bt=!0},p:Ga,i(t){bt||(v(G.$$.fragment,t),v(Z.$$.fragment,t),v(K.$$.fragment,t),v(Y.$$.fragment,t),v(ee.$$.fragment,t),v(ae.$$.fragment,t),v(oe.$$.fragment,t),v(ne.$$.fragment,t),v(se.$$.fragment,t),v(le.$$.fragment,t),v(pe.$$.fragment,t),v(me.$$.fragment,t),v(ce.$$.fragment,t),v(fe.$$.fragment,t),v(he.$$.fragment,t),v(ue.$$.fragment,t),v(ge.$$.fragment,t),v(ve.$$.fragment,t),bt=!0)},o(t){b(G.$$.fragment,t),b(Z.$$.fragment,t),b(K.$$.fragment,t),b(Y.$$.fragment,t),b(ee.$$.fragment,t),b(ae.$$.fragment,t),b(oe.$$.fragment,t),b(ne.$$.fragment,t),b(se.$$.fragment,t),b(le.$$.fragment,t),b(pe.$$.fragment,t),b(me.$$.fragment,t),b(ce.$$.fragment,t),b(fe.$$.fragment,t),b(he.$$.fragment,t),b(ue.$$.fragment,t),b(ge.$$.fragment,t),b(ve.$$.fragment,t),bt=!1},d(t){r(x),t&&r(ot),t&&r(F),_(G),t&&r(nt),t&&r(be),t&&r(st),t&&r(_e),t&&r(it),t&&r(S),_(Z),t&&r(lt),t&&r(A),_(K),t&&r(pt),t&&r(k),_(Y),t&&r(mt),t&&r(w),_(ee),t&&r(dt),t&&r(L),_(ae),t&&r(ct),t&&r(f),_(oe),_(ne),_(se),_(le),t&&r(ft),t&&r(D),_(pe),_(me),t&&r(ht),t&&r(E),_(ce),_(fe),t&&r(ut),t&&r(y),_(he),_(ue),t&&r(gt),t&&r(I),_(ge),t&&r(vt),t&&r(T),_(ve)}}}const Xa={local:"utilities-for-pipelines",sections:[{local:"transformers.pipelines.ArgumentHandler",title:"Argument handling"},{local:"transformers.PipelineDataFormat",title:"Data format"},{local:"transformers.pipelines.PipelineException",title:"Utilities"}],title:"Utilities for pipelines"};function Ya(ia){return Za(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ao extends Ra{constructor(x){super();Ba(this,x,Ya,Ka,Ma,{})}}export{ao as default,Xa as metadata};
