import{s as wt,n as yt,o as _t}from"../chunks/scheduler.d6170356.js";import{S as Ct,i as Tt,g as l,s as i,r as P,A as Mt,h as o,f as a,c as n,j as xt,u as S,x as f,k as bt,y as Ht,a as s,v as A,d as k,t as E,w as F}from"../chunks/index.fcd4cc08.js";import{H as I,E as Lt}from"../chunks/EditOnGithub.da2b595c.js";function Pt(lt){let r,q,V,z,u,W,d,ot="There are no constraints on how to structure dataset repositories.",Y,m,ft=`However, if you want the Dataset Viewer to show certain data files, or to separate your dataset in train/validation/test splits, you need to structure your dataset accordingly.
Often it is as simple as naming your data files according to their split names, e.g. <code>train.csv</code> and <code>test.csv</code>.`,O,p,U,c,rt='Machine learning datasets typically have splits and may also have subsets. A dataset is generally made of <em>splits</em> (e.g. <code>train</code> and <code>test</code>) that are used during different stages of training and evaluating a model. A <em>subset</em> (also called <em>configuration</em>) is a sub-dataset contained within a larger dataset. Subsets are especially common in multilingual speech datasets where there may be a different subset for each language. If you’re interested in learning more about splits and subsets, check out the <a href="https://huggingface.co/docs/datasets-server/configs_and_splits" rel="nofollow">Splits and subsets</a> guide!',j,g,ut='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/split-configs-server.gif" alt="split-configs-server"/>',G,h,R,$,dt='To structure your dataset by naming your data files or directories according to their split names, see the <a href="./datasets-file-names-and-splits">File names and splits</a> documentation and the <a href="https://huggingface.co/collections/datasets-examples/file-names-and-splits-655e28af4471bd95709eb135" rel="nofollow">companion collection of example datasets</a>.',B,v,J,x,mt=`You can choose the data files to show in the Dataset Viewer for your dataset using YAML.
It is useful if you want to specify which file goes into which split manually.`,K,b,pt="You can also define multiple subsets for your dataset, and pass dataset building parameters (e.g. the separator to use for CSV files).",N,w,ct='See the documentation on <a href="./datasets-manual-configuration">Manual configuration</a> for more information. Look also to the <a href="https://huggingface.co/collections/datasets-examples/manual-configuration-655e293cea26da0acab95b87" rel="nofollow">example datasets</a>.',Q,y,X,_,gt='See the <a href="./datasets-adding#file-formats">File formats</a> doc page to find the list of supported formats and recommendations for your dataset. If your dataset uses CSV or TSV files, you can find more information in the <a href="https://huggingface.co/collections/datasets-examples/format-csv-and-tsv-655f681cb9673a4249cccb3d" rel="nofollow">example datasets</a>.',Z,C,tt,T,ht=`For image and audio classification datasets, you can also use directories to name the image and audio classes.
And if your images/audio files have metadata (e.g. captions, bounding boxes, transcriptions, etc.), you can have metadata files next to them.`,et,M,$t="We provide two guides that you can check out:",at,H,vt='<li><a href="./datasets-image">How to create an image dataset</a> (<a href="https://huggingface.co/collections/datasets-examples/image-dataset-6568e7cf28639db76eb92d65" rel="nofollow">example datasets</a>)</li> <li><a href="https://huggingface.co/docs/datasets/audio_dataset" rel="nofollow">How to create an audio dataset</a></li>',st,L,it,D,nt;return u=new I({props:{title:"Data files Configuration",local:"data-files-configuration",headingTag:"h1"}}),p=new I({props:{title:"What are splits and subsets?",local:"what-are-splits-and-subsets",headingTag:"h2"}}),h=new I({props:{title:"File names and splits",local:"file-names-and-splits",headingTag:"h2"}}),v=new I({props:{title:"Manual configuration",local:"manual-configuration",headingTag:"h2"}}),y=new I({props:{title:"Supported file formats",local:"supported-file-formats",headingTag:"h2"}}),C=new I({props:{title:"Image and Audio datasets",local:"image-and-audio-datasets",headingTag:"h2"}}),L=new Lt({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-data-files-configuration.md"}}),{c(){r=l("meta"),q=i(),V=l("p"),z=i(),P(u.$$.fragment),W=i(),d=l("p"),d.textContent=ot,Y=i(),m=l("p"),m.innerHTML=ft,O=i(),P(p.$$.fragment),U=i(),c=l("p"),c.innerHTML=rt,j=i(),g=l("p"),g.innerHTML=ut,G=i(),P(h.$$.fragment),R=i(),$=l("p"),$.innerHTML=dt,B=i(),P(v.$$.fragment),J=i(),x=l("p"),x.textContent=mt,K=i(),b=l("p"),b.textContent=pt,N=i(),w=l("p"),w.innerHTML=ct,Q=i(),P(y.$$.fragment),X=i(),_=l("p"),_.innerHTML=gt,Z=i(),P(C.$$.fragment),tt=i(),T=l("p"),T.textContent=ht,et=i(),M=l("p"),M.textContent=$t,at=i(),H=l("ul"),H.innerHTML=vt,st=i(),P(L.$$.fragment),it=i(),D=l("p"),this.h()},l(t){const e=Mt("svelte-u9bgzb",document.head);r=o(e,"META",{name:!0,content:!0}),e.forEach(a),q=n(t),V=o(t,"P",{}),xt(V).forEach(a),z=n(t),S(u.$$.fragment,t),W=n(t),d=o(t,"P",{"data-svelte-h":!0}),f(d)!=="svelte-1sicc2g"&&(d.textContent=ot),Y=n(t),m=o(t,"P",{"data-svelte-h":!0}),f(m)!=="svelte-rffpu1"&&(m.innerHTML=ft),O=n(t),S(p.$$.fragment,t),U=n(t),c=o(t,"P",{"data-svelte-h":!0}),f(c)!=="svelte-1vuep7a"&&(c.innerHTML=rt),j=n(t),g=o(t,"P",{"data-svelte-h":!0}),f(g)!=="svelte-1p3cuco"&&(g.innerHTML=ut),G=n(t),S(h.$$.fragment,t),R=n(t),$=o(t,"P",{"data-svelte-h":!0}),f($)!=="svelte-1gvdkiz"&&($.innerHTML=dt),B=n(t),S(v.$$.fragment,t),J=n(t),x=o(t,"P",{"data-svelte-h":!0}),f(x)!=="svelte-irk0xr"&&(x.textContent=mt),K=n(t),b=o(t,"P",{"data-svelte-h":!0}),f(b)!=="svelte-24qwdr"&&(b.textContent=pt),N=n(t),w=o(t,"P",{"data-svelte-h":!0}),f(w)!=="svelte-1bzrp3h"&&(w.innerHTML=ct),Q=n(t),S(y.$$.fragment,t),X=n(t),_=o(t,"P",{"data-svelte-h":!0}),f(_)!=="svelte-13m965x"&&(_.innerHTML=gt),Z=n(t),S(C.$$.fragment,t),tt=n(t),T=o(t,"P",{"data-svelte-h":!0}),f(T)!=="svelte-r9o772"&&(T.textContent=ht),et=n(t),M=o(t,"P",{"data-svelte-h":!0}),f(M)!=="svelte-1s3m8si"&&(M.textContent=$t),at=n(t),H=o(t,"UL",{"data-svelte-h":!0}),f(H)!=="svelte-1gap8nq"&&(H.innerHTML=vt),st=n(t),S(L.$$.fragment,t),it=n(t),D=o(t,"P",{}),xt(D).forEach(a),this.h()},h(){bt(r,"name","hf:doc:metadata"),bt(r,"content",St)},m(t,e){Ht(document.head,r),s(t,q,e),s(t,V,e),s(t,z,e),A(u,t,e),s(t,W,e),s(t,d,e),s(t,Y,e),s(t,m,e),s(t,O,e),A(p,t,e),s(t,U,e),s(t,c,e),s(t,j,e),s(t,g,e),s(t,G,e),A(h,t,e),s(t,R,e),s(t,$,e),s(t,B,e),A(v,t,e),s(t,J,e),s(t,x,e),s(t,K,e),s(t,b,e),s(t,N,e),s(t,w,e),s(t,Q,e),A(y,t,e),s(t,X,e),s(t,_,e),s(t,Z,e),A(C,t,e),s(t,tt,e),s(t,T,e),s(t,et,e),s(t,M,e),s(t,at,e),s(t,H,e),s(t,st,e),A(L,t,e),s(t,it,e),s(t,D,e),nt=!0},p:yt,i(t){nt||(k(u.$$.fragment,t),k(p.$$.fragment,t),k(h.$$.fragment,t),k(v.$$.fragment,t),k(y.$$.fragment,t),k(C.$$.fragment,t),k(L.$$.fragment,t),nt=!0)},o(t){E(u.$$.fragment,t),E(p.$$.fragment,t),E(h.$$.fragment,t),E(v.$$.fragment,t),E(y.$$.fragment,t),E(C.$$.fragment,t),E(L.$$.fragment,t),nt=!1},d(t){t&&(a(q),a(V),a(z),a(W),a(d),a(Y),a(m),a(O),a(U),a(c),a(j),a(g),a(G),a(R),a($),a(B),a(J),a(x),a(K),a(b),a(N),a(w),a(Q),a(X),a(_),a(Z),a(tt),a(T),a(et),a(M),a(at),a(H),a(st),a(it),a(D)),a(r),F(u,t),F(p,t),F(h,t),F(v,t),F(y,t),F(C,t),F(L,t)}}}const St='{"title":"Data files Configuration","local":"data-files-configuration","sections":[{"title":"What are splits and subsets?","local":"what-are-splits-and-subsets","sections":[],"depth":2},{"title":"File names and splits","local":"file-names-and-splits","sections":[],"depth":2},{"title":"Manual configuration","local":"manual-configuration","sections":[],"depth":2},{"title":"Supported file formats","local":"supported-file-formats","sections":[],"depth":2},{"title":"Image and Audio datasets","local":"image-and-audio-datasets","sections":[],"depth":2}],"depth":1}';function At(lt){return _t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class It extends Ct{constructor(r){super(),Tt(this,r,At,Pt,wt,{})}}export{It as component};
