import{s as O,n as R,o as J}from"../chunks/scheduler.9cda857a.js";import{S as K,i as Q,e as c,s as o,c as b,h as V,a as w,d as a,b as n,f as F,g as v,j as G,k as N,l as W,m as s,n as _,t as y,o as T,p as x}from"../chunks/index.003612b0.js";import{C as X}from"../chunks/CopyLLMTxtMenu.44d08a39.js";import{H as U,E as Y}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.e5cfda8c.js";function Z(q){let i,H,$,C,l,P,d,E,r,L,m,A="Counting the number of downloads for datasets is not a trivial task, as a single dataset repository might contain multiple files, from multiple subsets and splits (e.g. train/validation/test) and sometimes with many files in a single split. To solve this issue and avoid counting one person’s download multiple times, we treat all files downloaded by a user (based on their IP address) within a 5-minute window as a single dataset download. This counting happens automatically on our servers when files are downloaded (through GET or HEAD requests), with no need to collect any user information or make additional calls.",M,u,S,f,B="The Hub used to provide download stats only for the datasets loadable via the <code>datasets</code> library. To determine the number of downloads, the Hub previously counted every time <code>load_dataset</code> was called in Python, excluding Hugging Face’s CI tooling on GitHub. No information was sent from the user, and no additional calls were made for this. The count was done server-side as we served files for downloads. This means that:",D,p,j='<li>The download count was the same regardless of whether the data is directly stored on the Hub repo or if the repository has a <a href="/docs/datasets/dataset_script">script</a> to load the data from an external source.</li> <li>If a user manually downloaded the data using tools like <code>wget</code> or the Hub’s user interface (UI), those downloads were not included in the download count.</li>',k,h,z,g,I;return l=new X({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),d=new U({props:{title:"Datasets Download Stats",local:"datasets-download-stats",headingTag:"h1"}}),r=new U({props:{title:"How are downloads counted for datasets?",local:"how-are-downloads-counted-for-datasets",headingTag:"h2"}}),u=new U({props:{title:"Before September 2024",local:"before-september-2024",headingTag:"h2"}}),h=new Y({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-download-stats.md"}}),{c(){i=c("meta"),H=o(),$=c("p"),C=o(),b(l.$$.fragment),P=o(),b(d.$$.fragment),E=o(),b(r.$$.fragment),L=o(),m=c("p"),m.textContent=A,M=o(),b(u.$$.fragment),S=o(),f=c("p"),f.innerHTML=B,D=o(),p=c("ul"),p.innerHTML=j,k=o(),b(h.$$.fragment),z=o(),g=c("p"),this.h()},l(e){const t=V("svelte-u9bgzb",document.head);i=w(t,"META",{name:!0,content:!0}),t.forEach(a),H=n(e),$=w(e,"P",{}),F($).forEach(a),C=n(e),v(l.$$.fragment,e),P=n(e),v(d.$$.fragment,e),E=n(e),v(r.$$.fragment,e),L=n(e),m=w(e,"P",{"data-svelte-h":!0}),G(m)!=="svelte-1a3nz8t"&&(m.textContent=A),M=n(e),v(u.$$.fragment,e),S=n(e),f=w(e,"P",{"data-svelte-h":!0}),G(f)!=="svelte-ni7ht1"&&(f.innerHTML=B),D=n(e),p=w(e,"UL",{"data-svelte-h":!0}),G(p)!=="svelte-g45zf4"&&(p.innerHTML=j),k=n(e),v(h.$$.fragment,e),z=n(e),g=w(e,"P",{}),F(g).forEach(a),this.h()},h(){N(i,"name","hf:doc:metadata"),N(i,"content",ee)},m(e,t){W(document.head,i),s(e,H,t),s(e,$,t),s(e,C,t),_(l,e,t),s(e,P,t),_(d,e,t),s(e,E,t),_(r,e,t),s(e,L,t),s(e,m,t),s(e,M,t),_(u,e,t),s(e,S,t),s(e,f,t),s(e,D,t),s(e,p,t),s(e,k,t),_(h,e,t),s(e,z,t),s(e,g,t),I=!0},p:R,i(e){I||(y(l.$$.fragment,e),y(d.$$.fragment,e),y(r.$$.fragment,e),y(u.$$.fragment,e),y(h.$$.fragment,e),I=!0)},o(e){T(l.$$.fragment,e),T(d.$$.fragment,e),T(r.$$.fragment,e),T(u.$$.fragment,e),T(h.$$.fragment,e),I=!1},d(e){e&&(a(H),a($),a(C),a(P),a(E),a(L),a(m),a(M),a(S),a(f),a(D),a(p),a(k),a(z),a(g)),a(i),x(l,e),x(d,e),x(r,e),x(u,e),x(h,e)}}}const ee='{"title":"Datasets Download Stats","local":"datasets-download-stats","sections":[{"title":"How are downloads counted for datasets?","local":"how-are-downloads-counted-for-datasets","sections":[],"depth":2},{"title":"Before September 2024","local":"before-september-2024","sections":[],"depth":2}],"depth":1}';function te(q){return J(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ie extends K{constructor(i){super(),Q(this,i,te,Z,O,{})}}export{ie as component};
