import{s as ht,n as $t,o as vt}from"../chunks/scheduler.d6170356.js";import{S as wt,i as yt,g as l,s as i,r as H,A as _t,h as o,f as a,c as n,j as ct,u as P,x as u,k as gt,y as xt,a as s,v as L,d as A,t as S,w as k}from"../chunks/index.fcd4cc08.js";import{H as F,E as bt}from"../chunks/EditOnGithub.da2b595c.js";function Ct(at){let r,I,E,V,f,W,d,st="There are no constraints on how to structure dataset repositories.",Y,m,it=`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>.`,q,p,O,c,nt='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!',U,g,lt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/split-configs-server.gif" alt="split-configs-server"/>',j,h,z,$,ot='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.',G,v,R,w,ut=`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.`,B,y,rt="You can also define multiple subsets for your dataset, and pass dataset building parameters (e.g. the separator to use for CSV files).",J,_,ft='See the documentation on <a href="./datasets-manual-configuration">Manual configuration</a> for more information.',K,x,N,b,dt=`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.`,Q,C,mt="We provide two guides that you can check out:",X,T,pt='<li><a href="./datasets-image">How to create an image dataset</a></li> <li><a href="https://huggingface.co/docs/datasets/audio_dataset" rel="nofollow">How to create an audio dataset</a></li>',Z,M,tt,D,et;return f=new F({props:{title:"Data files Configuration",local:"data-files-configuration",headingTag:"h1"}}),p=new F({props:{title:"What are splits and subsets?",local:"what-are-splits-and-subsets",headingTag:"h2"}}),h=new F({props:{title:"File names and splits",local:"file-names-and-splits",headingTag:"h2"}}),v=new F({props:{title:"Manual configuration",local:"manual-configuration",headingTag:"h2"}}),x=new F({props:{title:"Image and Audio datasets",local:"image-and-audio-datasets",headingTag:"h2"}}),M=new bt({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-data-files-configuration.md"}}),{c(){r=l("meta"),I=i(),E=l("p"),V=i(),H(f.$$.fragment),W=i(),d=l("p"),d.textContent=st,Y=i(),m=l("p"),m.innerHTML=it,q=i(),H(p.$$.fragment),O=i(),c=l("p"),c.innerHTML=nt,U=i(),g=l("p"),g.innerHTML=lt,j=i(),H(h.$$.fragment),z=i(),$=l("p"),$.innerHTML=ot,G=i(),H(v.$$.fragment),R=i(),w=l("p"),w.textContent=ut,B=i(),y=l("p"),y.textContent=rt,J=i(),_=l("p"),_.innerHTML=ft,K=i(),H(x.$$.fragment),N=i(),b=l("p"),b.textContent=dt,Q=i(),C=l("p"),C.textContent=mt,X=i(),T=l("ul"),T.innerHTML=pt,Z=i(),H(M.$$.fragment),tt=i(),D=l("p"),this.h()},l(t){const e=_t("svelte-u9bgzb",document.head);r=o(e,"META",{name:!0,content:!0}),e.forEach(a),I=n(t),E=o(t,"P",{}),ct(E).forEach(a),V=n(t),P(f.$$.fragment,t),W=n(t),d=o(t,"P",{"data-svelte-h":!0}),u(d)!=="svelte-1sicc2g"&&(d.textContent=st),Y=n(t),m=o(t,"P",{"data-svelte-h":!0}),u(m)!=="svelte-rffpu1"&&(m.innerHTML=it),q=n(t),P(p.$$.fragment,t),O=n(t),c=o(t,"P",{"data-svelte-h":!0}),u(c)!=="svelte-1vuep7a"&&(c.innerHTML=nt),U=n(t),g=o(t,"P",{"data-svelte-h":!0}),u(g)!=="svelte-1p3cuco"&&(g.innerHTML=lt),j=n(t),P(h.$$.fragment,t),z=n(t),$=o(t,"P",{"data-svelte-h":!0}),u($)!=="svelte-2so1ee"&&($.innerHTML=ot),G=n(t),P(v.$$.fragment,t),R=n(t),w=o(t,"P",{"data-svelte-h":!0}),u(w)!=="svelte-irk0xr"&&(w.textContent=ut),B=n(t),y=o(t,"P",{"data-svelte-h":!0}),u(y)!=="svelte-24qwdr"&&(y.textContent=rt),J=n(t),_=o(t,"P",{"data-svelte-h":!0}),u(_)!=="svelte-14ak4wy"&&(_.innerHTML=ft),K=n(t),P(x.$$.fragment,t),N=n(t),b=o(t,"P",{"data-svelte-h":!0}),u(b)!=="svelte-r9o772"&&(b.textContent=dt),Q=n(t),C=o(t,"P",{"data-svelte-h":!0}),u(C)!=="svelte-1s3m8si"&&(C.textContent=mt),X=n(t),T=o(t,"UL",{"data-svelte-h":!0}),u(T)!=="svelte-l8muxk"&&(T.innerHTML=pt),Z=n(t),P(M.$$.fragment,t),tt=n(t),D=o(t,"P",{}),ct(D).forEach(a),this.h()},h(){gt(r,"name","hf:doc:metadata"),gt(r,"content",Tt)},m(t,e){xt(document.head,r),s(t,I,e),s(t,E,e),s(t,V,e),L(f,t,e),s(t,W,e),s(t,d,e),s(t,Y,e),s(t,m,e),s(t,q,e),L(p,t,e),s(t,O,e),s(t,c,e),s(t,U,e),s(t,g,e),s(t,j,e),L(h,t,e),s(t,z,e),s(t,$,e),s(t,G,e),L(v,t,e),s(t,R,e),s(t,w,e),s(t,B,e),s(t,y,e),s(t,J,e),s(t,_,e),s(t,K,e),L(x,t,e),s(t,N,e),s(t,b,e),s(t,Q,e),s(t,C,e),s(t,X,e),s(t,T,e),s(t,Z,e),L(M,t,e),s(t,tt,e),s(t,D,e),et=!0},p:$t,i(t){et||(A(f.$$.fragment,t),A(p.$$.fragment,t),A(h.$$.fragment,t),A(v.$$.fragment,t),A(x.$$.fragment,t),A(M.$$.fragment,t),et=!0)},o(t){S(f.$$.fragment,t),S(p.$$.fragment,t),S(h.$$.fragment,t),S(v.$$.fragment,t),S(x.$$.fragment,t),S(M.$$.fragment,t),et=!1},d(t){t&&(a(I),a(E),a(V),a(W),a(d),a(Y),a(m),a(q),a(O),a(c),a(U),a(g),a(j),a(z),a($),a(G),a(R),a(w),a(B),a(y),a(J),a(_),a(K),a(N),a(b),a(Q),a(C),a(X),a(T),a(Z),a(tt),a(D)),a(r),k(f,t),k(p,t),k(h,t),k(v,t),k(x,t),k(M,t)}}}const Tt='{"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":"Image and Audio datasets","local":"image-and-audio-datasets","sections":[],"depth":2}],"depth":1}';function Mt(at){return vt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class At extends wt{constructor(r){super(),yt(this,r,Mt,Ct,ht,{})}}export{At as component};
