import{s as F,n as N,o as O}from"../chunks/scheduler.d6170356.js";import{S as R,i as J,g as c,s as n,r as E,A as K,h as p,f as a,c as i,j as B,u as S,x as I,k as j,y as Q,a as s,v as L,d as M,t as D,w as k}from"../chunks/index.fcd4cc08.js";import{H as z,E as V}from"../chunks/EditOnGithub.da2b595c.js";function W(A){let o,$,w,b,l,v,d,_,r,G="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.",y,m,T,u,U="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:",H,f,q='<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>',x,h,P,g,C;return l=new z({props:{title:"Datasets Download Stats",local:"datasets-download-stats",headingTag:"h1"}}),d=new z({props:{title:"How are downloads counted for datasets?",local:"how-are-downloads-counted-for-datasets",headingTag:"h2"}}),m=new z({props:{title:"Before September 2024",local:"before-september-2024",headingTag:"h2"}}),h=new V({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-download-stats.md"}}),{c(){o=c("meta"),$=n(),w=c("p"),b=n(),E(l.$$.fragment),v=n(),E(d.$$.fragment),_=n(),r=c("p"),r.textContent=G,y=n(),E(m.$$.fragment),T=n(),u=c("p"),u.innerHTML=U,H=n(),f=c("ul"),f.innerHTML=q,x=n(),E(h.$$.fragment),P=n(),g=c("p"),this.h()},l(e){const t=K("svelte-u9bgzb",document.head);o=p(t,"META",{name:!0,content:!0}),t.forEach(a),$=i(e),w=p(e,"P",{}),B(w).forEach(a),b=i(e),S(l.$$.fragment,e),v=i(e),S(d.$$.fragment,e),_=i(e),r=p(e,"P",{"data-svelte-h":!0}),I(r)!=="svelte-1a3nz8t"&&(r.textContent=G),y=i(e),S(m.$$.fragment,e),T=i(e),u=p(e,"P",{"data-svelte-h":!0}),I(u)!=="svelte-ni7ht1"&&(u.innerHTML=U),H=i(e),f=p(e,"UL",{"data-svelte-h":!0}),I(f)!=="svelte-g45zf4"&&(f.innerHTML=q),x=i(e),S(h.$$.fragment,e),P=i(e),g=p(e,"P",{}),B(g).forEach(a),this.h()},h(){j(o,"name","hf:doc:metadata"),j(o,"content",X)},m(e,t){Q(document.head,o),s(e,$,t),s(e,w,t),s(e,b,t),L(l,e,t),s(e,v,t),L(d,e,t),s(e,_,t),s(e,r,t),s(e,y,t),L(m,e,t),s(e,T,t),s(e,u,t),s(e,H,t),s(e,f,t),s(e,x,t),L(h,e,t),s(e,P,t),s(e,g,t),C=!0},p:N,i(e){C||(M(l.$$.fragment,e),M(d.$$.fragment,e),M(m.$$.fragment,e),M(h.$$.fragment,e),C=!0)},o(e){D(l.$$.fragment,e),D(d.$$.fragment,e),D(m.$$.fragment,e),D(h.$$.fragment,e),C=!1},d(e){e&&(a($),a(w),a(b),a(v),a(_),a(r),a(y),a(T),a(u),a(H),a(f),a(x),a(P),a(g)),a(o),k(l,e),k(d,e),k(m,e),k(h,e)}}}const X='{"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 Y(A){return O(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ae extends R{constructor(o){super(),J(this,o,Y,W,F,{})}}export{ae as component};
