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 n,r as H,A as _t,h as o,f as a,c as s,j as ct,u as P,x as r,k as gt,y as xt,a as i,v as L,d as A,t as k,w as E}from"../chunks/index.fcd4cc08.js";import{H as F,E as Ct}from"../chunks/EditOnGithub.da2b595c.js";function Tt(at){let u,I,S,V,f,W,d,it="There are no constraints on how to structure dataset repositories.",Y,m,nt=`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>.`,j,p,O,c,st='Machine learning datasets typically have splits and may also have configurations. 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>configuration</em> is a sub-dataset contained within a larger dataset. Configurations are especially common in multilingual speech datasets where there may be a different configuration for each language. If you’re interested in learning more about splits and configurations, check out the <a href="https://huggingface.co/docs/datasets-server/configs_and_splits" rel="nofollow">Splits and configurations</a> guide!',U,g,lt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/split-configs-server.gif" alt="split-configs-server"/>',q,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,rt=`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,ut="You can also define multiple configurations (or 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,C,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,T,mt="We provide two guides that you can check out:",X,M,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,b,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 configurations?",local:"what-are-splits-and-configurations",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"}}),b=new Ct({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-data-files-configuration.md"}}),{c(){u=l("meta"),I=n(),S=l("p"),V=n(),H(f.$$.fragment),W=n(),d=l("p"),d.textContent=it,Y=n(),m=l("p"),m.innerHTML=nt,j=n(),H(p.$$.fragment),O=n(),c=l("p"),c.innerHTML=st,U=n(),g=l("p"),g.innerHTML=lt,q=n(),H(h.$$.fragment),z=n(),$=l("p"),$.innerHTML=ot,G=n(),H(v.$$.fragment),R=n(),w=l("p"),w.textContent=rt,B=n(),y=l("p"),y.textContent=ut,J=n(),_=l("p"),_.innerHTML=ft,K=n(),H(x.$$.fragment),N=n(),C=l("p"),C.textContent=dt,Q=n(),T=l("p"),T.textContent=mt,X=n(),M=l("ul"),M.innerHTML=pt,Z=n(),H(b.$$.fragment),tt=n(),D=l("p"),this.h()},l(t){const e=_t("svelte-u9bgzb",document.head);u=o(e,"META",{name:!0,content:!0}),e.forEach(a),I=s(t),S=o(t,"P",{}),ct(S).forEach(a),V=s(t),P(f.$$.fragment,t),W=s(t),d=o(t,"P",{"data-svelte-h":!0}),r(d)!=="svelte-1sicc2g"&&(d.textContent=it),Y=s(t),m=o(t,"P",{"data-svelte-h":!0}),r(m)!=="svelte-rffpu1"&&(m.innerHTML=nt),j=s(t),P(p.$$.fragment,t),O=s(t),c=o(t,"P",{"data-svelte-h":!0}),r(c)!=="svelte-1jat08g"&&(c.innerHTML=st),U=s(t),g=o(t,"P",{"data-svelte-h":!0}),r(g)!=="svelte-1p3cuco"&&(g.innerHTML=lt),q=s(t),P(h.$$.fragment,t),z=s(t),$=o(t,"P",{"data-svelte-h":!0}),r($)!=="svelte-2so1ee"&&($.innerHTML=ot),G=s(t),P(v.$$.fragment,t),R=s(t),w=o(t,"P",{"data-svelte-h":!0}),r(w)!=="svelte-irk0xr"&&(w.textContent=rt),B=s(t),y=o(t,"P",{"data-svelte-h":!0}),r(y)!=="svelte-1ee155m"&&(y.textContent=ut),J=s(t),_=o(t,"P",{"data-svelte-h":!0}),r(_)!=="svelte-14ak4wy"&&(_.innerHTML=ft),K=s(t),P(x.$$.fragment,t),N=s(t),C=o(t,"P",{"data-svelte-h":!0}),r(C)!=="svelte-r9o772"&&(C.textContent=dt),Q=s(t),T=o(t,"P",{"data-svelte-h":!0}),r(T)!=="svelte-1s3m8si"&&(T.textContent=mt),X=s(t),M=o(t,"UL",{"data-svelte-h":!0}),r(M)!=="svelte-l8muxk"&&(M.innerHTML=pt),Z=s(t),P(b.$$.fragment,t),tt=s(t),D=o(t,"P",{}),ct(D).forEach(a),this.h()},h(){gt(u,"name","hf:doc:metadata"),gt(u,"content",Mt)},m(t,e){xt(document.head,u),i(t,I,e),i(t,S,e),i(t,V,e),L(f,t,e),i(t,W,e),i(t,d,e),i(t,Y,e),i(t,m,e),i(t,j,e),L(p,t,e),i(t,O,e),i(t,c,e),i(t,U,e),i(t,g,e),i(t,q,e),L(h,t,e),i(t,z,e),i(t,$,e),i(t,G,e),L(v,t,e),i(t,R,e),i(t,w,e),i(t,B,e),i(t,y,e),i(t,J,e),i(t,_,e),i(t,K,e),L(x,t,e),i(t,N,e),i(t,C,e),i(t,Q,e),i(t,T,e),i(t,X,e),i(t,M,e),i(t,Z,e),L(b,t,e),i(t,tt,e),i(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(b.$$.fragment,t),et=!0)},o(t){k(f.$$.fragment,t),k(p.$$.fragment,t),k(h.$$.fragment,t),k(v.$$.fragment,t),k(x.$$.fragment,t),k(b.$$.fragment,t),et=!1},d(t){t&&(a(I),a(S),a(V),a(W),a(d),a(Y),a(m),a(j),a(O),a(c),a(U),a(g),a(q),a(z),a($),a(G),a(R),a(w),a(B),a(y),a(J),a(_),a(K),a(N),a(C),a(Q),a(T),a(X),a(M),a(Z),a(tt),a(D)),a(u),E(f,t),E(p,t),E(h,t),E(v,t),E(x,t),E(b,t)}}}const Mt='{"title":"Data files Configuration","local":"data-files-configuration","sections":[{"title":"What are splits and configurations?","local":"what-are-splits-and-configurations","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 bt(at){return vt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class At extends wt{constructor(u){super(),yt(this,u,bt,Tt,ht,{})}}export{At as component};
