import{S as ho,i as go,s as _o,e as n,k as l,w as v,t as s,M as bo,c as o,d as a,m as c,a as r,x as h,h as i,b as u,G as e,g as m,y as g,L as yo,q as _,o as b,B as y,v as Eo}from"../../chunks/vendor-hf-doc-builder.js";import{D as x}from"../../chunks/Docstring-hf-doc-builder.js";import{I as Mn}from"../../chunks/IconCopyLink-hf-doc-builder.js";function $o(wn){let A,ct,T,z,xe,Z,Lt,Me,St,dt,L,R,we,ee,Ft,Ie,Ut,ut,E,Vt,Ne,Jt,zt,ke,Rt,qt,Oe,Bt,Ht,Ce,Wt,Gt,mt,p,te,Kt,O,jt,De,Qt,Xt,Pe,Yt,Zt,Ae,ea,ta,aa,ge,Te,na,oa,ra,Le,sa,ia,q,ae,la,ne,ca,Se,da,ua,ma,B,oe,pa,S,fa,Fe,va,ha,Ue,ga,_a,pt,M,re,ba,Ve,ya,Ea,_e,Je,$a,xa,Ma,ze,wa,ft,w,se,Ia,Re,Na,ka,be,qe,Oa,Ca,Da,Be,Pa,vt,I,ie,Aa,He,Ta,La,ye,We,Sa,Fa,Ua,Ge,Va,ht,F,H,Ke,le,Ja,je,za,gt,$,Ra,Qe,qa,Ba,Xe,Ha,Wa,Ye,Ga,Ka,Ze,ja,Qa,_t,f,ce,Xa,et,Ya,Za,W,de,en,tt,tn,an,G,ue,nn,at,on,rn,C,me,sn,nt,ln,cn,ot,dn,un,K,pe,mn,rt,pn,bt,U,fe,fn,st,vn,yt,V,ve,hn,it,gn,Et,J,he,_n,lt,bn,$t;return Z=new Mn({}),ee=new Mn({}),te=new x({props:{name:"class evaluate.EvaluationModuleInfo",anchor:"evaluate.EvaluationModuleInfo",parameters:[{name:"description",val:": str"},{name:"citation",val:": str"},{name:"features",val:": typing.Union[datasets.features.features.Features, typing.List[datasets.features.features.Features]]"},{name:"inputs_description",val:": str = <factory>"},{name:"homepage",val:": str = <factory>"},{name:"license",val:": str = <factory>"},{name:"codebase_urls",val:": typing.List[str] = <factory>"},{name:"reference_urls",val:": typing.List[str] = <factory>"},{name:"streamable",val:": bool = False"},{name:"format",val:": typing.Optional[str] = None"},{name:"module_type",val:": str = 'metric'"},{name:"module_name",val:": typing.Optional[str] = None"},{name:"config_name",val:": typing.Optional[str] = None"},{name:"experiment_id",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/info.py#L35"}}),ae=new x({props:{name:"from_directory",anchor:"evaluate.EvaluationModuleInfo.from_directory",parameters:[{name:"metric_info_dir",val:""}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/info.py#L82"}}),oe=new x({props:{name:"write_to_directory",anchor:"evaluate.EvaluationModuleInfo.write_to_directory",parameters:[{name:"metric_info_dir",val:""}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/info.py#L72"}}),re=new x({props:{name:"class evaluate.MetricInfo",anchor:"evaluate.MetricInfo",parameters:[{name:"description",val:": str"},{name:"citation",val:": str"},{name:"features",val:": typing.Union[datasets.features.features.Features, typing.List[datasets.features.features.Features]]"},{name:"inputs_description",val:": str = <factory>"},{name:"homepage",val:": str = <factory>"},{name:"license",val:": str = <factory>"},{name:"codebase_urls",val:": typing.List[str] = <factory>"},{name:"reference_urls",val:": typing.List[str] = <factory>"},{name:"streamable",val:": bool = False"},{name:"format",val:": typing.Optional[str] = None"},{name:"module_type",val:": str = 'metric'"},{name:"module_name",val:": typing.Optional[str] = None"},{name:"config_name",val:": typing.Optional[str] = None"},{name:"experiment_id",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/info.py#L105"}}),se=new x({props:{name:"class evaluate.ComparisonInfo",anchor:"evaluate.ComparisonInfo",parameters:[{name:"description",val:": str"},{name:"citation",val:": str"},{name:"features",val:": typing.Union[datasets.features.features.Features, typing.List[datasets.features.features.Features]]"},{name:"inputs_description",val:": str = <factory>"},{name:"homepage",val:": str = <factory>"},{name:"license",val:": str = <factory>"},{name:"codebase_urls",val:": typing.List[str] = <factory>"},{name:"reference_urls",val:": typing.List[str] = <factory>"},{name:"streamable",val:": bool = False"},{name:"format",val:": typing.Optional[str] = None"},{name:"module_type",val:": str = 'comparison'"},{name:"module_name",val:": typing.Optional[str] = None"},{name:"config_name",val:": typing.Optional[str] = None"},{name:"experiment_id",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/info.py#L118"}}),ie=new x({props:{name:"class evaluate.MeasurementInfo",anchor:"evaluate.MeasurementInfo",parameters:[{name:"description",val:": str"},{name:"citation",val:": str"},{name:"features",val:": typing.Union[datasets.features.features.Features, typing.List[datasets.features.features.Features]]"},{name:"inputs_description",val:": str = <factory>"},{name:"homepage",val:": str = <factory>"},{name:"license",val:": str = <factory>"},{name:"codebase_urls",val:": typing.List[str] = <factory>"},{name:"reference_urls",val:": typing.List[str] = <factory>"},{name:"streamable",val:": bool = False"},{name:"format",val:": typing.Optional[str] = None"},{name:"module_type",val:": str = 'measurement'"},{name:"module_name",val:": typing.Optional[str] = None"},{name:"config_name",val:": typing.Optional[str] = None"},{name:"experiment_id",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/info.py#L131"}}),le=new Mn({}),ce=new x({props:{name:"class evaluate.EvaluationModule",anchor:"evaluate.EvaluationModule",parameters:[{name:"config_name",val:": typing.Optional[str] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"cache_dir",val:": typing.Optional[str] = None"},{name:"num_process",val:": int = 1"},{name:"process_id",val:": int = 0"},{name:"seed",val:": typing.Optional[int] = None"},{name:"experiment_id",val:": typing.Optional[str] = None"},{name:"max_concurrent_cache_files",val:": int = 10000"},{name:"timeout",val:": typing.Union[int, float] = 100"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"evaluate.EvaluationModule.config_name",description:`<strong>config_name</strong> (<code>str</code>) &#x2014; This is used to define a hash specific to a module computation script and prevents the module&#x2019;s data
to be overridden when the module loading script is modified.`,name:"config_name"},{anchor:"evaluate.EvaluationModule.keep_in_memory",description:"<strong>keep_in_memory</strong> (<code>bool</code>) &#x2014; keep all predictions and references in memory. Not possible in distributed settings.",name:"keep_in_memory"},{anchor:"evaluate.EvaluationModule.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>) &#x2014; Path to a directory in which temporary prediction/references data will be stored.
The data directory should be located on a shared file-system in distributed setups.`,name:"cache_dir"},{anchor:"evaluate.EvaluationModule.num_process",description:`<strong>num_process</strong> (<code>int</code>) &#x2014; specify the total number of nodes in a distributed settings.
This is useful to compute module in distributed setups (in particular non-additive modules like F1).`,name:"num_process"},{anchor:"evaluate.EvaluationModule.process_id",description:`<strong>process_id</strong> (<code>int</code>) &#x2014; specify the id of the current process in a distributed setup (between 0 and num_process-1)
This is useful to compute module in distributed setups (in particular non-additive metrics like F1).`,name:"process_id"},{anchor:"evaluate.EvaluationModule.seed",description:'<strong>seed</strong> (<code>int</code>, optional) &#x2014; If specified, this will temporarily set numpy&#x2019;s random seed when <a href="/docs/evaluate/pr_182/en/package_reference/main_classes#evaluate.EvaluationModule.compute">evaluate.EvaluationModule.compute()</a> is run.',name:"seed"},{anchor:"evaluate.EvaluationModule.experiment_id",description:`<strong>experiment_id</strong> (<code>str</code>) &#x2014; A specific experiment id. This is used if several distributed evaluations share the same file system.
This is useful to compute module in distributed setups (in particular non-additive metrics like F1).`,name:"experiment_id"},{anchor:"evaluate.EvaluationModule.max_concurrent_cache_files",description:"<strong>max_concurrent_cache_files</strong> (<code>int</code>) &#x2014; Max number of concurrent module cache files (default 10000).",name:"max_concurrent_cache_files"},{anchor:"evaluate.EvaluationModule.timeout",description:"<strong>timeout</strong> (<code>Union[int, float]</code>) &#x2014; Timeout in second for distributed setting synchronization.",name:"timeout"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/module.py#L145"}}),de=new x({props:{name:"add",anchor:"evaluate.EvaluationModule.add",parameters:[{name:"prediction",val:" = None"},{name:"reference",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"evaluate.EvaluationModule.add.prediction",description:"<strong>prediction</strong> (list/array/tensor, optional) &#x2014; Predictions.",name:"prediction"},{anchor:"evaluate.EvaluationModule.add.reference",description:"<strong>reference</strong> (list/array/tensor, optional) &#x2014; References.",name:"reference"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/module.py#L508"}}),ue=new x({props:{name:"add_batch",anchor:"evaluate.EvaluationModule.add_batch",parameters:[{name:"predictions",val:" = None"},{name:"references",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"evaluate.EvaluationModule.add_batch.predictions",description:"<strong>predictions</strong> (list/array/tensor, optional) &#x2014; Predictions.",name:"predictions"},{anchor:"evaluate.EvaluationModule.add_batch.references",description:"<strong>references</strong> (list/array/tensor, optional) &#x2014; References.",name:"references"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/module.py#L460"}}),me=new x({props:{name:"compute",anchor:"evaluate.EvaluationModule.compute",parameters:[{name:"predictions",val:" = None"},{name:"references",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"evaluate.EvaluationModule.compute.predictions",description:"<strong>predictions</strong> (list/array/tensor, optional) &#x2014; Predictions.",name:"predictions"},{anchor:"evaluate.EvaluationModule.compute.references",description:"<strong>references</strong> (list/array/tensor, optional) &#x2014; References.",name:"references"},{anchor:"evaluate.EvaluationModule.compute.*kwargs",description:`*<strong>*kwargs</strong> (optional) &#x2014; Keyword arguments that will be forwarded to the evaluation module <code>_compute</code>
method (see details in the docstring).`,name:"*kwargs"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/module.py#L396",returnDescription:`
<p>dict or None</p>
<ul>
<li>Dictionary with the results if this evaluation module is run on the main process (<code>process_id == 0</code>).</li>
<li>None if the evaluation module is not run on the main process (<code>process_id != 0</code>).</li>
</ul>
`}}),pe=new x({props:{name:"download_and_prepare",anchor:"evaluate.EvaluationModule.download_and_prepare",parameters:[{name:"download_config",val:": typing.Optional[evaluate.utils.file_utils.DownloadConfig] = None"},{name:"dl_manager",val:": typing.Optional[datasets.download.download_manager.DownloadManager] = None"}],parametersDescription:[{anchor:"evaluate.EvaluationModule.download_and_prepare.download_config",description:"<strong>download_config</strong> (<code>DownloadConfig</code>, optional) &#x2014; Specific download configuration parameters.",name:"download_config"},{anchor:"evaluate.EvaluationModule.download_and_prepare.dl_manager",description:"<strong>dl_manager</strong> (<code>DownloadManager</code>, optional) &#x2014; Specific download manager to use.",name:"dl_manager"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/module.py#L625"}}),fe=new x({props:{name:"class evaluate.Metric",anchor:"evaluate.Metric",parameters:[{name:"config_name",val:": typing.Optional[str] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"cache_dir",val:": typing.Optional[str] = None"},{name:"num_process",val:": int = 1"},{name:"process_id",val:": int = 0"},{name:"seed",val:": typing.Optional[int] = None"},{name:"experiment_id",val:": typing.Optional[str] = None"},{name:"max_concurrent_cache_files",val:": int = 10000"},{name:"timeout",val:": typing.Union[int, float] = 100"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"evaluate.Metric.config_name",description:`<strong>config_name</strong> (<code>str</code>) &#x2014; This is used to define a hash specific to a metric computation script and prevents the metric&#x2019;s data
to be overridden when the metric loading script is modified.`,name:"config_name"},{anchor:"evaluate.Metric.keep_in_memory",description:"<strong>keep_in_memory</strong> (<code>bool</code>) &#x2014; keep all predictions and references in memory. Not possible in distributed settings.",name:"keep_in_memory"},{anchor:"evaluate.Metric.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>) &#x2014; Path to a directory in which temporary prediction/references data will be stored.
The data directory should be located on a shared file-system in distributed setups.`,name:"cache_dir"},{anchor:"evaluate.Metric.num_process",description:`<strong>num_process</strong> (<code>int</code>) &#x2014; specify the total number of nodes in a distributed settings.
This is useful to compute metrics in distributed setups (in particular non-additive metrics like F1).`,name:"num_process"},{anchor:"evaluate.Metric.process_id",description:`<strong>process_id</strong> (<code>int</code>) &#x2014; specify the id of the current process in a distributed setup (between 0 and num_process-1)
This is useful to compute metrics in distributed setups (in particular non-additive metrics like F1).`,name:"process_id"},{anchor:"evaluate.Metric.seed",description:'<strong>seed</strong> (<code>int</code>, optional) &#x2014; If specified, this will temporarily set numpy&#x2019;s random seed when <a href="/docs/evaluate/pr_182/en/package_reference/main_classes#evaluate.EvaluationModule.compute">evaluate.Metric.compute()</a> is run.',name:"seed"},{anchor:"evaluate.Metric.experiment_id",description:`<strong>experiment_id</strong> (<code>str</code>) &#x2014; A specific experiment id. This is used if several distributed evaluations share the same file system.
This is useful to compute metrics in distributed setups (in particular non-additive metrics like F1).`,name:"experiment_id"},{anchor:"evaluate.Metric.max_concurrent_cache_files",description:"<strong>max_concurrent_cache_files</strong> (<code>int</code>) &#x2014; Max number of concurrent metric cache files (default 10000).",name:"max_concurrent_cache_files"},{anchor:"evaluate.Metric.timeout",description:"<strong>timeout</strong> (<code>Union[int, float]</code>) &#x2014; Timeout in second for distributed setting synchronization.",name:"timeout"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/module.py#L722"}}),ve=new x({props:{name:"class evaluate.Comparison",anchor:"evaluate.Comparison",parameters:[{name:"config_name",val:": typing.Optional[str] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"cache_dir",val:": typing.Optional[str] = None"},{name:"num_process",val:": int = 1"},{name:"process_id",val:": int = 0"},{name:"seed",val:": typing.Optional[int] = None"},{name:"experiment_id",val:": typing.Optional[str] = None"},{name:"max_concurrent_cache_files",val:": int = 10000"},{name:"timeout",val:": typing.Union[int, float] = 100"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"evaluate.Comparison.config_name",description:`<strong>config_name</strong> (<code>str</code>) &#x2014; This is used to define a hash specific to a comparison computation script and prevents the comparison&#x2019;s data
to be overridden when the  comparison loading script is modified.`,name:"config_name"},{anchor:"evaluate.Comparison.keep_in_memory",description:"<strong>keep_in_memory</strong> (<code>bool</code>) &#x2014; keep all predictions and references in memory. Not possible in distributed settings.",name:"keep_in_memory"},{anchor:"evaluate.Comparison.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>) &#x2014; Path to a directory in which temporary prediction/references data will be stored.
The data directory should be located on a shared file-system in distributed setups.`,name:"cache_dir"},{anchor:"evaluate.Comparison.num_process",description:`<strong>num_process</strong> (<code>int</code>) &#x2014; specify the total number of nodes in a distributed settings.
This is useful to compute  comparisons in distributed setups (in particular non-additive comparisons).`,name:"num_process"},{anchor:"evaluate.Comparison.process_id",description:`<strong>process_id</strong> (<code>int</code>) &#x2014; specify the id of the current process in a distributed setup (between 0 and num_process-1)
This is useful to compute  comparisons in distributed setups (in particular non-additive comparisons).`,name:"process_id"},{anchor:"evaluate.Comparison.seed",description:'<strong>seed</strong> (<code>int</code>, optional) &#x2014; If specified, this will temporarily set numpy&#x2019;s random seed when <a href="/docs/evaluate/pr_182/en/package_reference/main_classes#evaluate.EvaluationModule.compute">evaluate.Comparison.compute()</a> is run.',name:"seed"},{anchor:"evaluate.Comparison.experiment_id",description:`<strong>experiment_id</strong> (<code>str</code>) &#x2014; A specific experiment id. This is used if several distributed evaluations share the same file system.
This is useful to compute  comparisons in distributed setups (in particular non-additive comparisons).`,name:"experiment_id"},{anchor:"evaluate.Comparison.max_concurrent_cache_files",description:"<strong>max_concurrent_cache_files</strong> (<code>int</code>) &#x2014; Max number of concurrent comparison cache files (default 10000).",name:"max_concurrent_cache_files"},{anchor:"evaluate.Comparison.timeout",description:"<strong>timeout</strong> (<code>Union[int, float]</code>) &#x2014; Timeout in second for distributed setting synchronization.",name:"timeout"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/module.py#L743"}}),he=new x({props:{name:"class evaluate.Measurement",anchor:"evaluate.Measurement",parameters:[{name:"config_name",val:": typing.Optional[str] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"cache_dir",val:": typing.Optional[str] = None"},{name:"num_process",val:": int = 1"},{name:"process_id",val:": int = 0"},{name:"seed",val:": typing.Optional[int] = None"},{name:"experiment_id",val:": typing.Optional[str] = None"},{name:"max_concurrent_cache_files",val:": int = 10000"},{name:"timeout",val:": typing.Union[int, float] = 100"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"evaluate.Measurement.config_name",description:`<strong>config_name</strong> (<code>str</code>) &#x2014; This is used to define a hash specific to a measurement computation script and prevents the measurement&#x2019;s data
to be overridden when the measurement loading script is modified.`,name:"config_name"},{anchor:"evaluate.Measurement.keep_in_memory",description:"<strong>keep_in_memory</strong> (<code>bool</code>) &#x2014; keep all predictions and references in memory. Not possible in distributed settings.",name:"keep_in_memory"},{anchor:"evaluate.Measurement.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>) &#x2014; Path to a directory in which temporary prediction/references data will be stored.
The data directory should be located on a shared file-system in distributed setups.`,name:"cache_dir"},{anchor:"evaluate.Measurement.num_process",description:`<strong>num_process</strong> (<code>int</code>) &#x2014; specify the total number of nodes in a distributed settings.
This is useful to compute measurements in distributed setups (in particular non-additive measurements).`,name:"num_process"},{anchor:"evaluate.Measurement.process_id",description:`<strong>process_id</strong> (<code>int</code>) &#x2014; specify the id of the current process in a distributed setup (between 0 and num_process-1)
This is useful to compute measurements in distributed setups (in particular non-additive measurements).`,name:"process_id"},{anchor:"evaluate.Measurement.seed",description:'<strong>seed</strong> (<code>int</code>, optional) &#x2014; If specified, this will temporarily set numpy&#x2019;s random seed when <a href="/docs/evaluate/pr_182/en/package_reference/main_classes#evaluate.EvaluationModule.compute">evaluate.Measurement.compute()</a> is run.',name:"seed"},{anchor:"evaluate.Measurement.experiment_id",description:`<strong>experiment_id</strong> (<code>str</code>) &#x2014; A specific experiment id. This is used if several distributed evaluations share the same file system.
This is useful to compute measurements in distributed setups (in particular non-additive measurements).`,name:"experiment_id"},{anchor:"evaluate.Measurement.max_concurrent_cache_files",description:"<strong>max_concurrent_cache_files</strong> (<code>int</code>) &#x2014; Max number of concurrent measurement cache files (default 10000).",name:"max_concurrent_cache_files"},{anchor:"evaluate.Measurement.timeout",description:"<strong>timeout</strong> (<code>Union[int, float]</code>) &#x2014; Timeout in second for distributed setting synchronization.",name:"timeout"}],source:"https://github.com/huggingface/evaluate/blob/vr_182/src/evaluate/module.py#L764"}}),{c(){A=n("meta"),ct=l(),T=n("h1"),z=n("a"),xe=n("span"),v(Z.$$.fragment),Lt=l(),Me=n("span"),St=s("Main classes"),dt=l(),L=n("h2"),R=n("a"),we=n("span"),v(ee.$$.fragment),Ft=l(),Ie=n("span"),Ut=s("EvaluationModuleInfo"),ut=l(),E=n("p"),Vt=s("The base class "),Ne=n("code"),Jt=s("EvaluationModuleInfo"),zt=s(" implements a the logic for the subclasses "),ke=n("code"),Rt=s("MetricInfo"),qt=s(", "),Oe=n("code"),Bt=s("ComparisonInfo"),Ht=s(", and "),Ce=n("code"),Wt=s("MeasurementInfo"),Gt=s("."),mt=l(),p=n("div"),v(te.$$.fragment),Kt=l(),O=n("p"),jt=s("Base class to store fnformation about an evaluation used for "),De=n("code"),Qt=s("MetricInfo"),Xt=s(", "),Pe=n("code"),Yt=s("ComparisonInfo"),Zt=s(`,
and `),Ae=n("code"),ea=s("MeasurementInfo"),ta=s("."),aa=l(),ge=n("p"),Te=n("code"),na=s("EvaluationModuleInfo"),oa=s(` documents an evaluation, including its name, version, and features.
See the constructor arguments and properties for a full list.`),ra=l(),Le=n("p"),sa=s("Note: Not all fields are known on construction and may be updated later."),ia=l(),q=n("div"),v(ae.$$.fragment),la=l(),ne=n("p"),ca=s("Create EvaluationModuleInfo from the JSON file in "),Se=n("code"),da=s("metric_info_dir"),ua=s("."),ma=l(),B=n("div"),v(oe.$$.fragment),pa=l(),S=n("p"),fa=s("Write "),Fe=n("code"),va=s("EvaluationModuleInfo"),ha=s(" as JSON to "),Ue=n("code"),ga=s("metric_info_dir"),_a=s(`.
Also save the license separately in LICENCE.`),pt=l(),M=n("div"),v(re.$$.fragment),ba=l(),Ve=n("p"),ya=s("Information about a metric."),Ea=l(),_e=n("p"),Je=n("code"),$a=s("EvaluationModuleInfo"),xa=s(` documents a metric, including its name, version, and features.
See the constructor arguments and properties for a full list.`),Ma=l(),ze=n("p"),wa=s("Note: Not all fields are known on construction and may be updated later."),ft=l(),w=n("div"),v(se.$$.fragment),Ia=l(),Re=n("p"),Na=s("Information about a comparison."),ka=l(),be=n("p"),qe=n("code"),Oa=s("EvaluationModuleInfo"),Ca=s(` documents a comparison, including its name, version, and features.
See the constructor arguments and properties for a full list.`),Da=l(),Be=n("p"),Pa=s("Note: Not all fields are known on construction and may be updated later."),vt=l(),I=n("div"),v(ie.$$.fragment),Aa=l(),He=n("p"),Ta=s("Information about a measurement."),La=l(),ye=n("p"),We=n("code"),Sa=s("EvaluationModuleInfo"),Fa=s(` documents a measurement, including its name, version, and features.
See the constructor arguments and properties for a full list.`),Ua=l(),Ge=n("p"),Va=s("Note: Not all fields are known on construction and may be updated later."),ht=l(),F=n("h2"),H=n("a"),Ke=n("span"),v(le.$$.fragment),Ja=l(),je=n("span"),za=s("EvaluationModule"),gt=l(),$=n("p"),Ra=s("The base class "),Qe=n("code"),qa=s("EvaluationModule"),Ba=s(" implements a the logic for the subclasses "),Xe=n("code"),Ha=s("Metric"),Wa=s(", "),Ye=n("code"),Ga=s("Comparison"),Ka=s(", and "),Ze=n("code"),ja=s("Measurement"),Qa=s("."),_t=l(),f=n("div"),v(ce.$$.fragment),Xa=l(),et=n("p"),Ya=s("A EvaluationModule is the base class and common API for metrics, comparisons, and measurements."),Za=l(),W=n("div"),v(de.$$.fragment),en=l(),tt=n("p"),tn=s("Add one prediction and reference for the evaluation module\u2019s stack."),an=l(),G=n("div"),v(ue.$$.fragment),nn=l(),at=n("p"),on=s("Add a batch of predictions and references for the evaluation module\u2019s stack."),rn=l(),C=n("div"),v(me.$$.fragment),sn=l(),nt=n("p"),ln=s("Compute the evaluation module."),cn=l(),ot=n("p"),dn=s("Usage of positional arguments is not allowed to prevent mistakes."),un=l(),K=n("div"),v(pe.$$.fragment),mn=l(),rt=n("p"),pn=s("Downloads and prepares dataset for reading."),bt=l(),U=n("div"),v(fe.$$.fragment),fn=l(),st=n("p"),vn=s("A Metric is the base class and common API for all metrics."),yt=l(),V=n("div"),v(ve.$$.fragment),hn=l(),it=n("p"),gn=s("A Comparison is the base class and common API for all comparisons."),Et=l(),J=n("div"),v(he.$$.fragment),_n=l(),lt=n("p"),bn=s("A Measurement is the base class and common API for all measurements."),this.h()},l(t){const d=bo('[data-svelte="svelte-1phssyn"]',document.head);A=o(d,"META",{name:!0,content:!0}),d.forEach(a),ct=c(t),T=o(t,"H1",{class:!0});var xt=r(T);z=o(xt,"A",{id:!0,class:!0,href:!0});var In=r(z);xe=o(In,"SPAN",{});var Nn=r(xe);h(Z.$$.fragment,Nn),Nn.forEach(a),In.forEach(a),Lt=c(xt),Me=o(xt,"SPAN",{});var kn=r(Me);St=i(kn,"Main classes"),kn.forEach(a),xt.forEach(a),dt=c(t),L=o(t,"H2",{class:!0});var Mt=r(L);R=o(Mt,"A",{id:!0,class:!0,href:!0});var On=r(R);we=o(On,"SPAN",{});var Cn=r(we);h(ee.$$.fragment,Cn),Cn.forEach(a),On.forEach(a),Ft=c(Mt),Ie=o(Mt,"SPAN",{});var Dn=r(Ie);Ut=i(Dn,"EvaluationModuleInfo"),Dn.forEach(a),Mt.forEach(a),ut=c(t),E=o(t,"P",{});var D=r(E);Vt=i(D,"The base class "),Ne=o(D,"CODE",{});var Pn=r(Ne);Jt=i(Pn,"EvaluationModuleInfo"),Pn.forEach(a),zt=i(D," implements a the logic for the subclasses "),ke=o(D,"CODE",{});var An=r(ke);Rt=i(An,"MetricInfo"),An.forEach(a),qt=i(D,", "),Oe=o(D,"CODE",{});var Tn=r(Oe);Bt=i(Tn,"ComparisonInfo"),Tn.forEach(a),Ht=i(D,", and "),Ce=o(D,"CODE",{});var Ln=r(Ce);Wt=i(Ln,"MeasurementInfo"),Ln.forEach(a),Gt=i(D,"."),D.forEach(a),mt=c(t),p=o(t,"DIV",{class:!0});var N=r(p);h(te.$$.fragment,N),Kt=c(N),O=o(N,"P",{});var j=r(O);jt=i(j,"Base class to store fnformation about an evaluation used for "),De=o(j,"CODE",{});var Sn=r(De);Qt=i(Sn,"MetricInfo"),Sn.forEach(a),Xt=i(j,", "),Pe=o(j,"CODE",{});var Fn=r(Pe);Yt=i(Fn,"ComparisonInfo"),Fn.forEach(a),Zt=i(j,`,
and `),Ae=o(j,"CODE",{});var Un=r(Ae);ea=i(Un,"MeasurementInfo"),Un.forEach(a),ta=i(j,"."),j.forEach(a),aa=c(N),ge=o(N,"P",{});var yn=r(ge);Te=o(yn,"CODE",{});var Vn=r(Te);na=i(Vn,"EvaluationModuleInfo"),Vn.forEach(a),oa=i(yn,` documents an evaluation, including its name, version, and features.
See the constructor arguments and properties for a full list.`),yn.forEach(a),ra=c(N),Le=o(N,"P",{});var Jn=r(Le);sa=i(Jn,"Note: Not all fields are known on construction and may be updated later."),Jn.forEach(a),ia=c(N),q=o(N,"DIV",{class:!0});var wt=r(q);h(ae.$$.fragment,wt),la=c(wt),ne=o(wt,"P",{});var It=r(ne);ca=i(It,"Create EvaluationModuleInfo from the JSON file in "),Se=o(It,"CODE",{});var zn=r(Se);da=i(zn,"metric_info_dir"),zn.forEach(a),ua=i(It,"."),It.forEach(a),wt.forEach(a),ma=c(N),B=o(N,"DIV",{class:!0});var Nt=r(B);h(oe.$$.fragment,Nt),pa=c(Nt),S=o(Nt,"P",{});var Ee=r(S);fa=i(Ee,"Write "),Fe=o(Ee,"CODE",{});var Rn=r(Fe);va=i(Rn,"EvaluationModuleInfo"),Rn.forEach(a),ha=i(Ee," as JSON to "),Ue=o(Ee,"CODE",{});var qn=r(Ue);ga=i(qn,"metric_info_dir"),qn.forEach(a),_a=i(Ee,`.
Also save the license separately in LICENCE.`),Ee.forEach(a),Nt.forEach(a),N.forEach(a),pt=c(t),M=o(t,"DIV",{class:!0});var Q=r(M);h(re.$$.fragment,Q),ba=c(Q),Ve=o(Q,"P",{});var Bn=r(Ve);ya=i(Bn,"Information about a metric."),Bn.forEach(a),Ea=c(Q),_e=o(Q,"P",{});var En=r(_e);Je=o(En,"CODE",{});var Hn=r(Je);$a=i(Hn,"EvaluationModuleInfo"),Hn.forEach(a),xa=i(En,` documents a metric, including its name, version, and features.
See the constructor arguments and properties for a full list.`),En.forEach(a),Ma=c(Q),ze=o(Q,"P",{});var Wn=r(ze);wa=i(Wn,"Note: Not all fields are known on construction and may be updated later."),Wn.forEach(a),Q.forEach(a),ft=c(t),w=o(t,"DIV",{class:!0});var X=r(w);h(se.$$.fragment,X),Ia=c(X),Re=o(X,"P",{});var Gn=r(Re);Na=i(Gn,"Information about a comparison."),Gn.forEach(a),ka=c(X),be=o(X,"P",{});var $n=r(be);qe=o($n,"CODE",{});var Kn=r(qe);Oa=i(Kn,"EvaluationModuleInfo"),Kn.forEach(a),Ca=i($n,` documents a comparison, including its name, version, and features.
See the constructor arguments and properties for a full list.`),$n.forEach(a),Da=c(X),Be=o(X,"P",{});var jn=r(Be);Pa=i(jn,"Note: Not all fields are known on construction and may be updated later."),jn.forEach(a),X.forEach(a),vt=c(t),I=o(t,"DIV",{class:!0});var Y=r(I);h(ie.$$.fragment,Y),Aa=c(Y),He=o(Y,"P",{});var Qn=r(He);Ta=i(Qn,"Information about a measurement."),Qn.forEach(a),La=c(Y),ye=o(Y,"P",{});var xn=r(ye);We=o(xn,"CODE",{});var Xn=r(We);Sa=i(Xn,"EvaluationModuleInfo"),Xn.forEach(a),Fa=i(xn,` documents a measurement, including its name, version, and features.
See the constructor arguments and properties for a full list.`),xn.forEach(a),Ua=c(Y),Ge=o(Y,"P",{});var Yn=r(Ge);Va=i(Yn,"Note: Not all fields are known on construction and may be updated later."),Yn.forEach(a),Y.forEach(a),ht=c(t),F=o(t,"H2",{class:!0});var kt=r(F);H=o(kt,"A",{id:!0,class:!0,href:!0});var Zn=r(H);Ke=o(Zn,"SPAN",{});var eo=r(Ke);h(le.$$.fragment,eo),eo.forEach(a),Zn.forEach(a),Ja=c(kt),je=o(kt,"SPAN",{});var to=r(je);za=i(to,"EvaluationModule"),to.forEach(a),kt.forEach(a),gt=c(t),$=o(t,"P",{});var P=r($);Ra=i(P,"The base class "),Qe=o(P,"CODE",{});var ao=r(Qe);qa=i(ao,"EvaluationModule"),ao.forEach(a),Ba=i(P," implements a the logic for the subclasses "),Xe=o(P,"CODE",{});var no=r(Xe);Ha=i(no,"Metric"),no.forEach(a),Wa=i(P,", "),Ye=o(P,"CODE",{});var oo=r(Ye);Ga=i(oo,"Comparison"),oo.forEach(a),Ka=i(P,", and "),Ze=o(P,"CODE",{});var ro=r(Ze);ja=i(ro,"Measurement"),ro.forEach(a),Qa=i(P,"."),P.forEach(a),_t=c(t),f=o(t,"DIV",{class:!0});var k=r(f);h(ce.$$.fragment,k),Xa=c(k),et=o(k,"P",{});var so=r(et);Ya=i(so,"A EvaluationModule is the base class and common API for metrics, comparisons, and measurements."),so.forEach(a),Za=c(k),W=o(k,"DIV",{class:!0});var Ot=r(W);h(de.$$.fragment,Ot),en=c(Ot),tt=o(Ot,"P",{});var io=r(tt);tn=i(io,"Add one prediction and reference for the evaluation module\u2019s stack."),io.forEach(a),Ot.forEach(a),an=c(k),G=o(k,"DIV",{class:!0});var Ct=r(G);h(ue.$$.fragment,Ct),nn=c(Ct),at=o(Ct,"P",{});var lo=r(at);on=i(lo,"Add a batch of predictions and references for the evaluation module\u2019s stack."),lo.forEach(a),Ct.forEach(a),rn=c(k),C=o(k,"DIV",{class:!0});var $e=r(C);h(me.$$.fragment,$e),sn=c($e),nt=o($e,"P",{});var co=r(nt);ln=i(co,"Compute the evaluation module."),co.forEach(a),cn=c($e),ot=o($e,"P",{});var uo=r(ot);dn=i(uo,"Usage of positional arguments is not allowed to prevent mistakes."),uo.forEach(a),$e.forEach(a),un=c(k),K=o(k,"DIV",{class:!0});var Dt=r(K);h(pe.$$.fragment,Dt),mn=c(Dt),rt=o(Dt,"P",{});var mo=r(rt);pn=i(mo,"Downloads and prepares dataset for reading."),mo.forEach(a),Dt.forEach(a),k.forEach(a),bt=c(t),U=o(t,"DIV",{class:!0});var Pt=r(U);h(fe.$$.fragment,Pt),fn=c(Pt),st=o(Pt,"P",{});var po=r(st);vn=i(po,"A Metric is the base class and common API for all metrics."),po.forEach(a),Pt.forEach(a),yt=c(t),V=o(t,"DIV",{class:!0});var At=r(V);h(ve.$$.fragment,At),hn=c(At),it=o(At,"P",{});var fo=r(it);gn=i(fo,"A Comparison is the base class and common API for all comparisons."),fo.forEach(a),At.forEach(a),Et=c(t),J=o(t,"DIV",{class:!0});var Tt=r(J);h(he.$$.fragment,Tt),_n=c(Tt),lt=o(Tt,"P",{});var vo=r(lt);bn=i(vo,"A Measurement is the base class and common API for all measurements."),vo.forEach(a),Tt.forEach(a),this.h()},h(){u(A,"name","hf:doc:metadata"),u(A,"content",JSON.stringify(xo)),u(z,"id","main-classes"),u(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(z,"href","#main-classes"),u(T,"class","relative group"),u(R,"id","evaluate.EvaluationModuleInfo"),u(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(R,"href","#evaluate.EvaluationModuleInfo"),u(L,"class","relative group"),u(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(H,"id","evaluate.EvaluationModule"),u(H,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(H,"href","#evaluate.EvaluationModule"),u(F,"class","relative group"),u(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,d){e(document.head,A),m(t,ct,d),m(t,T,d),e(T,z),e(z,xe),g(Z,xe,null),e(T,Lt),e(T,Me),e(Me,St),m(t,dt,d),m(t,L,d),e(L,R),e(R,we),g(ee,we,null),e(L,Ft),e(L,Ie),e(Ie,Ut),m(t,ut,d),m(t,E,d),e(E,Vt),e(E,Ne),e(Ne,Jt),e(E,zt),e(E,ke),e(ke,Rt),e(E,qt),e(E,Oe),e(Oe,Bt),e(E,Ht),e(E,Ce),e(Ce,Wt),e(E,Gt),m(t,mt,d),m(t,p,d),g(te,p,null),e(p,Kt),e(p,O),e(O,jt),e(O,De),e(De,Qt),e(O,Xt),e(O,Pe),e(Pe,Yt),e(O,Zt),e(O,Ae),e(Ae,ea),e(O,ta),e(p,aa),e(p,ge),e(ge,Te),e(Te,na),e(ge,oa),e(p,ra),e(p,Le),e(Le,sa),e(p,ia),e(p,q),g(ae,q,null),e(q,la),e(q,ne),e(ne,ca),e(ne,Se),e(Se,da),e(ne,ua),e(p,ma),e(p,B),g(oe,B,null),e(B,pa),e(B,S),e(S,fa),e(S,Fe),e(Fe,va),e(S,ha),e(S,Ue),e(Ue,ga),e(S,_a),m(t,pt,d),m(t,M,d),g(re,M,null),e(M,ba),e(M,Ve),e(Ve,ya),e(M,Ea),e(M,_e),e(_e,Je),e(Je,$a),e(_e,xa),e(M,Ma),e(M,ze),e(ze,wa),m(t,ft,d),m(t,w,d),g(se,w,null),e(w,Ia),e(w,Re),e(Re,Na),e(w,ka),e(w,be),e(be,qe),e(qe,Oa),e(be,Ca),e(w,Da),e(w,Be),e(Be,Pa),m(t,vt,d),m(t,I,d),g(ie,I,null),e(I,Aa),e(I,He),e(He,Ta),e(I,La),e(I,ye),e(ye,We),e(We,Sa),e(ye,Fa),e(I,Ua),e(I,Ge),e(Ge,Va),m(t,ht,d),m(t,F,d),e(F,H),e(H,Ke),g(le,Ke,null),e(F,Ja),e(F,je),e(je,za),m(t,gt,d),m(t,$,d),e($,Ra),e($,Qe),e(Qe,qa),e($,Ba),e($,Xe),e(Xe,Ha),e($,Wa),e($,Ye),e(Ye,Ga),e($,Ka),e($,Ze),e(Ze,ja),e($,Qa),m(t,_t,d),m(t,f,d),g(ce,f,null),e(f,Xa),e(f,et),e(et,Ya),e(f,Za),e(f,W),g(de,W,null),e(W,en),e(W,tt),e(tt,tn),e(f,an),e(f,G),g(ue,G,null),e(G,nn),e(G,at),e(at,on),e(f,rn),e(f,C),g(me,C,null),e(C,sn),e(C,nt),e(nt,ln),e(C,cn),e(C,ot),e(ot,dn),e(f,un),e(f,K),g(pe,K,null),e(K,mn),e(K,rt),e(rt,pn),m(t,bt,d),m(t,U,d),g(fe,U,null),e(U,fn),e(U,st),e(st,vn),m(t,yt,d),m(t,V,d),g(ve,V,null),e(V,hn),e(V,it),e(it,gn),m(t,Et,d),m(t,J,d),g(he,J,null),e(J,_n),e(J,lt),e(lt,bn),$t=!0},p:yo,i(t){$t||(_(Z.$$.fragment,t),_(ee.$$.fragment,t),_(te.$$.fragment,t),_(ae.$$.fragment,t),_(oe.$$.fragment,t),_(re.$$.fragment,t),_(se.$$.fragment,t),_(ie.$$.fragment,t),_(le.$$.fragment,t),_(ce.$$.fragment,t),_(de.$$.fragment,t),_(ue.$$.fragment,t),_(me.$$.fragment,t),_(pe.$$.fragment,t),_(fe.$$.fragment,t),_(ve.$$.fragment,t),_(he.$$.fragment,t),$t=!0)},o(t){b(Z.$$.fragment,t),b(ee.$$.fragment,t),b(te.$$.fragment,t),b(ae.$$.fragment,t),b(oe.$$.fragment,t),b(re.$$.fragment,t),b(se.$$.fragment,t),b(ie.$$.fragment,t),b(le.$$.fragment,t),b(ce.$$.fragment,t),b(de.$$.fragment,t),b(ue.$$.fragment,t),b(me.$$.fragment,t),b(pe.$$.fragment,t),b(fe.$$.fragment,t),b(ve.$$.fragment,t),b(he.$$.fragment,t),$t=!1},d(t){a(A),t&&a(ct),t&&a(T),y(Z),t&&a(dt),t&&a(L),y(ee),t&&a(ut),t&&a(E),t&&a(mt),t&&a(p),y(te),y(ae),y(oe),t&&a(pt),t&&a(M),y(re),t&&a(ft),t&&a(w),y(se),t&&a(vt),t&&a(I),y(ie),t&&a(ht),t&&a(F),y(le),t&&a(gt),t&&a($),t&&a(_t),t&&a(f),y(ce),y(de),y(ue),y(me),y(pe),t&&a(bt),t&&a(U),y(fe),t&&a(yt),t&&a(V),y(ve),t&&a(Et),t&&a(J),y(he)}}}const xo={local:"main-classes",sections:[{local:"evaluate.EvaluationModuleInfo",title:"EvaluationModuleInfo"},{local:"evaluate.EvaluationModule",title:"EvaluationModule"}],title:"Main classes"};function Mo(wn){return Eo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ko extends ho{constructor(A){super();go(this,A,Mo,$o,_o,{})}}export{ko as default,xo as metadata};
