import{S as xue,i as vue,s as yue,e as s,k as m,w as _,t as o,M as jue,c as n,d as a,m as h,a as r,x as b,h as l,b as w,G as e,g as D,y as $,q as x,o as v,B as y,v as wue,L as N}from"../../chunks/vendor-hf-doc-builder.js";import{T as $ue}from"../../chunks/Tip-hf-doc-builder.js";import{D as E}from"../../chunks/Docstring-hf-doc-builder.js";import{C as P}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Oa}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as T}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{D as Due}from"../../chunks/Deprecated-hf-doc-builder.js";function kue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import DatasetInfo
ds_info = DatasetInfo.from_directory("/path/to/directory/")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> DatasetInfo
<span class="hljs-meta">&gt;&gt;&gt; </span>ds_info = DatasetInfo.from_directory(<span class="hljs-string">&quot;/path/to/directory/&quot;</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Eue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.info.write_to_directory("/path/to/directory/")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.info.write_to_directory(<span class="hljs-string">&quot;/path/to/directory/&quot;</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function que(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
more_text = ds["text"]
ds.add_column(name="text_2", column=more_text)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>more_text = ds[<span class="hljs-string">&quot;text&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.add_column(name=<span class="hljs-string">&quot;text_2&quot;</span>, column=more_text)
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>, <span class="hljs-string">&#x27;text_2&#x27;</span>],
    num_rows: <span class="hljs-number">1066</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Iue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
new_review = {'label': 0, 'text': 'this movie is the absolute worst thing I have ever seen'}
ds = ds.add_item(new_review)
ds[-1]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>new_review = {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;this movie is the absolute worst thing I have ever seen&#x27;</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.add_item(new_review)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[-<span class="hljs-number">1</span>]
{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;this movie is the absolute worst thing I have ever seen&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Tue(k){let c,u,f,d,g;return d=new P({props:{code:"ds = Dataset.from_pandas(df)",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_pandas(df)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Nue(k){let c,u,f,d,g;return d=new P({props:{code:`def gen():
    yield {"text": "Good", "label": 0}
    yield {"text": "Bad", "label": 1}
ds = Dataset.from_generator(gen)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">gen</span>():
<span class="hljs-meta">... </span>    <span class="hljs-keyword">yield</span> {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Good&quot;</span>, <span class="hljs-string">&quot;label&quot;</span>: <span class="hljs-number">0</span>}
<span class="hljs-meta">... </span>    <span class="hljs-keyword">yield</span> {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Bad&quot;</span>, <span class="hljs-string">&quot;label&quot;</span>: <span class="hljs-number">1</span>}
...
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_generator(gen)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Pue(k){let c,u;return c=new P({props:{code:`def gen(shards):
    for shard in shards:
        with open(shard) as f:
            for line in f:
                yield {"line": line}
shards = [f"data{i}.txt" for i in range(32)]
ds = Dataset.from_generator(gen, gen_kwargs={"shards": shards})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">gen</span>(<span class="hljs-params">shards</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> shard <span class="hljs-keyword">in</span> shards:
<span class="hljs-meta">... </span>        <span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(shard) <span class="hljs-keyword">as</span> f:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">for</span> line <span class="hljs-keyword">in</span> f:
<span class="hljs-meta">... </span>                <span class="hljs-keyword">yield</span> {<span class="hljs-string">&quot;line&quot;</span>: line}
...
<span class="hljs-meta">&gt;&gt;&gt; </span>shards = [<span class="hljs-string">f&quot;data<span class="hljs-subst">{i}</span>.txt&quot;</span> <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">32</span>)]
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_generator(gen, gen_kwargs={<span class="hljs-string">&quot;shards&quot;</span>: shards})`}}),{c(){_(c.$$.fragment)},l(f){b(c.$$.fragment,f)},m(f,d){$(c,f,d),u=!0},p:N,i(f){u||(x(c.$$.fragment,f),u=!0)},o(f){v(c.$$.fragment,f),u=!1},d(f){y(c,f)}}}function Aue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.data`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.data
MemoryMappedTable
text: string
label: int64
----
text: [[<span class="hljs-string">&quot;compassionately explores the seemingly irreconcilable situation between conservative christian parents and their estranged gay and lesbian children .&quot;</span>,<span class="hljs-string">&quot;the soundtrack alone is worth the price of admission .&quot;</span>,<span class="hljs-string">&quot;rodriguez does a splendid job of racial profiling hollywood style--casting excellent latin actors of all ages--a trend long overdue .&quot;</span>,<span class="hljs-string">&quot;beneath the film&#x27;s obvious determination to shock at any cost lies considerable skill and determination , backed by sheer nerve .&quot;</span>,<span class="hljs-string">&quot;bielinsky is a filmmaker of impressive talent .&quot;</span>,<span class="hljs-string">&quot;so beautifully acted and directed , it&#x27;s clear that washington most certainly has a new career ahead of him if he so chooses .&quot;</span>,<span class="hljs-string">&quot;a visual spectacle full of stunning images and effects .&quot;</span>,<span class="hljs-string">&quot;a gentle and engrossing character study .&quot;</span>,<span class="hljs-string">&quot;it&#x27;s enough to watch huppert scheming , with her small , intelligent eyes as steady as any noir villain , and to enjoy the perfectly pitched web of tension that chabrol spins .&quot;</span>,<span class="hljs-string">&quot;an engrossing portrait of uncompromising artists trying to create something original against the backdrop of a corporate music industry that only seems to care about the bottom line .&quot;</span>,...,<span class="hljs-string">&quot;ultimately , jane learns her place as a girl , softens up and loses some of the intensity that made her an interesting character to begin with .&quot;</span>,<span class="hljs-string">&quot;ah-nuld&#x27;s action hero days might be over .&quot;</span>,<span class="hljs-string">&quot;it&#x27;s clear why deuces wild , which was shot two years ago , has been gathering dust on mgm&#x27;s shelf .&quot;</span>,<span class="hljs-string">&quot;feels like nothing quite so much as a middle-aged moviemaker&#x27;s attempt to surround himself with beautiful , half-naked women .&quot;</span>,<span class="hljs-string">&quot;when the precise nature of matthew&#x27;s predicament finally comes into sharp focus , the revelation fails to justify the build-up .&quot;</span>,<span class="hljs-string">&quot;this picture is murder by numbers , and as easy to be bored by as your abc&#x27;s , despite a few whopping shootouts .&quot;</span>,<span class="hljs-string">&quot;hilarious musical comedy though stymied by accents thick as mud .&quot;</span>,<span class="hljs-string">&quot;if you are into splatter movies , then you will probably have a reasonably good time with the salton sea .&quot;</span>,<span class="hljs-string">&quot;a dull , simple-minded and stereotypical tale of drugs , death and mind-numbing indifference on the inner-city streets .&quot;</span>,<span class="hljs-string">&quot;the feature-length stretch . . . strains the show&#x27;s concept .&quot;</span>]]
label: [[<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,<span class="hljs-number">1</span>,...,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>]]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Lue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.cache_files`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.cache_files
[{<span class="hljs-string">&#x27;filename&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/rotten_tomatoes_movie_review/default/1.0.0/40d411e45a6ce3484deed7cc15b82a53dad9a72aafd9f86f8f227134bec5ca46/rotten_tomatoes_movie_review-validation.arrow&#x27;</span>}]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Fue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.num_columns`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.num_columns
<span class="hljs-number">2</span>`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Cue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.num_rows`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.num_rows
<span class="hljs-number">1066</span>`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Oue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.column_names`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.column_names
[<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function zue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.shape`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.shape
(<span class="hljs-number">1066</span>, <span class="hljs-number">2</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Sue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.unique('label')`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.unique(<span class="hljs-string">&#x27;label&#x27;</span>)
[<span class="hljs-number">1</span>, <span class="hljs-number">0</span>]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Vue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("squad", split="train")
ds.features
ds.flatten()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;squad&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;answers&#x27;</span>: <span class="hljs-type">Sequence</span>(feature={<span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), <span class="hljs-string">&#x27;answer_start&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;int32&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}, length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;context&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;id&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;question&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;title&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.flatten()
Dataset({
    features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;context&#x27;</span>, <span class="hljs-string">&#x27;question&#x27;</span>, <span class="hljs-string">&#x27;answers.text&#x27;</span>, <span class="hljs-string">&#x27;answers.answer_start&#x27;</span>],
    num_rows: <span class="hljs-number">87599</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Uue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset, ClassLabel, Value
ds = load_dataset("rotten_tomatoes", split="validation")
ds.features
new_features = ds.features.copy()
new_features['label'] = ClassLabel(names=['bad', 'good'])
new_features['text'] = Value('large_string')
ds = ds.cast(new_features)
ds.features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, ClassLabel, Value
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;neg&#x27;</span>, <span class="hljs-string">&#x27;pos&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features = ds.features.copy()
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features[<span class="hljs-string">&#x27;label&#x27;</span>] = ClassLabel(names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features[<span class="hljs-string">&#x27;text&#x27;</span>] = Value(<span class="hljs-string">&#x27;large_string&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast(new_features)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;large_string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Mue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.features
ds = ds.cast_column('label', ClassLabel(names=['bad', 'good']))
ds.features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;neg&#x27;</span>, <span class="hljs-string">&#x27;pos&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast_column(<span class="hljs-string">&#x27;label&#x27;</span>, ClassLabel(names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>]))
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Rue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.remove_columns('label')
ds.remove_columns(column_names=ds.column_names) # Removing all the columns returns an empty dataset with the \`num_rows\` property set to 0`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.remove_columns(<span class="hljs-string">&#x27;label&#x27;</span>)
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>],
    num_rows: <span class="hljs-number">1066</span>
})
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.remove_columns(column_names=ds.column_names) <span class="hljs-comment"># Removing all the columns returns an empty dataset with the \`num_rows\` property set to 0</span>
Dataset({
    features: [],
    num_rows: <span class="hljs-number">0</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Bue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.rename_column('label', 'label_new')`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.rename_column(<span class="hljs-string">&#x27;label&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>)
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>],
    num_rows: <span class="hljs-number">1066</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Hue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.rename_columns({'text': 'text_new', 'label': 'label_new'})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.rename_columns({<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;text_new&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;label_new&#x27;</span>})
Dataset({
    features: [<span class="hljs-string">&#x27;text_new&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>],
    num_rows: <span class="hljs-number">1066</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Gue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.select_columns(['text'])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.select_columns([<span class="hljs-string">&#x27;text&#x27;</span>])
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>],
    num_rows: <span class="hljs-number">1066</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Kue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("boolq", split="validation")
ds.features
ds = ds.class_encode_column('answer')
ds.features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;boolq&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;answer&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;bool&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;passage&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;question&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.class_encode_column(<span class="hljs-string">&#x27;answer&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;answer&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;False&#x27;</span>, <span class="hljs-string">&#x27;True&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;passage&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;question&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Wue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.__len__`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.__len__
&lt;bound method Dataset.__len__ of Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
    num_rows: <span class="hljs-number">1066</span>
})&gt;`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Yue(k){let c,u,f,d,g,t,p,ce;return p=new P({props:{code:"new formatted columns = (all columns - previously unformatted columns)",highlighted:'<span class="hljs-built_in">new</span> formatted <span class="hljs-keyword">columns</span> = (<span class="hljs-keyword">all</span> <span class="hljs-keyword">columns</span> - previously unformatted <span class="hljs-keyword">columns</span>)'}}),{c(){c=s("p"),u=o("gets updated. In this case, if you apply "),f=s("code"),d=o("map"),g=o(" on a dataset to add a new column, then this column will be formatted as:"),t=m(),_(p.$$.fragment)},l(B){c=n(B,"P",{});var pe=r(c);u=l(pe,"gets updated. In this case, if you apply "),f=n(pe,"CODE",{});var ge=r(f);d=l(ge,"map"),ge.forEach(a),g=l(pe," on a dataset to add a new column, then this column will be formatted as:"),pe.forEach(a),t=h(B),b(p.$$.fragment,B)},m(B,pe){D(B,c,pe),e(c,u),e(c,f),e(f,d),e(c,g),D(B,t,pe),$(p,B,pe),ce=!0},p:N,i(B){ce||(x(p.$$.fragment,B),ce=!0)},o(B){v(p.$$.fragment,B),ce=!1},d(B){B&&a(c),B&&a(t),y(p,B)}}}function Jue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
ds = load_dataset("rotten_tomatoes", split="validation")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)
ds.set_format(type='numpy', columns=['text', 'label'])
ds.format`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> x: tokenizer(x[<span class="hljs-string">&#x27;text&#x27;</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>), batched=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.set_format(<span class="hljs-built_in">type</span>=<span class="hljs-string">&#x27;numpy&#x27;</span>, columns=[<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-string">&#x27;numpy&#x27;</span>,
<span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
<span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Que(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
ds = load_dataset("rotten_tomatoes", split="validation")
tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased')
def encode(batch):
    return tokenizer(batch['text'], padding=True, truncation=True, return_tensors='pt')
ds.set_transform(encode)
ds[0]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&#x27;bert-base-uncased&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">encode</span>(<span class="hljs-params">batch</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> tokenizer(batch[<span class="hljs-string">&#x27;text&#x27;</span>], padding=<span class="hljs-literal">True</span>, truncation=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&#x27;pt&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.set_transform(encode)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;attention_mask&#x27;</span>: tensor([<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>,
 <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]),
 <span class="hljs-string">&#x27;input_ids&#x27;</span>: tensor([  <span class="hljs-number">101</span>, <span class="hljs-number">29353</span>,  <span class="hljs-number">2135</span>, <span class="hljs-number">15102</span>,  <span class="hljs-number">1996</span>,  <span class="hljs-number">9428</span>, <span class="hljs-number">20868</span>,  <span class="hljs-number">2890</span>,  <span class="hljs-number">8663</span>,  <span class="hljs-number">6895</span>,
         <span class="hljs-number">20470</span>,  <span class="hljs-number">2571</span>,  <span class="hljs-number">3663</span>,  <span class="hljs-number">2090</span>,  <span class="hljs-number">4603</span>,  <span class="hljs-number">3017</span>,  <span class="hljs-number">3008</span>,  <span class="hljs-number">1998</span>,  <span class="hljs-number">2037</span>, <span class="hljs-number">24211</span>,
         <span class="hljs-number">5637</span>,  <span class="hljs-number">1998</span>, <span class="hljs-number">11690</span>,  <span class="hljs-number">2336</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>]),
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: tensor([<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>,
         <span class="hljs-number">0</span>, <span class="hljs-number">0</span>])}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Zue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
ds = load_dataset("rotten_tomatoes", split="validation")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)
ds.set_format(type='numpy', columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
ds.format
ds.reset_format()
ds.format`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> x: tokenizer(x[<span class="hljs-string">&#x27;text&#x27;</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>), batched=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.set_format(<span class="hljs-built_in">type</span>=<span class="hljs-string">&#x27;numpy&#x27;</span>, columns=[<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-string">&#x27;numpy&#x27;</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.reset_format()
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-literal">None</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Xue(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
ds = load_dataset("rotten_tomatoes", split="validation")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)
ds.format
ds = ds.with_format(type='tensorflow', columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
ds.format`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> x: tokenizer(x[<span class="hljs-string">&#x27;text&#x27;</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>), batched=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-literal">None</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.with_format(<span class="hljs-built_in">type</span>=<span class="hljs-string">&#x27;tensorflow&#x27;</span>, columns=[<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-string">&#x27;tensorflow&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function e_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
ds = load_dataset("rotten_tomatoes", split="validation")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
def encode(example):
    return tokenizer(example["text"], padding=True, truncation=True, return_tensors='pt')
ds = ds.with_transform(encode)
ds[0]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">encode</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> tokenizer(example[<span class="hljs-string">&quot;text&quot;</span>], padding=<span class="hljs-literal">True</span>, truncation=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&#x27;pt&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.with_transform(encode)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;attention_mask&#x27;</span>: tensor([<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>,
 <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]),
 <span class="hljs-string">&#x27;input_ids&#x27;</span>: tensor([  <span class="hljs-number">101</span>, <span class="hljs-number">18027</span>, <span class="hljs-number">16310</span>, <span class="hljs-number">16001</span>,  <span class="hljs-number">1103</span>,  <span class="hljs-number">9321</span>,   <span class="hljs-number">178</span>, <span class="hljs-number">11604</span>,  <span class="hljs-number">7235</span>,  <span class="hljs-number">6617</span>,
         <span class="hljs-number">1742</span>,  <span class="hljs-number">2165</span>,  <span class="hljs-number">2820</span>,  <span class="hljs-number">1206</span>,  <span class="hljs-number">6588</span>, <span class="hljs-number">22572</span>, <span class="hljs-number">12937</span>,  <span class="hljs-number">1811</span>,  <span class="hljs-number">2153</span>,  <span class="hljs-number">1105</span>,
         <span class="hljs-number">1147</span>, <span class="hljs-number">12890</span>, <span class="hljs-number">19587</span>,  <span class="hljs-number">6463</span>,  <span class="hljs-number">1105</span>, <span class="hljs-number">15026</span>,  <span class="hljs-number">1482</span>,   <span class="hljs-number">119</span>,   <span class="hljs-number">102</span>]),
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: tensor([<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>,
         <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>])}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function t_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.cleanup_cache_files()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.cleanup_cache_files()
<span class="hljs-number">10</span>`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function a_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
def add_prefix(example):
    example["text"] = "Review: " + example["text"]
    return example
ds = ds.map(add_prefix)
ds[0:3]["text"]

ds = ds.map(lambda example: tokenizer(example["text"]), batched=True)
ds = ds.map(add_prefix, num_proc=4)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">add_prefix</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    example[<span class="hljs-string">&quot;text&quot;</span>] = <span class="hljs-string">&quot;Review: &quot;</span> + example[<span class="hljs-string">&quot;text&quot;</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> example
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(add_prefix)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-number">0</span>:<span class="hljs-number">3</span>][<span class="hljs-string">&quot;text&quot;</span>]
[<span class="hljs-string">&#x27;Review: compassionately explores the seemingly irreconcilable situation between conservative christian parents and their estranged gay and lesbian children .&#x27;</span>,
 <span class="hljs-string">&#x27;Review: the soundtrack alone is worth the price of admission .&#x27;</span>,
 <span class="hljs-string">&#x27;Review: rodriguez does a splendid job of racial profiling hollywood style--casting excellent latin actors of all ages--a trend long overdue .&#x27;</span>]

<span class="hljs-comment"># process a batch of examples</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> example: tokenizer(example[<span class="hljs-string">&quot;text&quot;</span>]), batched=<span class="hljs-literal">True</span>)
<span class="hljs-comment"># set number of processors</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(add_prefix, num_proc=<span class="hljs-number">4</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function s_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.filter(lambda x: x["label"] == 1)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;label&quot;</span>] == <span class="hljs-number">1</span>)
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
    num_rows: <span class="hljs-number">533</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function n_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds.select(range(4))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.select(<span class="hljs-built_in">range</span>(<span class="hljs-number">4</span>))
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
    num_rows: <span class="hljs-number">4</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function r_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset('rotten_tomatoes', split='validation')
ds['label'][:10]
sorted_ds = ds.sort('label')
sorted_ds['label'][:10]
another_sorted_ds = ds.sort(['label', 'text'], reverse=[True, False])
another_sorted_ds['label'][:10]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&#x27;rotten_tomatoes&#x27;</span>, split=<span class="hljs-string">&#x27;validation&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&#x27;label&#x27;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>sorted_ds = ds.sort(<span class="hljs-string">&#x27;label&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sorted_ds[<span class="hljs-string">&#x27;label&#x27;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>another_sorted_ds = ds.sort([<span class="hljs-string">&#x27;label&#x27;</span>, <span class="hljs-string">&#x27;text&#x27;</span>], reverse=[<span class="hljs-literal">True</span>, <span class="hljs-literal">False</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>another_sorted_ds[<span class="hljs-string">&#x27;label&#x27;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function o_e(k){let c,u,f,d,g;return d=new P({props:{code:`my_dataset[0]  # fast
my_dataset = my_dataset.shuffle(seed=42)
my_dataset[0]  # up to 10x slower
my_dataset = my_dataset.flatten_indices()  # rewrite the shuffled dataset on disk as contiguous chunks of data
my_dataset[0]  # fast again`,highlighted:`my_dataset[<span class="hljs-number">0</span>]  <span class="hljs-comment"># fast</span>
my_dataset = my_dataset.shuffle(seed=<span class="hljs-number">42</span>)
my_dataset[<span class="hljs-number">0</span>]  <span class="hljs-comment"># up to 10x slower</span>
my_dataset = my_dataset.flatten_indices()  <span class="hljs-comment"># rewrite the shuffled dataset on disk as contiguous chunks of data</span>
my_dataset[<span class="hljs-number">0</span>]  <span class="hljs-comment"># fast again</span>`}}),{c(){c=s("p"),u=o("This may take a lot of time depending of the size of your dataset though:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"This may take a lot of time depending of the size of your dataset though:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function l_e(k){let c,u,f,d,g;return d=new P({props:{code:`my_iterable_dataset = my_dataset.to_iterable_dataset(num_shards=128)
for example in enumerate(my_iterable_dataset):  # fast
    pass

shuffled_iterable_dataset = my_iterable_dataset.shuffle(seed=42, buffer_size=100)

for example in enumerate(shuffled_iterable_dataset):  # as fast as before
    pass`,highlighted:`my_iterable_dataset = my_dataset.to_iterable_dataset(num_shards=<span class="hljs-number">128</span>)
<span class="hljs-keyword">for</span> example <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(my_iterable_dataset):  <span class="hljs-comment"># fast</span>
    <span class="hljs-keyword">pass</span>

shuffled_iterable_dataset = my_iterable_dataset.shuffle(seed=<span class="hljs-number">42</span>, buffer_size=<span class="hljs-number">100</span>)

<span class="hljs-keyword">for</span> example <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(shuffled_iterable_dataset):  <span class="hljs-comment"># as fast as before</span>
    <span class="hljs-keyword">pass</span>`}}),{c(){c=s("p"),u=o("It only shuffles the shards order and adds a shuffle buffer to your dataset, which keeps the speed of your dataset optimal:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"It only shuffles the shards order and adds a shuffle buffer to your dataset, which keeps the speed of your dataset optimal:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function i_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds['label'][:10]

shuffled_ds = ds.shuffle(seed=42)
shuffled_ds['label'][:10]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&#x27;label&#x27;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]

<span class="hljs-comment"># set a seed</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>shuffled_ds = ds.shuffle(seed=<span class="hljs-number">42</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>shuffled_ds[<span class="hljs-string">&#x27;label&#x27;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function d_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds = ds.train_test_split(test_size=0.2, shuffle=True)

ds = ds.train_test_split(test_size=0.2, seed=42)

ds = load_dataset("imdb",split="train")
ds = ds.train_test_split(test_size=0.2, stratify_by_column="label")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.train_test_split(test_size=<span class="hljs-number">0.2</span>, shuffle=<span class="hljs-literal">True</span>)
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
        num_rows: <span class="hljs-number">852</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
        num_rows: <span class="hljs-number">214</span>
    })
})

<span class="hljs-comment"># set a seed</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.train_test_split(test_size=<span class="hljs-number">0.2</span>, seed=<span class="hljs-number">42</span>)

<span class="hljs-comment"># stratified split</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;imdb&quot;</span>,split=<span class="hljs-string">&quot;train&quot;</span>)
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
    num_rows: <span class="hljs-number">25000</span>
})
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.train_test_split(test_size=<span class="hljs-number">0.2</span>, stratify_by_column=<span class="hljs-string">&quot;label&quot;</span>)
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
        num_rows: <span class="hljs-number">20000</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
        num_rows: <span class="hljs-number">5000</span>
    })
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function c_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="validation")
ds
ds.shard(num_shards=2, index=0)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
    num_rows: <span class="hljs-number">1066</span>
})
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.shard(num_shards=<span class="hljs-number">2</span>, index=<span class="hljs-number">0</span>)
Dataset({
    features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
    num_rows: <span class="hljs-number">533</span>
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function p_e(k){let c,u,f,d,g;return d=new P({props:{code:`ds_train = ds["train"].to_tf_dataset(
   columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'],
   shuffle=True,
   batch_size=16,
   collate_fn=data_collator,
)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>ds_train = ds[<span class="hljs-string">&quot;train&quot;</span>].to_tf_dataset(
<span class="hljs-meta">... </span>   columns=[<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
<span class="hljs-meta">... </span>   shuffle=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>   batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>   collate_fn=data_collator,
<span class="hljs-meta">... </span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function m_e(k){let c,u,f,d,g;return d=new P({props:{code:`dataset.push_to_hub("<organization>/<dataset_id>")
dataset.push_to_hub("<organization>/<dataset_id>", split="validation")
dataset.push_to_hub("<organization>/<dataset_id>", max_shard_size="1GB")
dataset.push_to_hub("<organization>/<dataset_id>", num_shards=1024)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.push_to_hub(<span class="hljs-string">&quot;&lt;organization&gt;/&lt;dataset_id&gt;&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.push_to_hub(<span class="hljs-string">&quot;&lt;organization&gt;/&lt;dataset_id&gt;&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.push_to_hub(<span class="hljs-string">&quot;&lt;organization&gt;/&lt;dataset_id&gt;&quot;</span>, max_shard_size=<span class="hljs-string">&quot;1GB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.push_to_hub(<span class="hljs-string">&quot;&lt;organization&gt;/&lt;dataset_id&gt;&quot;</span>, num_shards=<span class="hljs-number">1024</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function h_e(k){let c,u,f,d,g;return d=new P({props:{code:`ds.save_to_disk("path/to/dataset/directory")
ds.save_to_disk("path/to/dataset/directory", max_shard_size="1GB")
ds.save_to_disk("path/to/dataset/directory", num_shards=1024)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>ds.save_to_disk(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.save_to_disk(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>, max_shard_size=<span class="hljs-string">&quot;1GB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.save_to_disk(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>, num_shards=<span class="hljs-number">1024</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function f_e(k){let c,u,f,d,g;return d=new P({props:{code:'ds = load_from_disk("path/to/dataset/directory")',highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_from_disk(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function g_e(k){let c,u,f,d,g;return d=new P({props:{code:'ds.to_csv("path/to/dataset/directory")',highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds.to_csv(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function u_e(k){let c,u,f,d,g;return d=new P({props:{code:"ds.to_pandas()",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds.to_pandas()'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function __e(k){let c,u,f,d,g;return d=new P({props:{code:"ds.to_dict()",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds.to_dict()'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function b_e(k){let c,u,f,d,g;return d=new P({props:{code:'ds.to_json("path/to/dataset/directory")',highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds.to_json(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function $_e(k){let c,u,f,d,g;return d=new P({props:{code:'ds.to_parquet("path/to/dataset/directory")',highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds.to_parquet(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function x_e(k){let c,u,f,d,g;return d=new P({props:{code:`# con provided as a connection URI string
ds.to_sql("data", "sqlite:///my_own_db.sql")
# con provided as a sqlite3 connection object
import sqlite3
con = sqlite3.connect("my_own_db.sql")
with con:
    ds.to_sql("data", con)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># con provided as a connection URI string</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.to_sql(<span class="hljs-string">&quot;data&quot;</span>, <span class="hljs-string">&quot;sqlite:///my_own_db.sql&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># con provided as a sqlite3 connection object</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> sqlite3
<span class="hljs-meta">&gt;&gt;&gt; </span>con = sqlite3.connect(<span class="hljs-string">&quot;my_own_db.sql&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> con:
<span class="hljs-meta">... </span>    ds.to_sql(<span class="hljs-string">&quot;data&quot;</span>, con)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function v_e(k){let c,u,f,d,g;return d=new P({props:{code:`ds = datasets.load_dataset('crime_and_punish', split='train')
ds_with_embeddings = ds.map(lambda example: {'embeddings': embed(example['line']}))
ds_with_embeddings.add_faiss_index(column='embeddings')
# query
scores, retrieved_examples = ds_with_embeddings.get_nearest_examples('embeddings', embed('my new query'), k=10)
# save index
ds_with_embeddings.save_faiss_index('embeddings', 'my_index.faiss')

ds = datasets.load_dataset('crime_and_punish', split='train')
# load index
ds.load_faiss_index('embeddings', 'my_index.faiss')
# query
scores, retrieved_examples = ds.get_nearest_examples('embeddings', embed('my new query'), k=10)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>ds = datasets.load_dataset(<span class="hljs-string">&#x27;crime_and_punish&#x27;</span>, split=<span class="hljs-string">&#x27;train&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds_with_embeddings = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> example: {<span class="hljs-string">&#x27;embeddings&#x27;</span>: embed(example[<span class="hljs-string">&#x27;line&#x27;</span>]}))
<span class="hljs-meta">&gt;&gt;&gt; </span>ds_with_embeddings.add_faiss_index(column=<span class="hljs-string">&#x27;embeddings&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># query</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>scores, retrieved_examples = ds_with_embeddings.get_nearest_examples(<span class="hljs-string">&#x27;embeddings&#x27;</span>, embed(<span class="hljs-string">&#x27;my new query&#x27;</span>), k=<span class="hljs-number">10</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># save index</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds_with_embeddings.save_faiss_index(<span class="hljs-string">&#x27;embeddings&#x27;</span>, <span class="hljs-string">&#x27;my_index.faiss&#x27;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ds = datasets.load_dataset(<span class="hljs-string">&#x27;crime_and_punish&#x27;</span>, split=<span class="hljs-string">&#x27;train&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load index</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.load_faiss_index(<span class="hljs-string">&#x27;embeddings&#x27;</span>, <span class="hljs-string">&#x27;my_index.faiss&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># query</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>scores, retrieved_examples = ds.get_nearest_examples(<span class="hljs-string">&#x27;embeddings&#x27;</span>, embed(<span class="hljs-string">&#x27;my new query&#x27;</span>), k=<span class="hljs-number">10</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function y_e(k){let c,u,f,d,g;return d=new P({props:{code:`es_client = elasticsearch.Elasticsearch()
ds = datasets.load_dataset('crime_and_punish', split='train')
ds.add_elasticsearch_index(column='line', es_client=es_client, es_index_name="my_es_index")
scores, retrieved_examples = ds.get_nearest_examples('line', 'my new query', k=10)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>es_client = elasticsearch.Elasticsearch()
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = datasets.load_dataset(<span class="hljs-string">&#x27;crime_and_punish&#x27;</span>, split=<span class="hljs-string">&#x27;train&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.add_elasticsearch_index(column=<span class="hljs-string">&#x27;line&#x27;</span>, es_client=es_client, es_index_name=<span class="hljs-string">&quot;my_es_index&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>scores, retrieved_examples = ds.get_nearest_examples(<span class="hljs-string">&#x27;line&#x27;</span>, <span class="hljs-string">&#x27;my new query&#x27;</span>, k=<span class="hljs-number">10</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function j_e(k){let c,u,f,d,g;return d=new P({props:{code:"ds = Dataset.from_csv('path/to/dataset.csv')",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_csv(<span class="hljs-string">&#x27;path/to/dataset.csv&#x27;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function w_e(k){let c,u,f,d,g;return d=new P({props:{code:"ds = Dataset.from_json('path/to/dataset.json')",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_json(<span class="hljs-string">&#x27;path/to/dataset.json&#x27;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function D_e(k){let c,u,f,d,g;return d=new P({props:{code:"ds = Dataset.from_parquet('path/to/dataset.parquet')",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_parquet(<span class="hljs-string">&#x27;path/to/dataset.parquet&#x27;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function k_e(k){let c,u,f,d,g;return d=new P({props:{code:"ds = Dataset.from_text('path/to/dataset.txt')",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_text(<span class="hljs-string">&#x27;path/to/dataset.txt&#x27;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function E_e(k){let c,u,f,d,g;return d=new P({props:{code:`# Fetch a database table
ds = Dataset.from_sql("test_data", "postgres:///db_name")
# Execute a SQL query on the table
ds = Dataset.from_sql("SELECT sentence FROM test_data", "postgres:///db_name")
# Use a Selectable object to specify the query
from sqlalchemy import select, text
stmt = select([text("sentence")]).select_from(text("test_data"))
ds = Dataset.from_sql(stmt, "postgres:///db_name")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Fetch a database table</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_sql(<span class="hljs-string">&quot;test_data&quot;</span>, <span class="hljs-string">&quot;postgres:///db_name&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Execute a SQL query on the table</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_sql(<span class="hljs-string">&quot;SELECT sentence FROM test_data&quot;</span>, <span class="hljs-string">&quot;postgres:///db_name&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Use a Selectable object to specify the query</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> sqlalchemy <span class="hljs-keyword">import</span> select, text
<span class="hljs-meta">&gt;&gt;&gt; </span>stmt = select([text(<span class="hljs-string">&quot;sentence&quot;</span>)]).select_from(text(<span class="hljs-string">&quot;test_data&quot;</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_sql(stmt, <span class="hljs-string">&quot;postgres:///db_name&quot;</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function q_e(k){let c,u,f,d,g;return{c(){c=s("p"),u=o("The returned dataset can only be cached if "),f=s("code"),d=o("con"),g=o(" is specified as URI string.")},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"The returned dataset can only be cached if "),f=n(p,"CODE",{});var ce=r(f);d=l(ce,"con"),ce.forEach(a),g=l(p," is specified as URI string."),p.forEach(a)},m(t,p){D(t,c,p),e(c,u),e(c,f),e(f,d),e(c,g)},d(t){t&&a(c)}}}function I_e(k){let c,u,f,d,g;return d=new P({props:{code:`# dataset with mapping {'entailment': 0, 'neutral': 1, 'contradiction': 2}
ds = load_dataset("glue", "mnli", split="train")
# mapping to align with
label2id = {'CONTRADICTION': 0, 'NEUTRAL': 1, 'ENTAILMENT': 2}
ds_aligned = ds.align_labels_with_mapping(label2id, "label")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># dataset with mapping {&#x27;entailment&#x27;: 0, &#x27;neutral&#x27;: 1, &#x27;contradiction&#x27;: 2}</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;glue&quot;</span>, <span class="hljs-string">&quot;mnli&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mapping to align with</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>label2id = {<span class="hljs-string">&#x27;CONTRADICTION&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;NEUTRAL&#x27;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&#x27;ENTAILMENT&#x27;</span>: <span class="hljs-number">2</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds_aligned = ds.align_labels_with_mapping(label2id, <span class="hljs-string">&quot;label&quot;</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function T_e(k){let c,u,f,d,g;return d=new P({props:{code:"ds3 = concatenate_datasets([ds1, ds2])",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds3 = concatenate_datasets([ds1, ds2])'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function N_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Dataset, interleave_datasets
d1 = Dataset.from_dict({"a": [0, 1, 2]})
d2 = Dataset.from_dict({"a": [10, 11, 12]})
d3 = Dataset.from_dict({"a": [20, 21, 22]})
dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42, stopping_strategy="all_exhausted")
dataset["a"]
dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42)
dataset["a"]
dataset = interleave_datasets([d1, d2, d3])
dataset["a"]
dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted")
dataset["a"]
d1 = Dataset.from_dict({"a": [0, 1, 2]})
d2 = Dataset.from_dict({"a": [10, 11, 12, 13]})
d3 = Dataset.from_dict({"a": [20, 21, 22, 23, 24]})
dataset = interleave_datasets([d1, d2, d3])
dataset["a"]
dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted")
dataset["a"]
dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42)
dataset["a"]
dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42, stopping_strategy="all_exhausted")
dataset["a"]

from datasets import load_dataset, interleave_datasets
d1 = load_dataset("oscar", "unshuffled_deduplicated_en", split="train", streaming=True)
d2 = load_dataset("oscar", "unshuffled_deduplicated_fr", split="train", streaming=True)
dataset = interleave_datasets([d1, d2])
iterator = iter(dataset)
next(iterator)
next(iterator)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Dataset, interleave_datasets
<span class="hljs-meta">&gt;&gt;&gt; </span>d1 = Dataset.from_dict({<span class="hljs-string">&quot;a&quot;</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]})
<span class="hljs-meta">&gt;&gt;&gt; </span>d2 = Dataset.from_dict({<span class="hljs-string">&quot;a&quot;</span>: [<span class="hljs-number">10</span>, <span class="hljs-number">11</span>, <span class="hljs-number">12</span>]})
<span class="hljs-meta">&gt;&gt;&gt; </span>d3 = Dataset.from_dict({<span class="hljs-string">&quot;a&quot;</span>: [<span class="hljs-number">20</span>, <span class="hljs-number">21</span>, <span class="hljs-number">22</span>]})
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2, d3], probabilities=[<span class="hljs-number">0.7</span>, <span class="hljs-number">0.2</span>, <span class="hljs-number">0.1</span>], seed=<span class="hljs-number">42</span>, stopping_strategy=<span class="hljs-string">&quot;all_exhausted&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;a&quot;</span>]
[<span class="hljs-number">10</span>, <span class="hljs-number">0</span>, <span class="hljs-number">11</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">20</span>, <span class="hljs-number">12</span>, <span class="hljs-number">10</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">21</span>, <span class="hljs-number">0</span>, <span class="hljs-number">11</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">12</span>, <span class="hljs-number">2</span>, <span class="hljs-number">10</span>, <span class="hljs-number">0</span>, <span class="hljs-number">22</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2, d3], probabilities=[<span class="hljs-number">0.7</span>, <span class="hljs-number">0.2</span>, <span class="hljs-number">0.1</span>], seed=<span class="hljs-number">42</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;a&quot;</span>]
[<span class="hljs-number">10</span>, <span class="hljs-number">0</span>, <span class="hljs-number">11</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2, d3])
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;a&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">10</span>, <span class="hljs-number">20</span>, <span class="hljs-number">1</span>, <span class="hljs-number">11</span>, <span class="hljs-number">21</span>, <span class="hljs-number">2</span>, <span class="hljs-number">12</span>, <span class="hljs-number">22</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2, d3], stopping_strategy=<span class="hljs-string">&quot;all_exhausted&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;a&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">10</span>, <span class="hljs-number">20</span>, <span class="hljs-number">1</span>, <span class="hljs-number">11</span>, <span class="hljs-number">21</span>, <span class="hljs-number">2</span>, <span class="hljs-number">12</span>, <span class="hljs-number">22</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>d1 = Dataset.from_dict({<span class="hljs-string">&quot;a&quot;</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]})
<span class="hljs-meta">&gt;&gt;&gt; </span>d2 = Dataset.from_dict({<span class="hljs-string">&quot;a&quot;</span>: [<span class="hljs-number">10</span>, <span class="hljs-number">11</span>, <span class="hljs-number">12</span>, <span class="hljs-number">13</span>]})
<span class="hljs-meta">&gt;&gt;&gt; </span>d3 = Dataset.from_dict({<span class="hljs-string">&quot;a&quot;</span>: [<span class="hljs-number">20</span>, <span class="hljs-number">21</span>, <span class="hljs-number">22</span>, <span class="hljs-number">23</span>, <span class="hljs-number">24</span>]})
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2, d3])
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;a&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">10</span>, <span class="hljs-number">20</span>, <span class="hljs-number">1</span>, <span class="hljs-number">11</span>, <span class="hljs-number">21</span>, <span class="hljs-number">2</span>, <span class="hljs-number">12</span>, <span class="hljs-number">22</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2, d3], stopping_strategy=<span class="hljs-string">&quot;all_exhausted&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;a&quot;</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">10</span>, <span class="hljs-number">20</span>, <span class="hljs-number">1</span>, <span class="hljs-number">11</span>, <span class="hljs-number">21</span>, <span class="hljs-number">2</span>, <span class="hljs-number">12</span>, <span class="hljs-number">22</span>, <span class="hljs-number">0</span>, <span class="hljs-number">13</span>, <span class="hljs-number">23</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">24</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2, d3], probabilities=[<span class="hljs-number">0.7</span>, <span class="hljs-number">0.2</span>, <span class="hljs-number">0.1</span>], seed=<span class="hljs-number">42</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;a&quot;</span>]
[<span class="hljs-number">10</span>, <span class="hljs-number">0</span>, <span class="hljs-number">11</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2, d3], probabilities=[<span class="hljs-number">0.7</span>, <span class="hljs-number">0.2</span>, <span class="hljs-number">0.1</span>], seed=<span class="hljs-number">42</span>, stopping_strategy=<span class="hljs-string">&quot;all_exhausted&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;a&quot;</span>]
[<span class="hljs-number">10</span>, <span class="hljs-number">0</span>, <span class="hljs-number">11</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">20</span>, <span class="hljs-number">12</span>, <span class="hljs-number">13</span>, ..., <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">0</span>, <span class="hljs-number">24</span>]
For datasets <span class="hljs-keyword">in</span> streaming mode (iterable):

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, interleave_datasets
<span class="hljs-meta">&gt;&gt;&gt; </span>d1 = load_dataset(<span class="hljs-string">&quot;oscar&quot;</span>, <span class="hljs-string">&quot;unshuffled_deduplicated_en&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>d2 = load_dataset(<span class="hljs-string">&quot;oscar&quot;</span>, <span class="hljs-string">&quot;unshuffled_deduplicated_fr&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = interleave_datasets([d1, d2])
<span class="hljs-meta">&gt;&gt;&gt; </span>iterator = <span class="hljs-built_in">iter</span>(dataset)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(iterator)
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;Mtendere Village was inspired by the vision...}
&gt;&gt;&gt; next(iterator)
{&#x27;</span>text<span class="hljs-string">&#x27;: &quot;M\xE9dia de d\xE9bat d&#x27;</span><span class="hljs-built_in">id</span>\xE9es, de culture...}`}}),{c(){c=s("p"),u=o("For regular datasets (map-style):"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"For regular datasets (map-style):"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function P_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.data`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.data`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function A_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.cache_files`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.cache_files
{<span class="hljs-string">&#x27;test&#x27;</span>: [{<span class="hljs-string">&#x27;filename&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/rotten_tomatoes_movie_review/default/1.0.0/40d411e45a6ce3484deed7cc15b82a53dad9a72aafd9f86f8f227134bec5ca46/rotten_tomatoes_movie_review-test.arrow&#x27;</span>}],
 <span class="hljs-string">&#x27;train&#x27;</span>: [{<span class="hljs-string">&#x27;filename&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/rotten_tomatoes_movie_review/default/1.0.0/40d411e45a6ce3484deed7cc15b82a53dad9a72aafd9f86f8f227134bec5ca46/rotten_tomatoes_movie_review-train.arrow&#x27;</span>}],
 <span class="hljs-string">&#x27;validation&#x27;</span>: [{<span class="hljs-string">&#x27;filename&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/rotten_tomatoes_movie_review/default/1.0.0/40d411e45a6ce3484deed7cc15b82a53dad9a72aafd9f86f8f227134bec5ca46/rotten_tomatoes_movie_review-validation.arrow&#x27;</span>}]}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function L_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.num_columns`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.num_columns
{<span class="hljs-string">&#x27;test&#x27;</span>: <span class="hljs-number">2</span>, <span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-number">2</span>, <span class="hljs-string">&#x27;validation&#x27;</span>: <span class="hljs-number">2</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function F_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.num_rows`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.num_rows
{<span class="hljs-string">&#x27;test&#x27;</span>: <span class="hljs-number">1066</span>, <span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-number">8530</span>, <span class="hljs-string">&#x27;validation&#x27;</span>: <span class="hljs-number">1066</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function C_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.column_names`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.column_names
{<span class="hljs-string">&#x27;test&#x27;</span>: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
 <span class="hljs-string">&#x27;train&#x27;</span>: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
 <span class="hljs-string">&#x27;validation&#x27;</span>: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>]}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function O_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.shape`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.shape
{<span class="hljs-string">&#x27;test&#x27;</span>: (<span class="hljs-number">1066</span>, <span class="hljs-number">2</span>), <span class="hljs-string">&#x27;train&#x27;</span>: (<span class="hljs-number">8530</span>, <span class="hljs-number">2</span>), <span class="hljs-string">&#x27;validation&#x27;</span>: (<span class="hljs-number">1066</span>, <span class="hljs-number">2</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function z_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.unique("label")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.unique(<span class="hljs-string">&quot;label&quot;</span>)
{<span class="hljs-string">&#x27;test&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>], <span class="hljs-string">&#x27;train&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>], <span class="hljs-string">&#x27;validation&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">0</span>]}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function S_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.cleanup_cache_files()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.cleanup_cache_files()
{<span class="hljs-string">&#x27;test&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;validation&#x27;</span>: <span class="hljs-number">0</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function V_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
def add_prefix(example):
    example["text"] = "Review: " + example["text"]
    return example
ds = ds.map(add_prefix)
ds["train"][0:3]["text"]

ds = ds.map(lambda example: tokenizer(example["text"]), batched=True)
ds = ds.map(add_prefix, num_proc=4)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">add_prefix</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    example[<span class="hljs-string">&quot;text&quot;</span>] = <span class="hljs-string">&quot;Review: &quot;</span> + example[<span class="hljs-string">&quot;text&quot;</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> example
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(add_prefix)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>:<span class="hljs-number">3</span>][<span class="hljs-string">&quot;text&quot;</span>]
[<span class="hljs-string">&#x27;Review: the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>,
 <span class="hljs-string">&#x27;Review: the gorgeously elaborate continuation of &quot; the lord of the rings &quot; trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson&#x27;</span>s expanded vision of j . r . r . tolkien<span class="hljs-string">&#x27;s middle-earth .&#x27;</span>,
 <span class="hljs-string">&#x27;Review: effective but too-tepid biopic&#x27;</span>]

<span class="hljs-comment"># process a batch of examples</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> example: tokenizer(example[<span class="hljs-string">&quot;text&quot;</span>]), batched=<span class="hljs-literal">True</span>)
<span class="hljs-comment"># set number of processors</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(add_prefix, num_proc=<span class="hljs-number">4</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function U_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.filter(lambda x: x["label"] == 1)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;label&quot;</span>] == <span class="hljs-number">1</span>)
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
        num_rows: <span class="hljs-number">4265</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
        num_rows: <span class="hljs-number">533</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
        num_rows: <span class="hljs-number">533</span>
    })
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function M_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset('rotten_tomatoes')
ds['train']['label'][:10]
sorted_ds = ds.sort('label')
sorted_ds['train']['label'][:10]
another_sorted_ds = ds.sort(['label', 'text'], reverse=[True, False])
another_sorted_ds['train']['label'][:10]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&#x27;rotten_tomatoes&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&#x27;train&#x27;</span>][<span class="hljs-string">&#x27;label&#x27;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>sorted_ds = ds.sort(<span class="hljs-string">&#x27;label&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sorted_ds[<span class="hljs-string">&#x27;train&#x27;</span>][<span class="hljs-string">&#x27;label&#x27;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>another_sorted_ds = ds.sort([<span class="hljs-string">&#x27;label&#x27;</span>, <span class="hljs-string">&#x27;text&#x27;</span>], reverse=[<span class="hljs-literal">True</span>, <span class="hljs-literal">False</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>another_sorted_ds[<span class="hljs-string">&#x27;train&#x27;</span>][<span class="hljs-string">&#x27;label&#x27;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function R_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds["train"]["label"][:10]

shuffled_ds = ds.shuffle(seed=42)
shuffled_ds["train"]["label"][:10]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;label&quot;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]

<span class="hljs-comment"># set a seed</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>shuffled_ds = ds.shuffle(seed=<span class="hljs-number">42</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>shuffled_ds[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;label&quot;</span>][:<span class="hljs-number">10</span>]
[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function B_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
ds = ds.map(lambda x: tokenizer(x["text"], truncation=True, padding=True), batched=True)
ds.set_format(type="numpy", columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
ds["train"].format`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> x: tokenizer(x[<span class="hljs-string">&quot;text&quot;</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>), batched=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.set_format(<span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;numpy&quot;</span>, columns=[<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-string">&#x27;numpy&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function H_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
ds = load_dataset("rotten_tomatoes")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
ds = ds.map(lambda x: tokenizer(x["text"], truncation=True, padding=True), batched=True)
ds.set_format(type="numpy", columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
ds["train"].format
ds.reset_format()
ds["train"].format`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> x: tokenizer(x[<span class="hljs-string">&quot;text&quot;</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>), batched=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.set_format(<span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;numpy&quot;</span>, columns=[<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-string">&#x27;numpy&#x27;</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.reset_format()
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-literal">None</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function G_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
ds = load_dataset("rotten_tomatoes")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)
ds["train"].format
ds = ds.with_format(type='tensorflow', columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
ds["train"].format`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> x: tokenizer(x[<span class="hljs-string">&#x27;text&#x27;</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>), batched=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-literal">None</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.with_format(<span class="hljs-built_in">type</span>=<span class="hljs-string">&#x27;tensorflow&#x27;</span>, columns=[<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].<span class="hljs-built_in">format</span>
{<span class="hljs-string">&#x27;columns&#x27;</span>: [<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>],
 <span class="hljs-string">&#x27;format_kwargs&#x27;</span>: {},
 <span class="hljs-string">&#x27;output_all_columns&#x27;</span>: <span class="hljs-literal">False</span>,
 <span class="hljs-string">&#x27;type&#x27;</span>: <span class="hljs-string">&#x27;tensorflow&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function K_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
from transformers import AutoTokenizer
ds = load_dataset("rotten_tomatoes")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
def encode(example):
    return tokenizer(example['text'], truncation=True, padding=True, return_tensors="pt")
ds = ds.with_transform(encode)
ds["train"][0]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">encode</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> tokenizer(example[<span class="hljs-string">&#x27;text&#x27;</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.with_transform(encode)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;attention_mask&#x27;</span>: tensor([<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>,
 <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>,
 <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]),
 <span class="hljs-string">&#x27;input_ids&#x27;</span>: tensor([  <span class="hljs-number">101</span>,  <span class="hljs-number">1103</span>,  <span class="hljs-number">2067</span>,  <span class="hljs-number">1110</span>, <span class="hljs-number">17348</span>,  <span class="hljs-number">1106</span>,  <span class="hljs-number">1129</span>,  <span class="hljs-number">1103</span>,  <span class="hljs-number">6880</span>,  <span class="hljs-number">1432</span>,
        <span class="hljs-number">112</span>,   <span class="hljs-number">188</span>,  <span class="hljs-number">1207</span>,   <span class="hljs-number">107</span>, <span class="hljs-number">14255</span>,  <span class="hljs-number">1389</span>,   <span class="hljs-number">107</span>,  <span class="hljs-number">1105</span>,  <span class="hljs-number">1115</span>,  <span class="hljs-number">1119</span>,
        <span class="hljs-number">112</span>,   <span class="hljs-number">188</span>,  <span class="hljs-number">1280</span>,  <span class="hljs-number">1106</span>,  <span class="hljs-number">1294</span>,   <span class="hljs-number">170</span>, <span class="hljs-number">24194</span>,  <span class="hljs-number">1256</span>,  <span class="hljs-number">3407</span>,  <span class="hljs-number">1190</span>,
        <span class="hljs-number">170</span>, <span class="hljs-number">11791</span>,  <span class="hljs-number">5253</span>,   <span class="hljs-number">188</span>,  <span class="hljs-number">1732</span>,  <span class="hljs-number">7200</span>, <span class="hljs-number">10947</span>, <span class="hljs-number">12606</span>,  <span class="hljs-number">2895</span>,   <span class="hljs-number">117</span>,
        <span class="hljs-number">179</span>,  <span class="hljs-number">7766</span>,   <span class="hljs-number">118</span>,   <span class="hljs-number">172</span>, <span class="hljs-number">15554</span>,  <span class="hljs-number">1181</span>,  <span class="hljs-number">3498</span>,  <span class="hljs-number">6961</span>,  <span class="hljs-number">3263</span>,  <span class="hljs-number">1137</span>,
        <span class="hljs-number">188</span>,  <span class="hljs-number">1566</span>,  <span class="hljs-number">7912</span>, <span class="hljs-number">14516</span>,  <span class="hljs-number">6997</span>,   <span class="hljs-number">119</span>,   <span class="hljs-number">102</span>]),
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: tensor([<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>,
        <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>,
        <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>])}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function W_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("squad")
ds["train"].features
ds.flatten()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;squad&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;answers&#x27;</span>: <span class="hljs-type">Sequence</span>(feature={<span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), <span class="hljs-string">&#x27;answer_start&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;int32&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}, length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;context&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;id&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;question&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;title&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.flatten()
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;context&#x27;</span>, <span class="hljs-string">&#x27;question&#x27;</span>, <span class="hljs-string">&#x27;answers.text&#x27;</span>, <span class="hljs-string">&#x27;answers.answer_start&#x27;</span>],
        num_rows: <span class="hljs-number">87599</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;context&#x27;</span>, <span class="hljs-string">&#x27;question&#x27;</span>, <span class="hljs-string">&#x27;answers.text&#x27;</span>, <span class="hljs-string">&#x27;answers.answer_start&#x27;</span>],
        num_rows: <span class="hljs-number">10570</span>
    })
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Y_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds["train"].features
new_features = ds["train"].features.copy()
new_features['label'] = ClassLabel(names=['bad', 'good'])
new_features['text'] = Value('large_string')
ds = ds.cast(new_features)
ds["train"].features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;neg&#x27;</span>, <span class="hljs-string">&#x27;pos&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features = ds[<span class="hljs-string">&quot;train&quot;</span>].features.copy()
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features[<span class="hljs-string">&#x27;label&#x27;</span>] = ClassLabel(names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features[<span class="hljs-string">&#x27;text&#x27;</span>] = Value(<span class="hljs-string">&#x27;large_string&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast(new_features)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;large_string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function J_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds["train"].features
ds = ds.cast_column('label', ClassLabel(names=['bad', 'good']))
ds["train"].features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;neg&#x27;</span>, <span class="hljs-string">&#x27;pos&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast_column(<span class="hljs-string">&#x27;label&#x27;</span>, ClassLabel(names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>]))
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Q_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.remove_columns("label")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.remove_columns(<span class="hljs-string">&quot;label&quot;</span>)
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>],
        num_rows: <span class="hljs-number">8530</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>],
        num_rows: <span class="hljs-number">1066</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>],
        num_rows: <span class="hljs-number">1066</span>
    })
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Z_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.rename_column("label", "label_new")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.rename_column(<span class="hljs-string">&quot;label&quot;</span>, <span class="hljs-string">&quot;label_new&quot;</span>)
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>],
        num_rows: <span class="hljs-number">8530</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>],
        num_rows: <span class="hljs-number">1066</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>],
        num_rows: <span class="hljs-number">1066</span>
    })
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function X_e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.rename_columns({'text': 'text_new', 'label': 'label_new'})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.rename_columns({<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;text_new&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;label_new&#x27;</span>})
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;text_new&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>],
        num_rows: <span class="hljs-number">8530</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;text_new&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>],
        num_rows: <span class="hljs-number">1066</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;text_new&#x27;</span>, <span class="hljs-string">&#x27;label_new&#x27;</span>],
        num_rows: <span class="hljs-number">1066</span>
    })
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function ebe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes")
ds.select_columns("text")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.select_columns(<span class="hljs-string">&quot;text&quot;</span>)
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>],
        num_rows: <span class="hljs-number">8530</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>],
        num_rows: <span class="hljs-number">1066</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;text&#x27;</span>],
        num_rows: <span class="hljs-number">1066</span>
    })
})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function tbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("boolq")
ds["train"].features
ds = ds.class_encode_column("answer")
ds["train"].features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;boolq&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;answer&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;bool&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;passage&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;question&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.class_encode_column(<span class="hljs-string">&quot;answer&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;answer&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;False&#x27;</span>, <span class="hljs-string">&#x27;True&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;passage&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;question&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function abe(k){let c,u,f,d,g;return d=new P({props:{code:`dataset_dict.push_to_hub("<organization>/<dataset_id>")
dataset_dict.push_to_hub("<organization>/<dataset_id>", private=True)
dataset_dict.push_to_hub("<organization>/<dataset_id>", max_shard_size="1GB")
dataset_dict.push_to_hub("<organization>/<dataset_id>", num_shards={"train": 1024, "test": 8})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset_dict.push_to_hub(<span class="hljs-string">&quot;&lt;organization&gt;/&lt;dataset_id&gt;&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset_dict.push_to_hub(<span class="hljs-string">&quot;&lt;organization&gt;/&lt;dataset_id&gt;&quot;</span>, private=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset_dict.push_to_hub(<span class="hljs-string">&quot;&lt;organization&gt;/&lt;dataset_id&gt;&quot;</span>, max_shard_size=<span class="hljs-string">&quot;1GB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset_dict.push_to_hub(<span class="hljs-string">&quot;&lt;organization&gt;/&lt;dataset_id&gt;&quot;</span>, num_shards={<span class="hljs-string">&quot;train&quot;</span>: <span class="hljs-number">1024</span>, <span class="hljs-string">&quot;test&quot;</span>: <span class="hljs-number">8</span>})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function sbe(k){let c,u,f,d,g;return d=new P({props:{code:`dataset_dict.save_to_disk("path/to/dataset/directory")
dataset_dict.save_to_disk("path/to/dataset/directory", max_shard_size="1GB")
dataset_dict.save_to_disk("path/to/dataset/directory", num_shards={"train": 1024, "test": 8})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset_dict.save_to_disk(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset_dict.save_to_disk(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>, max_shard_size=<span class="hljs-string">&quot;1GB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset_dict.save_to_disk(<span class="hljs-string">&quot;path/to/dataset/directory&quot;</span>, num_shards={<span class="hljs-string">&quot;train&quot;</span>: <span class="hljs-number">1024</span>, <span class="hljs-string">&quot;test&quot;</span>: <span class="hljs-number">8</span>})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function nbe(k){let c,u,f,d,g;return d=new P({props:{code:"ds = load_from_disk('path/to/dataset/directory')",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_from_disk(<span class="hljs-string">&#x27;path/to/dataset/directory&#x27;</span>)'}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function rbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import DatasetDict
ds = DatasetDict.from_csv({'train': 'path/to/dataset.csv'})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> DatasetDict
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = DatasetDict.from_csv({<span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-string">&#x27;path/to/dataset.csv&#x27;</span>})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function obe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import DatasetDict
ds = DatasetDict.from_json({'train': 'path/to/dataset.json'})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> DatasetDict
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = DatasetDict.from_json({<span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-string">&#x27;path/to/dataset.json&#x27;</span>})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function lbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import DatasetDict
ds = DatasetDict.from_parquet({'train': 'path/to/dataset/parquet'})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> DatasetDict
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = DatasetDict.from_parquet({<span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-string">&#x27;path/to/dataset/parquet&#x27;</span>})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function ibe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import DatasetDict
ds = DatasetDict.from_text({'train': 'path/to/dataset.txt'})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> DatasetDict
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = DatasetDict.from_text({<span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-string">&#x27;path/to/dataset.txt&#x27;</span>})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function dbe(k){let c,u,f,d,g;return d=new P({props:{code:`def gen():
    yield {"text": "Good", "label": 0}
    yield {"text": "Bad", "label": 1}
ds = IterableDataset.from_generator(gen)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">gen</span>():
<span class="hljs-meta">... </span>    <span class="hljs-keyword">yield</span> {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Good&quot;</span>, <span class="hljs-string">&quot;label&quot;</span>: <span class="hljs-number">0</span>}
<span class="hljs-meta">... </span>    <span class="hljs-keyword">yield</span> {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;Bad&quot;</span>, <span class="hljs-string">&quot;label&quot;</span>: <span class="hljs-number">1</span>}
...
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = IterableDataset.from_generator(gen)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function cbe(k){let c,u;return c=new P({props:{code:`def gen(shards):
    for shard in shards:
        with open(shard) as f:
            for line in f:
                yield {"line": line}
shards = [f"data{i}.txt" for i in range(32)]
ds = IterableDataset.from_generator(gen, gen_kwargs={"shards": shards})
ds = ds.shuffle(seed=42, buffer_size=10_000)  # shuffles the shards order + uses a shuffle buffer
from torch.utils.data import DataLoader
dataloader = DataLoader(ds.with_format("torch"), num_workers=4)  # give each worker a subset of 32/4=8 shards`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">gen</span>(<span class="hljs-params">shards</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> shard <span class="hljs-keyword">in</span> shards:
<span class="hljs-meta">... </span>        <span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(shard) <span class="hljs-keyword">as</span> f:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">for</span> line <span class="hljs-keyword">in</span> f:
<span class="hljs-meta">... </span>                <span class="hljs-keyword">yield</span> {<span class="hljs-string">&quot;line&quot;</span>: line}
...
<span class="hljs-meta">&gt;&gt;&gt; </span>shards = [<span class="hljs-string">f&quot;data<span class="hljs-subst">{i}</span>.txt&quot;</span> <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">32</span>)]
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = IterableDataset.from_generator(gen, gen_kwargs={<span class="hljs-string">&quot;shards&quot;</span>: shards})
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.shuffle(seed=<span class="hljs-number">42</span>, buffer_size=<span class="hljs-number">10_000</span>)  <span class="hljs-comment"># shuffles the shards order + uses a shuffle buffer</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> torch.utils.data <span class="hljs-keyword">import</span> DataLoader
<span class="hljs-meta">&gt;&gt;&gt; </span>dataloader = DataLoader(ds.with_format(<span class="hljs-string">&quot;torch&quot;</span>), num_workers=<span class="hljs-number">4</span>)  <span class="hljs-comment"># give each worker a subset of 32/4=8 shards</span>`}}),{c(){_(c.$$.fragment)},l(f){b(c.$$.fragment,f)},m(f,d){$(c,f,d),u=!0},p:N,i(f){u||(x(c.$$.fragment,f),u=!0)},o(f){v(c.$$.fragment,f),u=!1},d(f){y(c,f)}}}function pbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
next(iter(ds))
ds = ds.remove_columns("label")
next(iter(ds))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds))
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.remove_columns(<span class="hljs-string">&quot;label&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds))
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function mbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
next(iter(ds))
ds = ds.select_columns("text")
next(iter(ds))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds))
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.select_columns(<span class="hljs-string">&quot;text&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds))
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function hbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset, Audio
ds = load_dataset("PolyAI/minds14", name="en-US", split="train", streaming=True)
ds.features
ds = ds.cast_column("audio", Audio(sampling_rate=16000))
ds.features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, name=<span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;audio&#x27;</span>: Audio(sampling_rate=<span class="hljs-number">8000</span>, mono=<span class="hljs-literal">True</span>, decode=<span class="hljs-literal">True</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;english_transcription&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;intent_class&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">14</span>, names=[<span class="hljs-string">&#x27;abroad&#x27;</span>, <span class="hljs-string">&#x27;address&#x27;</span>, <span class="hljs-string">&#x27;app_error&#x27;</span>, <span class="hljs-string">&#x27;atm_limit&#x27;</span>, <span class="hljs-string">&#x27;balance&#x27;</span>, <span class="hljs-string">&#x27;business_loan&#x27;</span>,  <span class="hljs-string">&#x27;card_issues&#x27;</span>, <span class="hljs-string">&#x27;cash_deposit&#x27;</span>, <span class="hljs-string">&#x27;direct_debit&#x27;</span>, <span class="hljs-string">&#x27;freeze&#x27;</span>, <span class="hljs-string">&#x27;high_value_payment&#x27;</span>, <span class="hljs-string">&#x27;joint_account&#x27;</span>, <span class="hljs-string">&#x27;latest_transactions&#x27;</span>, <span class="hljs-string">&#x27;pay_bill&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;lang_id&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">14</span>, names=[<span class="hljs-string">&#x27;cs-CZ&#x27;</span>, <span class="hljs-string">&#x27;de-DE&#x27;</span>, <span class="hljs-string">&#x27;en-AU&#x27;</span>, <span class="hljs-string">&#x27;en-GB&#x27;</span>, <span class="hljs-string">&#x27;en-US&#x27;</span>, <span class="hljs-string">&#x27;es-ES&#x27;</span>, <span class="hljs-string">&#x27;fr-FR&#x27;</span>, <span class="hljs-string">&#x27;it-IT&#x27;</span>, <span class="hljs-string">&#x27;ko-KR&#x27;</span>,  <span class="hljs-string">&#x27;nl-NL&#x27;</span>, <span class="hljs-string">&#x27;pl-PL&#x27;</span>, <span class="hljs-string">&#x27;pt-PT&#x27;</span>, <span class="hljs-string">&#x27;ru-RU&#x27;</span>, <span class="hljs-string">&#x27;zh-CN&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;path&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;transcription&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;audio&#x27;</span>: Audio(sampling_rate=<span class="hljs-number">16000</span>, mono=<span class="hljs-literal">True</span>, decode=<span class="hljs-literal">True</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;english_transcription&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;intent_class&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">14</span>, names=[<span class="hljs-string">&#x27;abroad&#x27;</span>, <span class="hljs-string">&#x27;address&#x27;</span>, <span class="hljs-string">&#x27;app_error&#x27;</span>, <span class="hljs-string">&#x27;atm_limit&#x27;</span>, <span class="hljs-string">&#x27;balance&#x27;</span>, <span class="hljs-string">&#x27;business_loan&#x27;</span>,  <span class="hljs-string">&#x27;card_issues&#x27;</span>, <span class="hljs-string">&#x27;cash_deposit&#x27;</span>, <span class="hljs-string">&#x27;direct_debit&#x27;</span>, <span class="hljs-string">&#x27;freeze&#x27;</span>, <span class="hljs-string">&#x27;high_value_payment&#x27;</span>, <span class="hljs-string">&#x27;joint_account&#x27;</span>, <span class="hljs-string">&#x27;latest_transactions&#x27;</span>, <span class="hljs-string">&#x27;pay_bill&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;lang_id&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">14</span>, names=[<span class="hljs-string">&#x27;cs-CZ&#x27;</span>, <span class="hljs-string">&#x27;de-DE&#x27;</span>, <span class="hljs-string">&#x27;en-AU&#x27;</span>, <span class="hljs-string">&#x27;en-GB&#x27;</span>, <span class="hljs-string">&#x27;en-US&#x27;</span>, <span class="hljs-string">&#x27;es-ES&#x27;</span>, <span class="hljs-string">&#x27;fr-FR&#x27;</span>, <span class="hljs-string">&#x27;it-IT&#x27;</span>, <span class="hljs-string">&#x27;ko-KR&#x27;</span>,  <span class="hljs-string">&#x27;nl-NL&#x27;</span>, <span class="hljs-string">&#x27;pl-PL&#x27;</span>, <span class="hljs-string">&#x27;pt-PT&#x27;</span>, <span class="hljs-string">&#x27;ru-RU&#x27;</span>, <span class="hljs-string">&#x27;zh-CN&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;path&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;transcription&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function fbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
ds.features
new_features = ds.features.copy()
new_features["label"] = ClassLabel(names=["bad", "good"])
new_features["text"] = Value("large_string")
ds = ds.cast(new_features)
ds.features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;neg&#x27;</span>, <span class="hljs-string">&#x27;pos&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features = ds.features.copy()
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features[<span class="hljs-string">&quot;label&quot;</span>] = ClassLabel(names=[<span class="hljs-string">&quot;bad&quot;</span>, <span class="hljs-string">&quot;good&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features[<span class="hljs-string">&quot;text&quot;</span>] = Value(<span class="hljs-string">&quot;large_string&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast(new_features)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;large_string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function gbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
def add_prefix(example):
    example["text"] = "Review: " + example["text"]
    return example
ds = ds.map(add_prefix)
list(ds.take(3))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">add_prefix</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    example[<span class="hljs-string">&quot;text&quot;</span>] = <span class="hljs-string">&quot;Review: &quot;</span> + example[<span class="hljs-string">&quot;text&quot;</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> example
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(add_prefix)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(ds.take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;Review: the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;Review: the gorgeously elaborate continuation of &quot; the lord of the rings &quot; trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson&#x27;</span>s expanded vision of j . r . r . tolkien<span class="hljs-string">&#x27;s middle-earth .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;Review: effective but too-tepid biopic&#x27;</span>}]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function ube(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
next(iter(ds))
ds = ds.rename_column("text", "movie_review")
next(iter(ds))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds))
{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.rename_column(<span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;movie_review&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds))
{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;movie_review&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function _be(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
ds = ds.filter(lambda x: x["label"] == 0)
list(ds.take(3))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;label&quot;</span>] == <span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(ds.take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;movie_review&#x27;</span>: <span class="hljs-string">&#x27;simplistic , silly and tedious .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;movie_review&#x27;</span>: <span class="hljs-string">&quot;it&#x27;s so laddish and juvenile , only teenage boys could possibly find it funny .&quot;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;movie_review&#x27;</span>: <span class="hljs-string">&#x27;exploitative and largely devoid of the depth or sophistication that would make watching such a graphic treatment of the crimes bearable .&#x27;</span>}]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function bbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
list(ds.take(3))
shuffled_ds = ds.shuffle(seed=42)
list(shuffled_ds.take(3))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(ds.take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the gorgeously elaborate continuation of &quot; the lord of the rings &quot; trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson&#x27;</span>s expanded vision of j . r . r . tolkien<span class="hljs-string">&#x27;s middle-earth .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;effective but too-tepid biopic&#x27;</span>}]
<span class="hljs-meta">&gt;&gt;&gt; </span>shuffled_ds = ds.shuffle(seed=<span class="hljs-number">42</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(shuffled_ds.take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&quot;a sports movie with action that&#x27;s exciting on the field and a story you care about off it .&quot;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;at its best , the good girl is a refreshingly adult take on adultery . . .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&quot;sam jones became a very lucky filmmaker the day wilco got dropped from their record label , proving that one man&#x27;s ruin may be another&#x27;s fortune .&quot;</span>}]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function $be(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
list(ds.take(3))
ds = ds.skip(1)
list(ds.take(3))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(ds.take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the gorgeously elaborate continuation of &quot; the lord of the rings &quot; trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson&#x27;</span>s expanded vision of j . r . r . tolkien<span class="hljs-string">&#x27;s middle-earth .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;effective but too-tepid biopic&#x27;</span>}]
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.skip(<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(ds.take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the gorgeously elaborate continuation of &quot; the lord of the rings &quot; trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson&#x27;</span>s expanded vision of j . r . r . tolkien<span class="hljs-string">&#x27;s middle-earth .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;effective but too-tepid biopic&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;if you sometimes like to go to the movies to have fun , wasabi is a good place to start .&#x27;</span>}]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function xbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
small_ds = ds.take(2)
list(small_ds)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>small_ds = ds.take(<span class="hljs-number">2</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(small_ds)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the gorgeously elaborate continuation of &quot; the lord of the rings &quot; trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson&#x27;</span>s expanded vision of j . r . r . tolkien<span class="hljs-string">&#x27;s middle-earth .&#x27;</span>}]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function vbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
def add_prefix(example):
    example["text"] = "Review: " + example["text"]
    return example
ds = ds.map(add_prefix)
next(iter(ds["train"]))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">add_prefix</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    example[<span class="hljs-string">&quot;text&quot;</span>] = <span class="hljs-string">&quot;Review: &quot;</span> + example[<span class="hljs-string">&quot;text&quot;</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> example
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(add_prefix)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds[<span class="hljs-string">&quot;train&quot;</span>]))
{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;Review: the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function ybe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
ds = ds.filter(lambda x: x["label"] == 0)
list(ds["train"].take(3))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;label&quot;</span>] == <span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(ds[<span class="hljs-string">&quot;train&quot;</span>].take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;Review: simplistic , silly and tedious .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&quot;Review: it&#x27;s so laddish and juvenile , only teenage boys could possibly find it funny .&quot;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">0</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;Review: exploitative and largely devoid of the depth or sophistication that would make watching such a graphic treatment of the crimes bearable .&#x27;</span>}]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function jbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
list(ds["train"].take(3))
ds = ds.shuffle(seed=42)
list(ds["train"].take(3))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(ds[<span class="hljs-string">&quot;train&quot;</span>].take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the gorgeously elaborate continuation of &quot; the lord of the rings &quot; trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson&#x27;</span>s expanded vision of j . r . r . tolkien<span class="hljs-string">&#x27;s middle-earth .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;effective but too-tepid biopic&#x27;</span>}]
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.shuffle(seed=<span class="hljs-number">42</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(ds[<span class="hljs-string">&quot;train&quot;</span>].take(<span class="hljs-number">3</span>))
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&quot;a sports movie with action that&#x27;s exciting on the field and a story you care about off it .&quot;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;at its best , the good girl is a refreshingly adult take on adultery . . .&#x27;</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&quot;sam jones became a very lucky filmmaker the day wilco got dropped from their record label , proving that one man&#x27;s ruin may be another&#x27;s fortune .&quot;</span>}]`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function wbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
def encode(example):
    return tokenizer(examples["text"], truncation=True, padding="max_length")
ds = ds.map(encode, batched=True, remove_columns=["text"])
ds = ds.with_format("torch")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">encode</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> tokenizer(examples[<span class="hljs-string">&quot;text&quot;</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-string">&quot;max_length&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(encode, batched=<span class="hljs-literal">True</span>, remove_columns=[<span class="hljs-string">&quot;text&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.with_format(<span class="hljs-string">&quot;torch&quot;</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Dbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
ds["train"].features
new_features = ds["train"].features.copy()
new_features['label'] = ClassLabel(names=['bad', 'good'])
new_features['text'] = Value('large_string')
ds = ds.cast(new_features)
ds["train"].features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;neg&#x27;</span>, <span class="hljs-string">&#x27;pos&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features = ds[<span class="hljs-string">&quot;train&quot;</span>].features.copy()
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features[<span class="hljs-string">&#x27;label&#x27;</span>] = ClassLabel(names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>new_features[<span class="hljs-string">&#x27;text&#x27;</span>] = Value(<span class="hljs-string">&#x27;large_string&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast(new_features)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;large_string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function kbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
ds["train"].features
ds = ds.cast_column('label', ClassLabel(names=['bad', 'good']))
ds["train"].features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;neg&#x27;</span>, <span class="hljs-string">&#x27;pos&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast_column(<span class="hljs-string">&#x27;label&#x27;</span>, ClassLabel(names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>]))
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-string">&quot;train&quot;</span>].features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Ebe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
ds = ds.remove_columns("label")
next(iter(ds["train"]))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.remove_columns(<span class="hljs-string">&quot;label&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds[<span class="hljs-string">&quot;train&quot;</span>]))
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function qbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
ds = ds.rename_column("text", "movie_review")
next(iter(ds["train"]))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.rename_column(<span class="hljs-string">&quot;text&quot;</span>, <span class="hljs-string">&quot;movie_review&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds[<span class="hljs-string">&quot;train&quot;</span>]))
{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-number">1</span>,
 <span class="hljs-string">&#x27;movie_review&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Ibe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
ds = ds.rename_columns({"text": "movie_review", "label": "rating"})
next(iter(ds["train"]))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.rename_columns({<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;movie_review&quot;</span>, <span class="hljs-string">&quot;label&quot;</span>: <span class="hljs-string">&quot;rating&quot;</span>})
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds[<span class="hljs-string">&quot;train&quot;</span>]))
{<span class="hljs-string">&#x27;movie_review&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>,
 <span class="hljs-string">&#x27;rating&#x27;</span>: <span class="hljs-number">1</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Tbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", streaming=True)
ds = ds.select("text")
next(iter(ds["train"]))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.select(<span class="hljs-string">&quot;text&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds[<span class="hljs-string">&quot;train&quot;</span>]))
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;the rock is destined to be the 21st century&#x27;</span>s new <span class="hljs-string">&quot; conan &quot;</span> <span class="hljs-keyword">and</span> that he<span class="hljs-string">&#x27;s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .&#x27;</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Nbe(k){let c,u,f,d,g,t,p,ce,B,pe,ge;return{c(){c=s("p"),u=o("A "),f=s("a"),d=o("Sequence"),g=o(` with a internal dictionary feature will be automatically converted into a dictionary of
lists. This behavior is implemented to have a compatilbity layer with the TensorFlow Datasets library but may be
un-wanted in some cases. If you don\u2019t want this behavior, you can use a python `),t=s("code"),p=o("list"),ce=o(` instead of the
`),B=s("a"),pe=o("Sequence"),ge=o("."),this.h()},l(Te){c=n(Te,"P",{});var ue=r(c);u=l(ue,"A "),f=n(ue,"A",{href:!0});var za=r(f);d=l(za,"Sequence"),za.forEach(a),g=l(ue,` with a internal dictionary feature will be automatically converted into a dictionary of
lists. This behavior is implemented to have a compatilbity layer with the TensorFlow Datasets library but may be
un-wanted in some cases. If you don\u2019t want this behavior, you can use a python `),t=n(ue,"CODE",{});var Ou=r(t);p=l(Ou,"list"),Ou.forEach(a),ce=l(ue,` instead of the
`),B=n(ue,"A",{href:!0});var qo=r(B);pe=l(qo,"Sequence"),qo.forEach(a),ge=l(ue,"."),ue.forEach(a),this.h()},h(){w(f,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Sequence"),w(B,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Sequence")},m(Te,ue){D(Te,c,ue),e(c,u),e(c,f),e(f,d),e(c,g),e(c,t),e(t,p),e(c,ce),e(c,B),e(B,pe),e(c,ge)},d(Te){Te&&a(c)}}}function Pbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train")
copy_of_features = ds.features.copy()
copy_of_features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>copy_of_features = ds.features.copy()
<span class="hljs-meta">&gt;&gt;&gt; </span>copy_of_features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;neg&#x27;</span>, <span class="hljs-string">&#x27;pos&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Abe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("squad", split="train")
ds.features.flatten()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;squad&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features.flatten()
{<span class="hljs-string">&#x27;answers.answer_start&#x27;</span>: <span class="hljs-type">Sequence</span>(feature=Value(dtype=<span class="hljs-string">&#x27;int32&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;answers.text&#x27;</span>: <span class="hljs-type">Sequence</span>(feature=Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;context&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;id&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;question&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;title&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Lbe(k){let c,u,f,d,g;return d=new P({props:{code:"Features.from_dict({'_type': {'dtype': 'string', 'id': None, '_type': 'Value'}})",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>Features.from_dict({<span class="hljs-string">&#x27;_type&#x27;</span>: {<span class="hljs-string">&#x27;dtype&#x27;</span>: <span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-string">&#x27;id&#x27;</span>: <span class="hljs-literal">None</span>, <span class="hljs-string">&#x27;_type&#x27;</span>: <span class="hljs-string">&#x27;Value&#x27;</span>}})
{<span class="hljs-string">&#x27;_type&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Fbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Features, Sequence, Value
# let's say we have to features with a different order of nested fields (for a and b for example)
f1 = Features({"root": Sequence({"a": Value("string"), "b": Value("string")})})
f2 = Features({"root": {"b": Sequence(Value("string")), "a": Sequence(Value("string"))}})
assert f1.type != f2.type
# re-ordering keeps the base structure (here Sequence is defined at the root level), but make the fields order match
f1.reorder_fields_as(f2)
assert f1.reorder_fields_as(f2).type == f2.type`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Features, <span class="hljs-type">Sequence</span>, Value
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let&#x27;s say we have to features with a different order of nested fields (for a and b for example)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>f1 = Features({<span class="hljs-string">&quot;root&quot;</span>: <span class="hljs-type">Sequence</span>({<span class="hljs-string">&quot;a&quot;</span>: Value(<span class="hljs-string">&quot;string&quot;</span>), <span class="hljs-string">&quot;b&quot;</span>: Value(<span class="hljs-string">&quot;string&quot;</span>)})})
<span class="hljs-meta">&gt;&gt;&gt; </span>f2 = Features({<span class="hljs-string">&quot;root&quot;</span>: {<span class="hljs-string">&quot;b&quot;</span>: <span class="hljs-type">Sequence</span>(Value(<span class="hljs-string">&quot;string&quot;</span>)), <span class="hljs-string">&quot;a&quot;</span>: <span class="hljs-type">Sequence</span>(Value(<span class="hljs-string">&quot;string&quot;</span>))}})
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> f1.<span class="hljs-built_in">type</span> != f2.<span class="hljs-built_in">type</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># re-ordering keeps the base structure (here Sequence is defined at the root level), but make the fields order match</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>f1.reorder_fields_as(f2)
{<span class="hljs-string">&#x27;root&#x27;</span>: <span class="hljs-type">Sequence</span>(feature={<span class="hljs-string">&#x27;b&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), <span class="hljs-string">&#x27;a&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}, length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> f1.reorder_fields_as(f2).<span class="hljs-built_in">type</span> == f2.<span class="hljs-built_in">type</span>`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Cbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Features, Sequence, Value, ClassLabel
features = Features({'post': Sequence(feature={'text': Value(dtype='string'), 'upvotes': Value(dtype='int32'), 'label': ClassLabel(num_classes=2, names=['hot', 'cold'])})})
features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Features, <span class="hljs-type">Sequence</span>, Value, ClassLabel
<span class="hljs-meta">&gt;&gt;&gt; </span>features = Features({<span class="hljs-string">&#x27;post&#x27;</span>: <span class="hljs-type">Sequence</span>(feature={<span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>), <span class="hljs-string">&#x27;upvotes&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;int32&#x27;</span>), <span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;hot&#x27;</span>, <span class="hljs-string">&#x27;cold&#x27;</span>])})})
<span class="hljs-meta">&gt;&gt;&gt; </span>features
{<span class="hljs-string">&#x27;post&#x27;</span>: <span class="hljs-type">Sequence</span>(feature={<span class="hljs-string">&#x27;text&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;string&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), <span class="hljs-string">&#x27;upvotes&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;int32&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), <span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">2</span>, names=[<span class="hljs-string">&#x27;hot&#x27;</span>, <span class="hljs-string">&#x27;cold&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}, length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Obe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Features
features = Features({'label': ClassLabel(num_classes=3, names=['bad', 'ok', 'good'])})
features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Features
<span class="hljs-meta">&gt;&gt;&gt; </span>features = Features({<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">3</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;ok&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>])})
<span class="hljs-meta">&gt;&gt;&gt; </span>features
{<span class="hljs-string">&#x27;label&#x27;</span>: ClassLabel(num_classes=<span class="hljs-number">3</span>, names=[<span class="hljs-string">&#x27;bad&#x27;</span>, <span class="hljs-string">&#x27;ok&#x27;</span>, <span class="hljs-string">&#x27;good&#x27;</span>], <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function zbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train")
ds.features["label"].int2str(0)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features[<span class="hljs-string">&quot;label&quot;</span>].int2str(<span class="hljs-number">0</span>)
<span class="hljs-string">&#x27;neg&#x27;</span>`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Sbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset
ds = load_dataset("rotten_tomatoes", split="train")
ds.features["label"].str2int('neg')`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features[<span class="hljs-string">&quot;label&quot;</span>].str2int(<span class="hljs-string">&#x27;neg&#x27;</span>)
<span class="hljs-number">0</span>`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Vbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Features
features = Features({'stars': Value(dtype='int32')})
features`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Features
<span class="hljs-meta">&gt;&gt;&gt; </span>features = Features({<span class="hljs-string">&#x27;stars&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;int32&#x27;</span>)})
<span class="hljs-meta">&gt;&gt;&gt; </span>features
{<span class="hljs-string">&#x27;stars&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;int32&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Ube(k){let c,u,f,d,g;return d=new P({props:{code:`# At construction time:
datasets.features.Translation(languages=['en', 'fr', 'de'])
# During data generation:
yield {
        'en': 'the cat',
        'fr': 'le chat',
        'de': 'die katze'
}`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># At construction time:</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>datasets.features.Translation(languages=[<span class="hljs-string">&#x27;en&#x27;</span>, <span class="hljs-string">&#x27;fr&#x27;</span>, <span class="hljs-string">&#x27;de&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># During data generation:</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">yield</span> {
<span class="hljs-meta">... </span>        <span class="hljs-string">&#x27;en&#x27;</span>: <span class="hljs-string">&#x27;the cat&#x27;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&#x27;fr&#x27;</span>: <span class="hljs-string">&#x27;le chat&#x27;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&#x27;de&#x27;</span>: <span class="hljs-string">&#x27;die katze&#x27;</span>
<span class="hljs-meta">... </span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Mbe(k){let c,u,f,d,g;return d=new P({props:{code:`# At construction time:
datasets.features.TranslationVariableLanguages(languages=['en', 'fr', 'de'])
# During data generation:
yield {
        'en': 'the cat',
        'fr': ['le chat', 'la chatte,']
        'de': 'die katze'
}
# Tensor returned :
{
        'language': ['en', 'de', 'fr', 'fr'],
        'translation': ['the cat', 'die katze', 'la chatte', 'le chat'],
}`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># At construction time:</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>datasets.features.TranslationVariableLanguages(languages=[<span class="hljs-string">&#x27;en&#x27;</span>, <span class="hljs-string">&#x27;fr&#x27;</span>, <span class="hljs-string">&#x27;de&#x27;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># During data generation:</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">yield</span> {
<span class="hljs-meta">... </span>        <span class="hljs-string">&#x27;en&#x27;</span>: <span class="hljs-string">&#x27;the cat&#x27;</span>,
<span class="hljs-meta">... </span>        <span class="hljs-string">&#x27;fr&#x27;</span>: [<span class="hljs-string">&#x27;le chat&#x27;</span>, <span class="hljs-string">&#x27;la chatte,&#x27;</span>]
<span class="hljs-meta">... </span>        <span class="hljs-string">&#x27;de&#x27;</span>: <span class="hljs-string">&#x27;die katze&#x27;</span>
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Tensor returned :</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>{
<span class="hljs-meta">... </span>        <span class="hljs-string">&#x27;language&#x27;</span>: [<span class="hljs-string">&#x27;en&#x27;</span>, <span class="hljs-string">&#x27;de&#x27;</span>, <span class="hljs-string">&#x27;fr&#x27;</span>, <span class="hljs-string">&#x27;fr&#x27;</span>],
<span class="hljs-meta">... </span>        <span class="hljs-string">&#x27;translation&#x27;</span>: [<span class="hljs-string">&#x27;the cat&#x27;</span>, <span class="hljs-string">&#x27;die katze&#x27;</span>, <span class="hljs-string">&#x27;la chatte&#x27;</span>, <span class="hljs-string">&#x27;le chat&#x27;</span>],
<span class="hljs-meta">... </span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Rbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Features
features = Features({'x': Array2D(shape=(1, 3), dtype='int32')})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Features
<span class="hljs-meta">&gt;&gt;&gt; </span>features = Features({<span class="hljs-string">&#x27;x&#x27;</span>: Array2D(shape=(<span class="hljs-number">1</span>, <span class="hljs-number">3</span>), dtype=<span class="hljs-string">&#x27;int32&#x27;</span>)})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Bbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Features
features = Features({'x': Array3D(shape=(1, 2, 3), dtype='int32')})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Features
<span class="hljs-meta">&gt;&gt;&gt; </span>features = Features({<span class="hljs-string">&#x27;x&#x27;</span>: Array3D(shape=(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>), dtype=<span class="hljs-string">&#x27;int32&#x27;</span>)})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Hbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Features
features = Features({'x': Array4D(shape=(1, 2, 2, 3), dtype='int32')})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Features
<span class="hljs-meta">&gt;&gt;&gt; </span>features = Features({<span class="hljs-string">&#x27;x&#x27;</span>: Array4D(shape=(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>), dtype=<span class="hljs-string">&#x27;int32&#x27;</span>)})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Gbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import Features
features = Features({'x': Array5D(shape=(1, 2, 2, 3, 3), dtype='int32')})`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Features
<span class="hljs-meta">&gt;&gt;&gt; </span>features = Features({<span class="hljs-string">&#x27;x&#x27;</span>: Array5D(shape=(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">3</span>), dtype=<span class="hljs-string">&#x27;int32&#x27;</span>)})`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Kbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset, Audio
ds = load_dataset("PolyAI/minds14", name="en-US", split="train")
ds = ds.cast_column("audio", Audio(sampling_rate=16000))
ds[0]["audio"]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, name=<span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>]
{<span class="hljs-string">&#x27;array&#x27;</span>: array([ <span class="hljs-number">2.3443763e-05</span>,  <span class="hljs-number">2.1729663e-04</span>,  <span class="hljs-number">2.2145823e-04</span>, ...,
     <span class="hljs-number">3.8356509e-05</span>, -<span class="hljs-number">7.3497440e-06</span>, -<span class="hljs-number">2.1754686e-05</span>], dtype=float32),
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav&#x27;</span>,
 <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">16000</span>}`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Wbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_dataset, Image
ds = load_dataset("beans", split="train")
ds.features["image"]
ds[0]["image"]
ds = ds.cast_column('image', Image(decode=False))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Image
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;beans&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds.features[<span class="hljs-string">&quot;image&quot;</span>]
Image(decode=<span class="hljs-literal">True</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;image&quot;</span>]
&lt;PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x500 at <span class="hljs-number">0x15E52E7F0</span>&gt;
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.cast_column(<span class="hljs-string">&#x27;image&#x27;</span>, Image(decode=<span class="hljs-literal">False</span>))
{<span class="hljs-string">&#x27;bytes&#x27;</span>: <span class="hljs-literal">None</span>,
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/b0a21163f78769a2cf11f58dfc767fb458fc7cea5c05dccc0144a2c0f0bc1292/train/healthy/healthy_train.85.jpg&#x27;</span>}`}}),{c(){c=s("p"),u=o("Examples:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Examples:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Ybe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import MetricInfo
metric_info = MetricInfo.from_directory("/path/to/directory/")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> MetricInfo
<span class="hljs-meta">&gt;&gt;&gt; </span>metric_info = MetricInfo.from_directory(<span class="hljs-string">&quot;/path/to/directory/&quot;</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Jbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_metric
metric = load_metric("accuracy")
metric.info.write_to_directory("/path/to/directory/")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_metric
<span class="hljs-meta">&gt;&gt;&gt; </span>metric = load_metric(<span class="hljs-string">&quot;accuracy&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>metric.info.write_to_directory(<span class="hljs-string">&quot;/path/to/directory/&quot;</span>)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Qbe(k){let c,u,f,d;return{c(){c=s("p"),u=o("Use the new library \u{1F917} Evaluate instead: "),f=s("a"),d=o("https://huggingface.co/docs/evaluate"),this.h()},l(g){c=n(g,"P",{});var t=r(c);u=l(t,"Use the new library \u{1F917} Evaluate instead: "),f=n(t,"A",{href:!0,rel:!0});var p=r(f);d=l(p,"https://huggingface.co/docs/evaluate"),p.forEach(a),t.forEach(a),this.h()},h(){w(f,"href","https://huggingface.co/docs/evaluate"),w(f,"rel","nofollow")},m(g,t){D(g,c,t),e(c,u),e(c,f),e(f,d)},d(g){g&&a(c)}}}function Zbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_metric
metric = load_metric("accuracy")
metric.add(predictions=model_predictions, references=labels)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_metric
<span class="hljs-meta">&gt;&gt;&gt; </span>metric = load_metric(<span class="hljs-string">&quot;accuracy&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>metric.add(predictions=model_predictions, references=labels)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function Xbe(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_metric
metric = load_metric("accuracy")
metric.add_batch(predictions=model_prediction, references=labels)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_metric
<span class="hljs-meta">&gt;&gt;&gt; </span>metric = load_metric(<span class="hljs-string">&quot;accuracy&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>metric.add_batch(predictions=model_prediction, references=labels)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function e1e(k){let c,u,f,d,g;return d=new P({props:{code:`from datasets import load_metric
metric = load_metric("accuracy")
accuracy = metric.compute(predictions=model_prediction, references=labels)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_metric
<span class="hljs-meta">&gt;&gt;&gt; </span>metric = load_metric(<span class="hljs-string">&quot;accuracy&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>accuracy = metric.compute(predictions=model_prediction, references=labels)`}}),{c(){c=s("p"),u=o("Example:"),f=m(),_(d.$$.fragment)},l(t){c=n(t,"P",{});var p=r(c);u=l(p,"Example:"),p.forEach(a),f=h(t),b(d.$$.fragment,t)},m(t,p){D(t,c,p),e(c,u),D(t,f,p),$(d,t,p),g=!0},p:N,i(t){g||(x(d.$$.fragment,t),g=!0)},o(t){v(d.$$.fragment,t),g=!1},d(t){t&&a(c),t&&a(f),y(d,t)}}}function t1e(k){let c,u;return c=new P({props:{code:`import datasets
s3 = datasets.filesystems.S3FileSystem(anon=True)
s3.ls('public-datasets/imdb/train')`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> datasets
<span class="hljs-meta">&gt;&gt;&gt; </span>s3 = datasets.filesystems.S3FileSystem(anon=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>s3.ls(<span class="hljs-string">&#x27;public-datasets/imdb/train&#x27;</span>)
[<span class="hljs-string">&#x27;dataset_info.json.json&#x27;</span>,<span class="hljs-string">&#x27;dataset.arrow&#x27;</span>,<span class="hljs-string">&#x27;state.json&#x27;</span>]`}}),{c(){_(c.$$.fragment)},l(f){b(c.$$.fragment,f)},m(f,d){$(c,f,d),u=!0},p:N,i(f){u||(x(c.$$.fragment,f),u=!0)},o(f){v(c.$$.fragment,f),u=!1},d(f){y(c,f)}}}function a1e(k){let c,u;return c=new P({props:{code:`import datasets
s3 = datasets.filesystems.S3FileSystem(key=aws_access_key_id, secret=aws_secret_access_key)
s3.ls('my-private-datasets/imdb/train')`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> datasets
<span class="hljs-meta">&gt;&gt;&gt; </span>s3 = datasets.filesystems.S3FileSystem(key=aws_access_key_id, secret=aws_secret_access_key)
<span class="hljs-meta">&gt;&gt;&gt; </span>s3.ls(<span class="hljs-string">&#x27;my-private-datasets/imdb/train&#x27;</span>)
[<span class="hljs-string">&#x27;dataset_info.json.json&#x27;</span>,<span class="hljs-string">&#x27;dataset.arrow&#x27;</span>,<span class="hljs-string">&#x27;state.json&#x27;</span>]`}}),{c(){_(c.$$.fragment)},l(f){b(c.$$.fragment,f)},m(f,d){$(c,f,d),u=!0},p:N,i(f){u||(x(c.$$.fragment,f),u=!0)},o(f){v(c.$$.fragment,f),u=!1},d(f){y(c,f)}}}function s1e(k){let c,u;return c=new P({props:{code:`import botocore
from datasets.filesystems import S3Filesystem

s3_session = botocore.session.Session(profile_name='my_profile_name')
s3 = S3FileSystem(session=s3_session)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> botocore
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets.filesystems <span class="hljs-keyword">import</span> S3Filesystem

<span class="hljs-meta">&gt;&gt;&gt; </span>s3_session = botocore.session.Session(profile_name=<span class="hljs-string">&#x27;my_profile_name&#x27;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>s3 = S3FileSystem(session=s3_session)`}}),{c(){_(c.$$.fragment)},l(f){b(c.$$.fragment,f)},m(f,d){$(c,f,d),u=!0},p:N,i(f){u||(x(c.$$.fragment,f),u=!0)},o(f){v(c.$$.fragment,f),u=!1},d(f){y(c,f)}}}function n1e(k){let c,u;return c=new P({props:{code:`from datasets import load_from_disk
from datasets.filesystems import S3Filesystem

s3 = S3FileSystem(key=aws_access_key_id, secret=aws_secret_access_key)
dataset = load_from_disk('s3://my-private-datasets/imdb/train', storage_options=s3.storage_options)
print(len(dataset))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_from_disk
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets.filesystems <span class="hljs-keyword">import</span> S3Filesystem

<span class="hljs-meta">&gt;&gt;&gt; </span>s3 = S3FileSystem(key=aws_access_key_id, secret=aws_secret_access_key)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_from_disk(<span class="hljs-string">&#x27;s3://my-private-datasets/imdb/train&#x27;</span>, storage_options=s3.storage_options)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-built_in">len</span>(dataset))
<span class="hljs-number">25000</span>`}}),{c(){_(c.$$.fragment)},l(f){b(c.$$.fragment,f)},m(f,d){$(c,f,d),u=!0},p:N,i(f){u||(x(c.$$.fragment,f),u=!0)},o(f){v(c.$$.fragment,f),u=!1},d(f){y(c,f)}}}function r1e(k){let c,u;return c=new P({props:{code:`from datasets import load_dataset
from datasets.filesystems import S3Filesystem

dataset = load_dataset("imdb")
s3 = S3FileSystem(key=aws_access_key_id, secret=aws_secret_access_key)
dataset.save_to_disk('s3://my-private-datasets/imdb/train', storage_options=s3.storage_options)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets.filesystems <span class="hljs-keyword">import</span> S3Filesystem

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;imdb&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>s3 = S3FileSystem(key=aws_access_key_id, secret=aws_secret_access_key)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.save_to_disk(<span class="hljs-string">&#x27;s3://my-private-datasets/imdb/train&#x27;</span>, storage_options=s3.storage_options)`}}),{c(){_(c.$$.fragment)},l(f){b(c.$$.fragment,f)},m(f,d){$(c,f,d),u=!0},p:N,i(f){u||(x(c.$$.fragment,f),u=!0)},o(f){v(c.$$.fragment,f),u=!1},d(f){y(c,f)}}}function o1e(k){let c,u,f,d,g,t,p,ce,B,pe,ge,Te,ue,za,Ou,qo,H6,r3,me,Jc,G6,Q$,K6,W6,zu,Z$,Y6,J6,Q6,X$,Z6,X6,Ne,Qc,e8,Rn,t8,Su,a8,s8,ex,n8,r8,o8,Zc,l8,Vu,i8,d8,c8,tx,p8,m8,Io,h8,Sa,Xc,f8,Bn,g8,ax,u8,_8,sx,b8,$8,x8,To,o3,Hn,No,nx,ep,v8,rx,y8,l3,Po,j8,Uu,w8,D8,i3,q,tp,k8,ox,E8,q8,$t,ap,I8,lx,T8,N8,ix,P8,A8,Ao,L8,xt,sp,F8,dx,C8,O8,cx,z8,S8,Lo,V8,Fo,np,U8,px,M8,R8,Co,rp,B8,mx,H8,G8,Pe,op,K8,Ht,W8,hx,Y8,J8,fx,Q8,Z8,Mu,X8,eq,tq,Gn,aq,gx,sq,nq,ux,rq,oq,lq,Gt,iq,_x,dq,cq,bx,pq,mq,$x,hq,fq,gq,Oo,uq,zo,lp,_q,Kt,bq,xx,$q,xq,vx,vq,yq,Ru,jq,wq,Dq,vt,ip,kq,yx,Eq,qq,So,Iq,Vo,Tq,Va,dp,Nq,jx,Pq,Aq,Uo,Lq,Ua,cp,Fq,wx,Cq,Oq,Mo,zq,Ma,pp,Sq,Dx,Vq,Uq,Ro,Mq,Ra,mp,Rq,hp,Bq,Bo,Hq,kx,Gq,Kq,Wq,Yq,Ho,Jq,Ba,fp,Qq,Ex,Zq,Xq,Go,e9,Ha,gp,t9,qx,a9,s9,Ko,n9,yt,up,r9,Ix,o9,l9,Tx,i9,d9,Wo,c9,Ga,_p,p9,Nx,m9,h9,Yo,f9,Ka,bp,g9,Px,u9,_9,Jo,b9,Wa,$p,$9,Ax,x9,v9,Qo,y9,jt,xp,j9,Lx,w9,D9,Kn,k9,Bu,E9,q9,Fx,I9,T9,N9,Zo,P9,Ya,vp,A9,Cx,L9,F9,Xo,C9,Ja,yp,O9,Ox,z9,S9,el,V9,Qa,jp,U9,zx,M9,R9,tl,B9,Za,wp,H9,Dp,G9,Hu,K9,W9,Y9,al,J9,Xa,kp,Q9,Sx,Z9,X9,sl,eI,es,Ep,tI,Vx,aI,sI,qp,nI,Gu,rI,oI,lI,ts,Ip,iI,Tp,dI,Ux,cI,pI,mI,Np,hI,Mx,fI,gI,uI,nl,Pp,_I,Wn,bI,Rx,$I,xI,Bx,vI,yI,jI,Ae,Ap,wI,Qe,DI,Hx,kI,EI,Gx,qI,II,Kx,TI,NI,Ku,PI,AI,LI,Wt,FI,Wu,CI,OI,Wx,zI,SI,Yx,VI,UI,MI,rl,RI,ol,BI,as,Lp,HI,Ze,GI,Jx,KI,WI,Qx,YI,JI,Yu,QI,ZI,Ju,XI,eT,tT,ll,aT,wt,Fp,sT,Cp,nT,Zx,rT,oT,lT,Qu,iT,Xx,dT,cT,il,pT,Le,Op,mT,Yt,hT,ev,fT,gT,tv,uT,_T,av,bT,$T,xT,zp,vT,Zu,yT,jT,wT,Jt,DT,Xu,kT,ET,sv,qT,IT,e_,TT,NT,PT,dl,AT,Fe,Sp,LT,Yn,FT,nv,CT,OT,rv,zT,ST,VT,Jn,UT,t_,MT,RT,a_,BT,HT,GT,Qt,KT,s_,WT,YT,ov,JT,QT,n_,ZT,XT,eN,cl,tN,pl,Vp,aN,lv,sN,nN,Dt,Up,rN,iv,oN,lN,dv,iN,dN,ml,cN,Ce,Mp,pN,cv,mN,hN,Rp,fN,pv,gN,uN,_N,Qn,Zn,bN,mv,$N,xN,hv,vN,yN,jN,Zt,wN,fv,DN,kN,gv,EN,qN,uv,IN,TN,NN,Y,PN,_v,AN,LN,bv,FN,CN,$v,ON,zN,xv,SN,VN,vv,UN,MN,yv,RN,BN,jv,HN,GN,wv,KN,WN,YN,hl,JN,ss,Bp,QN,Dv,ZN,XN,fl,eP,ns,Hp,tP,kv,aP,sP,gl,nP,rs,Gp,rP,Ev,oP,lP,ul,iP,Z,Kp,dP,qv,cP,pP,Iv,mP,hP,Xt,fP,Tv,gP,uP,r_,_P,bP,o_,$P,xP,vP,_l,yP,Xn,jP,l_,wP,DP,i_,kP,EP,qP,bl,IP,$l,TP,kt,Wp,NP,te,PP,d_,AP,LP,Nv,FP,CP,Pv,OP,zP,Av,SP,VP,Lv,UP,MP,Fv,RP,BP,Cv,HP,GP,KP,Yp,WP,Ov,YP,JP,QP,xl,ZP,_e,Jp,XP,er,eA,zv,tA,aA,Sv,sA,nA,rA,tr,oA,Vv,lA,iA,Uv,dA,cA,pA,be,Mv,mA,hA,Rv,fA,gA,Bv,uA,_A,Hv,bA,$A,Gv,xA,vA,Kv,yA,jA,wA,Qp,DA,Wv,kA,EA,qA,vl,IA,os,Zp,TA,ae,NA,Yv,PA,AA,Jv,LA,FA,Qv,CA,OA,Zv,zA,SA,Xv,VA,UA,e0,MA,RA,t0,BA,HA,GA,yl,KA,Et,Xp,WA,a0,YA,JA,Xe,QA,c_,ZA,XA,p_,eL,tL,s0,aL,sL,n0,nL,rL,oL,jl,lL,Oe,em,iL,ar,dL,r0,cL,pL,o0,mL,hL,fL,sr,gL,m_,uL,_L,h_,bL,$L,xL,l0,vL,yL,wl,jL,ls,tm,wL,ea,DL,i0,kL,EL,d0,qL,IL,c0,TL,NL,PL,Dl,AL,kl,am,LL,p0,FL,CL,is,sm,OL,m0,zL,SL,El,VL,ds,nm,UL,rm,ML,h0,RL,BL,HL,ql,GL,cs,om,KL,f0,WL,YL,Il,JL,ps,lm,QL,g0,ZL,XL,Tl,eF,ms,im,tF,u0,aF,sF,Nl,nF,hs,dm,rF,_0,oF,lF,Pl,iF,qt,cm,dF,nr,cF,b0,pF,mF,$0,hF,fF,gF,x0,f_,uF,pm,_F,bF,Al,$F,fs,mm,xF,ta,vF,v0,yF,jF,y0,wF,DF,j0,kF,EF,qF,w0,g_,IF,hm,TF,NF,Ll,fm,PF,D0,AF,LF,gs,gm,FF,k0,CF,OF,um,zF,E0,SF,VF,UF,us,_m,MF,q0,RF,BF,Fl,HF,Cl,bm,GF,I0,KF,WF,Ol,$m,YF,xm,JF,T0,QF,ZF,XF,zl,vm,eC,ym,tC,N0,aC,sC,nC,Sl,jm,rC,P0,oC,lC,Vl,wm,iC,A0,dC,cC,Ul,Dm,pC,L0,mC,hC,Ml,km,fC,F0,gC,uC,Rl,Em,_C,C0,bC,$C,Bl,qm,xC,u_,__,vC,yC,jC,Hl,Im,wC,b_,$_,DC,kC,EC,x_,Tm,qC,v_,Nm,IC,y_,Pm,TC,j_,Am,NC,w_,Lm,PC,D_,Fm,AC,k_,Cm,LC,E_,Om,FC,q_,zm,CC,I_,Sm,OC,T_,Vm,zC,N_,Um,SC,P_,Mm,VC,_s,Rm,UC,O0,MC,RC,Gl,BC,bs,Bm,HC,z0,GC,KC,Kl,WC,$s,Hm,YC,S0,JC,QC,Wl,ZC,xs,Gm,XC,V0,eO,tO,Yl,aO,It,Km,sO,U0,nO,rO,Jl,oO,Ql,lO,vs,Wm,iO,rr,dO,A_,cO,pO,L_,M0,mO,hO,fO,or,gO,R0,uO,_O,B0,bO,$O,xO,ys,Ym,vO,Jm,yO,H0,jO,wO,DO,Zl,d3,aa,Qm,kO,lr,EO,F_,qO,IO,C_,TO,NO,PO,Xl,c3,se,Zm,AO,G0,LO,FO,ir,CO,O_,OO,zO,z_,SO,VO,UO,Xm,dr,MO,K0,RO,BO,W0,HO,GO,KO,cr,WO,Y0,YO,JO,J0,QO,ZO,XO,pr,ez,Q0,tz,az,Z0,sz,nz,rz,X0,oz,lz,ei,p3,he,eh,iz,mr,dz,ey,cz,pz,ty,mz,hz,fz,ay,gz,uz,sy,_z,bz,ny,$z,xz,sa,vz,ry,yz,jz,oy,wz,Dz,ly,kz,Ez,m3,De,th,qz,iy,Iz,Tz,dy,Nz,Pz,cy,Az,Lz,et,py,Fz,Cz,my,Oz,zz,hy,Sz,Vz,ah,Uz,S_,Mz,Rz,Bz,na,Hz,V_,Gz,Kz,fy,Wz,Yz,U_,Jz,Qz,h3,ke,sh,Zz,gy,Xz,eS,uy,tS,aS,_y,sS,nS,tt,by,rS,oS,$y,lS,iS,xy,dS,cS,nh,pS,M_,mS,hS,fS,ra,gS,R_,uS,_S,vy,bS,$S,B_,xS,vS,f3,Ee,rh,yS,yy,jS,wS,jy,DS,kS,wy,ES,qS,at,Dy,IS,TS,ky,NS,PS,Ey,AS,LS,oh,FS,H_,CS,OS,zS,oa,SS,G_,VS,US,qy,MS,RS,K_,BS,HS,g3,hr,ti,Iy,lh,GS,Ty,KS,u3,ai,WS,Ny,YS,JS,_3,A,ih,QS,Py,ZS,XS,js,dh,eV,Ay,tV,aV,si,sV,ws,ch,nV,Ly,rV,oV,ni,lV,Ds,ph,iV,Fy,dV,cV,ri,pV,ks,mh,mV,hh,hV,oi,fV,Cy,gV,uV,_V,bV,li,$V,Es,fh,xV,Oy,vV,yV,ii,jV,qs,gh,wV,zy,DV,kV,di,EV,Tt,uh,qV,Sy,IV,TV,Vy,NV,PV,ci,AV,Is,_h,LV,Uy,FV,CV,pi,OV,Ts,bh,zV,My,SV,VV,mi,UV,Ns,$h,MV,Ry,RV,BV,hi,HV,Ps,xh,GV,By,KV,WV,fi,YV,ze,vh,JV,Hy,QV,ZV,Gy,XV,eU,Ky,tU,aU,gi,sU,Se,yh,nU,jh,rU,Wy,oU,lU,iU,st,dU,Yy,cU,pU,Jy,mU,hU,Qy,fU,gU,Zy,uU,_U,bU,Xy,ej,$U,xU,ui,vU,Nt,wh,yU,Dh,jU,tj,wU,DU,kU,W_,EU,aj,qU,IU,_i,TU,bi,kh,NU,fr,PU,sj,AU,LU,nj,FU,CU,OU,Ve,Eh,zU,la,SU,rj,VU,UU,oj,MU,RU,lj,BU,HU,GU,qh,KU,Y_,WU,YU,JU,nt,QU,J_,ZU,XU,ij,eM,tM,Q_,aM,sM,Z_,nM,rM,oM,$i,lM,Ue,Ih,iM,gr,dM,dj,cM,pM,cj,mM,hM,fM,ur,gM,X_,uM,_M,eb,bM,$M,xM,rt,vM,pj,yM,jM,mj,wM,DM,tb,kM,EM,ab,qM,IM,TM,xi,NM,As,Th,PM,hj,AM,LM,vi,FM,Pt,Nh,CM,fj,OM,zM,ia,SM,sb,VM,UM,gj,MM,RM,uj,BM,HM,GM,yi,KM,Ls,Ph,WM,_j,YM,JM,ji,QM,Me,Ah,ZM,bj,XM,eR,$j,tR,aR,_r,sR,nb,nR,rR,xj,oR,lR,iR,wi,dR,Re,Lh,cR,vj,pR,mR,br,hR,rb,fR,gR,yj,uR,_R,bR,Fh,jj,$R,xR,wj,vR,yR,Di,jR,Fs,Ch,wR,Dj,DR,kR,ki,ER,At,Oh,qR,kj,IR,TR,Ej,NR,PR,Ei,AR,Cs,zh,LR,Sh,FR,ob,CR,OR,zR,qi,SR,Be,Vh,VR,$r,UR,lb,MR,RR,ib,BR,HR,GR,qj,KR,WR,da,YR,db,JR,QR,cb,ZR,XR,Ij,eB,tB,aB,Ii,sB,He,Uh,nB,xr,rB,pb,oB,lB,Tj,iB,dB,cB,vr,pB,mb,mB,hB,hb,fB,gB,uB,Nj,_B,bB,Ti,$B,Os,Mh,xB,ca,vB,Pj,yB,jB,fb,wB,DB,Aj,kB,EB,qB,Ni,IB,zs,Rh,TB,Bh,NB,gb,PB,AB,LB,Pi,FB,Ss,Hh,CB,Gh,OB,ub,zB,SB,VB,Ai,UB,Vs,Kh,MB,Wh,RB,_b,BB,HB,GB,Li,KB,Us,Yh,WB,Jh,YB,bb,JB,QB,ZB,Fi,XB,Ms,Qh,eH,yr,tH,$b,aH,sH,xb,Lj,nH,rH,oH,jr,lH,Fj,iH,dH,Cj,cH,pH,b3,vb,$3,wr,Ci,Oj,Zh,mH,zj,hH,x3,Oi,fH,yb,gH,uH,v3,F,Xh,_H,Sj,bH,$H,Lt,ef,xH,Vj,vH,yH,zi,jH,Si,wH,Rs,tf,DH,Uj,kH,EH,Vi,qH,Bs,af,IH,Mj,TH,NH,Ui,PH,Hs,sf,AH,Rj,LH,FH,Mi,CH,Gs,nf,OH,Bj,zH,SH,Ri,VH,jb,rf,UH,Bi,of,MH,lf,RH,Hj,BH,HH,GH,Ge,df,KH,Gj,WH,YH,cf,JH,Kj,QH,ZH,XH,Dr,kr,eG,Wj,tG,aG,Yj,sG,nG,rG,Er,oG,Jj,lG,iG,Qj,dG,cG,pG,J,mG,Zj,hG,fG,Xj,gG,uG,ew,_G,bG,tw,$G,xG,aw,vG,yG,sw,jG,wG,nw,DG,kG,rw,EG,qG,IG,Hi,TG,Ks,pf,NG,ow,PG,AG,Gi,LG,Ws,mf,FG,lw,CG,OG,Ki,zG,$e,hf,SG,iw,VG,UG,ff,MG,dw,RG,BG,HG,qr,GG,cw,KG,WG,pw,YG,JG,QG,Ir,ZG,wb,XG,eK,Db,tK,aK,sK,Wi,nK,Ys,gf,rK,Tr,oK,kb,lK,iK,mw,dK,cK,pK,Yi,mK,Js,uf,hK,Nr,fK,Eb,gK,uK,hw,_K,bK,$K,Ji,xK,Qi,_f,vK,qb,Ib,yK,jK,wK,Zi,bf,DK,Tb,Nb,kK,EK,qK,Pb,$f,IK,Ab,xf,TK,Lb,vf,NK,Fb,yf,PK,Cb,jf,AK,Ob,wf,LK,zb,Df,FK,Sb,kf,CK,Vb,Ef,OK,Ub,qf,zK,Mb,If,SK,Rb,Tf,VK,Bb,Nf,y3,Pr,Xi,fw,Pf,UK,gw,MK,j3,ed,RK,uw,BK,HK,w3,R,Af,GK,Ke,Lf,KK,_w,WK,YK,Ff,JK,bw,QK,ZK,XK,Ar,Lr,eW,$w,tW,aW,xw,sW,nW,rW,pa,oW,vw,lW,iW,yw,dW,cW,jw,pW,mW,hW,Q,fW,ww,gW,uW,Dw,_W,bW,kw,$W,xW,Ew,vW,yW,qw,jW,wW,Iw,DW,kW,Tw,EW,qW,Nw,IW,TW,NW,td,PW,Qs,Cf,AW,Pw,LW,FW,ad,CW,xe,Of,OW,Aw,zW,SW,Lw,VW,UW,Fr,MW,Fw,RW,BW,Cw,HW,GW,KW,ma,WW,Ow,YW,JW,Hb,QW,ZW,Gb,XW,eY,tY,sd,aY,Zs,zf,sY,zw,nY,rY,nd,oY,Xs,Sf,lY,Sw,iY,dY,rd,cY,en,Vf,pY,Vw,mY,hY,od,fY,tn,Uf,gY,Uw,uY,_Y,ld,bY,an,Mf,$Y,Mw,xY,vY,id,yY,sn,Rf,jY,Rw,wY,DY,dd,kY,nn,Bf,EY,Bw,qY,IY,cd,D3,Cr,pd,Hw,Hf,TY,Gw,NY,k3,S,Gf,PY,Kw,AY,LY,Kf,FY,Ww,CY,OY,zY,Kb,Yw,SY,VY,UY,ne,Jw,ha,MY,Wb,RY,BY,Qw,HY,GY,Zw,KY,WY,YY,Xw,Wf,JY,Yb,QY,ZY,XY,e7,Yf,eJ,t7,tJ,aJ,sJ,Jf,ot,nJ,a7,rJ,oJ,Jb,lJ,iJ,s7,dJ,cJ,Qb,pJ,mJ,hJ,md,fJ,n7,lt,gJ,Zb,uJ,_J,Xb,bJ,$J,e1,xJ,vJ,t1,yJ,jJ,wJ,r7,Qf,DJ,a1,kJ,EJ,qJ,o7,fa,IJ,s1,TJ,NJ,l7,PJ,AJ,i7,LJ,FJ,CJ,d7,hd,n1,OJ,zJ,r1,SJ,VJ,UJ,rn,Zf,MJ,Xf,RJ,o1,BJ,HJ,GJ,fd,KJ,gd,eg,WJ,c7,YJ,JJ,ud,tg,QJ,p7,ZJ,XJ,_d,ag,eQ,m7,tQ,aQ,bd,sg,sQ,h7,nQ,rQ,$d,ng,oQ,f7,lQ,iQ,xd,rg,dQ,g7,cQ,pQ,Ft,og,mQ,lg,hQ,u7,fQ,gQ,uQ,ig,_Q,_7,bQ,$Q,xQ,vd,vQ,yd,dg,yQ,cg,jQ,l1,wQ,DQ,kQ,We,pg,EQ,mg,qQ,b7,IQ,TQ,NQ,Or,PQ,$7,AQ,LQ,x7,FQ,CQ,OQ,ga,zQ,v7,SQ,VQ,y7,UQ,MQ,j7,RQ,BQ,HQ,jd,GQ,Ct,hg,KQ,fg,WQ,w7,YQ,JQ,QQ,D7,ZQ,XQ,wd,E3,ua,gg,eZ,k7,tZ,aZ,Dd,q3,K,ug,sZ,E7,nZ,rZ,_g,oZ,q7,lZ,iZ,dZ,zr,i1,I7,cZ,pZ,mZ,d1,T7,hZ,fZ,gZ,c1,N7,uZ,_Z,bZ,P7,$Z,xZ,kd,vZ,on,bg,yZ,Sr,jZ,A7,wZ,DZ,L7,kZ,EZ,qZ,$g,F7,C7,IZ,TZ,O7,z7,NZ,PZ,Ot,xg,AZ,Vr,LZ,S7,FZ,CZ,V7,OZ,zZ,SZ,vg,VZ,U7,UZ,MZ,RZ,Ed,BZ,ln,yg,HZ,Ur,GZ,M7,KZ,WZ,R7,YZ,JZ,QZ,qd,I3,it,jg,ZZ,wg,XZ,B7,eX,tX,aX,O,H7,G7,sX,nX,K7,W7,rX,oX,Y7,J7,lX,iX,Q7,Z7,dX,cX,X7,eD,pX,mX,tD,aD,hX,fX,sD,nD,gX,uX,rD,oD,_X,bX,lD,iD,$X,xX,dD,cD,vX,yX,pD,mD,jX,wX,p1,hD,DX,kX,EX,m1,fD,qX,IX,TX,gD,uD,NX,PX,_D,bD,AX,LX,$D,xD,FX,CX,vD,yD,OX,zX,jD,wD,SX,VX,DD,kD,UX,MX,ED,qD,RX,BX,ID,TD,HX,GX,ND,PD,KX,WX,AD,LD,YX,JX,FD,CD,QX,ZX,OD,zD,XX,eee,SD,VD,tee,aee,Id,T3,dt,Dg,see,h1,UD,nee,ree,oee,Td,lee,Nd,kg,iee,MD,dee,N3,ct,Eg,cee,f1,RD,pee,mee,hee,Pd,fee,Ad,qg,gee,BD,uee,P3,_a,Ig,_ee,HD,bee,$ee,Ld,A3,ba,Tg,xee,GD,vee,yee,Fd,L3,$a,Ng,jee,KD,wee,Dee,Cd,F3,xa,Pg,kee,WD,Eee,qee,Od,C3,H,Ag,Iee,Lg,Tee,YD,Nee,Pee,Aee,JD,Lee,Fee,Mr,QD,Fg,Cee,ZD,Oee,zee,See,Rr,Cg,Vee,XD,Uee,Mee,Ree,Og,g1,ek,Bee,Hee,Gee,u1,tk,Kee,Wee,Yee,ak,Jee,Qee,Br,zg,Zee,sk,Xee,ete,tte,Hr,_1,nk,ate,ste,nte,b1,rk,rte,ote,lte,$1,ok,ite,dte,cte,lk,pte,mte,zd,hte,dn,Sg,fte,ik,gte,ute,pt,x1,dk,_te,bte,$te,v1,ck,xte,vte,yte,pk,mk,jte,wte,hk,fk,Dte,kte,y1,gk,Ete,qte,Ite,Sd,Vg,Tte,uk,Nte,Pte,Vd,Ug,Ate,_k,Lte,Fte,Ud,Mg,Cte,bk,Ote,zte,Md,Rg,Ste,$k,Vte,O3,G,Bg,Ute,Hg,Mte,xk,Rte,Bte,Hte,vk,Gte,Kte,va,yk,Gg,Wte,jk,Yte,Jte,Qte,Gr,Kg,Zte,wk,Xte,eae,tae,Wg,j1,Dk,aae,sae,nae,w1,kk,rae,oae,lae,Ek,iae,dae,qk,Yg,cae,Ik,pae,mae,hae,Tk,Jg,fae,Nk,gae,uae,_ae,Rd,bae,cn,Qg,$ae,Pk,xae,vae,qe,D1,Ak,yae,jae,wae,k1,Lk,Dae,kae,Eae,Fk,Ck,qae,Iae,Ok,zk,Tae,Nae,E1,Sk,Pae,Aae,Lae,q1,Vk,Fae,Cae,Oae,Bd,Zg,zae,Uk,Sae,Vae,Hd,Xg,Uae,Mk,Mae,Rae,Gd,eu,Bae,Rk,Hae,Gae,Kd,tu,Kae,Bk,Wae,z3,Kr,Wd,Hk,au,Yae,Gk,Jae,S3,fe,su,Qae,Kk,Zae,Xae,I1,Wk,ese,tse,ase,Yk,sse,nse,pn,nu,rse,ru,ose,Jk,lse,ise,dse,Yd,cse,mn,ou,pse,ya,mse,Qk,hse,fse,Zk,gse,use,Xk,_se,bse,$se,Jd,V3,Wr,Qd,e4,lu,xse,t4,vse,U3,hn,yse,a4,jse,wse,T1,Dse,kse,M3,re,iu,Ese,s4,qse,Ise,Zd,Tse,fn,du,Nse,n4,Pse,Ase,Xd,Lse,gn,cu,Fse,r4,Cse,Ose,ec,zse,zt,pu,Sse,o4,Vse,Use,l4,Mse,Rse,tc,Bse,ac,mu,Hse,i4,Gse,R3,Yr,sc,d4,hu,Kse,c4,Wse,B3,V,fu,Yse,nc,p4,Jse,Qse,gu,m4,Zse,Xse,ene,ja,tne,h4,ane,sne,f4,nne,rne,g4,one,lne,ine,u4,dne,cne,_4,pne,mne,rc,hne,Jr,fne,b4,gne,une,$4,_ne,bne,$ne,oc,xne,wa,vne,x4,yne,jne,v4,wne,Dne,y4,kne,Ene,qne,lc,Ine,Qr,Tne,j4,Nne,Pne,N1,Ane,Lne,Fne,ic,Cne,Zr,One,w4,zne,Sne,P1,Vne,Une,Mne,dc,H3,Xr,uu,Rne,eo,Bne,D4,Hne,Gne,k4,Kne,Wne,G3,to,_u,Yne,E4,Jne,K3,ao,cc,q4,bu,Qne,I4,Zne,W3,so,$u,Xne,T4,ere,Y3;return t=new Oa({}),za=new Oa({}),Jc=new E({props:{name:"class datasets.DatasetInfo",anchor:"datasets.DatasetInfo",parameters:[{name:"description",val:": str = <factory>"},{name:"citation",val:": str = <factory>"},{name:"homepage",val:": str = <factory>"},{name:"license",val:": str = <factory>"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"post_processed",val:": typing.Optional[datasets.info.PostProcessedInfo] = None"},{name:"supervised_keys",val:": typing.Optional[datasets.info.SupervisedKeysData] = None"},{name:"task_templates",val:": typing.Optional[typing.List[datasets.tasks.base.TaskTemplate]] = None"},{name:"builder_name",val:": typing.Optional[str] = None"},{name:"config_name",val:": typing.Optional[str] = None"},{name:"version",val:": typing.Union[str, datasets.utils.version.Version, NoneType] = None"},{name:"splits",val:": typing.Optional[dict] = None"},{name:"download_checksums",val:": typing.Optional[dict] = None"},{name:"download_size",val:": typing.Optional[int] = None"},{name:"post_processing_size",val:": typing.Optional[int] = None"},{name:"dataset_size",val:": typing.Optional[int] = None"},{name:"size_in_bytes",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"datasets.DatasetInfo.description",description:`<strong>description</strong> (<code>str</code>) &#x2014;
A description of the dataset.`,name:"description"},{anchor:"datasets.DatasetInfo.citation",description:`<strong>citation</strong> (<code>str</code>) &#x2014;
A BibTeX citation of the dataset.`,name:"citation"},{anchor:"datasets.DatasetInfo.homepage",description:`<strong>homepage</strong> (<code>str</code>) &#x2014;
A URL to the official homepage for the dataset.`,name:"homepage"},{anchor:"datasets.DatasetInfo.license",description:`<strong>license</strong> (<code>str</code>) &#x2014;
The dataset&#x2019;s license. It can be the name of the license or a paragraph containing the terms of the license.`,name:"license"},{anchor:"datasets.DatasetInfo.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
The features used to specify the dataset&#x2019;s column types.`,name:"features"},{anchor:"datasets.DatasetInfo.post_processed",description:`<strong>post_processed</strong> (<code>PostProcessedInfo</code>, <em>optional</em>) &#x2014;
Information regarding the resources of a possible post-processing of a dataset. For example, it can contain the information of an index.`,name:"post_processed"},{anchor:"datasets.DatasetInfo.supervised_keys",description:`<strong>supervised_keys</strong> (<code>SupervisedKeysData</code>, <em>optional</em>) &#x2014;
Specifies the input feature and the label for supervised learning if applicable for the dataset (legacy from TFDS).`,name:"supervised_keys"},{anchor:"datasets.DatasetInfo.builder_name",description:`<strong>builder_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the <code>GeneratorBasedBuilder</code> subclass used to create the dataset. Usually matched to the corresponding script name. It is also the snake_case version of the dataset builder class name.`,name:"builder_name"},{anchor:"datasets.DatasetInfo.config_name",description:`<strong>config_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the configuration derived from <a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.BuilderConfig">BuilderConfig</a>.`,name:"config_name"},{anchor:"datasets.DatasetInfo.version",description:`<strong>version</strong> (<code>str</code> or <a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.Version">Version</a>, <em>optional</em>) &#x2014;
The version of the dataset.`,name:"version"},{anchor:"datasets.DatasetInfo.splits",description:`<strong>splits</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The mapping between split name and metadata.`,name:"splits"},{anchor:"datasets.DatasetInfo.download_checksums",description:`<strong>download_checksums</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The mapping between the URL to download the dataset&#x2019;s checksums and corresponding metadata.`,name:"download_checksums"},{anchor:"datasets.DatasetInfo.download_size",description:`<strong>download_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The size of the files to download to generate the dataset, in bytes.`,name:"download_size"},{anchor:"datasets.DatasetInfo.post_processing_size",description:`<strong>post_processing_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Size of the dataset in bytes after post-processing, if any.`,name:"post_processing_size"},{anchor:"datasets.DatasetInfo.dataset_size",description:`<strong>dataset_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The combined size in bytes of the Arrow tables for all splits.`,name:"dataset_size"},{anchor:"datasets.DatasetInfo.size_in_bytes",description:`<strong>size_in_bytes</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The combined size in bytes of all files associated with the dataset (downloaded files + Arrow files).`,name:"size_in_bytes"},{anchor:"datasets.DatasetInfo.task_templates",description:`<strong>task_templates</strong> (<code>List[TaskTemplate]</code>, <em>optional</em>) &#x2014;
The task templates to prepare the dataset for during training and evaluation. Each template casts the dataset&#x2019;s <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a> to standardized column names and types as detailed in <code>datasets.tasks</code>.`,name:"task_templates"},{anchor:"datasets.DatasetInfo.*config_kwargs",description:`*<strong>*config_kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to the <a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.BuilderConfig">BuilderConfig</a> and used in the <a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.DatasetBuilder">DatasetBuilder</a>.`,name:"*config_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/info.py#L94"}}),Qc=new E({props:{name:"from_directory",anchor:"datasets.DatasetInfo.from_directory",parameters:[{name:"dataset_info_dir",val:": str"},{name:"fs",val:" = 'deprecated'"},{name:"storage_options",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.DatasetInfo.from_directory.dataset_info_dir",description:`<strong>dataset_info_dir</strong> (<code>str</code>) &#x2014;
The directory containing the metadata file. This
should be the root directory of a specific dataset version.`,name:"dataset_info_dir"},{anchor:"datasets.DatasetInfo.from_directory.fs",description:`<strong>fs</strong> (<code>fsspec.spec.AbstractFileSystem</code>, <em>optional</em>) &#x2014;
Instance of the remote filesystem used to download the files from.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.9.0</p>
						
<p><code>fs</code> was deprecated in version 2.9.0 and will be removed in 3.0.0.
Please use <code>storage_options</code> instead, e.g. <code>storage_options=fs.storage_options</code>.</p>

					</div>`,name:"fs"},{anchor:"datasets.DatasetInfo.from_directory.storage_options",description:`<strong>storage_options</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Key/value pairs to be passed on to the file-system backend, if any.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.9.0</p>
						
					</div>`,name:"storage_options"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/info.py#L303"}}),Io=new T({props:{anchor:"datasets.DatasetInfo.from_directory.example",$$slots:{default:[kue]},$$scope:{ctx:k}}}),Xc=new E({props:{name:"write_to_directory",anchor:"datasets.DatasetInfo.write_to_directory",parameters:[{name:"dataset_info_dir",val:""},{name:"pretty_print",val:" = False"},{name:"fs",val:" = 'deprecated'"},{name:"storage_options",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.DatasetInfo.write_to_directory.dataset_info_dir",description:`<strong>dataset_info_dir</strong> (<code>str</code>) &#x2014;
Destination directory.`,name:"dataset_info_dir"},{anchor:"datasets.DatasetInfo.write_to_directory.pretty_print",description:`<strong>pretty_print</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, the JSON will be pretty-printed with the indent level of 4.`,name:"pretty_print"},{anchor:"datasets.DatasetInfo.write_to_directory.fs",description:`<strong>fs</strong> (<code>fsspec.spec.AbstractFileSystem</code>, <em>optional</em>) &#x2014;
Instance of the remote filesystem used to download the files from.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.9.0</p>
						
<p><code>fs</code> was deprecated in version 2.9.0 and will be removed in 3.0.0.
Please use <code>storage_options</code> instead, e.g. <code>storage_options=fs.storage_options</code>.</p>

					</div>`,name:"fs"},{anchor:"datasets.DatasetInfo.write_to_directory.storage_options",description:`<strong>storage_options</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Key/value pairs to be passed on to the file-system backend, if any.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.9.0</p>
						
					</div>`,name:"storage_options"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/info.py#L212"}}),To=new T({props:{anchor:"datasets.DatasetInfo.write_to_directory.example",$$slots:{default:[Eue]},$$scope:{ctx:k}}}),ep=new Oa({}),tp=new E({props:{name:"class datasets.Dataset",anchor:"datasets.Dataset",parameters:[{name:"arrow_table",val:": Table"},{name:"info",val:": typing.Optional[datasets.info.DatasetInfo] = None"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"indices_table",val:": typing.Optional[datasets.table.Table] = None"},{name:"fingerprint",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L629"}}),ap=new E({props:{name:"add_column",anchor:"datasets.Dataset.add_column",parameters:[{name:"name",val:": str"},{name:"column",val:": typing.Union[list, <built-in function array>]"},{name:"new_fingerprint",val:": str"}],parametersDescription:[{anchor:"datasets.Dataset.add_column.name",description:`<strong>name</strong> (<code>str</code>) &#x2014;
Column name.`,name:"name"},{anchor:"datasets.Dataset.add_column.column",description:`<strong>column</strong> (<code>list</code> or <code>np.array</code>) &#x2014;
Column data to be added.`,name:"column"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L5415",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Ao=new T({props:{anchor:"datasets.Dataset.add_column.example",$$slots:{default:[que]},$$scope:{ctx:k}}}),sp=new E({props:{name:"add_item",anchor:"datasets.Dataset.add_item",parameters:[{name:"item",val:": dict"},{name:"new_fingerprint",val:": str"}],parametersDescription:[{anchor:"datasets.Dataset.add_item.item",description:`<strong>item</strong> (<code>dict</code>) &#x2014;
Item data to be added.`,name:"item"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L5662",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Lo=new T({props:{anchor:"datasets.Dataset.add_item.example",$$slots:{default:[Iue]},$$scope:{ctx:k}}}),np=new E({props:{name:"from_file",anchor:"datasets.Dataset.from_file",parameters:[{name:"filename",val:": str"},{name:"info",val:": typing.Optional[datasets.info.DatasetInfo] = None"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"indices_filename",val:": typing.Optional[str] = None"},{name:"in_memory",val:": bool = False"}],parametersDescription:[{anchor:"datasets.Dataset.from_file.filename",description:`<strong>filename</strong> (<code>str</code>) &#x2014;
File name of the dataset.`,name:"filename"},{anchor:"datasets.Dataset.from_file.info",description:`<strong>info</strong> (<code>DatasetInfo</code>, <em>optional</em>) &#x2014;
Dataset information, like description, citation, etc.`,name:"info"},{anchor:"datasets.Dataset.from_file.split",description:`<strong>split</strong> (<code>NamedSplit</code>, <em>optional</em>) &#x2014;
Name of the dataset split.`,name:"split"},{anchor:"datasets.Dataset.from_file.indices_filename",description:`<strong>indices_filename</strong> (<code>str</code>, <em>optional</em>) &#x2014;
File names of the indices.`,name:"indices_filename"},{anchor:"datasets.Dataset.from_file.in_memory",description:`<strong>in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"in_memory"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L707",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),rp=new E({props:{name:"from_buffer",anchor:"datasets.Dataset.from_buffer",parameters:[{name:"buffer",val:": Buffer"},{name:"info",val:": typing.Optional[datasets.info.DatasetInfo] = None"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"indices_buffer",val:": typing.Optional[pyarrow.lib.Buffer] = None"}],parametersDescription:[{anchor:"datasets.Dataset.from_buffer.buffer",description:`<strong>buffer</strong> (<code>pyarrow.Buffer</code>) &#x2014;
Arrow buffer.`,name:"buffer"},{anchor:"datasets.Dataset.from_buffer.info",description:`<strong>info</strong> (<code>DatasetInfo</code>, <em>optional</em>) &#x2014;
Dataset information, like description, citation, etc.`,name:"info"},{anchor:"datasets.Dataset.from_buffer.split",description:`<strong>split</strong> (<code>NamedSplit</code>, <em>optional</em>) &#x2014;
Name of the dataset split.`,name:"split"},{anchor:"datasets.Dataset.from_buffer.indices_buffer",description:`<strong>indices_buffer</strong> (<code>pyarrow.Buffer</code>, <em>optional</em>) &#x2014;
Indices Arrow buffer.`,name:"indices_buffer"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L747",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),op=new E({props:{name:"from_pandas",anchor:"datasets.Dataset.from_pandas",parameters:[{name:"df",val:": DataFrame"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"info",val:": typing.Optional[datasets.info.DatasetInfo] = None"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"preserve_index",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"datasets.Dataset.from_pandas.df",description:`<strong>df</strong> (<code>pandas.DataFrame</code>) &#x2014;
Dataframe that contains the dataset.`,name:"df"},{anchor:"datasets.Dataset.from_pandas.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.Dataset.from_pandas.info",description:`<strong>info</strong> (<code>DatasetInfo</code>, <em>optional</em>) &#x2014;
Dataset information, like description, citation, etc.`,name:"info"},{anchor:"datasets.Dataset.from_pandas.split",description:`<strong>split</strong> (<code>NamedSplit</code>, <em>optional</em>) &#x2014;
Name of the dataset split.`,name:"split"},{anchor:"datasets.Dataset.from_pandas.preserve_index",description:`<strong>preserve_index</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to store the index as an additional column in the resulting Dataset.
The default of <code>None</code> will store the index as a column, except for <code>RangeIndex</code> which is stored as metadata only.
Use <code>preserve_index=True</code> to force it to be stored as a column.`,name:"preserve_index"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L779",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Oo=new T({props:{anchor:"datasets.Dataset.from_pandas.example",$$slots:{default:[Tue]},$$scope:{ctx:k}}}),lp=new E({props:{name:"from_dict",anchor:"datasets.Dataset.from_dict",parameters:[{name:"mapping",val:": dict"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"info",val:": typing.Optional[datasets.info.DatasetInfo] = None"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"}],parametersDescription:[{anchor:"datasets.Dataset.from_dict.mapping",description:`<strong>mapping</strong> (<code>Mapping</code>) &#x2014;
Mapping of strings to Arrays or Python lists.`,name:"mapping"},{anchor:"datasets.Dataset.from_dict.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.Dataset.from_dict.info",description:`<strong>info</strong> (<code>DatasetInfo</code>, <em>optional</em>) &#x2014;
Dataset information, like description, citation, etc.`,name:"info"},{anchor:"datasets.Dataset.from_dict.split",description:`<strong>split</strong> (<code>NamedSplit</code>, <em>optional</em>) &#x2014;
Name of the dataset split.`,name:"split"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L841",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),ip=new E({props:{name:"from_generator",anchor:"datasets.Dataset.from_generator",parameters:[{name:"generator",val:": typing.Callable"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"gen_kwargs",val:": typing.Optional[dict] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.from_generator.generator",description:`<strong>generator</strong> ( &#x2014;<code>Callable</code>):
A generator function that <code>yields</code> examples.`,name:"generator"},{anchor:"datasets.Dataset.from_generator.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.Dataset.from_generator.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.Dataset.from_generator.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.from_generator.gen_kwargs(dict,",description:`<strong>gen_kwargs(<code>dict</code>,</strong> <em>optional</em>) &#x2014;
Keyword arguments to be passed to the <code>generator</code> callable.
You can define a sharded dataset by passing the list of shards in <code>gen_kwargs</code>.`,name:"gen_kwargs(dict,"},{anchor:"datasets.Dataset.from_generator.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of processes when downloading and generating the dataset locally.
This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.7.0</p>
						
					</div>`,name:"num_proc"},{anchor:"datasets.Dataset.from_generator.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to :<code>GeneratorConfig</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L977",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),So=new T({props:{anchor:"datasets.Dataset.from_generator.example",$$slots:{default:[Nue]},$$scope:{ctx:k}}}),Vo=new T({props:{anchor:"datasets.Dataset.from_generator.example-2",$$slots:{default:[Pue]},$$scope:{ctx:k}}}),dp=new E({props:{name:"data",anchor:"datasets.Dataset.data",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1644"}}),Uo=new T({props:{anchor:"datasets.Dataset.data.example",$$slots:{default:[Aue]},$$scope:{ctx:k}}}),cp=new E({props:{name:"cache_files",anchor:"datasets.Dataset.cache_files",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1664"}}),Mo=new T({props:{anchor:"datasets.Dataset.cache_files.example",$$slots:{default:[Lue]},$$scope:{ctx:k}}}),pp=new E({props:{name:"num_columns",anchor:"datasets.Dataset.num_columns",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1682"}}),Ro=new T({props:{anchor:"datasets.Dataset.num_columns.example",$$slots:{default:[Fue]},$$scope:{ctx:k}}}),mp=new E({props:{name:"num_rows",anchor:"datasets.Dataset.num_rows",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1697"}}),Ho=new T({props:{anchor:"datasets.Dataset.num_rows.example",$$slots:{default:[Cue]},$$scope:{ctx:k}}}),fp=new E({props:{name:"column_names",anchor:"datasets.Dataset.column_names",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1714"}}),Go=new T({props:{anchor:"datasets.Dataset.column_names.example",$$slots:{default:[Oue]},$$scope:{ctx:k}}}),gp=new E({props:{name:"shape",anchor:"datasets.Dataset.shape",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1729"}}),Ko=new T({props:{anchor:"datasets.Dataset.shape.example",$$slots:{default:[zue]},$$scope:{ctx:k}}}),up=new E({props:{name:"unique",anchor:"datasets.Dataset.unique",parameters:[{name:"column",val:": str"}],parametersDescription:[{anchor:"datasets.Dataset.unique.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
Column name (list all the column names with <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.column_names">column_names</a>).`,name:"column"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1746",returnDescription:`
<p>List of unique elements in the given column.</p>
`,returnType:`
<p><code>list</code></p>
`}}),Wo=new T({props:{anchor:"datasets.Dataset.unique.example",$$slots:{default:[Sue]},$$scope:{ctx:k}}}),_p=new E({props:{name:"flatten",anchor:"datasets.Dataset.flatten",parameters:[{name:"new_fingerprint",val:": typing.Optional[str] = None"},{name:"max_depth",val:" = 16"}],parametersDescription:[{anchor:"datasets.Dataset.flatten.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1852",returnDescription:`
<p>A copy of the dataset with flattened columns.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Yo=new T({props:{anchor:"datasets.Dataset.flatten.example",$$slots:{default:[Vue]},$$scope:{ctx:k}}}),bp=new E({props:{name:"cast",anchor:"datasets.Dataset.cast",parameters:[{name:"features",val:": Features"},{name:"batch_size",val:": typing.Optional[int] = 1000"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"num_proc",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"datasets.Dataset.cast.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>) &#x2014;
New features to cast the dataset to.
The name of the fields in the features must match the current column names.
The type of the data must also be convertible from one type to the other.
For non-trivial conversion, e.g. <code>str</code> &lt;-&gt; <code>ClassLabel</code> you should use <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map">map()</a> to update the Dataset.`,name:"features"},{anchor:"datasets.Dataset.cast.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of examples per batch provided to cast.
If <code>batch_size &lt;= 0</code> or <code>batch_size == None</code> then provide the full dataset as a single batch to cast.`,name:"batch_size"},{anchor:"datasets.Dataset.cast.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.cast.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>bool</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the current computation from <code>function</code>
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.Dataset.cast.cache_file_name",description:`<strong>cache_file_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
results of the computation instead of the automatically generated cache file name.`,name:"cache_file_name"},{anchor:"datasets.Dataset.cast.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map">map()</a>.`,name:"writer_batch_size"},{anchor:"datasets.Dataset.cast.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of processes for multiprocessing. By default it doesn&#x2019;t
use multiprocessing.`,name:"num_proc"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1896",returnDescription:`
<p>A copy of the dataset with casted features.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Jo=new T({props:{anchor:"datasets.Dataset.cast.example",$$slots:{default:[Uue]},$$scope:{ctx:k}}}),$p=new E({props:{name:"cast_column",anchor:"datasets.Dataset.cast_column",parameters:[{name:"column",val:": str"},{name:"feature",val:": typing.Union[dict, list, tuple, datasets.features.features.Value, datasets.features.features.ClassLabel, datasets.features.translation.Translation, datasets.features.translation.TranslationVariableLanguages, datasets.features.features.Sequence, datasets.features.features.Array2D, datasets.features.features.Array3D, datasets.features.features.Array4D, datasets.features.features.Array5D, datasets.features.audio.Audio, datasets.features.image.Image]"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.cast_column.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
Column name.`,name:"column"},{anchor:"datasets.Dataset.cast_column.feature",description:`<strong>feature</strong> (<code>FeatureType</code>) &#x2014;
Target feature.`,name:"feature"},{anchor:"datasets.Dataset.cast_column.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1979",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Qo=new T({props:{anchor:"datasets.Dataset.cast_column.example",$$slots:{default:[Mue]},$$scope:{ctx:k}}}),xp=new E({props:{name:"remove_columns",anchor:"datasets.Dataset.remove_columns",parameters:[{name:"column_names",val:": typing.Union[str, typing.List[str]]"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.remove_columns.column_names",description:`<strong>column_names</strong> (<code>Union[str, List[str]]</code>) &#x2014;
Name of the column(s) to remove.`,name:"column_names"},{anchor:"datasets.Dataset.remove_columns.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2021",returnDescription:`
<p>A copy of the dataset object without the columns to remove.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Zo=new T({props:{anchor:"datasets.Dataset.remove_columns.example",$$slots:{default:[Rue]},$$scope:{ctx:k}}}),vp=new E({props:{name:"rename_column",anchor:"datasets.Dataset.rename_column",parameters:[{name:"original_column_name",val:": str"},{name:"new_column_name",val:": str"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.rename_column.original_column_name",description:`<strong>original_column_name</strong> (<code>str</code>) &#x2014;
Name of the column to rename.`,name:"original_column_name"},{anchor:"datasets.Dataset.rename_column.new_column_name",description:`<strong>new_column_name</strong> (<code>str</code>) &#x2014;
New name for the column.`,name:"new_column_name"},{anchor:"datasets.Dataset.rename_column.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2077",returnDescription:`
<p>A copy of the dataset with a renamed column.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Xo=new T({props:{anchor:"datasets.Dataset.rename_column.example",$$slots:{default:[Bue]},$$scope:{ctx:k}}}),yp=new E({props:{name:"rename_columns",anchor:"datasets.Dataset.rename_columns",parameters:[{name:"column_mapping",val:": typing.Dict[str, str]"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.rename_columns.column_mapping",description:`<strong>column_mapping</strong> (<code>Dict[str, str]</code>) &#x2014;
A mapping of columns to rename to their new names`,name:"column_mapping"},{anchor:"datasets.Dataset.rename_columns.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2144",returnDescription:`
<p>A copy of the dataset with renamed columns</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),el=new T({props:{anchor:"datasets.Dataset.rename_columns.example",$$slots:{default:[Hue]},$$scope:{ctx:k}}}),jp=new E({props:{name:"select_columns",anchor:"datasets.Dataset.select_columns",parameters:[{name:"column_names",val:": typing.Union[str, typing.List[str]]"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.select_columns.column_names",description:`<strong>column_names</strong> (<code>Union[str, List[str]]</code>) &#x2014;
Name of the column(s) to keep.`,name:"column_names"},{anchor:"datasets.Dataset.select_columns.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The new fingerprint of the dataset after transform. If <code>None</code>,
the new fingerprint is computed using a hash of the previous
fingerprint, and the transform arguments.`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2212",returnDescription:`
<p>A copy of the dataset object which only consists of
selected columns.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),tl=new T({props:{anchor:"datasets.Dataset.select_columns.example",$$slots:{default:[Gue]},$$scope:{ctx:k}}}),wp=new E({props:{name:"class_encode_column",anchor:"datasets.Dataset.class_encode_column",parameters:[{name:"column",val:": str"},{name:"include_nulls",val:": bool = False"}],parametersDescription:[{anchor:"datasets.Dataset.class_encode_column.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
The name of the column to cast (list all the column names with <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.column_names">column_names</a>)`,name:"column"},{anchor:"datasets.Dataset.class_encode_column.include_nulls",description:`<strong>include_nulls</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to include null values in the class labels. If <code>True</code>, the null values will be encoded as the <code>&quot;None&quot;</code> class label.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 1.14.2</p>
						
					</div>`,name:"include_nulls"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1777"}}),al=new T({props:{anchor:"datasets.Dataset.class_encode_column.example",$$slots:{default:[Kue]},$$scope:{ctx:k}}}),kp=new E({props:{name:"__len__",anchor:"datasets.Dataset.__len__",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2261"}}),sl=new T({props:{anchor:"datasets.Dataset.__len__.example",$$slots:{default:[Wue]},$$scope:{ctx:k}}}),Ep=new E({props:{name:"__iter__",anchor:"datasets.Dataset.__iter__",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2278"}}),Ip=new E({props:{name:"iter",anchor:"datasets.Dataset.iter",parameters:[{name:"batch_size",val:": int"},{name:"drop_last_batch",val:": bool = False"}],parametersDescription:[{anchor:"datasets.Dataset.iter.batch_size",description:"<strong>batch_size</strong> (<code>int</code>) &#x2014; size of each batch to yield.",name:"batch_size"},{anchor:"datasets.Dataset.iter.drop_last_batch",description:`<strong>drop_last_batch</strong> (<code>bool</code>, default <em>False</em>) &#x2014; Whether a last batch smaller than the batch_size should be
dropped`,name:"drop_last_batch"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2307"}}),Pp=new E({props:{name:"formatted_as",anchor:"datasets.Dataset.formatted_as",parameters:[{name:"type",val:": typing.Optional[str] = None"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"},{name:"**format_kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.formatted_as.type",description:`<strong>type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Output type selected in <code>[None, &apos;numpy&apos;, &apos;torch&apos;, &apos;tensorflow&apos;, &apos;pandas&apos;, &apos;arrow&apos;, &apos;jax&apos;]</code>.
<code>None</code> means \`<strong>getitem</strong>&#x201C; returns python objects (default).`,name:"type"},{anchor:"datasets.Dataset.formatted_as.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Columns to format in the output.
<code>None</code> means <code>__getitem__</code> returns all columns (default).`,name:"columns"},{anchor:"datasets.Dataset.formatted_as.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep un-formatted columns as well in the output (as python objects).`,name:"output_all_columns"},{anchor:"datasets.Dataset.formatted_as.*format_kwargs",description:`*<strong>*format_kwargs</strong> (additional keyword arguments) &#x2014;
Keywords arguments passed to the convert function like <code>np.array</code>, <code>torch.tensor</code> or <code>tensorflow.ragged.constant</code>.`,name:"*format_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2351"}}),Ap=new E({props:{name:"set_format",anchor:"datasets.Dataset.set_format",parameters:[{name:"type",val:": typing.Optional[str] = None"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"},{name:"**format_kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.set_format.type",description:`<strong>type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Either output type selected in <code>[None, &apos;numpy&apos;, &apos;torch&apos;, &apos;tensorflow&apos;, &apos;pandas&apos;, &apos;arrow&apos;, &apos;jax&apos;]</code>.
<code>None</code> means <code>__getitem__</code> returns python objects (default).`,name:"type"},{anchor:"datasets.Dataset.set_format.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Columns to format in the output.
<code>None</code> means <code>__getitem__</code> returns all columns (default).`,name:"columns"},{anchor:"datasets.Dataset.set_format.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep un-formatted columns as well in the output (as python objects).`,name:"output_all_columns"},{anchor:"datasets.Dataset.set_format.*format_kwargs",description:`*<strong>*format_kwargs</strong> (additional keyword arguments) &#x2014;
Keywords arguments passed to the convert function like <code>np.array</code>, <code>torch.tensor</code> or <code>tensorflow.ragged.constant</code>.`,name:"*format_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2383"}}),rl=new T({props:{anchor:"datasets.Dataset.set_format.example",$$slots:{default:[Yue]},$$scope:{ctx:k}}}),ol=new T({props:{anchor:"datasets.Dataset.set_format.example-2",$$slots:{default:[Jue]},$$scope:{ctx:k}}}),Lp=new E({props:{name:"set_transform",anchor:"datasets.Dataset.set_transform",parameters:[{name:"transform",val:": typing.Optional[typing.Callable]"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"}],parametersDescription:[{anchor:"datasets.Dataset.set_transform.transform",description:`<strong>transform</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
User-defined formatting transform, replaces the format defined by <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_format">set_format()</a>.
A formatting function is a callable that takes a batch (as a <code>dict</code>) as input and returns a batch.
This function is applied right before returning the objects in <code>__getitem__</code>.`,name:"transform"},{anchor:"datasets.Dataset.set_transform.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Columns to format in the output.
If specified, then the input batch of the transform only contains those columns.`,name:"columns"},{anchor:"datasets.Dataset.set_transform.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep un-formatted columns as well in the output (as python objects).
If set to True, then the other un-formatted columns are kept with the output of the transform.`,name:"output_all_columns"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2489"}}),ll=new T({props:{anchor:"datasets.Dataset.set_transform.example",$$slots:{default:[Que]},$$scope:{ctx:k}}}),Fp=new E({props:{name:"reset_format",anchor:"datasets.Dataset.reset_format",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2460"}}),il=new T({props:{anchor:"datasets.Dataset.reset_format.example",$$slots:{default:[Zue]},$$scope:{ctx:k}}}),Op=new E({props:{name:"with_format",anchor:"datasets.Dataset.with_format",parameters:[{name:"type",val:": typing.Optional[str] = None"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"},{name:"**format_kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.with_format.type",description:`<strong>type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Either output type selected in <code>[None, &apos;numpy&apos;, &apos;torch&apos;, &apos;tensorflow&apos;, &apos;pandas&apos;, &apos;arrow&apos;, &apos;jax&apos;]</code>.
<code>None</code> means <code>__getitem__</code> returns python objects (default).`,name:"type"},{anchor:"datasets.Dataset.with_format.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Columns to format in the output.
<code>None</code> means <code>__getitem__</code> returns all columns (default).`,name:"columns"},{anchor:"datasets.Dataset.with_format.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep un-formatted columns as well in the output (as python objects).`,name:"output_all_columns"},{anchor:"datasets.Dataset.with_format.*format_kwargs",description:`*<strong>*format_kwargs</strong> (additional keyword arguments) &#x2014;
Keywords arguments passed to the convert function like <code>np.array</code>, <code>torch.tensor</code> or <code>tensorflow.ragged.constant</code>.`,name:"*format_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2532"}}),dl=new T({props:{anchor:"datasets.Dataset.with_format.example",$$slots:{default:[Xue]},$$scope:{ctx:k}}}),Sp=new E({props:{name:"with_transform",anchor:"datasets.Dataset.with_transform",parameters:[{name:"transform",val:": typing.Optional[typing.Callable]"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"}],parametersDescription:[{anchor:"datasets.Dataset.with_transform.transform",description:`<strong>transform</strong> (<code>Callable</code>, <code>optional</code>) &#x2014;
User-defined formatting transform, replaces the format defined by <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_format">set_format()</a>.
A formatting function is a callable that takes a batch (as a <code>dict</code>) as input and returns a batch.
This function is applied right before returning the objects in <code>__getitem__</code>.`,name:"transform"},{anchor:"datasets.Dataset.with_transform.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <code>optional</code>) &#x2014;
Columns to format in the output.
If specified, then the input batch of the transform only contains those columns.`,name:"columns"},{anchor:"datasets.Dataset.with_transform.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep un-formatted columns as well in the output (as python objects).
If set to <code>True</code>, then the other un-formatted columns are kept with the output of the transform.`,name:"output_all_columns"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2583"}}),cl=new T({props:{anchor:"datasets.Dataset.with_transform.example",$$slots:{default:[e_e]},$$scope:{ctx:k}}}),Vp=new E({props:{name:"__getitem__",anchor:"datasets.Dataset.__getitem__",parameters:[{name:"key",val:""}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2707"}}),Up=new E({props:{name:"cleanup_cache_files",anchor:"datasets.Dataset.cleanup_cache_files",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2717",returnDescription:`
<p>Number of removed files.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ml=new T({props:{anchor:"datasets.Dataset.cleanup_cache_files.example",$$slots:{default:[t_e]},$$scope:{ctx:k}}}),Mp=new E({props:{name:"map",anchor:"datasets.Dataset.map",parameters:[{name:"function",val:": typing.Optional[typing.Callable] = None"},{name:"with_indices",val:": bool = False"},{name:"with_rank",val:": bool = False"},{name:"input_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"batched",val:": bool = False"},{name:"batch_size",val:": typing.Optional[int] = 1000"},{name:"drop_last_batch",val:": bool = False"},{name:"remove_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"disable_nullable",val:": bool = False"},{name:"fn_kwargs",val:": typing.Optional[dict] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"suffix_template",val:": str = '_{rank:05d}_of_{num_proc:05d}'"},{name:"new_fingerprint",val:": typing.Optional[str] = None"},{name:"desc",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.map.function",description:`<strong>function</strong> (<code>Callable</code>) &#x2014; Function with one of the following signatures:</p>
<ul>
<li><code>function(example: Dict[str, Any]) -&gt; Dict[str, Any]</code> if <code>batched=False</code> and <code>with_indices=False</code> and <code>with_rank=False</code></li>
<li><code>function(example: Dict[str, Any], *extra_args) -&gt; Dict[str, Any]</code> if <code>batched=False</code> and <code>with_indices=True</code> and/or <code>with_rank=True</code> (one extra arg for each)</li>
<li><code>function(batch: Dict[str, List]) -&gt; Dict[str, List]</code> if <code>batched=True</code> and <code>with_indices=False</code> and <code>with_rank=False</code></li>
<li><code>function(batch: Dict[str, List], *extra_args) -&gt; Dict[str, List]</code> if <code>batched=True</code> and <code>with_indices=True</code> and/or <code>with_rank=True</code> (one extra arg for each)</li>
</ul>
<p>For advanced usage, the function can also return a <code>pyarrow.Table</code>.
Moreover if your function returns nothing (<code>None</code>), then <code>map</code> will run your function and return the dataset unchanged.
If no function is provided, default to identity function: <code>lambda x: x</code>.`,name:"function"},{anchor:"datasets.Dataset.map.with_indices",description:`<strong>with_indices</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide example indices to <code>function</code>. Note that in this case the
signature of <code>function</code> should be <code>def function(example, idx[, rank]): ...</code>.`,name:"with_indices"},{anchor:"datasets.Dataset.map.with_rank",description:`<strong>with_rank</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide process rank to <code>function</code>. Note that in this case the
signature of <code>function</code> should be <code>def function(example[, idx], rank): ...</code>.`,name:"with_rank"},{anchor:"datasets.Dataset.map.input_columns",description:`<strong>input_columns</strong> (<code>Optional[Union[str, List[str]]]</code>, defaults to <code>None</code>) &#x2014;
The columns to be passed into <code>function</code>
as positional arguments. If <code>None</code>, a <code>dict</code> mapping to all formatted columns is passed as one argument.`,name:"input_columns"},{anchor:"datasets.Dataset.map.batched",description:`<strong>batched</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide batch of examples to <code>function</code>.`,name:"batched"},{anchor:"datasets.Dataset.map.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1000</code>) &#x2014;
Number of examples per batch provided to <code>function</code> if <code>batched=True</code>.
If <code>batch_size &lt;= 0</code> or <code>batch_size == None</code>, provide the full dataset as a single batch to <code>function</code>.`,name:"batch_size"},{anchor:"datasets.Dataset.map.drop_last_batch",description:`<strong>drop_last_batch</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether a last batch smaller than the batch_size should be
dropped instead of being processed by the function.`,name:"drop_last_batch"},{anchor:"datasets.Dataset.map.remove_columns",description:`<strong>remove_columns</strong> (<code>Optional[Union[str, List[str]]]</code>, defaults to <code>None</code>) &#x2014;
Remove a selection of columns while doing the mapping.
Columns will be removed before updating the examples with the output of <code>function</code>, i.e. if <code>function</code> is adding
columns with names in <code>remove_columns</code>, these columns will be kept.`,name:"remove_columns"},{anchor:"datasets.Dataset.map.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the dataset in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.map.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optioanl[bool]</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the current computation from <code>function</code>
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.Dataset.map.cache_file_name",description:`<strong>cache_file_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
results of the computation instead of the automatically generated cache file name.`,name:"cache_file_name"},{anchor:"datasets.Dataset.map.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"},{anchor:"datasets.Dataset.map.features",description:`<strong>features</strong> (<code>Optional[datasets.Features]</code>, defaults to <code>None</code>) &#x2014;
Use a specific Features to store the cache file
instead of the automatically generated one.`,name:"features"},{anchor:"datasets.Dataset.map.disable_nullable",description:`<strong>disable_nullable</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Disallow null values in the table.`,name:"disable_nullable"},{anchor:"datasets.Dataset.map.fn_kwargs",description:`<strong>fn_kwargs</strong> (<code>Dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Keyword arguments to be passed to <code>function</code>.`,name:"fn_kwargs"},{anchor:"datasets.Dataset.map.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Max number of processes when generating cache. Already cached shards are loaded sequentially.`,name:"num_proc"},{anchor:"datasets.Dataset.map.suffix_template",description:`<strong>suffix_template</strong> (<code>str</code>) &#x2014;
If <code>cache_file_name</code> is specified, then this suffix
will be added at the end of the base name of each. Defaults to <code>&quot;_{rank:05d}_of_{num_proc:05d}&quot;</code>. For example, if <code>cache_file_name</code> is &#x201C;processed.arrow&#x201D;, then for
<code>rank=1</code> and <code>num_proc=4</code>, the resulting file would be <code>&quot;processed_00001_of_00004.arrow&quot;</code> for the default suffix.`,name:"suffix_template"},{anchor:"datasets.Dataset.map.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"},{anchor:"datasets.Dataset.map.desc",description:`<strong>desc</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Meaningful description to be displayed alongside with the progress bar while mapping examples.`,name:"desc"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2764"}}),hl=new T({props:{anchor:"datasets.Dataset.map.example",$$slots:{default:[a_e]},$$scope:{ctx:k}}}),Bp=new E({props:{name:"filter",anchor:"datasets.Dataset.filter",parameters:[{name:"function",val:": typing.Optional[typing.Callable] = None"},{name:"with_indices",val:" = False"},{name:"input_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"batched",val:": bool = False"},{name:"batch_size",val:": typing.Optional[int] = 1000"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"fn_kwargs",val:": typing.Optional[dict] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"suffix_template",val:": str = '_{rank:05d}_of_{num_proc:05d}'"},{name:"new_fingerprint",val:": typing.Optional[str] = None"},{name:"desc",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.filter.function",description:`<strong>function</strong> (<code>Callable</code>) &#x2014; Callable with one of the following signatures:</p>
<ul>
<li><code>function(example: Dict[str, Any]) -&gt; bool</code> if <code>with_indices=False, batched=False</code></li>
<li><code>function(example: Dict[str, Any], indices: int) -&gt; bool</code> if <code>with_indices=True, batched=False</code></li>
<li><code>function(example: Dict[str, List]) -&gt; List[bool]</code> if <code>with_indices=False, batched=True</code></li>
<li><code>function(example: Dict[str, List], indices: List[int]) -&gt; List[bool]</code> if <code>with_indices=True, batched=True</code></li>
</ul>
<p>If no function is provided, defaults to an always <code>True</code> function: <code>lambda x: True</code>.`,name:"function"},{anchor:"datasets.Dataset.filter.with_indices",description:`<strong>with_indices</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide example indices to <code>function</code>. Note that in this case the signature of <code>function</code> should be <code>def function(example, idx): ...</code>.`,name:"with_indices"},{anchor:"datasets.Dataset.filter.input_columns",description:`<strong>input_columns</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The columns to be passed into <code>function</code> as
positional arguments. If <code>None</code>, a <code>dict</code> mapping to all formatted columns is passed as one argument.`,name:"input_columns"},{anchor:"datasets.Dataset.filter.batched",description:`<strong>batched</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide batch of examples to <code>function</code>.`,name:"batched"},{anchor:"datasets.Dataset.filter.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1000</code>) &#x2014;
Number of examples per batch provided to <code>function</code> if
<code>batched = True</code>. If <code>batched = False</code>, one example per batch is passed to <code>function</code>.
If <code>batch_size &lt;= 0</code> or <code>batch_size == None</code>, provide the full dataset as a single batch to <code>function</code>.`,name:"batch_size"},{anchor:"datasets.Dataset.filter.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the dataset in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.filter.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optional[bool]</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the current computation from <code>function</code>
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.Dataset.filter.cache_file_name",description:`<strong>cache_file_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
results of the computation instead of the automatically generated cache file name.`,name:"cache_file_name"},{anchor:"datasets.Dataset.filter.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"},{anchor:"datasets.Dataset.filter.fn_kwargs",description:`<strong>fn_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Keyword arguments to be passed to <code>function</code>.`,name:"fn_kwargs"},{anchor:"datasets.Dataset.filter.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of processes for multiprocessing. By default it doesn&#x2019;t
use multiprocessing.`,name:"num_proc"},{anchor:"datasets.Dataset.filter.suffix_template",description:`<strong>suffix_template</strong> (<code>str</code>) &#x2014;
If <code>cache_file_name</code> is specified, then this suffix will be added at the end of the base name of each.
For example, if <code>cache_file_name</code> is <code>&quot;processed.arrow&quot;</code>, then for <code>rank = 1</code> and <code>num_proc = 4</code>,
the resulting file would be <code>&quot;processed_00001_of_00004.arrow&quot;</code> for the default suffix (default
<code>_{rank:05d}_of_{num_proc:05d}</code>).`,name:"suffix_template"},{anchor:"datasets.Dataset.filter.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"},{anchor:"datasets.Dataset.filter.desc",description:`<strong>desc</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Meaningful description to be displayed alongside with the progress bar while filtering examples.`,name:"desc"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L3436"}}),fl=new T({props:{anchor:"datasets.Dataset.filter.example",$$slots:{default:[s_e]},$$scope:{ctx:k}}}),Hp=new E({props:{name:"select",anchor:"datasets.Dataset.select",parameters:[{name:"indices",val:": typing.Iterable"},{name:"keep_in_memory",val:": bool = False"},{name:"indices_cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.select.indices",description:`<strong>indices</strong> (<code>range</code>, <code>list</code>, <code>iterable</code>, <code>ndarray</code> or <code>Series</code>) &#x2014;
Range, list or 1D-array of integer indices for indexing.
If the indices correspond to a contiguous range, the Arrow table is simply sliced.
However passing a list of indices that are not contiguous creates indices mapping, which is much less efficient,
but still faster than recreating an Arrow table made of the requested rows.`,name:"indices"},{anchor:"datasets.Dataset.select.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the indices mapping in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.select.indices_cache_file_name",description:`<strong>indices_cache_file_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
indices mapping instead of the automatically generated cache file name.`,name:"indices_cache_file_name"},{anchor:"datasets.Dataset.select.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"},{anchor:"datasets.Dataset.select.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L3635"}}),gl=new T({props:{anchor:"datasets.Dataset.select.example",$$slots:{default:[n_e]},$$scope:{ctx:k}}}),Gp=new E({props:{name:"sort",anchor:"datasets.Dataset.sort",parameters:[{name:"column_names",val:": typing.Union[str, typing.Sequence[str]]"},{name:"reverse",val:": typing.Union[bool, typing.Sequence[bool]] = False"},{name:"kind",val:" = 'deprecated'"},{name:"null_placement",val:": str = 'at_end'"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"indices_cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.sort.column_names",description:`<strong>column_names</strong> (<code>Union[str, Sequence[str]]</code>) &#x2014;
Column name(s) to sort by.`,name:"column_names"},{anchor:"datasets.Dataset.sort.reverse",description:`<strong>reverse</strong> (<code>Union[bool, Sequence[bool]]</code>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, sort by descending order rather than ascending. If a single bool is provided,
the value is applied to the sorting of all column names. Otherwise a list of bools with the
same length and order as column_names must be provided.`,name:"reverse"},{anchor:"datasets.Dataset.sort.kind",description:`<strong>kind</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Pandas algorithm for sorting selected in <code>{quicksort, mergesort, heapsort, stable}</code>,
The default is <code>quicksort</code>. Note that both <code>stable</code> and <code>mergesort</code> use <code>timsort</code> under the covers and, in general,
the actual implementation will vary with data type. The <code>mergesort</code> option is retained for backwards compatibility.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.8.0</p>
						
<p><code>kind</code> was deprecated in version 2.10.0 and will be removed in 3.0.0.</p>

					</div>`,name:"kind"},{anchor:"datasets.Dataset.sort.null_placement",description:`<strong>null_placement</strong> (<code>str</code>, defaults to <code>at_end</code>) &#x2014;
Put <code>None</code> values at the beginning if <code>at_start</code> or <code>first</code> or at the end if <code>at_end</code> or <code>last</code></p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 1.14.2</p>
						
					</div>`,name:"null_placement"},{anchor:"datasets.Dataset.sort.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the sorted indices in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.sort.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optional[bool]</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the sorted indices
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.Dataset.sort.indices_cache_file_name",description:`<strong>indices_cache_file_name</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
sorted indices instead of the automatically generated cache file name.`,name:"indices_cache_file_name"},{anchor:"datasets.Dataset.sort.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
Higher value gives smaller cache files, lower value consume less temporary memory.`,name:"writer_batch_size"},{anchor:"datasets.Dataset.sort.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L3885"}}),ul=new T({props:{anchor:"datasets.Dataset.sort.example",$$slots:{default:[r_e]},$$scope:{ctx:k}}}),Kp=new E({props:{name:"shuffle",anchor:"datasets.Dataset.shuffle",parameters:[{name:"seed",val:": typing.Optional[int] = None"},{name:"generator",val:": typing.Optional[numpy.random._generator.Generator] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"indices_cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.shuffle.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>) &#x2014;
A seed to initialize the default BitGenerator if <code>generator=None</code>.
If <code>None</code>, then fresh, unpredictable entropy will be pulled from the OS.
If an <code>int</code> or <code>array_like[ints]</code> is passed, then it will be passed to SeedSequence to derive the initial BitGenerator state.`,name:"seed"},{anchor:"datasets.Dataset.shuffle.generator",description:`<strong>generator</strong> (<code>numpy.random.Generator</code>, <em>optional</em>) &#x2014;
Numpy random Generator to use to compute the permutation of the dataset rows.
If <code>generator=None</code> (default), uses <code>np.random.default_rng</code> (the default BitGenerator (PCG64) of NumPy).`,name:"generator"},{anchor:"datasets.Dataset.shuffle.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, default <code>False</code>) &#x2014;
Keep the shuffled indices in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.shuffle.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optional[bool]</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the shuffled indices
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.Dataset.shuffle.indices_cache_file_name",description:`<strong>indices_cache_file_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
shuffled indices instead of the automatically generated cache file name.`,name:"indices_cache_file_name"},{anchor:"datasets.Dataset.shuffle.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"},{anchor:"datasets.Dataset.shuffle.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4030"}}),_l=new T({props:{anchor:"datasets.Dataset.shuffle.example",$$slots:{default:[o_e]},$$scope:{ctx:k}}}),bl=new T({props:{anchor:"datasets.Dataset.shuffle.example-2",$$slots:{default:[l_e]},$$scope:{ctx:k}}}),$l=new T({props:{anchor:"datasets.Dataset.shuffle.example-3",$$slots:{default:[i_e]},$$scope:{ctx:k}}}),Wp=new E({props:{name:"train_test_split",anchor:"datasets.Dataset.train_test_split",parameters:[{name:"test_size",val:": typing.Union[float, int, NoneType] = None"},{name:"train_size",val:": typing.Union[float, int, NoneType] = None"},{name:"shuffle",val:": bool = True"},{name:"stratify_by_column",val:": typing.Optional[str] = None"},{name:"seed",val:": typing.Optional[int] = None"},{name:"generator",val:": typing.Optional[numpy.random._generator.Generator] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"train_indices_cache_file_name",val:": typing.Optional[str] = None"},{name:"test_indices_cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"train_new_fingerprint",val:": typing.Optional[str] = None"},{name:"test_new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.train_test_split.test_size",description:`<strong>test_size</strong> (<code>numpy.random.Generator</code>, <em>optional</em>) &#x2014;
Size of the test split
If <code>float</code>, should be between <code>0.0</code> and <code>1.0</code> and represent the proportion of the dataset to include in the test split.
If <code>int</code>, represents the absolute number of test samples.
If <code>None</code>, the value is set to the complement of the train size.
If <code>train_size</code> is also <code>None</code>, it will be set to <code>0.25</code>.`,name:"test_size"},{anchor:"datasets.Dataset.train_test_split.train_size",description:`<strong>train_size</strong> (<code>numpy.random.Generator</code>, <em>optional</em>) &#x2014;
Size of the train split
If <code>float</code>, should be between <code>0.0</code> and <code>1.0</code> and represent the proportion of the dataset to include in the train split.
If <code>int</code>, represents the absolute number of train samples.
If <code>None</code>, the value is automatically set to the complement of the test size.`,name:"train_size"},{anchor:"datasets.Dataset.train_test_split.shuffle",description:`<strong>shuffle</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to shuffle the data before splitting.`,name:"shuffle"},{anchor:"datasets.Dataset.train_test_split.stratify_by_column",description:`<strong>stratify_by_column</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The column name of labels to be used to perform stratified split of data.`,name:"stratify_by_column"},{anchor:"datasets.Dataset.train_test_split.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>) &#x2014;
A seed to initialize the default BitGenerator if <code>generator=None</code>.
If <code>None</code>, then fresh, unpredictable entropy will be pulled from the OS.
If an <code>int</code> or <code>array_like[ints]</code> is passed, then it will be passed to SeedSequence to derive the initial BitGenerator state.`,name:"seed"},{anchor:"datasets.Dataset.train_test_split.generator",description:`<strong>generator</strong> (<code>numpy.random.Generator</code>, <em>optional</em>) &#x2014;
Numpy random Generator to use to compute the permutation of the dataset rows.
If <code>generator=None</code> (default), uses <code>np.random.default_rng</code> (the default BitGenerator (PCG64) of NumPy).`,name:"generator"},{anchor:"datasets.Dataset.train_test_split.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the splits indices in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.train_test_split.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optional[bool]</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the splits indices
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.Dataset.train_test_split.train_cache_file_name",description:`<strong>train_cache_file_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
train split indices instead of the automatically generated cache file name.`,name:"train_cache_file_name"},{anchor:"datasets.Dataset.train_test_split.test_cache_file_name",description:`<strong>test_cache_file_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
test split indices instead of the automatically generated cache file name.`,name:"test_cache_file_name"},{anchor:"datasets.Dataset.train_test_split.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"},{anchor:"datasets.Dataset.train_test_split.train_new_fingerprint",description:`<strong>train_new_fingerprint</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The new fingerprint of the train set after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments`,name:"train_new_fingerprint"},{anchor:"datasets.Dataset.train_test_split.test_new_fingerprint",description:`<strong>test_new_fingerprint</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The new fingerprint of the test set after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments`,name:"test_new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4162"}}),xl=new T({props:{anchor:"datasets.Dataset.train_test_split.example",$$slots:{default:[d_e]},$$scope:{ctx:k}}}),Jp=new E({props:{name:"shard",anchor:"datasets.Dataset.shard",parameters:[{name:"num_shards",val:": int"},{name:"index",val:": int"},{name:"contiguous",val:": bool = False"},{name:"keep_in_memory",val:": bool = False"},{name:"indices_cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"}],parametersDescription:[{anchor:"datasets.Dataset.shard.num_shards",description:`<strong>num_shards</strong> (<code>int</code>) &#x2014;
How many shards to split the dataset into.`,name:"num_shards"},{anchor:"datasets.Dataset.shard.index",description:`<strong>index</strong> (<code>int</code>) &#x2014;
Which shard to select and return.
contiguous &#x2014; (<code>bool</code>, defaults to <code>False</code>):
Whether to select contiguous blocks of indices for shards.`,name:"index"},{anchor:"datasets.Dataset.shard.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the dataset in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.shard.indices_cache_file_name",description:`<strong>indices_cache_file_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
indices of each shard instead of the automatically generated cache file name.`,name:"indices_cache_file_name"},{anchor:"datasets.Dataset.shard.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4445"}}),vl=new T({props:{anchor:"datasets.Dataset.shard.example",$$slots:{default:[c_e]},$$scope:{ctx:k}}}),Zp=new E({props:{name:"to_tf_dataset",anchor:"datasets.Dataset.to_tf_dataset",parameters:[{name:"batch_size",val:": int"},{name:"columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"shuffle",val:": bool = False"},{name:"collate_fn",val:": typing.Optional[typing.Callable] = None"},{name:"drop_remainder",val:": bool = False"},{name:"collate_fn_args",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"label_cols",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"prefetch",val:": bool = True"},{name:"num_workers",val:": int = 0"},{name:"num_test_batches",val:": int = 20"}],parametersDescription:[{anchor:"datasets.Dataset.to_tf_dataset.batch_size",description:`<strong>batch_size</strong> (<code>int</code>) &#x2014;
Size of batches to load from the dataset.`,name:"batch_size"},{anchor:"datasets.Dataset.to_tf_dataset.columns",description:`<strong>columns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
Dataset column(s) to load in the <code>tf.data.Dataset</code>.
Column names that are created by the <code>collate_fn</code> and that do not exist in the original dataset can be used.`,name:"columns"},{anchor:"datasets.Dataset.to_tf_dataset.shuffle(bool,",description:`<strong>shuffle(<code>bool</code>,</strong> defaults to <code>False</code>) &#x2014;
Shuffle the dataset order when loading. Recommended <code>True</code> for training, <code>False</code> for
validation/evaluation.`,name:"shuffle(bool,"},{anchor:"datasets.Dataset.to_tf_dataset.drop_remainder(bool,",description:`<strong>drop_remainder(<code>bool</code>,</strong> defaults to <code>False</code>) &#x2014;
Drop the last incomplete batch when loading. Ensures
that all batches yielded by the dataset will have the same length on the batch dimension.`,name:"drop_remainder(bool,"},{anchor:"datasets.Dataset.to_tf_dataset.collate_fn(Callable,",description:`<strong>collate_fn(<code>Callable</code>,</strong> <em>optional</em>) &#x2014;
A function or callable object (such as a <code>DataCollator</code>) that will collate
lists of samples into a batch.`,name:"collate_fn(Callable,"},{anchor:"datasets.Dataset.to_tf_dataset.collate_fn_args",description:`<strong>collate_fn_args</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
An optional <code>dict</code> of keyword arguments to be passed to the
<code>collate_fn</code>.`,name:"collate_fn_args"},{anchor:"datasets.Dataset.to_tf_dataset.label_cols",description:`<strong>label_cols</strong> (<code>List[str]</code> or <code>str</code>, defaults to <code>None</code>) &#x2014;
Dataset column(s) to load as labels.
Note that many models compute loss internally rather than letting Keras do it, in which case
passing the labels here is optional, as long as they&#x2019;re in the input <code>columns</code>.`,name:"label_cols"},{anchor:"datasets.Dataset.to_tf_dataset.prefetch",description:`<strong>prefetch</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to run the dataloader in a separate thread and maintain
a small buffer of batches for training. Improves performance by allowing data to be loaded in the
background while the model is training.`,name:"prefetch"},{anchor:"datasets.Dataset.to_tf_dataset.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, defaults to <code>0</code>) &#x2014;
Number of workers to use for loading the dataset. Only supported on Python versions &gt;= 3.8.`,name:"num_workers"},{anchor:"datasets.Dataset.to_tf_dataset.num_test_batches",description:`<strong>num_test_batches</strong> (<code>int</code>, defaults to <code>20</code>) &#x2014;
Number of batches to use to infer the output signature of the dataset.
The higher this number, the more accurate the signature will be, but the longer it will take to
create the dataset.`,name:"num_test_batches"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L314",returnDescription:`
<p><code>tf.data.Dataset</code></p>
`}}),yl=new T({props:{anchor:"datasets.Dataset.to_tf_dataset.example",$$slots:{default:[p_e]},$$scope:{ctx:k}}}),Xp=new E({props:{name:"push_to_hub",anchor:"datasets.Dataset.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"split",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = False"},{name:"token",val:": typing.Optional[str] = None"},{name:"branch",val:": typing.Optional[str] = None"},{name:"max_shard_size",val:": typing.Union[str, int, NoneType] = None"},{name:"num_shards",val:": typing.Optional[int] = None"},{name:"embed_external_files",val:": bool = True"}],parametersDescription:[{anchor:"datasets.Dataset.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The ID of the repository to push to in the following format: <code>&lt;user&gt;/&lt;dataset_name&gt;</code> or
<code>&lt;org&gt;/&lt;dataset_name&gt;</code>. Also accepts <code>&lt;dataset_name&gt;</code>, which will default to the namespace
of the logged-in user.`,name:"repo_id"},{anchor:"datasets.Dataset.push_to_hub.split",description:`<strong>split</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the split that will be given to that dataset. Defaults to <code>self.split</code>.`,name:"split"},{anchor:"datasets.Dataset.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the dataset repository should be set to private or not. Only affects repository creation:
a repository that already exists will not be affected by that parameter.`,name:"private"},{anchor:"datasets.Dataset.push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
An optional authentication token for the Hugging Face Hub. If no token is passed, will default
to the token saved locally when logging in with <code>huggingface-cli login</code>. Will raise an error
if no token is passed and the user is not logged-in.`,name:"token"},{anchor:"datasets.Dataset.push_to_hub.branch",description:`<strong>branch</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The git branch on which to push the dataset. This defaults to the default branch as specified
in your repository, which defaults to <code>&quot;main&quot;</code>.`,name:"branch"},{anchor:"datasets.Dataset.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;500MB&quot;</code>) &#x2014;
The maximum size of the dataset shards to be uploaded to the hub. If expressed as a string, needs to be digits followed by
a unit (like <code>&quot;5MB&quot;</code>).`,name:"max_shard_size"},{anchor:"datasets.Dataset.push_to_hub.num_shards",description:`<strong>num_shards</strong> (<code>int</code>, <em>optional</em>) &#x2014; Number of shards to write. By default the number of shards depends on <code>max_shard_size</code>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_shards"},{anchor:"datasets.Dataset.push_to_hub.embed_external_files",description:`<strong>embed_external_files</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to embed file bytes in the shards.
In particular, this will do the following before the push for the fields of type:</p>
<ul>
<li><a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio">Audio</a> and <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Image">Image</a>: remove local path information and embed file content in the Parquet files.</li>
</ul>`,name:"embed_external_files"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L5250"}}),jl=new T({props:{anchor:"datasets.Dataset.push_to_hub.example",$$slots:{default:[m_e]},$$scope:{ctx:k}}}),em=new E({props:{name:"save_to_disk",anchor:"datasets.Dataset.save_to_disk",parameters:[{name:"dataset_path",val:": typing.Union[str, bytes, os.PathLike]"},{name:"fs",val:" = 'deprecated'"},{name:"max_shard_size",val:": typing.Union[str, int, NoneType] = None"},{name:"num_shards",val:": typing.Optional[int] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"storage_options",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.Dataset.save_to_disk.dataset_path",description:`<strong>dataset_path</strong> (<code>str</code>) &#x2014;
Path (e.g. <code>dataset/train</code>) or remote URI (e.g. <code>s3://my-bucket/dataset/train</code>)
of the dataset directory where the dataset will be saved to.`,name:"dataset_path"},{anchor:"datasets.Dataset.save_to_disk.fs",description:`<strong>fs</strong> (<code>fsspec.spec.AbstractFileSystem</code>, <em>optional</em>) &#x2014;
Instance of the remote filesystem where the dataset will be saved to.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.8.0</p>
						
<p><code>fs</code> was deprecated in version 2.8.0 and will be removed in 3.0.0.
Please use <code>storage_options</code> instead, e.g. <code>storage_options=fs.storage_options</code></p>

					</div>`,name:"fs"},{anchor:"datasets.Dataset.save_to_disk.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;500MB&quot;</code>) &#x2014;
The maximum size of the dataset shards to be uploaded to the hub. If expressed as a string, needs to be digits followed by a unit
(like <code>&quot;50MB&quot;</code>).`,name:"max_shard_size"},{anchor:"datasets.Dataset.save_to_disk.num_shards",description:`<strong>num_shards</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of shards to write. By default the number of shards depends on <code>max_shard_size</code> and <code>num_proc</code>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_shards"},{anchor:"datasets.Dataset.save_to_disk.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of processes when downloading and generating the dataset locally.
Multiprocessing is disabled by default.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_proc"},{anchor:"datasets.Dataset.save_to_disk.storage_options",description:`<strong>storage_options</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Key/value pairs to be passed on to the file-system backend, if any.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"storage_options"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1285"}}),wl=new T({props:{anchor:"datasets.Dataset.save_to_disk.example",$$slots:{default:[h_e]},$$scope:{ctx:k}}}),tm=new E({props:{name:"load_from_disk",anchor:"datasets.Dataset.load_from_disk",parameters:[{name:"dataset_path",val:": str"},{name:"fs",val:" = 'deprecated'"},{name:"keep_in_memory",val:": typing.Optional[bool] = None"},{name:"storage_options",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.Dataset.load_from_disk.dataset_path",description:`<strong>dataset_path</strong> (<code>str</code>) &#x2014;
Path (e.g. <code>&quot;dataset/train&quot;</code>) or remote URI (e.g. <code>&quot;s3//my-bucket/dataset/train&quot;</code>)
of the dataset directory where the dataset will be loaded from.`,name:"dataset_path"},{anchor:"datasets.Dataset.load_from_disk.fs",description:`<strong>fs</strong> (<code>fsspec.spec.AbstractFileSystem</code>, <em>optional</em>) &#x2014;
Instance of the remote filesystem where the dataset will be saved to.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.8.0</p>
						
<p><code>fs</code> was deprecated in version 2.8.0 and will be removed in 3.0.0.
Please use <code>storage_options</code> instead, e.g. <code>storage_options=fs.storage_options</code></p>

					</div>`,name:"fs"},{anchor:"datasets.Dataset.load_from_disk.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>None</code>) &#x2014;
Whether to copy the dataset in-memory. If <code>None</code>, the
dataset will not be copied in-memory unless explicitly enabled by setting
<code>datasets.config.IN_MEMORY_MAX_SIZE</code> to nonzero. See more details in the
<a href="../cache#improve-performance">improve performance</a> section.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.load_from_disk.storage_options",description:`<strong>storage_options</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Key/value pairs to be passed on to the file-system backend, if any.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"storage_options"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1503",returnDescription:`
<ul>
<li>If <code>dataset_path</code> is a path of a dataset directory, the dataset requested.</li>
<li>If <code>dataset_path</code> is a path of a dataset dict directory, a <code>datasets.DatasetDict</code> with each split.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a> or <a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),Dl=new T({props:{anchor:"datasets.Dataset.load_from_disk.example",$$slots:{default:[f_e]},$$scope:{ctx:k}}}),am=new E({props:{name:"flatten_indices",anchor:"datasets.Dataset.flatten_indices",parameters:[{name:"keep_in_memory",val:": bool = False"},{name:"cache_file_name",val:": typing.Optional[str] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"disable_nullable",val:": bool = False"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"new_fingerprint",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Dataset.flatten_indices.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the dataset in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.flatten_indices.cache_file_name",description:`<strong>cache_file_name</strong> (<code>str</code>, <em>optional</em>, default <code>None</code>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
results of the computation instead of the automatically generated cache file name.`,name:"cache_file_name"},{anchor:"datasets.Dataset.flatten_indices.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"},{anchor:"datasets.Dataset.flatten_indices.features",description:`<strong>features</strong> (<code>Optional[datasets.Features]</code>, defaults to <code>None</code>) &#x2014;
Use a specific <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a> to store the cache file
instead of the automatically generated one.`,name:"features"},{anchor:"datasets.Dataset.flatten_indices.disable_nullable",description:`<strong>disable_nullable</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Allow null values in the table.`,name:"disable_nullable"},{anchor:"datasets.Dataset.flatten_indices.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, optional, default <code>None</code>) &#x2014;
Max number of processes when generating cache. Already cached shards are loaded sequentially`,name:"num_proc"},{anchor:"datasets.Dataset.flatten_indices.new_fingerprint",description:`<strong>new_fingerprint</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The new fingerprint of the dataset after transform.
If <code>None</code>, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments`,name:"new_fingerprint"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L3556"}}),sm=new E({props:{name:"to_csv",anchor:"datasets.Dataset.to_csv",parameters:[{name:"path_or_buf",val:": typing.Union[str, bytes, os.PathLike, typing.BinaryIO]"},{name:"batch_size",val:": typing.Optional[int] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"**to_csv_kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.to_csv.path_or_buf",description:`<strong>path_or_buf</strong> (<code>PathLike</code> or <code>FileOrBuffer</code>) &#x2014;
Either a path to a file or a BinaryIO.`,name:"path_or_buf"},{anchor:"datasets.Dataset.to_csv.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Size of the batch to load in memory and write at once.
Defaults to <code>datasets.config.DEFAULT_MAX_BATCH_SIZE</code>.`,name:"batch_size"},{anchor:"datasets.Dataset.to_csv.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of processes for multiprocessing. By default it doesn&#x2019;t
use multiprocessing. <code>batch_size</code> in this case defaults to
<code>datasets.config.DEFAULT_MAX_BATCH_SIZE</code> but feel free to make it 5x or 10x of the default
value if you have sufficient compute power.`,name:"num_proc"},{anchor:"datasets.Dataset.to_csv.*to_csv_kwargs",description:`*<strong>*to_csv_kwargs</strong> (additional keyword arguments) &#x2014;
Parameters to pass to pandas&#x2019;s <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html" rel="nofollow"><code>pandas.DataFrame.to_csv</code></a>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Changed in 2.10.0</p>
						
<p>Now, <code>index</code> defaults to <code>False</code> if not specified.</p>
<p>If you would like to write the index, pass <code>index=True</code> and also set a name for the index column by
passing <code>index_label</code>.</p>

					</div>`,name:"*to_csv_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4610",returnDescription:`
<p>The number of characters or bytes written.</p>
`,returnType:`
<p><code>int</code></p>
`}}),El=new T({props:{anchor:"datasets.Dataset.to_csv.example",$$slots:{default:[g_e]},$$scope:{ctx:k}}}),nm=new E({props:{name:"to_pandas",anchor:"datasets.Dataset.to_pandas",parameters:[{name:"batch_size",val:": typing.Optional[int] = None"},{name:"batched",val:": bool = False"}],parametersDescription:[{anchor:"datasets.Dataset.to_pandas.batched",description:`<strong>batched</strong> (<code>bool</code>) &#x2014;
Set to <code>True</code> to return a generator that yields the dataset as batches
of <code>batch_size</code> rows. Defaults to <code>False</code> (returns the whole datasets once).`,name:"batched"},{anchor:"datasets.Dataset.to_pandas.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The size (number of rows) of the batches if <code>batched</code> is <code>True</code>.
Defaults to <code>datasets.config.DEFAULT_MAX_BATCH_SIZE</code>.`,name:"batch_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4770",returnDescription:`
<p><code>pandas.DataFrame</code> or <code>Iterator[pandas.DataFrame]</code></p>
`}}),ql=new T({props:{anchor:"datasets.Dataset.to_pandas.example",$$slots:{default:[u_e]},$$scope:{ctx:k}}}),om=new E({props:{name:"to_dict",anchor:"datasets.Dataset.to_dict",parameters:[{name:"batch_size",val:": typing.Optional[int] = None"},{name:"batched",val:" = 'deprecated'"}],parametersDescription:[{anchor:"datasets.Dataset.to_dict.batched",description:`<strong>batched</strong> (<code>bool</code>) &#x2014;
Set to <code>True</code> to return a generator that yields the dataset as batches
of <code>batch_size</code> rows. Defaults to <code>False</code> (returns the whole datasets once).</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.11.0</p>
						
<p>Use <code>.iter(batch_size=batch_size)</code> followed by <code>.to_dict()</code> on the individual batches instead.</p>

					</div>`,name:"batched"},{anchor:"datasets.Dataset.to_dict.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014; The size (number of rows) of the batches if <code>batched</code> is <code>True</code>.
Defaults to <code>datasets.config.DEFAULT_MAX_BATCH_SIZE</code>.`,name:"batch_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4656",returnDescription:`
<p><code>dict</code> or <code>Iterator[dict]</code></p>
`}}),Il=new T({props:{anchor:"datasets.Dataset.to_dict.example",$$slots:{default:[__e]},$$scope:{ctx:k}}}),lm=new E({props:{name:"to_json",anchor:"datasets.Dataset.to_json",parameters:[{name:"path_or_buf",val:": typing.Union[str, bytes, os.PathLike, typing.BinaryIO]"},{name:"batch_size",val:": typing.Optional[int] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"**to_json_kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.to_json.path_or_buf",description:`<strong>path_or_buf</strong> (<code>PathLike</code> or <code>FileOrBuffer</code>) &#x2014;
Either a path to a file or a BinaryIO.`,name:"path_or_buf"},{anchor:"datasets.Dataset.to_json.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Size of the batch to load in memory and write at once.
Defaults to <code>datasets.config.DEFAULT_MAX_BATCH_SIZE</code>.`,name:"batch_size"},{anchor:"datasets.Dataset.to_json.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of processes for multiprocessing. By default it doesn&#x2019;t
use multiprocessing. <code>batch_size</code> in this case defaults to
<code>datasets.config.DEFAULT_MAX_BATCH_SIZE</code> but feel free to make it 5x or 10x of the default
value if you have sufficient compute power.`,name:"num_proc"},{anchor:"datasets.Dataset.to_json.*to_json_kwargs",description:`*<strong>*to_json_kwargs</strong> (additional keyword arguments) &#x2014;
Parameters to pass to pandas&#x2019;s <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html" rel="nofollow"><code>pandas.DataFrame.to_json</code></a>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Changed in 2.11.0</p>
						
<p>Now, <code>index</code> defaults to <code>False</code> if <code>orint</code> is  <code>&quot;split&quot;</code> or <code>&quot;table&quot;</code> is  specified.</p>
<p>If you would like to write the index, pass <code>index=True</code>.</p>

					</div>`,name:"*to_json_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4725",returnDescription:`
<p>The number of characters or bytes written.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Tl=new T({props:{anchor:"datasets.Dataset.to_json.example",$$slots:{default:[b_e]},$$scope:{ctx:k}}}),im=new E({props:{name:"to_parquet",anchor:"datasets.Dataset.to_parquet",parameters:[{name:"path_or_buf",val:": typing.Union[str, bytes, os.PathLike, typing.BinaryIO]"},{name:"batch_size",val:": typing.Optional[int] = None"},{name:"**parquet_writer_kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.to_parquet.path_or_buf",description:`<strong>path_or_buf</strong> (<code>PathLike</code> or <code>FileOrBuffer</code>) &#x2014;
Either a path to a file or a BinaryIO.`,name:"path_or_buf"},{anchor:"datasets.Dataset.to_parquet.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Size of the batch to load in memory and write at once.
Defaults to <code>datasets.config.DEFAULT_MAX_BATCH_SIZE</code>.`,name:"batch_size"},{anchor:"datasets.Dataset.to_parquet.*parquet_writer_kwargs",description:`*<strong>*parquet_writer_kwargs</strong> (additional keyword arguments) &#x2014;
Parameters to pass to PyArrow&#x2019;s <code>pyarrow.parquet.ParquetWriter</code>.`,name:"*parquet_writer_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4809",returnDescription:`
<p>The number of characters or bytes written.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Nl=new T({props:{anchor:"datasets.Dataset.to_parquet.example",$$slots:{default:[$_e]},$$scope:{ctx:k}}}),dm=new E({props:{name:"to_sql",anchor:"datasets.Dataset.to_sql",parameters:[{name:"name",val:": str"},{name:"con",val:": typing.Union[str, ForwardRef('sqlalchemy.engine.Connection'), ForwardRef('sqlalchemy.engine.Engine'), ForwardRef('sqlite3.Connection')]"},{name:"batch_size",val:": typing.Optional[int] = None"},{name:"**sql_writer_kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.to_sql.name",description:`<strong>name</strong> (<code>str</code>) &#x2014;
Name of SQL table.`,name:"name"},{anchor:"datasets.Dataset.to_sql.con",description:`<strong>con</strong> (<code>str</code> or <code>sqlite3.Connection</code> or <code>sqlalchemy.engine.Connection</code> or <code>sqlalchemy.engine.Connection</code>) &#x2014;
A <a href="https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls" rel="nofollow">URI string</a> or a SQLite3/SQLAlchemy connection object used to write to a database.`,name:"con"},{anchor:"datasets.Dataset.to_sql.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Size of the batch to load in memory and write at once.
Defaults to <code>datasets.config.DEFAULT_MAX_BATCH_SIZE</code>.`,name:"batch_size"},{anchor:"datasets.Dataset.to_sql.*sql_writer_kwargs",description:`*<strong>*sql_writer_kwargs</strong> (additional keyword arguments) &#x2014;
Parameters to pass to pandas&#x2019;s <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_sql.html" rel="nofollow"><code>pandas.DataFrame.to_sql</code></a>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Changed in 2.11.0</p>
						
<p>Now, <code>index</code> defaults to <code>False</code> if not specified.</p>
<p>If you would like to write the index, pass <code>index=True</code> and also set a name for the index column by
passing <code>index_label</code>.</p>

					</div>`,name:"*sql_writer_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L4840",returnDescription:`
<p>The number of records written.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Pl=new T({props:{anchor:"datasets.Dataset.to_sql.example",$$slots:{default:[x_e]},$$scope:{ctx:k}}}),cm=new E({props:{name:"add_faiss_index",anchor:"datasets.Dataset.add_faiss_index",parameters:[{name:"column",val:": str"},{name:"index_name",val:": typing.Optional[str] = None"},{name:"device",val:": typing.Optional[int] = None"},{name:"string_factory",val:": typing.Optional[str] = None"},{name:"metric_type",val:": typing.Optional[int] = None"},{name:"custom_index",val:": typing.Optional[ForwardRef('faiss.Index')] = None"},{name:"batch_size",val:": int = 1000"},{name:"train_size",val:": typing.Optional[int] = None"},{name:"faiss_verbose",val:": bool = False"},{name:"dtype",val:" = <class 'numpy.float32'>"}],parametersDescription:[{anchor:"datasets.Dataset.add_faiss_index.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
The column of the vectors to add to the index.`,name:"column"},{anchor:"datasets.Dataset.add_faiss_index.index_name",description:`<strong>index_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The <code>index_name</code>/identifier of the index.
This is the <code>index_name</code> that is used to call <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.get_nearest_examples">get_nearest_examples()</a> or <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.search">search()</a>.
By default it corresponds to <code>column</code>.`,name:"index_name"},{anchor:"datasets.Dataset.add_faiss_index.device",description:`<strong>device</strong> (<code>Union[int, List[int]]</code>, <em>optional</em>) &#x2014;
If positive integer, this is the index of the GPU to use. If negative integer, use all GPUs.
If a list of positive integers is passed in, run only on those GPUs. By default it uses the CPU.`,name:"device"},{anchor:"datasets.Dataset.add_faiss_index.string_factory",description:`<strong>string_factory</strong> (<code>str</code>, <em>optional</em>) &#x2014;
This is passed to the index factory of Faiss to create the index.
Default index class is <code>IndexFlat</code>.`,name:"string_factory"},{anchor:"datasets.Dataset.add_faiss_index.metric_type",description:`<strong>metric_type</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Type of metric. Ex: <code>faiss.METRIC_INNER_PRODUCT</code> or <code>faiss.METRIC_L2</code>.`,name:"metric_type"},{anchor:"datasets.Dataset.add_faiss_index.custom_index",description:`<strong>custom_index</strong> (<code>faiss.Index</code>, <em>optional</em>) &#x2014;
Custom Faiss index that you already have instantiated and configured for your needs.`,name:"custom_index"},{anchor:"datasets.Dataset.add_faiss_index.batch_size",description:`<strong>batch_size</strong> (<code>int</code>) &#x2014;
Size of the batch to use while adding vectors to the <code>FaissIndex</code>. Default value is <code>1000</code>.<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.4.0</p>
						
					</div>`,name:"batch_size"},{anchor:"datasets.Dataset.add_faiss_index.train_size",description:`<strong>train_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If the index needs a training step, specifies how many vectors will be used to train the index.`,name:"train_size"},{anchor:"datasets.Dataset.add_faiss_index.faiss_verbose",description:`<strong>faiss_verbose</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Enable the verbosity of the Faiss index.`,name:"faiss_verbose"},{anchor:"datasets.Dataset.add_faiss_index.dtype",description:`<strong>dtype</strong> (<code>data-type</code>) &#x2014;
The dtype of the numpy arrays that are indexed.
Default is <code>np.float32</code>.`,name:"dtype"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L5455"}}),Al=new T({props:{anchor:"datasets.Dataset.add_faiss_index.example",$$slots:{default:[v_e]},$$scope:{ctx:k}}}),mm=new E({props:{name:"add_faiss_index_from_external_arrays",anchor:"datasets.Dataset.add_faiss_index_from_external_arrays",parameters:[{name:"external_arrays",val:": array"},{name:"index_name",val:": str"},{name:"device",val:": typing.Optional[int] = None"},{name:"string_factory",val:": typing.Optional[str] = None"},{name:"metric_type",val:": typing.Optional[int] = None"},{name:"custom_index",val:": typing.Optional[ForwardRef('faiss.Index')] = None"},{name:"batch_size",val:": int = 1000"},{name:"train_size",val:": typing.Optional[int] = None"},{name:"faiss_verbose",val:": bool = False"},{name:"dtype",val:" = <class 'numpy.float32'>"}],parametersDescription:[{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.external_arrays",description:`<strong>external_arrays</strong> (<code>np.array</code>) &#x2014;
If you want to use arrays from outside the lib for the index, you can set <code>external_arrays</code>.
It will use <code>external_arrays</code> to create the Faiss index instead of the arrays in the given <code>column</code>.`,name:"external_arrays"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.index_name",description:`<strong>index_name</strong> (<code>str</code>) &#x2014;
The <code>index_name</code>/identifier of the index.
This is the <code>index_name</code> that is used to call <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.get_nearest_examples">get_nearest_examples()</a> or <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.search">search()</a>.`,name:"index_name"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.device",description:`<strong>device</strong> (Optional <code>Union[int, List[int]]</code>, <em>optional</em>) &#x2014;
If positive integer, this is the index of the GPU to use. If negative integer, use all GPUs.
If a list of positive integers is passed in, run only on those GPUs. By default it uses the CPU.`,name:"device"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.string_factory",description:`<strong>string_factory</strong> (<code>str</code>, <em>optional</em>) &#x2014;
This is passed to the index factory of Faiss to create the index.
Default index class is <code>IndexFlat</code>.`,name:"string_factory"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.metric_type",description:`<strong>metric_type</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Type of metric. Ex: <code>faiss.faiss.METRIC_INNER_PRODUCT</code> or <code>faiss.METRIC_L2</code>.`,name:"metric_type"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.custom_index",description:`<strong>custom_index</strong> (<code>faiss.Index</code>, <em>optional</em>) &#x2014;
Custom Faiss index that you already have instantiated and configured for your needs.`,name:"custom_index"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Size of the batch to use while adding vectors to the FaissIndex. Default value is 1000.<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.4.0</p>
						
					</div>`,name:"batch_size"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.train_size",description:`<strong>train_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If the index needs a training step, specifies how many vectors will be used to train the index.`,name:"train_size"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.faiss_verbose",description:`<strong>faiss_verbose</strong> (<code>bool</code>, defaults to False) &#x2014;
Enable the verbosity of the Faiss index.`,name:"faiss_verbose"},{anchor:"datasets.Dataset.add_faiss_index_from_external_arrays.dtype",description:`<strong>dtype</strong> (<code>numpy.dtype</code>) &#x2014;
The dtype of the numpy arrays that are indexed. Default is np.float32.`,name:"dtype"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L5535"}}),fm=new E({props:{name:"save_faiss_index",anchor:"datasets.Dataset.save_faiss_index",parameters:[{name:"index_name",val:": str"},{name:"file",val:": typing.Union[str, pathlib.PurePath]"},{name:"storage_options",val:": typing.Optional[typing.Dict] = None"}],parametersDescription:[{anchor:"datasets.Dataset.save_faiss_index.index_name",description:"<strong>index_name</strong> (<code>str</code>) &#x2014; The index_name/identifier of the index. This is the index_name that is used to call <code>.get_nearest</code> or <code>.search</code>.",name:"index_name"},{anchor:"datasets.Dataset.save_faiss_index.file",description:"<strong>file</strong> (<code>str</code>) &#x2014; The path to the serialized faiss index on disk or remote URI (e.g. <code>&quot;s3://my-bucket/index.faiss&quot;</code>).",name:"file"},{anchor:"datasets.Dataset.save_faiss_index.storage_options",description:`<strong>storage_options</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Key/value pairs to be passed on to the file-system backend, if any.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.11.0</p>
						
					</div>`,name:"storage_options"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L528"}}),gm=new E({props:{name:"load_faiss_index",anchor:"datasets.Dataset.load_faiss_index",parameters:[{name:"index_name",val:": str"},{name:"file",val:": typing.Union[str, pathlib.PurePath]"},{name:"device",val:": typing.Union[int, typing.List[int], NoneType] = None"},{name:"storage_options",val:": typing.Optional[typing.Dict] = None"}],parametersDescription:[{anchor:"datasets.Dataset.load_faiss_index.index_name",description:`<strong>index_name</strong> (<code>str</code>) &#x2014; The index_name/identifier of the index. This is the index_name that is used to
call <code>.get_nearest</code> or <code>.search</code>.`,name:"index_name"},{anchor:"datasets.Dataset.load_faiss_index.file",description:"<strong>file</strong> (<code>str</code>) &#x2014; The path to the serialized faiss index on disk or remote URI (e.g. <code>&quot;s3://my-bucket/index.faiss&quot;</code>).",name:"file"},{anchor:"datasets.Dataset.load_faiss_index.device",description:`<strong>device</strong> (Optional <code>Union[int, List[int]]</code>) &#x2014; If positive integer, this is the index of the GPU to use. If negative integer, use all GPUs.
If a list of positive integers is passed in, run only on those GPUs. By default it uses the CPU.`,name:"device"},{anchor:"datasets.Dataset.load_faiss_index.storage_options",description:`<strong>storage_options</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Key/value pairs to be passed on to the file-system backend, if any.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.11.0</p>
						
					</div>`,name:"storage_options"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L546"}}),_m=new E({props:{name:"add_elasticsearch_index",anchor:"datasets.Dataset.add_elasticsearch_index",parameters:[{name:"column",val:": str"},{name:"index_name",val:": typing.Optional[str] = None"},{name:"host",val:": typing.Optional[str] = None"},{name:"port",val:": typing.Optional[int] = None"},{name:"es_client",val:": typing.Optional[ForwardRef('elasticsearch.Elasticsearch')] = None"},{name:"es_index_name",val:": typing.Optional[str] = None"},{name:"es_index_config",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.Dataset.add_elasticsearch_index.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
The column of the documents to add to the index.`,name:"column"},{anchor:"datasets.Dataset.add_elasticsearch_index.index_name",description:`<strong>index_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The <code>index_name</code>/identifier of the index.
This is the index name that is used to call <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.get_nearest_examples">get_nearest_examples()</a> or <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.search">Dataset.search()</a>.
By default it corresponds to <code>column</code>.`,name:"index_name"},{anchor:"datasets.Dataset.add_elasticsearch_index.host",description:`<strong>host</strong> (<code>str</code>, <em>optional</em>, defaults to <code>localhost</code>) &#x2014;
Host of where ElasticSearch is running.`,name:"host"},{anchor:"datasets.Dataset.add_elasticsearch_index.port",description:`<strong>port</strong> (<code>str</code>, <em>optional</em>, defaults to <code>9200</code>) &#x2014;
Port of where ElasticSearch is running.`,name:"port"},{anchor:"datasets.Dataset.add_elasticsearch_index.es_client",description:`<strong>es_client</strong> (<code>elasticsearch.Elasticsearch</code>, <em>optional</em>) &#x2014;
The elasticsearch client used to create the index if host and port are <code>None</code>.`,name:"es_client"},{anchor:"datasets.Dataset.add_elasticsearch_index.es_index_name",description:`<strong>es_index_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The elasticsearch index name used to create the index.`,name:"es_index_name"},{anchor:"datasets.Dataset.add_elasticsearch_index.es_index_config",description:`<strong>es_index_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The configuration of the elasticsearch index.
Default config is:`,name:"es_index_config"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L5594"}}),Fl=new T({props:{anchor:"datasets.Dataset.add_elasticsearch_index.example",$$slots:{default:[y_e]},$$scope:{ctx:k}}}),bm=new E({props:{name:"load_elasticsearch_index",anchor:"datasets.Dataset.load_elasticsearch_index",parameters:[{name:"index_name",val:": str"},{name:"es_index_name",val:": str"},{name:"host",val:": typing.Optional[str] = None"},{name:"port",val:": typing.Optional[int] = None"},{name:"es_client",val:": typing.Optional[ForwardRef('Elasticsearch')] = None"},{name:"es_index_config",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.Dataset.load_elasticsearch_index.index_name",description:`<strong>index_name</strong> (<code>str</code>) &#x2014;
The <code>index_name</code>/identifier of the index. This is the index name that is used to call <code>get_nearest</code> or <code>search</code>.`,name:"index_name"},{anchor:"datasets.Dataset.load_elasticsearch_index.es_index_name",description:`<strong>es_index_name</strong> (<code>str</code>) &#x2014;
The name of elasticsearch index to load.`,name:"es_index_name"},{anchor:"datasets.Dataset.load_elasticsearch_index.host",description:`<strong>host</strong> (<code>str</code>, <em>optional</em>, defaults to <code>localhost</code>) &#x2014;
Host of where ElasticSearch is running.`,name:"host"},{anchor:"datasets.Dataset.load_elasticsearch_index.port",description:`<strong>port</strong> (<code>str</code>, <em>optional</em>, defaults to <code>9200</code>) &#x2014;
Port of where ElasticSearch is running.`,name:"port"},{anchor:"datasets.Dataset.load_elasticsearch_index.es_client",description:`<strong>es_client</strong> (<code>elasticsearch.Elasticsearch</code>, <em>optional</em>) &#x2014;
The elasticsearch client used to create the index if host and port are <code>None</code>.`,name:"es_client"},{anchor:"datasets.Dataset.load_elasticsearch_index.es_index_config",description:`<strong>es_index_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The configuration of the elasticsearch index.
Default config is:`,name:"es_index_config"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L630"}}),$m=new E({props:{name:"list_indexes",anchor:"datasets.Dataset.list_indexes",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L431"}}),vm=new E({props:{name:"get_index",anchor:"datasets.Dataset.get_index",parameters:[{name:"index_name",val:": str"}],parametersDescription:[{anchor:"datasets.Dataset.get_index.index_name",description:"<strong>index_name</strong> (<code>str</code>) &#x2014; Index name.",name:"index_name"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L435",returnDescription:`
<p><code>BaseIndex</code></p>
`}}),jm=new E({props:{name:"drop_index",anchor:"datasets.Dataset.drop_index",parameters:[{name:"index_name",val:": str"}],parametersDescription:[{anchor:"datasets.Dataset.drop_index.index_name",description:`<strong>index_name</strong> (<code>str</code>) &#x2014;
The <code>index_name</code>/identifier of the index.`,name:"index_name"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L677"}}),wm=new E({props:{name:"search",anchor:"datasets.Dataset.search",parameters:[{name:"index_name",val:": str"},{name:"query",val:": typing.Union[str, <built-in function array>]"},{name:"k",val:": int = 10"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.search.index_name",description:`<strong>index_name</strong> (<code>str</code>) &#x2014;
The name/identifier of the index.`,name:"index_name"},{anchor:"datasets.Dataset.search.query",description:`<strong>query</strong> (<code>Union[str, np.ndarray]</code>) &#x2014;
The query as a string if <code>index_name</code> is a text index or as a numpy array if <code>index_name</code> is a vector index.`,name:"query"},{anchor:"datasets.Dataset.search.k",description:`<strong>k</strong> (<code>int</code>) &#x2014;
The number of examples to retrieve.`,name:"k"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L686",returnDescription:`
<p>The retrieval scores of the retrieved examples.</p>
<ul>
<li>indices (<code>List[List[int]]</code>): The indices of the retrieved examples.</li>
</ul>
`,returnType:`
<ul>
<li>scores (<code>List[List[float]</code>)</li>
</ul>
`}}),Dm=new E({props:{name:"search_batch",anchor:"datasets.Dataset.search_batch",parameters:[{name:"index_name",val:": str"},{name:"queries",val:": typing.Union[typing.List[str], <built-in function array>]"},{name:"k",val:": int = 10"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.search_batch.index_name",description:`<strong>index_name</strong> (<code>str</code>) &#x2014;
The <code>index_name</code>/identifier of the index.`,name:"index_name"},{anchor:"datasets.Dataset.search_batch.queries",description:`<strong>queries</strong> (<code>Union[List[str], np.ndarray]</code>) &#x2014;
The queries as a list of strings if <code>index_name</code> is a text index or as a numpy array if <code>index_name</code> is a vector index.`,name:"queries"},{anchor:"datasets.Dataset.search_batch.k",description:`<strong>k</strong> (<code>int</code>) &#x2014;
The number of examples to retrieve per query.`,name:"k"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L704",returnDescription:`
<p>The retrieval scores of the retrieved examples per query.</p>
<ul>
<li>total_indices (<code>List[List[int]]</code>): The indices of the retrieved examples per query.</li>
</ul>
`,returnType:`
<ul>
<li>total_scores (<code>List[List[float]</code>)</li>
</ul>
`}}),km=new E({props:{name:"get_nearest_examples",anchor:"datasets.Dataset.get_nearest_examples",parameters:[{name:"index_name",val:": str"},{name:"query",val:": typing.Union[str, <built-in function array>]"},{name:"k",val:": int = 10"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.get_nearest_examples.index_name",description:`<strong>index_name</strong> (<code>str</code>) &#x2014;
The index_name/identifier of the index.`,name:"index_name"},{anchor:"datasets.Dataset.get_nearest_examples.query",description:`<strong>query</strong> (<code>Union[str, np.ndarray]</code>) &#x2014;
The query as a string if <code>index_name</code> is a text index or as a numpy array if <code>index_name</code> is a vector index.`,name:"query"},{anchor:"datasets.Dataset.get_nearest_examples.k",description:`<strong>k</strong> (<code>int</code>) &#x2014;
The number of examples to retrieve.`,name:"k"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L724",returnDescription:`
<p>The retrieval scores of the retrieved examples.</p>
<ul>
<li>examples (<code>dict</code>): The retrieved examples.</li>
</ul>
`,returnType:`
<ul>
<li>scores (<code>List[float]</code>)</li>
</ul>
`}}),Em=new E({props:{name:"get_nearest_examples_batch",anchor:"datasets.Dataset.get_nearest_examples_batch",parameters:[{name:"index_name",val:": str"},{name:"queries",val:": typing.Union[typing.List[str], <built-in function array>]"},{name:"k",val:": int = 10"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.get_nearest_examples_batch.index_name",description:`<strong>index_name</strong> (<code>str</code>) &#x2014;
The <code>index_name</code>/identifier of the index.`,name:"index_name"},{anchor:"datasets.Dataset.get_nearest_examples_batch.queries",description:`<strong>queries</strong> (<code>Union[List[str], np.ndarray]</code>) &#x2014;
The queries as a list of strings if <code>index_name</code> is a text index or as a numpy array if <code>index_name</code> is a vector index.`,name:"queries"},{anchor:"datasets.Dataset.get_nearest_examples_batch.k",description:`<strong>k</strong> (<code>int</code>) &#x2014;
The number of examples to retrieve per query.`,name:"k"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/search.py#L746",returnDescription:`
<p>The retrieval scores of the retrieved examples per query.</p>
<ul>
<li>total_examples (<code>List[dict]</code>): The retrieved examples per query.</li>
</ul>
`,returnType:`
<ul>
<li>total_scores (<code>List[List[float]</code>)</li>
</ul>
`}}),qm=new E({props:{name:"info",anchor:"datasets.Dataset.info",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L146"}}),Im=new E({props:{name:"split",anchor:"datasets.Dataset.split",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L151"}}),Tm=new E({props:{name:"builder_name",anchor:"datasets.Dataset.builder_name",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L156"}}),Nm=new E({props:{name:"citation",anchor:"datasets.Dataset.citation",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L160"}}),Pm=new E({props:{name:"config_name",anchor:"datasets.Dataset.config_name",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L164"}}),Am=new E({props:{name:"dataset_size",anchor:"datasets.Dataset.dataset_size",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L168"}}),Lm=new E({props:{name:"description",anchor:"datasets.Dataset.description",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L172"}}),Fm=new E({props:{name:"download_checksums",anchor:"datasets.Dataset.download_checksums",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L176"}}),Cm=new E({props:{name:"download_size",anchor:"datasets.Dataset.download_size",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L180"}}),Om=new E({props:{name:"features",anchor:"datasets.Dataset.features",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L700"}}),zm=new E({props:{name:"homepage",anchor:"datasets.Dataset.homepage",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L188"}}),Sm=new E({props:{name:"license",anchor:"datasets.Dataset.license",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L192"}}),Vm=new E({props:{name:"size_in_bytes",anchor:"datasets.Dataset.size_in_bytes",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L196"}}),Um=new E({props:{name:"supervised_keys",anchor:"datasets.Dataset.supervised_keys",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L200"}}),Mm=new E({props:{name:"version",anchor:"datasets.Dataset.version",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L208"}}),Rm=new E({props:{name:"from_csv",anchor:"datasets.Dataset.from_csv",parameters:[{name:"path_or_paths",val:": typing.Union[str, bytes, os.PathLike, typing.List[typing.Union[str, bytes, os.PathLike]]]"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.from_csv.path_or_paths",description:`<strong>path_or_paths</strong> (<code>path-like</code> or list of <code>path-like</code>) &#x2014;
Path(s) of the CSV file(s).`,name:"path_or_paths"},{anchor:"datasets.Dataset.from_csv.split",description:`<strong>split</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.NamedSplit">NamedSplit</a>, <em>optional</em>) &#x2014;
Split name to be assigned to the dataset.`,name:"split"},{anchor:"datasets.Dataset.from_csv.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.Dataset.from_csv.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.Dataset.from_csv.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.from_csv.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of processes when downloading and generating the dataset locally.
This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_proc"},{anchor:"datasets.Dataset.from_csv.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>pandas.read_csv</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L924",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Gl=new T({props:{anchor:"datasets.Dataset.from_csv.example",$$slots:{default:[j_e]},$$scope:{ctx:k}}}),Bm=new E({props:{name:"from_json",anchor:"datasets.Dataset.from_json",parameters:[{name:"path_or_paths",val:": typing.Union[str, bytes, os.PathLike, typing.List[typing.Union[str, bytes, os.PathLike]]]"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"field",val:": typing.Optional[str] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.from_json.path_or_paths",description:`<strong>path_or_paths</strong> (<code>path-like</code> or list of <code>path-like</code>) &#x2014;
Path(s) of the JSON or JSON Lines file(s).`,name:"path_or_paths"},{anchor:"datasets.Dataset.from_json.split",description:`<strong>split</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.NamedSplit">NamedSplit</a>, <em>optional</em>) &#x2014;
Split name to be assigned to the dataset.`,name:"split"},{anchor:"datasets.Dataset.from_json.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.Dataset.from_json.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.Dataset.from_json.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.from_json.field",description:`<strong>field</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Field name of the JSON file where the dataset is contained in.`,name:"field"},{anchor:"datasets.Dataset.from_json.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em> defaults to <code>None</code>) &#x2014;
Number of processes when downloading and generating the dataset locally.
This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_proc"},{anchor:"datasets.Dataset.from_json.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>JsonConfig</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1045",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Kl=new T({props:{anchor:"datasets.Dataset.from_json.example",$$slots:{default:[w_e]},$$scope:{ctx:k}}}),Hm=new E({props:{name:"from_parquet",anchor:"datasets.Dataset.from_parquet",parameters:[{name:"path_or_paths",val:": typing.Union[str, bytes, os.PathLike, typing.List[typing.Union[str, bytes, os.PathLike]]]"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"columns",val:": typing.Optional[typing.List[str]] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.from_parquet.path_or_paths",description:`<strong>path_or_paths</strong> (<code>path-like</code> or list of <code>path-like</code>) &#x2014;
Path(s) of the Parquet file(s).`,name:"path_or_paths"},{anchor:"datasets.Dataset.from_parquet.split",description:`<strong>split</strong> (<code>NamedSplit</code>, <em>optional</em>) &#x2014;
Split name to be assigned to the dataset.`,name:"split"},{anchor:"datasets.Dataset.from_parquet.features",description:`<strong>features</strong> (<code>Features</code>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.Dataset.from_parquet.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.Dataset.from_parquet.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.from_parquet.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
If not <code>None</code>, only these columns will be read from the file.
A column name may be a prefix of a nested field, e.g. &#x2018;a&#x2019; will select
&#x2018;a.b&#x2019;, &#x2018;a.c&#x2019;, and &#x2018;a.d.e&#x2019;.`,name:"columns"},{anchor:"datasets.Dataset.from_parquet.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of processes when downloading and generating the dataset locally.
This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_proc"},{anchor:"datasets.Dataset.from_parquet.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>ParquetConfig</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1102",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Wl=new T({props:{anchor:"datasets.Dataset.from_parquet.example",$$slots:{default:[D_e]},$$scope:{ctx:k}}}),Gm=new E({props:{name:"from_text",anchor:"datasets.Dataset.from_text",parameters:[{name:"path_or_paths",val:": typing.Union[str, bytes, os.PathLike, typing.List[typing.Union[str, bytes, os.PathLike]]]"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.from_text.path_or_paths",description:`<strong>path_or_paths</strong> (<code>path-like</code> or list of <code>path-like</code>) &#x2014;
Path(s) of the text file(s).`,name:"path_or_paths"},{anchor:"datasets.Dataset.from_text.split",description:`<strong>split</strong> (<code>NamedSplit</code>, <em>optional</em>) &#x2014;
Split name to be assigned to the dataset.`,name:"split"},{anchor:"datasets.Dataset.from_text.features",description:`<strong>features</strong> (<code>Features</code>, o<em>ptional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.Dataset.from_text.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.Dataset.from_text.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.from_text.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of processes when downloading and generating the dataset locally.
This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_proc"},{anchor:"datasets.Dataset.from_text.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>TextConfig</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1161",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Yl=new T({props:{anchor:"datasets.Dataset.from_text.example",$$slots:{default:[k_e]},$$scope:{ctx:k}}}),Km=new E({props:{name:"from_sql",anchor:"datasets.Dataset.from_sql",parameters:[{name:"sql",val:": typing.Union[str, ForwardRef('sqlalchemy.sql.Selectable')]"},{name:"con",val:": typing.Union[str, ForwardRef('sqlalchemy.engine.Connection'), ForwardRef('sqlalchemy.engine.Engine'), ForwardRef('sqlite3.Connection')]"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Dataset.from_sql.sql",description:`<strong>sql</strong> (<code>str</code> or <code>sqlalchemy.sql.Selectable</code>) &#x2014;
SQL query to be executed or a table name.`,name:"sql"},{anchor:"datasets.Dataset.from_sql.con",description:`<strong>con</strong> (<code>str</code> or <code>sqlite3.Connection</code> or <code>sqlalchemy.engine.Connection</code> or <code>sqlalchemy.engine.Connection</code>) &#x2014;
A <a href="https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls" rel="nofollow">URI string</a> used to instantiate a database connection or a SQLite3/SQLAlchemy connection object.`,name:"con"},{anchor:"datasets.Dataset.from_sql.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.Dataset.from_sql.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.Dataset.from_sql.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.Dataset.from_sql.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>SqlConfig</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L1214",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Jl=new T({props:{anchor:"datasets.Dataset.from_sql.example",$$slots:{default:[E_e]},$$scope:{ctx:k}}}),Ql=new $ue({props:{$$slots:{default:[q_e]},$$scope:{ctx:k}}}),Wm=new E({props:{name:"prepare_for_task",anchor:"datasets.Dataset.prepare_for_task",parameters:[{name:"task",val:": typing.Union[str, datasets.tasks.base.TaskTemplate]"},{name:"id",val:": int = 0"}],parametersDescription:[{anchor:"datasets.Dataset.prepare_for_task.task",description:`<strong>task</strong> (<code>Union[str, TaskTemplate]</code>) &#x2014;
The task to prepare the dataset for during training and evaluation. If <code>str</code>, supported tasks include:</p>
<ul>
<li><code>&quot;text-classification&quot;</code></li>
<li><code>&quot;question-answering&quot;</code></li>
</ul>
<p>If <code>TaskTemplate</code>, must be one of the task templates in <a href="./task_templates"><code>datasets.tasks</code></a>.`,name:"task"},{anchor:"datasets.Dataset.prepare_for_task.id",description:`<strong>id</strong> (<code>int</code>, defaults to <code>0</code>) &#x2014;
The id required to unambiguously identify the task template when multiple task templates of the same type are supported.`,name:"id"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L2631"}}),Ym=new E({props:{name:"align_labels_with_mapping",anchor:"datasets.Dataset.align_labels_with_mapping",parameters:[{name:"label2id",val:": typing.Dict"},{name:"label_column",val:": str"}],parametersDescription:[{anchor:"datasets.Dataset.align_labels_with_mapping.label2id",description:`<strong>label2id</strong> (<code>dict</code>) &#x2014;
The label name to ID mapping to align the dataset with.`,name:"label2id"},{anchor:"datasets.Dataset.align_labels_with_mapping.label_column",description:`<strong>label_column</strong> (<code>str</code>) &#x2014;
The column name of labels to align on.`,name:"label_column"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L5716"}}),Zl=new T({props:{anchor:"datasets.Dataset.align_labels_with_mapping.example",$$slots:{default:[I_e]},$$scope:{ctx:k}}}),Qm=new E({props:{name:"datasets.concatenate_datasets",anchor:"datasets.concatenate_datasets",parameters:[{name:"dsets",val:": typing.List[~DatasetType]"},{name:"info",val:": typing.Optional[datasets.info.DatasetInfo] = None"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"axis",val:": int = 0"}],parametersDescription:[{anchor:"datasets.concatenate_datasets.dsets",description:`<strong>dsets</strong> (<code>List[datasets.Dataset]</code>) &#x2014;
List of Datasets to concatenate.`,name:"dsets"},{anchor:"datasets.concatenate_datasets.info",description:`<strong>info</strong> (<code>DatasetInfo</code>, <em>optional</em>) &#x2014;
Dataset information, like description, citation, etc.`,name:"info"},{anchor:"datasets.concatenate_datasets.split",description:`<strong>split</strong> (<code>NamedSplit</code>, <em>optional</em>) &#x2014;
Name of the dataset split.`,name:"split"},{anchor:"datasets.concatenate_datasets.axis",description:`<strong>axis</strong> (<code>{0, 1}</code>, defaults to <code>0</code>) &#x2014;
Axis to concatenate over, where <code>0</code> means over rows (vertically) and <code>1</code> means over columns
(horizontally).</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 1.6.0</p>
						
					</div>`,name:"axis"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/combine.py#L139"}}),Xl=new T({props:{anchor:"datasets.concatenate_datasets.example",$$slots:{default:[T_e]},$$scope:{ctx:k}}}),Zm=new E({props:{name:"datasets.interleave_datasets",anchor:"datasets.interleave_datasets",parameters:[{name:"datasets",val:": typing.List[~DatasetType]"},{name:"probabilities",val:": typing.Optional[typing.List[float]] = None"},{name:"seed",val:": typing.Optional[int] = None"},{name:"info",val:": typing.Optional[datasets.info.DatasetInfo] = None"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"stopping_strategy",val:": typing.Optional[str] = 'first_exhausted'"}],parametersDescription:[{anchor:"datasets.interleave_datasets.datasets",description:`<strong>datasets</strong> (<code>List[Dataset]</code> or <code>List[IterableDataset]</code>) &#x2014;
List of datasets to interleave.`,name:"datasets"},{anchor:"datasets.interleave_datasets.probabilities",description:`<strong>probabilities</strong> (<code>List[float]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If specified, the new dataset is constructed by sampling
examples from one source at a time according to these probabilities.`,name:"probabilities"},{anchor:"datasets.interleave_datasets.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The random seed used to choose a source for each example.`,name:"seed"},{anchor:"datasets.interleave_datasets.info",description:`<strong>info</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetInfo">DatasetInfo</a>, <em>optional</em>) &#x2014;
Dataset information, like description, citation, etc.<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.4.0</p>
						
					</div>`,name:"info"},{anchor:"datasets.interleave_datasets.split",description:`<strong>split</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.NamedSplit">NamedSplit</a>, <em>optional</em>) &#x2014;
Name of the dataset split.<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.4.0</p>
						
					</div>`,name:"split"},{anchor:"datasets.interleave_datasets.stopping_strategy",description:`<strong>stopping_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>first_exhausted</code>) &#x2014;
Two strategies are proposed right now, <code>first_exhausted</code> and <code>all_exhausted</code>.
By default, <code>first_exhausted</code> is an undersampling strategy, i.e the dataset construction is stopped as soon as one dataset has ran out of samples.
If the strategy is <code>all_exhausted</code>,  we use an oversampling strategy, i.e the dataset construction is stopped as soon as every samples of every dataset has been added at least once.
Note that if the strategy is <code>all_exhausted</code>, the interleaved dataset size can get enormous:<ul>
<li>with no probabilities, the resulting dataset will have <code>max_length_datasets*nb_dataset</code> samples.</li>
<li>with given probabilities, the resulting dataset will have more samples if some datasets have really low probability of visiting.</li>
</ul>`,name:"stopping_strategy"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/combine.py#L16",returnDescription:`
<p>Return type depends on the input <code>datasets</code>
parameter. <code>Dataset</code> if the input is a list of <code>Dataset</code>, <code>IterableDataset</code> if the input is a list of
<code>IterableDataset</code>.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a> or <a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset"
>IterableDataset</a></p>
`}}),ei=new T({props:{anchor:"datasets.interleave_datasets.example",$$slots:{default:[N_e]},$$scope:{ctx:k}}}),eh=new E({props:{name:"datasets.distributed.split_dataset_by_node",anchor:"datasets.distributed.split_dataset_by_node",parameters:[{name:"dataset",val:": DatasetType"},{name:"rank",val:": int"},{name:"world_size",val:": int"}],parametersDescription:[{anchor:"datasets.distributed.split_dataset_by_node.dataset",description:`<strong>dataset</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset">Dataset</a> or <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset">IterableDataset</a>) &#x2014;
The dataset to split by node.`,name:"dataset"},{anchor:"datasets.distributed.split_dataset_by_node.rank",description:`<strong>rank</strong> (<code>int</code>) &#x2014;
Rank of the current node.`,name:"rank"},{anchor:"datasets.distributed.split_dataset_by_node.world_size",description:`<strong>world_size</strong> (<code>int</code>) &#x2014;
Total number of nodes.`,name:"world_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/distributed.py#L10",returnDescription:`
<p>The dataset to be used on the node at rank <code>rank</code>.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a> or <a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset"
>IterableDataset</a></p>
`}}),th=new E({props:{name:"datasets.enable_caching",anchor:"datasets.enable_caching",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/fingerprint.py#L96"}}),sh=new E({props:{name:"datasets.disable_caching",anchor:"datasets.disable_caching",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/fingerprint.py#L117"}}),rh=new E({props:{name:"datasets.is_caching_enabled",anchor:"datasets.is_caching_enabled",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/fingerprint.py#L162"}}),lh=new Oa({}),ih=new E({props:{name:"class datasets.DatasetDict",anchor:"datasets.DatasetDict",parameters:"",source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L39"}}),dh=new E({props:{name:"data",anchor:"datasets.DatasetDict.data",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L69"}}),si=new T({props:{anchor:"datasets.DatasetDict.data.example",$$slots:{default:[P_e]},$$scope:{ctx:k}}}),ch=new E({props:{name:"cache_files",anchor:"datasets.DatasetDict.cache_files",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L84"}}),ni=new T({props:{anchor:"datasets.DatasetDict.cache_files.example",$$slots:{default:[A_e]},$$scope:{ctx:k}}}),ph=new E({props:{name:"num_columns",anchor:"datasets.DatasetDict.num_columns",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L102"}}),ri=new T({props:{anchor:"datasets.DatasetDict.num_columns.example",$$slots:{default:[L_e]},$$scope:{ctx:k}}}),mh=new E({props:{name:"num_rows",anchor:"datasets.DatasetDict.num_rows",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L118"}}),li=new T({props:{anchor:"datasets.DatasetDict.num_rows.example",$$slots:{default:[F_e]},$$scope:{ctx:k}}}),fh=new E({props:{name:"column_names",anchor:"datasets.DatasetDict.column_names",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L134"}}),ii=new T({props:{anchor:"datasets.DatasetDict.column_names.example",$$slots:{default:[C_e]},$$scope:{ctx:k}}}),gh=new E({props:{name:"shape",anchor:"datasets.DatasetDict.shape",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L152"}}),di=new T({props:{anchor:"datasets.DatasetDict.shape.example",$$slots:{default:[O_e]},$$scope:{ctx:k}}}),uh=new E({props:{name:"unique",anchor:"datasets.DatasetDict.unique",parameters:[{name:"column",val:": str"}],parametersDescription:[{anchor:"datasets.DatasetDict.unique.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
column name (list all the column names with <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.column_names">column_names</a>)`,name:"column"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L200",returnDescription:`
<p>Dictionary of unique elements in the given column.</p>
`,returnType:`
<p>Dict[<code>str</code>, <code>list</code>]</p>
`}}),ci=new T({props:{anchor:"datasets.DatasetDict.unique.example",$$slots:{default:[z_e]},$$scope:{ctx:k}}}),_h=new E({props:{name:"cleanup_cache_files",anchor:"datasets.DatasetDict.cleanup_cache_files",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L224",returnDescription:`
<p><code>Dict</code> with the number of removed files for each split</p>
`}}),pi=new T({props:{anchor:"datasets.DatasetDict.cleanup_cache_files.example",$$slots:{default:[S_e]},$$scope:{ctx:k}}}),bh=new E({props:{name:"map",anchor:"datasets.DatasetDict.map",parameters:[{name:"function",val:": typing.Optional[typing.Callable] = None"},{name:"with_indices",val:": bool = False"},{name:"with_rank",val:": bool = False"},{name:"input_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"batched",val:": bool = False"},{name:"batch_size",val:": typing.Optional[int] = 1000"},{name:"drop_last_batch",val:": bool = False"},{name:"remove_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"cache_file_names",val:": typing.Union[typing.Dict[str, typing.Optional[str]], NoneType] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"disable_nullable",val:": bool = False"},{name:"fn_kwargs",val:": typing.Optional[dict] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"desc",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.DatasetDict.map.function",description:`<strong>function</strong> (<code>callable</code>) &#x2014; with one of the following signature:</p>
<ul>
<li><code>function(example: Dict[str, Any]) -&gt; Dict[str, Any]</code> if <code>batched=False</code> and <code>with_indices=False</code></li>
<li><code>function(example: Dict[str, Any], indices: int) -&gt; Dict[str, Any]</code> if <code>batched=False</code> and <code>with_indices=True</code></li>
<li><code>function(batch: Dict[str, List]) -&gt; Dict[str, List]</code> if <code>batched=True</code> and <code>with_indices=False</code></li>
<li><code>function(batch: Dict[str, List], indices: List[int]) -&gt; Dict[str, List]</code> if <code>batched=True</code> and <code>with_indices=True</code></li>
</ul>
<p>For advanced usage, the function can also return a <code>pyarrow.Table</code>.
Moreover if your function returns nothing (<code>None</code>), then <code>map</code> will run your function and return the dataset unchanged.`,name:"function"},{anchor:"datasets.DatasetDict.map.with_indices",description:`<strong>with_indices</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide example indices to <code>function</code>. Note that in this case the signature of <code>function</code> should be <code>def function(example, idx): ...</code>.`,name:"with_indices"},{anchor:"datasets.DatasetDict.map.with_rank",description:`<strong>with_rank</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide process rank to <code>function</code>. Note that in this case the
signature of <code>function</code> should be <code>def function(example[, idx], rank): ...</code>.`,name:"with_rank"},{anchor:"datasets.DatasetDict.map.input_columns",description:`<strong>input_columns</strong> (<code>[Union[str, List[str]]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The columns to be passed into <code>function</code> as
positional arguments. If <code>None</code>, a dict mapping to all formatted columns is passed as one argument.`,name:"input_columns"},{anchor:"datasets.DatasetDict.map.batched",description:`<strong>batched</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide batch of examples to <code>function</code>.`,name:"batched"},{anchor:"datasets.DatasetDict.map.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1000</code>) &#x2014;
Number of examples per batch provided to <code>function</code> if <code>batched=True</code>,
<code>batch_size &lt;= 0</code> or <code>batch_size == None</code> then provide the full dataset as a single batch to <code>function</code>.`,name:"batch_size"},{anchor:"datasets.DatasetDict.map.drop_last_batch",description:`<strong>drop_last_batch</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether a last batch smaller than the batch_size should be
dropped instead of being processed by the function.`,name:"drop_last_batch"},{anchor:"datasets.DatasetDict.map.remove_columns",description:`<strong>remove_columns</strong> (<code>[Union[str, List[str]]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Remove a selection of columns while doing the mapping.
Columns will be removed before updating the examples with the output of <code>function</code>, i.e. if <code>function</code> is adding
columns with names in <code>remove_columns</code>, these columns will be kept.`,name:"remove_columns"},{anchor:"datasets.DatasetDict.map.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the dataset in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.map.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optional[bool]</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the current computation from <code>function</code>
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.DatasetDict.map.cache_file_names",description:`<strong>cache_file_names</strong> (<code>[Dict[str, str]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
results of the computation instead of the automatically generated cache file name.
You have to provide one <code>cache_file_name</code> per dataset in the dataset dictionary.`,name:"cache_file_names"},{anchor:"datasets.DatasetDict.map.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, default <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"},{anchor:"datasets.DatasetDict.map.features",description:`<strong>features</strong> (<code>[datasets.Features]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Use a specific <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a> to store the cache file
instead of the automatically generated one.`,name:"features"},{anchor:"datasets.DatasetDict.map.disable_nullable",description:`<strong>disable_nullable</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Disallow null values in the table.`,name:"disable_nullable"},{anchor:"datasets.DatasetDict.map.fn_kwargs",description:`<strong>fn_kwargs</strong> (<code>Dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Keyword arguments to be passed to <code>function</code>`,name:"fn_kwargs"},{anchor:"datasets.DatasetDict.map.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of processes for multiprocessing. By default it doesn&#x2019;t
use multiprocessing.`,name:"num_proc"},{anchor:"datasets.DatasetDict.map.desc",description:`<strong>desc</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Meaningful description to be displayed alongside with the progress bar while mapping examples.`,name:"desc"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L747"}}),mi=new T({props:{anchor:"datasets.DatasetDict.map.example",$$slots:{default:[V_e]},$$scope:{ctx:k}}}),$h=new E({props:{name:"filter",anchor:"datasets.DatasetDict.filter",parameters:[{name:"function",val:""},{name:"with_indices",val:" = False"},{name:"input_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"batched",val:": bool = False"},{name:"batch_size",val:": typing.Optional[int] = 1000"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"cache_file_names",val:": typing.Union[typing.Dict[str, typing.Optional[str]], NoneType] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"},{name:"fn_kwargs",val:": typing.Optional[dict] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"desc",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.DatasetDict.filter.function",description:`<strong>function</strong> (<code>callable</code>) &#x2014;
With one of the following signature:<ul>
<li><code>function(example: Dict[str, Any]) -&gt; bool</code> if <code>with_indices=False, batched=False</code></li>
<li><code>function(example: Dict[str, Any], indices: int) -&gt; bool</code> if <code>with_indices=True, batched=False</code></li>
<li><code>function(example: Dict[str, List]) -&gt; List[bool]</code> if <code>with_indices=False, batched=True</code></li>
<li><code>function(example: Dict[str, List], indices: List[int]) -&gt; List[bool]</code> if \`<code>with_indices=True, batched=True</code></li>
</ul>`,name:"function"},{anchor:"datasets.DatasetDict.filter.with_indices",description:`<strong>with_indices</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide example indices to <code>function</code>. Note that in this case the signature of <code>function</code> should be <code>def function(example, idx): ...</code>.`,name:"with_indices"},{anchor:"datasets.DatasetDict.filter.input_columns",description:`<strong>input_columns</strong> (<code>[Union[str, List[str]]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The columns to be passed into <code>function</code> as
positional arguments. If <code>None</code>, a dict mapping to all formatted columns is passed as one argument.`,name:"input_columns"},{anchor:"datasets.DatasetDict.filter.batched",description:`<strong>batched</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide batch of examples to <code>function</code>.`,name:"batched"},{anchor:"datasets.DatasetDict.filter.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1000</code>) &#x2014;
Number of examples per batch provided to <code>function</code> if <code>batched=True</code>
<code>batch_size &lt;= 0</code> or <code>batch_size == None</code> then provide the full dataset as a single batch to <code>function</code>.`,name:"batch_size"},{anchor:"datasets.DatasetDict.filter.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the dataset in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.filter.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optional[bool]</code>, defaults to <code>True</code> if chaching is enabled) &#x2014;
If a cache file storing the current computation from <code>function</code>
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.DatasetDict.filter.cache_file_names",description:`<strong>cache_file_names</strong> (<code>[Dict[str, str]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
results of the computation instead of the automatically generated cache file name.
You have to provide one <code>cache_file_name</code> per dataset in the dataset dictionary.`,name:"cache_file_names"},{anchor:"datasets.DatasetDict.filter.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"},{anchor:"datasets.DatasetDict.filter.fn_kwargs",description:`<strong>fn_kwargs</strong> (<code>Dict</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Keyword arguments to be passed to <code>function</code>`,name:"fn_kwargs"},{anchor:"datasets.DatasetDict.filter.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of processes for multiprocessing. By default it doesn&#x2019;t
use multiprocessing.`,name:"num_proc"},{anchor:"datasets.DatasetDict.filter.desc",description:`<strong>desc</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Meaningful description to be displayed alongside with the progress bar while filtering examples.`,name:"desc"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L875"}}),hi=new T({props:{anchor:"datasets.DatasetDict.filter.example",$$slots:{default:[U_e]},$$scope:{ctx:k}}}),xh=new E({props:{name:"sort",anchor:"datasets.DatasetDict.sort",parameters:[{name:"column_names",val:": typing.Union[str, typing.Sequence[str]]"},{name:"reverse",val:": typing.Union[bool, typing.Sequence[bool]] = False"},{name:"kind",val:" = 'deprecated'"},{name:"null_placement",val:": str = 'at_end'"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"indices_cache_file_names",val:": typing.Union[typing.Dict[str, typing.Optional[str]], NoneType] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"}],parametersDescription:[{anchor:"datasets.DatasetDict.sort.column_names",description:`<strong>column_names</strong> (<code>Union[str, Sequence[str]]</code>) &#x2014;
Column name(s) to sort by.`,name:"column_names"},{anchor:"datasets.DatasetDict.sort.reverse",description:`<strong>reverse</strong> (<code>Union[bool, Sequence[bool]]</code>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, sort by descending order rather than ascending. If a single bool is provided,
the value is applied to the sorting of all column names. Otherwise a list of bools with the
same length and order as column_names must be provided.`,name:"reverse"},{anchor:"datasets.DatasetDict.sort.kind",description:`<strong>kind</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Pandas algorithm for sorting selected in <code>{quicksort, mergesort, heapsort, stable}</code>,
The default is <code>quicksort</code>. Note that both <code>stable</code> and <code>mergesort</code> use timsort under the covers and, in general,
the actual implementation will vary with data type. The <code>mergesort</code> option is retained for backwards compatibility.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.8.0</p>
						
<p><code>kind</code> was deprecated in version 2.10.0 and will be removed in 3.0.0.</p>

					</div>`,name:"kind"},{anchor:"datasets.DatasetDict.sort.null_placement",description:`<strong>null_placement</strong> (<code>str</code>, defaults to <code>at_end</code>) &#x2014;
Put <code>None</code> values at the beginning if <code>at_start</code> or <code>first</code> or at the end if <code>at_end</code> or <code>last</code>`,name:"null_placement"},{anchor:"datasets.DatasetDict.sort.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the sorted indices in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.sort.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optional[bool]</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the sorted indices
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.DatasetDict.sort.indices_cache_file_names",description:`<strong>indices_cache_file_names</strong> (<code>[Dict[str, str]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
indices mapping instead of the automatically generated cache file name.
You have to provide one <code>cache_file_name</code> per dataset in the dataset dictionary.`,name:"indices_cache_file_names"},{anchor:"datasets.DatasetDict.sort.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
Higher value gives smaller cache files, lower value consume less temporary memory.`,name:"writer_batch_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L977"}}),fi=new T({props:{anchor:"datasets.DatasetDict.sort.example",$$slots:{default:[M_e]},$$scope:{ctx:k}}}),vh=new E({props:{name:"shuffle",anchor:"datasets.DatasetDict.shuffle",parameters:[{name:"seeds",val:": typing.Union[int, typing.Dict[str, typing.Optional[int]], NoneType] = None"},{name:"seed",val:": typing.Optional[int] = None"},{name:"generators",val:": typing.Union[typing.Dict[str, numpy.random._generator.Generator], NoneType] = None"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": typing.Optional[bool] = None"},{name:"indices_cache_file_names",val:": typing.Union[typing.Dict[str, typing.Optional[str]], NoneType] = None"},{name:"writer_batch_size",val:": typing.Optional[int] = 1000"}],parametersDescription:[{anchor:"datasets.DatasetDict.shuffle.seeds",description:`<strong>seeds</strong> (<code>Dict[str, int]</code> or <code>int</code>, <em>optional</em>) &#x2014;
A seed to initialize the default BitGenerator if <code>generator=None</code>.
If <code>None</code>, then fresh, unpredictable entropy will be pulled from the OS.
If an <code>int</code> or <code>array_like[ints]</code> is passed, then it will be passed to SeedSequence to derive the initial BitGenerator state.
You can provide one <code>seed</code> per dataset in the dataset dictionary.`,name:"seeds"},{anchor:"datasets.DatasetDict.shuffle.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>) &#x2014;
A seed to initialize the default BitGenerator if <code>generator=None</code>. Alias for seeds (a <code>ValueError</code> is raised if both are provided).`,name:"seed"},{anchor:"datasets.DatasetDict.shuffle.generators",description:`<strong>generators</strong> (<code>Dict[str, *optional*, np.random.Generator]</code>) &#x2014;
Numpy random Generator to use to compute the permutation of the dataset rows.
If <code>generator=None</code> (default), uses <code>np.random.default_rng</code> (the default BitGenerator (PCG64) of NumPy).
You have to provide one <code>generator</code> per dataset in the dataset dictionary.`,name:"generators"},{anchor:"datasets.DatasetDict.shuffle.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep the dataset in memory instead of writing it to a cache file.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.shuffle.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>Optional[bool]</code>, defaults to <code>True</code> if caching is enabled) &#x2014;
If a cache file storing the current computation from <code>function</code>
can be identified, use it instead of recomputing.`,name:"load_from_cache_file"},{anchor:"datasets.DatasetDict.shuffle.indices_cache_file_names",description:`<strong>indices_cache_file_names</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
Provide the name of a path for the cache file. It is used to store the
indices mappings instead of the automatically generated cache file name.
You have to provide one <code>cache_file_name</code> per dataset in the dataset dictionary.`,name:"indices_cache_file_names"},{anchor:"datasets.DatasetDict.shuffle.writer_batch_size",description:`<strong>writer_batch_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Number of rows per write operation for the cache file writer.
This value is a good trade-off between memory usage during the processing, and processing speed.
Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running <code>map</code>.`,name:"writer_batch_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1055"}}),gi=new T({props:{anchor:"datasets.DatasetDict.shuffle.example",$$slots:{default:[R_e]},$$scope:{ctx:k}}}),yh=new E({props:{name:"set_format",anchor:"datasets.DatasetDict.set_format",parameters:[{name:"type",val:": typing.Optional[str] = None"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"},{name:"**format_kwargs",val:""}],parametersDescription:[{anchor:"datasets.DatasetDict.set_format.type",description:`<strong>type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Output type selected in <code>[None, &apos;numpy&apos;, &apos;torch&apos;, &apos;tensorflow&apos;, &apos;pandas&apos;, &apos;arrow&apos;, &apos;jax&apos;]</code>.
<code>None</code> means <code>__getitem__</code> returns python objects (default).`,name:"type"},{anchor:"datasets.DatasetDict.set_format.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Columns to format in the output.
<code>None</code> means <code>__getitem__</code> returns all columns (default).`,name:"columns"},{anchor:"datasets.DatasetDict.set_format.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to False) &#x2014;
Keep un-formatted columns as well in the output (as python objects),`,name:"output_all_columns"},{anchor:"datasets.DatasetDict.set_format.*format_kwargs",description:`*<strong>*format_kwargs</strong> (additional keyword arguments) &#x2014;
Keywords arguments passed to the convert function like <code>np.array</code>, <code>torch.tensor</code> or <code>tensorflow.ragged.constant</code>.`,name:"*format_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L539"}}),ui=new T({props:{anchor:"datasets.DatasetDict.set_format.example",$$slots:{default:[B_e]},$$scope:{ctx:k}}}),wh=new E({props:{name:"reset_format",anchor:"datasets.DatasetDict.reset_format",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L585"}}),_i=new T({props:{anchor:"datasets.DatasetDict.reset_format.example",$$slots:{default:[H_e]},$$scope:{ctx:k}}}),kh=new E({props:{name:"formatted_as",anchor:"datasets.DatasetDict.formatted_as",parameters:[{name:"type",val:": typing.Optional[str] = None"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"},{name:"**format_kwargs",val:""}],parametersDescription:[{anchor:"datasets.DatasetDict.formatted_as.type",description:`<strong>type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Output type selected in <code>[None, &apos;numpy&apos;, &apos;torch&apos;, &apos;tensorflow&apos;, &apos;pandas&apos;, &apos;arrow&apos;, &apos;jax&apos;]</code>.
<code>None</code> means <code>__getitem__</code> returns python objects (default).`,name:"type"},{anchor:"datasets.DatasetDict.formatted_as.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Columns to format in the output.
<code>None</code> means <code>__getitem__</code> returns all columns (default).`,name:"columns"},{anchor:"datasets.DatasetDict.formatted_as.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to False) &#x2014;
Keep un-formatted columns as well in the output (as python objects).`,name:"output_all_columns"},{anchor:"datasets.DatasetDict.formatted_as.*format_kwargs",description:`*<strong>*format_kwargs</strong> (additional keyword arguments) &#x2014;
Keywords arguments passed to the convert function like <code>np.array</code>, <code>torch.tensor</code> or <code>tensorflow.ragged.constant</code>.`,name:"*format_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L502"}}),Eh=new E({props:{name:"with_format",anchor:"datasets.DatasetDict.with_format",parameters:[{name:"type",val:": typing.Optional[str] = None"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"},{name:"**format_kwargs",val:""}],parametersDescription:[{anchor:"datasets.DatasetDict.with_format.type",description:`<strong>type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Output type selected in <code>[None, &apos;numpy&apos;, &apos;torch&apos;, &apos;tensorflow&apos;, &apos;pandas&apos;, &apos;arrow&apos;, &apos;jax&apos;]</code>.
<code>None</code> means <code>__getitem__</code> returns python objects (default).`,name:"type"},{anchor:"datasets.DatasetDict.with_format.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Columns to format in the output.
<code>None</code> means <code>__getitem__</code> returns all columns (default).`,name:"columns"},{anchor:"datasets.DatasetDict.with_format.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Keep un-formatted columns as well in the output (as python objects).`,name:"output_all_columns"},{anchor:"datasets.DatasetDict.with_format.*format_kwargs",description:`*<strong>*format_kwargs</strong> (additional keyword arguments) &#x2014;
Keywords arguments passed to the convert function like <code>np.array</code>, <code>torch.tensor</code> or <code>tensorflow.ragged.constant</code>.`,name:"*format_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L641"}}),$i=new T({props:{anchor:"datasets.DatasetDict.with_format.example",$$slots:{default:[G_e]},$$scope:{ctx:k}}}),Ih=new E({props:{name:"with_transform",anchor:"datasets.DatasetDict.with_transform",parameters:[{name:"transform",val:": typing.Optional[typing.Callable]"},{name:"columns",val:": typing.Optional[typing.List] = None"},{name:"output_all_columns",val:": bool = False"}],parametersDescription:[{anchor:"datasets.DatasetDict.with_transform.transform",description:`<strong>transform</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
User-defined formatting transform, replaces the format defined by <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_format">set_format()</a>.
A formatting function is a callable that takes a batch (as a dict) as input and returns a batch.
This function is applied right before returning the objects in <code>__getitem__</code>.`,name:"transform"},{anchor:"datasets.DatasetDict.with_transform.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Columns to format in the output.
If specified, then the input batch of the transform only contains those columns.`,name:"columns"},{anchor:"datasets.DatasetDict.with_transform.output_all_columns",description:`<strong>output_all_columns</strong> (<code>bool</code>, defaults to False) &#x2014;
Keep un-formatted columns as well in the output (as python objects).
If set to <code>True</code>, then the other un-formatted columns are kept with the output of the transform.`,name:"output_all_columns"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L693"}}),xi=new T({props:{anchor:"datasets.DatasetDict.with_transform.example",$$slots:{default:[K_e]},$$scope:{ctx:k}}}),Th=new E({props:{name:"flatten",anchor:"datasets.DatasetDict.flatten",parameters:[{name:"max_depth",val:" = 16"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L168"}}),vi=new T({props:{anchor:"datasets.DatasetDict.flatten.example",$$slots:{default:[W_e]},$$scope:{ctx:k}}}),Nh=new E({props:{name:"cast",anchor:"datasets.DatasetDict.cast",parameters:[{name:"features",val:": Features"}],parametersDescription:[{anchor:"datasets.DatasetDict.cast.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>) &#x2014;
New features to cast the dataset to.
The name and order of the fields in the features must match the current column names.
The type of the data must also be convertible from one type to the other.
For non-trivial conversion, e.g. <code>string</code> &lt;-&gt; <code>ClassLabel</code> you should use <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map">map()</a> to update the Dataset.`,name:"features"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L248"}}),yi=new T({props:{anchor:"datasets.DatasetDict.cast.example",$$slots:{default:[Y_e]},$$scope:{ctx:k}}}),Ph=new E({props:{name:"cast_column",anchor:"datasets.DatasetDict.cast_column",parameters:[{name:"column",val:": str"},{name:"feature",val:""}],parametersDescription:[{anchor:"datasets.DatasetDict.cast_column.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
Column name.`,name:"column"},{anchor:"datasets.DatasetDict.cast_column.feature",description:`<strong>feature</strong> (<code>Feature</code>) &#x2014;
Target feature.`,name:"feature"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L283",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),ji=new T({props:{anchor:"datasets.DatasetDict.cast_column.example",$$slots:{default:[J_e]},$$scope:{ctx:k}}}),Ah=new E({props:{name:"remove_columns",anchor:"datasets.DatasetDict.remove_columns",parameters:[{name:"column_names",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"datasets.DatasetDict.remove_columns.column_names",description:`<strong>column_names</strong> (<code>Union[str, List[str]]</code>) &#x2014;
Name of the column(s) to remove.`,name:"column_names"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L312"}}),wi=new T({props:{anchor:"datasets.DatasetDict.remove_columns.example",$$slots:{default:[Q_e]},$$scope:{ctx:k}}}),Lh=new E({props:{name:"rename_column",anchor:"datasets.DatasetDict.rename_column",parameters:[{name:"original_column_name",val:": str"},{name:"new_column_name",val:": str"}],parametersDescription:[{anchor:"datasets.DatasetDict.rename_column.original_column_name",description:`<strong>original_column_name</strong> (<code>str</code>) &#x2014;
Name of the column to rename.`,name:"original_column_name"},{anchor:"datasets.DatasetDict.rename_column.new_column_name",description:`<strong>new_column_name</strong> (<code>str</code>) &#x2014;
New name for the column.`,name:"new_column_name"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L351"}}),Di=new T({props:{anchor:"datasets.DatasetDict.rename_column.example",$$slots:{default:[Z_e]},$$scope:{ctx:k}}}),Ch=new E({props:{name:"rename_columns",anchor:"datasets.DatasetDict.rename_columns",parameters:[{name:"column_mapping",val:": typing.Dict[str, str]"}],parametersDescription:[{anchor:"datasets.DatasetDict.rename_columns.column_mapping",description:`<strong>column_mapping</strong> (<code>Dict[str, str]</code>) &#x2014;
A mapping of columns to rename to their new names.`,name:"column_mapping"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L396",returnDescription:`
<p>A copy of the dataset with renamed columns.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),ki=new T({props:{anchor:"datasets.DatasetDict.rename_columns.example",$$slots:{default:[X_e]},$$scope:{ctx:k}}}),Oh=new E({props:{name:"select_columns",anchor:"datasets.DatasetDict.select_columns",parameters:[{name:"column_names",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"datasets.DatasetDict.select_columns.column_names",description:`<strong>column_names</strong> (<code>Union[str, List[str]]</code>) &#x2014;
Name of the column(s) to keep.`,name:"column_names"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L434"}}),Ei=new T({props:{anchor:"datasets.DatasetDict.select_columns.example",$$slots:{default:[ebe]},$$scope:{ctx:k}}}),zh=new E({props:{name:"class_encode_column",anchor:"datasets.DatasetDict.class_encode_column",parameters:[{name:"column",val:": str"},{name:"include_nulls",val:": bool = False"}],parametersDescription:[{anchor:"datasets.DatasetDict.class_encode_column.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
The name of the column to cast.`,name:"column"},{anchor:"datasets.DatasetDict.class_encode_column.include_nulls",description:`<strong>include_nulls</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to include null values in the class labels. If <code>True</code>, the null values will be encoded as the <code>&quot;None&quot;</code> class label.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 1.14.2</p>
						
					</div>`,name:"include_nulls"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L470"}}),qi=new T({props:{anchor:"datasets.DatasetDict.class_encode_column.example",$$slots:{default:[tbe]},$$scope:{ctx:k}}}),Vh=new E({props:{name:"push_to_hub",anchor:"datasets.DatasetDict.push_to_hub",parameters:[{name:"repo_id",val:""},{name:"private",val:": typing.Optional[bool] = False"},{name:"token",val:": typing.Optional[str] = None"},{name:"branch",val:": NoneType = None"},{name:"max_shard_size",val:": typing.Union[str, int, NoneType] = None"},{name:"num_shards",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"embed_external_files",val:": bool = True"}],parametersDescription:[{anchor:"datasets.DatasetDict.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The ID of the repository to push to in the following format: <code>&lt;user&gt;/&lt;dataset_name&gt;</code> or
<code>&lt;org&gt;/&lt;dataset_name&gt;</code>. Also accepts <code>&lt;dataset_name&gt;</code>, which will default to the namespace
of the logged-in user.`,name:"repo_id"},{anchor:"datasets.DatasetDict.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether the dataset repository should be set to private or not. Only affects repository creation:
a repository that already exists will not be affected by that parameter.`,name:"private"},{anchor:"datasets.DatasetDict.push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
An optional authentication token for the Hugging Face Hub. If no token is passed, will default
to the token saved locally when logging in with <code>huggingface-cli login</code>. Will raise an error
if no token is passed and the user is not logged-in.`,name:"token"},{anchor:"datasets.DatasetDict.push_to_hub.branch",description:`<strong>branch</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The git branch on which to push the dataset.`,name:"branch"},{anchor:"datasets.DatasetDict.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;500MB&quot;</code>) &#x2014;
The maximum size of the dataset shards to be uploaded to the hub. If expressed as a string, needs to be digits followed by a unit
(like <code>&quot;500MB&quot;</code> or <code>&quot;1GB&quot;</code>).`,name:"max_shard_size"},{anchor:"datasets.DatasetDict.push_to_hub.num_shards",description:`<strong>num_shards</strong> (<code>Dict[str, int]</code>, <em>optional</em>) &#x2014;
Number of shards to write. By default the number of shards depends on <code>max_shard_size</code>.
Use a dictionary to define a different num_shards for each split.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_shards"},{anchor:"datasets.DatasetDict.push_to_hub.embed_external_files",description:`<strong>embed_external_files</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to embed file bytes in the shards.
In particular, this will do the following before the push for the fields of type:</p>
<ul>
<li><a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio">Audio</a> and <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Image">Image</a> removes local path information and embed file content in the Parquet files.</li>
</ul>`,name:"embed_external_files"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1503"}}),Ii=new T({props:{anchor:"datasets.DatasetDict.push_to_hub.example",$$slots:{default:[abe]},$$scope:{ctx:k}}}),Uh=new E({props:{name:"save_to_disk",anchor:"datasets.DatasetDict.save_to_disk",parameters:[{name:"dataset_dict_path",val:": typing.Union[str, bytes, os.PathLike]"},{name:"fs",val:" = 'deprecated'"},{name:"max_shard_size",val:": typing.Union[str, int, NoneType] = None"},{name:"num_shards",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"num_proc",val:": typing.Optional[int] = None"},{name:"storage_options",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.DatasetDict.save_to_disk.dataset_dict_path",description:`<strong>dataset_dict_path</strong> (<code>str</code>) &#x2014;
Path (e.g. <code>dataset/train</code>) or remote URI
(e.g. <code>s3://my-bucket/dataset/train</code>) of the dataset dict directory where the dataset dict will be
saved to.`,name:"dataset_dict_path"},{anchor:"datasets.DatasetDict.save_to_disk.fs",description:`<strong>fs</strong> (<code>fsspec.spec.AbstractFileSystem</code>, <em>optional</em>) &#x2014;
Instance of the remote filesystem where the dataset will be saved to.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.8.0</p>
						
<p><code>fs</code> was deprecated in version 2.8.0 and will be removed in 3.0.0.
Please use <code>storage_options</code> instead, e.g. <code>storage_options=fs.storage_options</code></p>

					</div>`,name:"fs"},{anchor:"datasets.DatasetDict.save_to_disk.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;500MB&quot;</code>) &#x2014;
The maximum size of the dataset shards to be uploaded to the hub. If expressed as a string, needs to be digits followed by a unit
(like <code>&quot;50MB&quot;</code>).`,name:"max_shard_size"},{anchor:"datasets.DatasetDict.save_to_disk.num_shards",description:`<strong>num_shards</strong> (<code>Dict[str, int]</code>, <em>optional</em>) &#x2014;
Number of shards to write. By default the number of shards depends on <code>max_shard_size</code> and <code>num_proc</code>.
You need to provide the number of shards for each dataset in the dataset dictionary.
Use a dictionary to define a different num_shards for each split.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_shards"},{anchor:"datasets.DatasetDict.save_to_disk.num_proc",description:`<strong>num_proc</strong> (<code>int</code>, <em>optional</em>, default <code>None</code>) &#x2014;
Number of processes when downloading and generating the dataset locally.
Multiprocessing is disabled by default.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"num_proc"},{anchor:"datasets.DatasetDict.save_to_disk.storage_options",description:`<strong>storage_options</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Key/value pairs to be passed on to the file-system backend, if any.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"storage_options"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1138"}}),Ti=new T({props:{anchor:"datasets.DatasetDict.save_to_disk.example",$$slots:{default:[sbe]},$$scope:{ctx:k}}}),Mh=new E({props:{name:"load_from_disk",anchor:"datasets.DatasetDict.load_from_disk",parameters:[{name:"dataset_dict_path",val:": typing.Union[str, bytes, os.PathLike]"},{name:"fs",val:" = 'deprecated'"},{name:"keep_in_memory",val:": typing.Optional[bool] = None"},{name:"storage_options",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.DatasetDict.load_from_disk.dataset_dict_path",description:`<strong>dataset_dict_path</strong> (<code>str</code>) &#x2014;
Path (e.g. <code>&quot;dataset/train&quot;</code>) or remote URI (e.g. <code>&quot;s3//my-bucket/dataset/train&quot;</code>)
of the dataset dict directory where the dataset dict will be loaded from.`,name:"dataset_dict_path"},{anchor:"datasets.DatasetDict.load_from_disk.fs",description:`<strong>fs</strong> (<code>fsspec.spec.AbstractFileSystem</code>, <em>optional</em>) &#x2014;
Instance of the remote filesystem where the dataset will be saved to.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						<p class="font-medium">Deprecated in 2.8.0</p>
						
<p><code>fs</code> was deprecated in version 2.8.0 and will be removed in 3.0.0.
Please use <code>storage_options</code> instead, e.g. <code>storage_options=fs.storage_options</code></p>

					</div>`,name:"fs"},{anchor:"datasets.DatasetDict.load_from_disk.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>None</code>) &#x2014;
Whether to copy the dataset in-memory. If <code>None</code>, the
dataset will not be copied in-memory unless explicitly enabled by setting
<code>datasets.config.IN_MEMORY_MAX_SIZE</code> to nonzero. See more details in the
<a href="../cache#improve-performance">improve performance</a> section.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.load_from_disk.storage_options",description:`<strong>storage_options</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Key/value pairs to be passed on to the file-system backend, if any.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						<p class="font-medium">Added in 2.8.0</p>
						
					</div>`,name:"storage_options"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1232",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),Ni=new T({props:{anchor:"datasets.DatasetDict.load_from_disk.example",$$slots:{default:[nbe]},$$scope:{ctx:k}}}),Rh=new E({props:{name:"from_csv",anchor:"datasets.DatasetDict.from_csv",parameters:[{name:"path_or_paths",val:": typing.Dict[str, typing.Union[str, bytes, os.PathLike]]"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.DatasetDict.from_csv.path_or_paths",description:`<strong>path_or_paths</strong> (<code>dict</code> of path-like) &#x2014;
Path(s) of the CSV file(s).`,name:"path_or_paths"},{anchor:"datasets.DatasetDict.from_csv.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.DatasetDict.from_csv.cache_dir",description:`<strong>cache_dir</strong> (str, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.DatasetDict.from_csv.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.from_csv.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>pandas.read_csv</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1322",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),Pi=new T({props:{anchor:"datasets.DatasetDict.from_csv.example",$$slots:{default:[rbe]},$$scope:{ctx:k}}}),Hh=new E({props:{name:"from_json",anchor:"datasets.DatasetDict.from_json",parameters:[{name:"path_or_paths",val:": typing.Dict[str, typing.Union[str, bytes, os.PathLike]]"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.DatasetDict.from_json.path_or_paths",description:`<strong>path_or_paths</strong> (<code>path-like</code> or list of <code>path-like</code>) &#x2014;
Path(s) of the JSON Lines file(s).`,name:"path_or_paths"},{anchor:"datasets.DatasetDict.from_json.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.DatasetDict.from_json.cache_dir",description:`<strong>cache_dir</strong> (str, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.DatasetDict.from_json.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.from_json.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>JsonConfig</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1361",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),Ai=new T({props:{anchor:"datasets.DatasetDict.from_json.example",$$slots:{default:[obe]},$$scope:{ctx:k}}}),Kh=new E({props:{name:"from_parquet",anchor:"datasets.DatasetDict.from_parquet",parameters:[{name:"path_or_paths",val:": typing.Dict[str, typing.Union[str, bytes, os.PathLike]]"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"columns",val:": typing.Optional[typing.List[str]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.DatasetDict.from_parquet.path_or_paths",description:`<strong>path_or_paths</strong> (<code>dict</code> of path-like) &#x2014;
Path(s) of the CSV file(s).`,name:"path_or_paths"},{anchor:"datasets.DatasetDict.from_parquet.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.DatasetDict.from_parquet.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.DatasetDict.from_parquet.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.from_parquet.columns",description:`<strong>columns</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
If not <code>None</code>, only these columns will be read from the file.
A column name may be a prefix of a nested field, e.g. &#x2018;a&#x2019; will select
&#x2018;a.b&#x2019;, &#x2018;a.c&#x2019;, and &#x2018;a.d.e&#x2019;.`,name:"columns"},{anchor:"datasets.DatasetDict.from_parquet.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>ParquetConfig</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1400",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),Li=new T({props:{anchor:"datasets.DatasetDict.from_parquet.example",$$slots:{default:[lbe]},$$scope:{ctx:k}}}),Yh=new E({props:{name:"from_text",anchor:"datasets.DatasetDict.from_text",parameters:[{name:"path_or_paths",val:": typing.Dict[str, typing.Union[str, bytes, os.PathLike]]"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"cache_dir",val:": str = None"},{name:"keep_in_memory",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.DatasetDict.from_text.path_or_paths",description:`<strong>path_or_paths</strong> (<code>dict</code> of path-like) &#x2014;
Path(s) of the text file(s).`,name:"path_or_paths"},{anchor:"datasets.DatasetDict.from_text.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.DatasetDict.from_text.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;~/.cache/huggingface/datasets&quot;</code>) &#x2014;
Directory to cache data.`,name:"cache_dir"},{anchor:"datasets.DatasetDict.from_text.keep_in_memory",description:`<strong>keep_in_memory</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to copy the data in-memory.`,name:"keep_in_memory"},{anchor:"datasets.DatasetDict.from_text.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Keyword arguments to be passed to <code>TextConfig</code>.`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1449",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),Fi=new T({props:{anchor:"datasets.DatasetDict.from_text.example",$$slots:{default:[ibe]},$$scope:{ctx:k}}}),Qh=new E({props:{name:"prepare_for_task",anchor:"datasets.DatasetDict.prepare_for_task",parameters:[{name:"task",val:": typing.Union[str, datasets.tasks.base.TaskTemplate]"},{name:"id",val:": int = 0"}],parametersDescription:[{anchor:"datasets.DatasetDict.prepare_for_task.task",description:`<strong>task</strong> (<code>Union[str, TaskTemplate]</code>) &#x2014;
The task to prepare the dataset for during training and evaluation. If <code>str</code>, supported tasks include:</p>
<ul>
<li><code>&quot;text-classification&quot;</code></li>
<li><code>&quot;question-answering&quot;</code></li>
</ul>
<p>If <code>TaskTemplate</code>, must be one of the task templates in <a href="./task_templates"><code>datasets.tasks</code></a>.`,name:"task"},{anchor:"datasets.DatasetDict.prepare_for_task.id",description:`<strong>id</strong> (<code>int</code>, defaults to <code>0</code>) &#x2014;
The id required to unambiguously identify the task template when multiple task templates of the same type are supported.`,name:"id"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1488"}}),Zh=new Oa({}),Xh=new E({props:{name:"class datasets.IterableDataset",anchor:"datasets.IterableDataset",parameters:[{name:"ex_iterable",val:": _BaseExamplesIterable"},{name:"info",val:": typing.Optional[datasets.info.DatasetInfo] = None"},{name:"split",val:": typing.Optional[datasets.splits.NamedSplit] = None"},{name:"format_type",val:": typing.Optional[str] = None"},{name:"shuffling",val:": typing.Optional[datasets.iterable_dataset.ShufflingConfig] = None"},{name:"distributed",val:": typing.Optional[datasets.iterable_dataset.DistributedConfig] = None"},{name:"token_per_repo_id",val:": typing.Union[typing.Dict[str, typing.Union[str, bool, NoneType]], NoneType] = None"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L791"}}),ef=new E({props:{name:"from_generator",anchor:"datasets.IterableDataset.from_generator",parameters:[{name:"generator",val:": typing.Callable"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"gen_kwargs",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.IterableDataset.from_generator.generator",description:`<strong>generator</strong> (<code>Callable</code>) &#x2014;
A generator function that <code>yields</code> examples.`,name:"generator"},{anchor:"datasets.IterableDataset.from_generator.features",description:`<strong>features</strong> (<code>Features</code>, <em>optional</em>) &#x2014;
Dataset features.`,name:"features"},{anchor:"datasets.IterableDataset.from_generator.gen_kwargs(dict,",description:`<strong>gen_kwargs(<code>dict</code>,</strong> <em>optional</em>) &#x2014;
Keyword arguments to be passed to the <code>generator</code> callable.
You can define a sharded iterable dataset by passing the list of shards in <code>gen_kwargs</code>.
This can be used to improve shuffling and when iterating over the dataset with multiple workers.`,name:"gen_kwargs(dict,"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L969",returnType:`
<p><code>IterableDataset</code></p>
`}}),zi=new T({props:{anchor:"datasets.IterableDataset.from_generator.example",$$slots:{default:[dbe]},$$scope:{ctx:k}}}),Si=new T({props:{anchor:"datasets.IterableDataset.from_generator.example-2",$$slots:{default:[cbe]},$$scope:{ctx:k}}}),tf=new E({props:{name:"remove_columns",anchor:"datasets.IterableDataset.remove_columns",parameters:[{name:"column_names",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"datasets.IterableDataset.remove_columns.column_names",description:`<strong>column_names</strong> (<code>Union[str, List[str]]</code>) &#x2014;
Name of the column(s) to remove.`,name:"column_names"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1498",returnDescription:`
<p>A copy of the dataset object without the columns to remove.</p>
`,returnType:`
<p><code>IterableDataset</code></p>
`}}),Vi=new T({props:{anchor:"datasets.IterableDataset.remove_columns.example",$$slots:{default:[pbe]},$$scope:{ctx:k}}}),af=new E({props:{name:"select_columns",anchor:"datasets.IterableDataset.select_columns",parameters:[{name:"column_names",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"datasets.IterableDataset.select_columns.column_names",description:`<strong>column_names</strong> (<code>Union[str, List[str]]</code>) &#x2014;
Name of the column(s) to select.`,name:"column_names"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1532",returnDescription:`
<p>A copy of the dataset object with selected columns.</p>
`,returnType:`
<p><code>IterableDataset</code></p>
`}}),Ui=new T({props:{anchor:"datasets.IterableDataset.select_columns.example",$$slots:{default:[mbe]},$$scope:{ctx:k}}}),sf=new E({props:{name:"cast_column",anchor:"datasets.IterableDataset.cast_column",parameters:[{name:"column",val:": str"},{name:"feature",val:": typing.Union[dict, list, tuple, datasets.features.features.Value, datasets.features.features.ClassLabel, datasets.features.translation.Translation, datasets.features.translation.TranslationVariableLanguages, datasets.features.features.Sequence, datasets.features.features.Array2D, datasets.features.features.Array3D, datasets.features.features.Array4D, datasets.features.features.Array5D, datasets.features.audio.Audio, datasets.features.image.Image]"}],parametersDescription:[{anchor:"datasets.IterableDataset.cast_column.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
Column name.`,name:"column"},{anchor:"datasets.IterableDataset.cast_column.feature",description:`<strong>feature</strong> (<code>Feature</code>) &#x2014;
Target feature.`,name:"feature"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1583",returnType:`
<p><code>IterableDataset</code></p>
`}}),Mi=new T({props:{anchor:"datasets.IterableDataset.cast_column.example",$$slots:{default:[hbe]},$$scope:{ctx:k}}}),nf=new E({props:{name:"cast",anchor:"datasets.IterableDataset.cast",parameters:[{name:"features",val:": Features"}],parametersDescription:[{anchor:"datasets.IterableDataset.cast.features",description:`<strong>features</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features">Features</a>) &#x2014;
New features to cast the dataset to.
The name of the fields in the features must match the current column names.
The type of the data must also be convertible from one type to the other.
For non-trivial conversion, e.g. <code>string</code> &lt;-&gt; <code>ClassLabel</code> you should use <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map">map()</a> to update the Dataset.`,name:"features"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1634",returnDescription:`
<p>A copy of the dataset with casted features.</p>
`,returnType:`
<p><code>IterableDataset</code></p>
`}}),Ri=new T({props:{anchor:"datasets.IterableDataset.cast.example",$$slots:{default:[fbe]},$$scope:{ctx:k}}}),rf=new E({props:{name:"__iter__",anchor:"datasets.IterableDataset.__iter__",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L925"}}),of=new E({props:{name:"iter",anchor:"datasets.IterableDataset.iter",parameters:[{name:"batch_size",val:": int"},{name:"drop_last_batch",val:": bool = False"}],parametersDescription:[{anchor:"datasets.IterableDataset.iter.batch_size",description:"<strong>batch_size</strong> (<code>int</code>) &#x2014; size of each batch to yield.",name:"batch_size"},{anchor:"datasets.IterableDataset.iter.drop_last_batch",description:`<strong>drop_last_batch</strong> (<code>bool</code>, default <em>False</em>) &#x2014; Whether a last batch smaller than the batch_size should be
dropped`,name:"drop_last_batch"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L947"}}),df=new E({props:{name:"map",anchor:"datasets.IterableDataset.map",parameters:[{name:"function",val:": typing.Optional[typing.Callable] = None"},{name:"with_indices",val:": bool = False"},{name:"input_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"batched",val:": bool = False"},{name:"batch_size",val:": typing.Optional[int] = 1000"},{name:"drop_last_batch",val:": bool = False"},{name:"remove_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"features",val:": typing.Optional[datasets.features.features.Features] = None"},{name:"fn_kwargs",val:": typing.Optional[dict] = None"}],parametersDescription:[{anchor:"datasets.IterableDataset.map.function",description:`<strong>function</strong> (<code>Callable</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Function applied on-the-fly on the examples when you iterate on the dataset.
It must have one of the following signatures:</p>
<ul>
<li><code>function(example: Dict[str, Any]) -&gt; Dict[str, Any]</code> if <code>batched=False</code> and <code>with_indices=False</code></li>
<li><code>function(example: Dict[str, Any], idx: int) -&gt; Dict[str, Any]</code> if <code>batched=False</code> and <code>with_indices=True</code></li>
<li><code>function(batch: Dict[str, List]) -&gt; Dict[str, List]</code> if <code>batched=True</code> and <code>with_indices=False</code></li>
<li><code>function(batch: Dict[str, List], indices: List[int]) -&gt; Dict[str, List]</code> if <code>batched=True</code> and <code>with_indices=True</code></li>
</ul>
<p>For advanced usage, the function can also return a <code>pyarrow.Table</code>.
Moreover if your function returns nothing (<code>None</code>), then <code>map</code> will run your function and return the dataset unchanged.
If no function is provided, default to identity function: <code>lambda x: x</code>.`,name:"function"},{anchor:"datasets.IterableDataset.map.with_indices",description:`<strong>with_indices</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide example indices to <code>function</code>. Note that in this case the signature of <code>function</code> should be <code>def function(example, idx[, rank]): ...</code>.`,name:"with_indices"},{anchor:"datasets.IterableDataset.map.input_columns",description:`<strong>input_columns</strong> (<code>Optional[Union[str, List[str]]]</code>, defaults to <code>None</code>) &#x2014;
The columns to be passed into <code>function</code>
as positional arguments. If <code>None</code>, a dict mapping to all formatted columns is passed as one argument.`,name:"input_columns"},{anchor:"datasets.IterableDataset.map.batched",description:`<strong>batched</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide batch of examples to <code>function</code>.`,name:"batched"},{anchor:"datasets.IterableDataset.map.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1000</code>) &#x2014;
Number of examples per batch provided to <code>function</code> if <code>batched=True</code>.
<code>batch_size &lt;= 0</code> or <code>batch_size == None</code> then provide the full dataset as a single batch to <code>function</code>.`,name:"batch_size"},{anchor:"datasets.IterableDataset.map.drop_last_batch",description:`<strong>drop_last_batch</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether a last batch smaller than the batch_size should be
dropped instead of being processed by the function.`,name:"drop_last_batch"},{anchor:"datasets.IterableDataset.map.remove_columns",description:`<strong>remove_columns</strong> (<code>[List[str]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Remove a selection of columns while doing the mapping.
Columns will be removed before updating the examples with the output of <code>function</code>, i.e. if <code>function</code> is adding
columns with names in <code>remove_columns</code>, these columns will be kept.`,name:"remove_columns"},{anchor:"datasets.IterableDataset.map.features",description:`<strong>features</strong> (<code>[Features]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Feature types of the resulting dataset.`,name:"features"},{anchor:"datasets.IterableDataset.map.fn_kwargs",description:`<strong>fn_kwargs</strong> (<code>Dict</code>, <em>optional</em>, default <code>None</code>) &#x2014;
Keyword arguments to be passed to <code>function</code>.`,name:"fn_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1051"}}),Hi=new T({props:{anchor:"datasets.IterableDataset.map.example",$$slots:{default:[gbe]},$$scope:{ctx:k}}}),pf=new E({props:{name:"rename_column",anchor:"datasets.IterableDataset.rename_column",parameters:[{name:"original_column_name",val:": str"},{name:"new_column_name",val:": str"}],parametersDescription:[{anchor:"datasets.IterableDataset.rename_column.original_column_name",description:`<strong>original_column_name</strong> (<code>str</code>) &#x2014;
Name of the column to rename.`,name:"original_column_name"},{anchor:"datasets.IterableDataset.rename_column.new_column_name",description:`<strong>new_column_name</strong> (<code>str</code>) &#x2014;
New name for the column.`,name:"new_column_name"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1410",returnDescription:`
<p>A copy of the dataset with a renamed column.</p>
`,returnType:`
<p><code>IterableDataset</code></p>
`}}),Gi=new T({props:{anchor:"datasets.IterableDataset.rename_column.example",$$slots:{default:[ube]},$$scope:{ctx:k}}}),mf=new E({props:{name:"filter",anchor:"datasets.IterableDataset.filter",parameters:[{name:"function",val:": typing.Optional[typing.Callable] = None"},{name:"with_indices",val:" = False"},{name:"input_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"batched",val:": bool = False"},{name:"batch_size",val:": typing.Optional[int] = 1000"}],parametersDescription:[{anchor:"datasets.IterableDataset.filter.function",description:`<strong>function</strong> (<code>Callable</code>) &#x2014;
Callable with one of the following signatures:</p>
<ul>
<li><code>function(example: Dict[str, Any]) -&gt; bool</code> if <code>with_indices=False, batched=False</code></li>
<li><code>function(example: Dict[str, Any], indices: int) -&gt; bool</code> if <code>with_indices=True, batched=False</code></li>
<li><code>function(example: Dict[str, List]) -&gt; List[bool]</code> if <code>with_indices=False, batched=True</code></li>
<li><code>function(example: Dict[str, List], indices: List[int]) -&gt; List[bool]</code> if <code>with_indices=True, batched=True</code></li>
</ul>
<p>If no function is provided, defaults to an always True function: <code>lambda x: True</code>.`,name:"function"},{anchor:"datasets.IterableDataset.filter.with_indices",description:`<strong>with_indices</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide example indices to <code>function</code>. Note that in this case the signature of <code>function</code> should be <code>def function(example, idx): ...</code>.`,name:"with_indices"},{anchor:"datasets.IterableDataset.filter.input_columns",description:`<strong>input_columns</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The columns to be passed into <code>function</code> as
positional arguments. If <code>None</code>, a dict mapping to all formatted columns is passed as one argument.`,name:"input_columns"},{anchor:"datasets.IterableDataset.filter.batched",description:`<strong>batched</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide batch of examples to <code>function</code>.`,name:"batched"},{anchor:"datasets.IterableDataset.filter.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, default <code>1000</code>) &#x2014;
Number of examples per batch provided to <code>function</code> if <code>batched=True</code>.`,name:"batch_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1163"}}),Ki=new T({props:{anchor:"datasets.IterableDataset.filter.example",$$slots:{default:[_be]},$$scope:{ctx:k}}}),hf=new E({props:{name:"shuffle",anchor:"datasets.IterableDataset.shuffle",parameters:[{name:"seed",val:" = None"},{name:"generator",val:": typing.Optional[numpy.random._generator.Generator] = None"},{name:"buffer_size",val:": int = 1000"}],parametersDescription:[{anchor:"datasets.IterableDataset.shuffle.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Random seed that will be used to shuffle the dataset.
It is used to sample from the shuffle buffe and also to shuffle the data shards.`,name:"seed"},{anchor:"datasets.IterableDataset.shuffle.generator",description:`<strong>generator</strong> (<code>numpy.random.Generator</code>, <em>optional</em>) &#x2014;
Numpy random Generator to use to compute the permutation of the dataset rows.
If <code>generator=None</code> (default), uses <code>np.random.default_rng</code> (the default BitGenerator (PCG64) of NumPy).`,name:"generator"},{anchor:"datasets.IterableDataset.shuffle.buffer_size",description:`<strong>buffer_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Size of the buffer.`,name:"buffer_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1236"}}),Wi=new T({props:{anchor:"datasets.IterableDataset.shuffle.example",$$slots:{default:[bbe]},$$scope:{ctx:k}}}),gf=new E({props:{name:"skip",anchor:"datasets.IterableDataset.skip",parameters:[{name:"n",val:""}],parametersDescription:[{anchor:"datasets.IterableDataset.skip.n",description:`<strong>n</strong> (<code>int</code>) &#x2014;
Number of elements to skip.`,name:"n"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1306"}}),Yi=new T({props:{anchor:"datasets.IterableDataset.skip.example",$$slots:{default:[$be]},$$scope:{ctx:k}}}),uf=new E({props:{name:"take",anchor:"datasets.IterableDataset.take",parameters:[{name:"n",val:""}],parametersDescription:[{anchor:"datasets.IterableDataset.take.n",description:`<strong>n</strong> (<code>int</code>) &#x2014;
Number of elements to take.`,name:"n"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/iterable_dataset.py#L1345"}}),Ji=new T({props:{anchor:"datasets.IterableDataset.take.example",$$slots:{default:[xbe]},$$scope:{ctx:k}}}),_f=new E({props:{name:"info",anchor:"datasets.IterableDataset.info",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L146"}}),bf=new E({props:{name:"split",anchor:"datasets.IterableDataset.split",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L151"}}),$f=new E({props:{name:"builder_name",anchor:"datasets.IterableDataset.builder_name",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L156"}}),xf=new E({props:{name:"citation",anchor:"datasets.IterableDataset.citation",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L160"}}),vf=new E({props:{name:"config_name",anchor:"datasets.IterableDataset.config_name",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L164"}}),yf=new E({props:{name:"dataset_size",anchor:"datasets.IterableDataset.dataset_size",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L168"}}),jf=new E({props:{name:"description",anchor:"datasets.IterableDataset.description",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L172"}}),wf=new E({props:{name:"download_checksums",anchor:"datasets.IterableDataset.download_checksums",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L176"}}),Df=new E({props:{name:"download_size",anchor:"datasets.IterableDataset.download_size",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L180"}}),kf=new E({props:{name:"features",anchor:"datasets.IterableDataset.features",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L184"}}),Ef=new E({props:{name:"homepage",anchor:"datasets.IterableDataset.homepage",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L188"}}),qf=new E({props:{name:"license",anchor:"datasets.IterableDataset.license",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L192"}}),If=new E({props:{name:"size_in_bytes",anchor:"datasets.IterableDataset.size_in_bytes",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L196"}}),Tf=new E({props:{name:"supervised_keys",anchor:"datasets.IterableDataset.supervised_keys",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L200"}}),Nf=new E({props:{name:"version",anchor:"datasets.IterableDataset.version",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/arrow_dataset.py#L208"}}),Pf=new Oa({}),Af=new E({props:{name:"class datasets.IterableDatasetDict",anchor:"datasets.IterableDatasetDict",parameters:"",source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1642"}}),Lf=new E({props:{name:"map",anchor:"datasets.IterableDatasetDict.map",parameters:[{name:"function",val:": typing.Optional[typing.Callable] = None"},{name:"with_indices",val:": bool = False"},{name:"input_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"batched",val:": bool = False"},{name:"batch_size",val:": int = 1000"},{name:"drop_last_batch",val:": bool = False"},{name:"remove_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.map.function",description:`<strong>function</strong> (<code>Callable</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Function applied on-the-fly on the examples when you iterate on the dataset.
It must have one of the following signatures:</p>
<ul>
<li><code>function(example: Dict[str, Any]) -&gt; Dict[str, Any]</code> if <code>batched=False</code> and <code>with_indices=False</code></li>
<li><code>function(example: Dict[str, Any], idx: int) -&gt; Dict[str, Any]</code> if <code>batched=False</code> and <code>with_indices=True</code></li>
<li><code>function(batch: Dict[str, List]) -&gt; Dict[str, List]</code> if <code>batched=True</code> and <code>with_indices=False</code></li>
<li><code>function(batch: Dict[str, List], indices: List[int]) -&gt; Dict[str, List]</code> if <code>batched=True</code> and <code>with_indices=True</code></li>
</ul>
<p>For advanced usage, the function can also return a <code>pyarrow.Table</code>.
Moreover if your function returns nothing (<code>None</code>), then <code>map</code> will run your function and return the dataset unchanged.
If no function is provided, default to identity function: <code>lambda x: x</code>.`,name:"function"},{anchor:"datasets.IterableDatasetDict.map.with_indices",description:`<strong>with_indices</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide example indices to <code>function</code>. Note that in this case the signature of <code>function</code> should be <code>def function(example, idx[, rank]): ...</code>.`,name:"with_indices"},{anchor:"datasets.IterableDatasetDict.map.input_columns",description:`<strong>input_columns</strong> (<code>[Union[str, List[str]]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The columns to be passed into <code>function</code>
as positional arguments. If <code>None</code>, a dict mapping to all formatted columns is passed as one argument.`,name:"input_columns"},{anchor:"datasets.IterableDatasetDict.map.batched",description:`<strong>batched</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide batch of examples to <code>function</code>.`,name:"batched"},{anchor:"datasets.IterableDatasetDict.map.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1000</code>) &#x2014;
Number of examples per batch provided to <code>function</code> if <code>batched=True</code>.`,name:"batch_size"},{anchor:"datasets.IterableDatasetDict.map.drop_last_batch",description:`<strong>drop_last_batch</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether a last batch smaller than the <code>batch_size</code> should be
dropped instead of being processed by the function.`,name:"drop_last_batch"},{anchor:"datasets.IterableDatasetDict.map.remove_columns",description:`<strong>remove_columns</strong> (<code>[List[str]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Remove a selection of columns while doing the mapping.
Columns will be removed before updating the examples with the output of <code>function</code>, i.e. if <code>function</code> is adding
columns with names in <code>remove_columns</code>, these columns will be kept.`,name:"remove_columns"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1672"}}),td=new T({props:{anchor:"datasets.IterableDatasetDict.map.example",$$slots:{default:[vbe]},$$scope:{ctx:k}}}),Cf=new E({props:{name:"filter",anchor:"datasets.IterableDatasetDict.filter",parameters:[{name:"function",val:": typing.Optional[typing.Callable] = None"},{name:"with_indices",val:" = False"},{name:"input_columns",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"batched",val:": bool = False"},{name:"batch_size",val:": typing.Optional[int] = 1000"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.filter.function",description:`<strong>function</strong> (<code>Callable</code>) &#x2014;
Callable with one of the following signatures:</p>
<ul>
<li><code>function(example: Dict[str, Any]) -&gt; bool</code> if <code>with_indices=False, batched=False</code></li>
<li><code>function(example: Dict[str, Any], indices: int) -&gt; bool</code> if <code>with_indices=True, batched=False</code></li>
<li><code>function(example: Dict[str, List]) -&gt; List[bool]</code> if <code>with_indices=False, batched=True</code></li>
<li><code>function(example: Dict[str, List], indices: List[int]) -&gt; List[bool]</code> if <code>with_indices=True, batched=True</code></li>
</ul>
<p>If no function is provided, defaults to an always True function: <code>lambda x: True</code>.`,name:"function"},{anchor:"datasets.IterableDatasetDict.filter.with_indices",description:`<strong>with_indices</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide example indices to <code>function</code>. Note that in this case the signature of <code>function</code> should be <code>def function(example, idx): ...</code>.`,name:"with_indices"},{anchor:"datasets.IterableDatasetDict.filter.input_columns",description:`<strong>input_columns</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The columns to be passed into <code>function</code> as
positional arguments. If <code>None</code>, a dict mapping to all formatted columns is passed as one argument.`,name:"input_columns"},{anchor:"datasets.IterableDatasetDict.filter.batched",description:`<strong>batched</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Provide batch of examples to <code>function</code>`,name:"batched"},{anchor:"datasets.IterableDatasetDict.filter.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1000</code>) &#x2014;
Number of examples per batch provided to <code>function</code> if <code>batched=True</code>.`,name:"batch_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1757"}}),ad=new T({props:{anchor:"datasets.IterableDatasetDict.filter.example",$$slots:{default:[ybe]},$$scope:{ctx:k}}}),Of=new E({props:{name:"shuffle",anchor:"datasets.IterableDatasetDict.shuffle",parameters:[{name:"seed",val:" = None"},{name:"generator",val:": typing.Optional[numpy.random._generator.Generator] = None"},{name:"buffer_size",val:": int = 1000"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.shuffle.seed",description:`<strong>seed</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Random seed that will be used to shuffle the dataset.
It is used to sample from the shuffle buffe and als oto shuffle the data shards.`,name:"seed"},{anchor:"datasets.IterableDatasetDict.shuffle.generator",description:`<strong>generator</strong> (<code>numpy.random.Generator</code>, <em>optional</em>) &#x2014;
Numpy random Generator to use to compute the permutation of the dataset rows.
If <code>generator=None</code> (default), uses <code>np.random.default_rng</code> (the default BitGenerator (PCG64) of NumPy).`,name:"generator"},{anchor:"datasets.IterableDatasetDict.shuffle.buffer_size",description:`<strong>buffer_size</strong> (<code>int</code>, defaults to <code>1000</code>) &#x2014;
Size of the buffer.`,name:"buffer_size"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1816"}}),sd=new T({props:{anchor:"datasets.IterableDatasetDict.shuffle.example",$$slots:{default:[jbe]},$$scope:{ctx:k}}}),zf=new E({props:{name:"with_format",anchor:"datasets.IterableDatasetDict.with_format",parameters:[{name:"type",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.with_format.type",description:`<strong>type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to &#x201C;torch&#x201D;, the returned dataset
will be a subclass of <code>torch.utils.data.IterableDataset</code> to be used in a <code>DataLoader</code>.`,name:"type"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1643"}}),nd=new T({props:{anchor:"datasets.IterableDatasetDict.with_format.example",$$slots:{default:[wbe]},$$scope:{ctx:k}}}),Sf=new E({props:{name:"cast",anchor:"datasets.IterableDatasetDict.cast",parameters:[{name:"features",val:": Features"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.cast.features",description:`<strong>features</strong> (<code>Features</code>) &#x2014;
New features to cast the dataset to.
The name of the fields in the features must match the current column names.
The type of the data must also be convertible from one type to the other.
For non-trivial conversion, e.g. <code>string</code> &lt;-&gt; <code>ClassLabel</code> you should use <code>map</code> to update the Dataset.`,name:"features"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L2018",returnDescription:`
<p>A copy of the dataset with casted features.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),rd=new T({props:{anchor:"datasets.IterableDatasetDict.cast.example",$$slots:{default:[Dbe]},$$scope:{ctx:k}}}),Vf=new E({props:{name:"cast_column",anchor:"datasets.IterableDatasetDict.cast_column",parameters:[{name:"column",val:": str"},{name:"feature",val:": typing.Union[dict, list, tuple, datasets.features.features.Value, datasets.features.features.ClassLabel, datasets.features.translation.Translation, datasets.features.translation.TranslationVariableLanguages, datasets.features.features.Sequence, datasets.features.features.Array2D, datasets.features.features.Array3D, datasets.features.features.Array4D, datasets.features.features.Array5D, datasets.features.audio.Audio, datasets.features.image.Image]"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.cast_column.column",description:`<strong>column</strong> (<code>str</code>) &#x2014;
Column name.`,name:"column"},{anchor:"datasets.IterableDatasetDict.cast_column.feature",description:`<strong>feature</strong> (<code>Feature</code>) &#x2014;
Target feature.`,name:"feature"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1987",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),od=new T({props:{anchor:"datasets.IterableDatasetDict.cast_column.example",$$slots:{default:[kbe]},$$scope:{ctx:k}}}),Uf=new E({props:{name:"remove_columns",anchor:"datasets.IterableDatasetDict.remove_columns",parameters:[{name:"column_names",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.remove_columns.column_names",description:`<strong>column_names</strong> (<code>Union[str, List[str]]</code>) &#x2014;
Name of the column(s) to remove.`,name:"column_names"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1935",returnDescription:`
<p>A copy of the dataset object without the columns to remove.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),ld=new T({props:{anchor:"datasets.IterableDatasetDict.remove_columns.example",$$slots:{default:[Ebe]},$$scope:{ctx:k}}}),Mf=new E({props:{name:"rename_column",anchor:"datasets.IterableDatasetDict.rename_column",parameters:[{name:"original_column_name",val:": str"},{name:"new_column_name",val:": str"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.rename_column.original_column_name",description:`<strong>original_column_name</strong> (<code>str</code>) &#x2014;
Name of the column to rename.`,name:"original_column_name"},{anchor:"datasets.IterableDatasetDict.rename_column.new_column_name",description:`<strong>new_column_name</strong> (<code>str</code>) &#x2014;
New name for the column.`,name:"new_column_name"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1874",returnDescription:`
<p>A copy of the dataset with a renamed column.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),id=new T({props:{anchor:"datasets.IterableDatasetDict.rename_column.example",$$slots:{default:[qbe]},$$scope:{ctx:k}}}),Rf=new E({props:{name:"rename_columns",anchor:"datasets.IterableDatasetDict.rename_columns",parameters:[{name:"column_mapping",val:": typing.Dict[str, str]"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.rename_columns.column_mapping",description:`<strong>column_mapping</strong> (<code>Dict[str, str]</code>) &#x2014;
A mapping of columns to rename to their new names.`,name:"column_mapping"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1907",returnDescription:`
<p>A copy of the dataset with renamed columns</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),dd=new T({props:{anchor:"datasets.IterableDatasetDict.rename_columns.example",$$slots:{default:[Ibe]},$$scope:{ctx:k}}}),Bf=new E({props:{name:"select_columns",anchor:"datasets.IterableDatasetDict.select_columns",parameters:[{name:"column_names",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"datasets.IterableDatasetDict.select_columns.column_names",description:`<strong>column_names</strong> (<code>Union[str, List[str]]</code>) &#x2014;
Name of the column(s) to keep.`,name:"column_names"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/dataset_dict.py#L1961",returnDescription:`
<p>A copy of the dataset object with only selected columns.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),cd=new T({props:{anchor:"datasets.IterableDatasetDict.select_columns.example",$$slots:{default:[Tbe]},$$scope:{ctx:k}}}),Hf=new Oa({}),Gf=new E({props:{name:"class datasets.Features",anchor:"datasets.Features",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1529"}}),md=new $ue({props:{$$slots:{default:[Nbe]},$$scope:{ctx:k}}}),Zf=new E({props:{name:"copy",anchor:"datasets.Features.copy",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1918",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features"
>Features</a></p>
`}}),fd=new T({props:{anchor:"datasets.Features.copy.example",$$slots:{default:[Pbe]},$$scope:{ctx:k}}}),eg=new E({props:{name:"decode_batch",anchor:"datasets.Features.decode_batch",parameters:[{name:"batch",val:": dict"},{name:"token_per_repo_id",val:": typing.Union[typing.Dict[str, typing.Union[str, bool, NoneType]], NoneType] = None"}],parametersDescription:[{anchor:"datasets.Features.decode_batch.batch",description:`<strong>batch</strong> (<code>dict[str, list[Any]]</code>) &#x2014;
Dataset batch data.`,name:"batch"},{anchor:"datasets.Features.decode_batch.token_per_repo_id",description:`<strong>token_per_repo_id</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
To access and decode audio or image files from private repositories on the Hub, you can pass
a dictionary repo_id (str) -&gt; token (bool or str)`,name:"token_per_repo_id"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1891",returnDescription:`
<p><code>dict[str, list[Any]]</code></p>
`}}),tg=new E({props:{name:"decode_column",anchor:"datasets.Features.decode_column",parameters:[{name:"column",val:": list"},{name:"column_name",val:": str"}],parametersDescription:[{anchor:"datasets.Features.decode_column.column",description:`<strong>column</strong> (<code>list[Any]</code>) &#x2014;
Dataset column data.`,name:"column"},{anchor:"datasets.Features.decode_column.column_name",description:`<strong>column_name</strong> (<code>str</code>) &#x2014;
Dataset column name.`,name:"column_name"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1873",returnDescription:`
<p><code>list[Any]</code></p>
`}}),ag=new E({props:{name:"decode_example",anchor:"datasets.Features.decode_example",parameters:[{name:"example",val:": dict"},{name:"token_per_repo_id",val:": typing.Union[typing.Dict[str, typing.Union[str, bool, NoneType]], NoneType] = None"}],parametersDescription:[{anchor:"datasets.Features.decode_example.example",description:`<strong>example</strong> (<code>dict[str, Any]</code>) &#x2014;
Dataset row data.`,name:"example"},{anchor:"datasets.Features.decode_example.token_per_repo_id",description:`<strong>token_per_repo_id</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
To access and decode audio or image files from private repositories on the Hub, you can pass
a dictionary <code>repo_id (str) -&gt; token (bool or str)</code>.`,name:"token_per_repo_id"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1850",returnDescription:`
<p><code>dict[str, Any]</code></p>
`}}),sg=new E({props:{name:"encode_batch",anchor:"datasets.Features.encode_batch",parameters:[{name:"batch",val:""}],parametersDescription:[{anchor:"datasets.Features.encode_batch.batch",description:`<strong>batch</strong> (<code>dict[str, list[Any]]</code>) &#x2014;
Data in a Dataset batch.`,name:"batch"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1831",returnDescription:`
<p><code>dict[str, list[Any]]</code></p>
`}}),ng=new E({props:{name:"encode_column",anchor:"datasets.Features.encode_column",parameters:[{name:"column",val:""},{name:"column_name",val:": str"}],parametersDescription:[{anchor:"datasets.Features.encode_column.column",description:`<strong>column</strong> (<code>list[Any]</code>) &#x2014;
Data in a Dataset column.`,name:"column"},{anchor:"datasets.Features.encode_column.column_name",description:`<strong>column_name</strong> (<code>str</code>) &#x2014;
Dataset column name.`,name:"column_name"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1815",returnDescription:`
<p><code>list[Any]</code></p>
`}}),rg=new E({props:{name:"encode_example",anchor:"datasets.Features.encode_example",parameters:[{name:"example",val:""}],parametersDescription:[{anchor:"datasets.Features.encode_example.example",description:`<strong>example</strong> (<code>dict[str, Any]</code>) &#x2014;
Data in a Dataset row.`,name:"example"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1801",returnDescription:`
<p><code>dict[str, Any]</code></p>
`}}),og=new E({props:{name:"flatten",anchor:"datasets.Features.flatten",parameters:[{name:"max_depth",val:" = 16"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L2005",returnDescription:`
<p>The flattened features.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features"
>Features</a></p>
`}}),vd=new T({props:{anchor:"datasets.Features.flatten.example",$$slots:{default:[Abe]},$$scope:{ctx:k}}}),dg=new E({props:{name:"from_arrow_schema",anchor:"datasets.Features.from_arrow_schema",parameters:[{name:"pa_schema",val:": Schema"}],parametersDescription:[{anchor:"datasets.Features.from_arrow_schema.pa_schema",description:`<strong>pa_schema</strong> (<code>pyarrow.Schema</code>) &#x2014;
Arrow Schema.`,name:"pa_schema"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1604",returnDescription:`
<p><a
  href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features"
>Features</a></p>
`}}),pg=new E({props:{name:"from_dict",anchor:"datasets.Features.from_dict",parameters:[{name:"dic",val:""}],parametersDescription:[{anchor:"datasets.Features.from_dict.dic",description:`<strong>dic</strong> (<em>dict[str, Any]</em>) &#x2014;
Python dictionary.`,name:"dic"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1625",returnType:`
<p><em>Features</em></p>
`}}),jd=new T({props:{anchor:"datasets.Features.from_dict.example",$$slots:{default:[Lbe]},$$scope:{ctx:k}}}),hg=new E({props:{name:"reorder_fields_as",anchor:"datasets.Features.reorder_fields_as",parameters:[{name:"other",val:": Features"}],parametersDescription:[{anchor:"datasets.Features.reorder_fields_as.other",description:`<strong>other</strong> ([<em>Features</em>]) &#x2014;
The other [<em>Features</em>] to align with.`,name:"other"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1938",returnDescription:`
<p>[<em>Features</em>]</p>
`}}),wd=new T({props:{anchor:"datasets.Features.reorder_fields_as.example",$$slots:{default:[Fbe]},$$scope:{ctx:k}}}),gg=new E({props:{name:"class datasets.Sequence",anchor:"datasets.Sequence",parameters:[{name:"feature",val:": typing.Any"},{name:"length",val:": int = -1"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Sequence.length",description:`<strong>length</strong> (<code>int</code>) &#x2014;
Length of the sequence.`,name:"length"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1098"}}),Dd=new T({props:{anchor:"datasets.Sequence.example",$$slots:{default:[Cbe]},$$scope:{ctx:k}}}),ug=new E({props:{name:"class datasets.ClassLabel",anchor:"datasets.ClassLabel",parameters:[{name:"num_classes",val:": dataclasses.InitVar[typing.Optional[int]] = None"},{name:"names",val:": typing.List[str] = None"},{name:"names_file",val:": dataclasses.InitVar[typing.Optional[str]] = None"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.ClassLabel.num_classes",description:`<strong>num_classes</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of classes. All labels must be &lt; <code>num_classes</code>.`,name:"num_classes"},{anchor:"datasets.ClassLabel.names",description:`<strong>names</strong> (<code>list</code> of <code>str</code>, <em>optional</em>) &#x2014;
String names for the integer classes.
The order in which the names are provided is kept.`,name:"names"},{anchor:"datasets.ClassLabel.names_file",description:`<strong>names_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Path to a file with names for the integer classes, one per line.`,name:"names_file"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L900"}}),kd=new T({props:{anchor:"datasets.ClassLabel.example",$$slots:{default:[Obe]},$$scope:{ctx:k}}}),bg=new E({props:{name:"cast_storage",anchor:"datasets.ClassLabel.cast_storage",parameters:[{name:"storage",val:": typing.Union[pyarrow.lib.StringArray, pyarrow.lib.IntegerArray]"}],parametersDescription:[{anchor:"datasets.ClassLabel.cast_storage.storage",description:`<strong>storage</strong> (<code>Union[pa.StringArray, pa.IntegerArray]</code>) &#x2014;
PyArrow array to cast.`,name:"storage"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1065",returnDescription:`
<p>Array in the <code>ClassLabel</code> arrow storage type.</p>
`,returnType:`
<p><code>pa.Int64Array</code></p>
`}}),xg=new E({props:{name:"int2str",anchor:"datasets.ClassLabel.int2str",parameters:[{name:"values",val:": typing.Union[int, collections.abc.Iterable]"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L1019"}}),Ed=new T({props:{anchor:"datasets.ClassLabel.int2str.example",$$slots:{default:[zbe]},$$scope:{ctx:k}}}),yg=new E({props:{name:"str2int",anchor:"datasets.ClassLabel.str2int",parameters:[{name:"values",val:": typing.Union[str, collections.abc.Iterable]"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L974"}}),qd=new T({props:{anchor:"datasets.ClassLabel.str2int.example",$$slots:{default:[Sbe]},$$scope:{ctx:k}}}),jg=new E({props:{name:"class datasets.Value",anchor:"datasets.Value",parameters:[{name:"dtype",val:": str"},{name:"id",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L445"}}),Id=new T({props:{anchor:"datasets.Value.example",$$slots:{default:[Vbe]},$$scope:{ctx:k}}}),Dg=new E({props:{name:"class datasets.Translation",anchor:"datasets.Translation",parameters:[{name:"languages",val:": typing.List[str]"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Translation.languages",description:`<strong>languages</strong> (<code>dict</code>) &#x2014;
A dictionary for each example mapping string language codes to string translations.`,name:"languages"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/translation.py#L12"}}),Td=new T({props:{anchor:"datasets.Translation.example",$$slots:{default:[Ube]},$$scope:{ctx:k}}}),kg=new E({props:{name:"flatten",anchor:"datasets.Translation.flatten",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/translation.py#L44"}}),Eg=new E({props:{name:"class datasets.TranslationVariableLanguages",anchor:"datasets.TranslationVariableLanguages",parameters:[{name:"languages",val:": typing.Optional[typing.List] = None"},{name:"num_languages",val:": typing.Optional[int] = None"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.TranslationVariableLanguages.languages",description:`<strong>languages</strong> (<code>dict</code>) &#x2014;
A dictionary for each example mapping string language codes to one or more string translations.
The languages present may vary from example to example.`,name:"languages"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/translation.py#L52",returnDescription:`
<p>Language codes sorted in ascending order or plain text translations, sorted to align with language codes.</p>
`,returnType:`
<ul>
<li><code>language</code> or <code>translation</code> (variable-length 1D <code>tf.Tensor</code> of <code>tf.string</code>)</li>
</ul>
`}}),Pd=new T({props:{anchor:"datasets.TranslationVariableLanguages.example",$$slots:{default:[Mbe]},$$scope:{ctx:k}}}),qg=new E({props:{name:"flatten",anchor:"datasets.TranslationVariableLanguages.flatten",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/translation.py#L120"}}),Ig=new E({props:{name:"class datasets.Array2D",anchor:"datasets.Array2D",parameters:[{name:"shape",val:": tuple"},{name:"dtype",val:": str"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Array2D.shape",description:`<strong>shape</strong> (<code>tuple</code>) &#x2014;
The size of each dimension.`,name:"shape"},{anchor:"datasets.Array2D.dtype",description:`<strong>dtype</strong> (<code>str</code>) &#x2014;
The value of the data type.`,name:"dtype"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L530"}}),Ld=new T({props:{anchor:"datasets.Array2D.example",$$slots:{default:[Rbe]},$$scope:{ctx:k}}}),Tg=new E({props:{name:"class datasets.Array3D",anchor:"datasets.Array3D",parameters:[{name:"shape",val:": tuple"},{name:"dtype",val:": str"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Array3D.shape",description:`<strong>shape</strong> (<code>tuple</code>) &#x2014;
The size of each dimension.`,name:"shape"},{anchor:"datasets.Array3D.dtype",description:`<strong>dtype</strong> (<code>str</code>) &#x2014;
The value of the data type.`,name:"dtype"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L555"}}),Fd=new T({props:{anchor:"datasets.Array3D.example",$$slots:{default:[Bbe]},$$scope:{ctx:k}}}),Ng=new E({props:{name:"class datasets.Array4D",anchor:"datasets.Array4D",parameters:[{name:"shape",val:": tuple"},{name:"dtype",val:": str"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Array4D.shape",description:`<strong>shape</strong> (<code>tuple</code>) &#x2014;
The size of each dimension.`,name:"shape"},{anchor:"datasets.Array4D.dtype",description:`<strong>dtype</strong> (<code>str</code>) &#x2014;
The value of the data type.`,name:"dtype"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L580"}}),Cd=new T({props:{anchor:"datasets.Array4D.example",$$slots:{default:[Hbe]},$$scope:{ctx:k}}}),Pg=new E({props:{name:"class datasets.Array5D",anchor:"datasets.Array5D",parameters:[{name:"shape",val:": tuple"},{name:"dtype",val:": str"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Array5D.shape",description:`<strong>shape</strong> (<code>tuple</code>) &#x2014;
The size of each dimension.`,name:"shape"},{anchor:"datasets.Array5D.dtype",description:`<strong>dtype</strong> (<code>str</code>) &#x2014;
The value of the data type.`,name:"dtype"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/features.py#L605"}}),Od=new T({props:{anchor:"datasets.Array5D.example",$$slots:{default:[Gbe]},$$scope:{ctx:k}}}),Ag=new E({props:{name:"class datasets.Audio",anchor:"datasets.Audio",parameters:[{name:"sampling_rate",val:": typing.Optional[int] = None"},{name:"mono",val:": bool = True"},{name:"decode",val:": bool = True"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Audio.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Target sampling rate. If <code>None</code>, the native sampling rate is used.`,name:"sampling_rate"},{anchor:"datasets.Audio.mono",description:`<strong>mono</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to convert the audio signal to mono by averaging samples across
channels.`,name:"mono"},{anchor:"datasets.Audio.decode",description:`<strong>decode</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to decode the audio data. If <code>False</code>,
returns the underlying dictionary in the format <code>{&quot;path&quot;: audio_path, &quot;bytes&quot;: audio_bytes}</code>.`,name:"decode"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/audio.py#L23"}}),zd=new T({props:{anchor:"datasets.Audio.example",$$slots:{default:[Kbe]},$$scope:{ctx:k}}}),Sg=new E({props:{name:"cast_storage",anchor:"datasets.Audio.cast_storage",parameters:[{name:"storage",val:": typing.Union[pyarrow.lib.StringArray, pyarrow.lib.StructArray]"}],parametersDescription:[{anchor:"datasets.Audio.cast_storage.storage",description:`<strong>storage</strong> (<code>Union[pa.StringArray, pa.StructArray]</code>) &#x2014;
PyArrow array to cast.`,name:"storage"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/audio.py#L207",returnDescription:`
<p>Array in the Audio arrow storage type, that is
<code>pa.struct(&#123;"bytes": pa.binary(), "path": pa.string()&#125;)</code></p>
`,returnType:`
<p><code>pa.StructArray</code></p>
`}}),Vg=new E({props:{name:"decode_example",anchor:"datasets.Audio.decode_example",parameters:[{name:"value",val:": dict"},{name:"token_per_repo_id",val:": typing.Union[typing.Dict[str, typing.Union[str, bool, NoneType]], NoneType] = None"}],parametersDescription:[{anchor:"datasets.Audio.decode_example.value",description:`<strong>value</strong> (<code>dict</code>) &#x2014;
A dictionary with keys:</p>
<ul>
<li><code>path</code>: String with relative audio file path.</li>
<li><code>bytes</code>: Bytes of the audio file.</li>
</ul>`,name:"value"},{anchor:"datasets.Audio.decode_example.token_per_repo_id",description:`<strong>token_per_repo_id</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
To access and decode
audio files from private repositories on the Hub, you can pass
a dictionary repo_id (<code>str</code>) -&gt; token (<code>bool</code> or <code>str</code>)`,name:"token_per_repo_id"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/audio.py#L128",returnType:`
<p><code>dict</code></p>
`}}),Ug=new E({props:{name:"embed_storage",anchor:"datasets.Audio.embed_storage",parameters:[{name:"storage",val:": StructArray"}],parametersDescription:[{anchor:"datasets.Audio.embed_storage.storage",description:`<strong>storage</strong> (<code>pa.StructArray</code>) &#x2014;
PyArrow array to embed.`,name:"storage"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/audio.py#L245",returnDescription:`
<p>Array in the Audio arrow storage type, that is
<code>pa.struct(&#123;"bytes": pa.binary(), "path": pa.string()&#125;)</code>.</p>
`,returnType:`
<p><code>pa.StructArray</code></p>
`}}),Mg=new E({props:{name:"encode_example",anchor:"datasets.Audio.encode_example",parameters:[{name:"value",val:": typing.Union[str, bytes, dict]"}],parametersDescription:[{anchor:"datasets.Audio.encode_example.value",description:`<strong>value</strong> (<code>str</code> or <code>dict</code>) &#x2014;
Data passed as input to Audio feature.`,name:"value"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/audio.py#L79",returnType:`
<p><code>dict</code></p>
`}}),Rg=new E({props:{name:"flatten",anchor:"datasets.Audio.flatten",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/audio.py#L196"}}),Bg=new E({props:{name:"class datasets.Image",anchor:"datasets.Image",parameters:[{name:"decode",val:": bool = True"},{name:"id",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"datasets.Image.decode",description:`<strong>decode</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to decode the image data. If <code>False</code>,
returns the underlying dictionary in the format <code>{&quot;path&quot;: image_path, &quot;bytes&quot;: image_bytes}</code>.`,name:"decode"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/image.py#L46"}}),Rd=new T({props:{anchor:"datasets.Image.example",$$slots:{default:[Wbe]},$$scope:{ctx:k}}}),Qg=new E({props:{name:"cast_storage",anchor:"datasets.Image.cast_storage",parameters:[{name:"storage",val:": typing.Union[pyarrow.lib.StringArray, pyarrow.lib.StructArray, pyarrow.lib.ListArray]"}],parametersDescription:[{anchor:"datasets.Image.cast_storage.storage",description:`<strong>storage</strong> (<code>Union[pa.StringArray, pa.StructArray, pa.ListArray]</code>) &#x2014;
PyArrow array to cast.`,name:"storage"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/image.py#L194",returnDescription:`
<p>Array in the Image arrow storage type, that is
<code>pa.struct(&#123;"bytes": pa.binary(), "path": pa.string()&#125;)</code>.</p>
`,returnType:`
<p><code>pa.StructArray</code></p>
`}}),Zg=new E({props:{name:"decode_example",anchor:"datasets.Image.decode_example",parameters:[{name:"value",val:": dict"},{name:"token_per_repo_id",val:" = None"}],parametersDescription:[{anchor:"datasets.Image.decode_example.value",description:`<strong>value</strong> (<code>str</code> or <code>dict</code>) &#x2014;
A string with the absolute image file path, a dictionary with
keys:</p>
<ul>
<li><code>path</code>: String with absolute or relative image file path.</li>
<li><code>bytes</code>: The bytes of the image file.</li>
</ul>`,name:"value"},{anchor:"datasets.Image.decode_example.token_per_repo_id",description:`<strong>token_per_repo_id</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
To access and decode
image files from private repositories on the Hub, you can pass
a dictionary repo_id (<code>str</code>) -&gt; token (<code>bool</code> or <code>str</code>).`,name:"token_per_repo_id"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/image.py#L130",returnDescription:`
<p><code>PIL.Image.Image</code></p>
`}}),Xg=new E({props:{name:"embed_storage",anchor:"datasets.Image.embed_storage",parameters:[{name:"storage",val:": StructArray"}],parametersDescription:[{anchor:"datasets.Image.embed_storage.storage",description:`<strong>storage</strong> (<code>pa.StructArray</code>) &#x2014;
PyArrow array to embed.`,name:"storage"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/image.py#L240",returnDescription:`
<p>Array in the Image arrow storage type, that is
<code>pa.struct(&#123;"bytes": pa.binary(), "path": pa.string()&#125;)</code>.</p>
`,returnType:`
<p><code>pa.StructArray</code></p>
`}}),eu=new E({props:{name:"encode_example",anchor:"datasets.Image.encode_example",parameters:[{name:"value",val:": typing.Union[str, bytes, dict, numpy.ndarray, ForwardRef('PIL.Image.Image')]"}],parametersDescription:[{anchor:"datasets.Image.encode_example.value",description:`<strong>value</strong> (<code>str</code>, <code>np.ndarray</code>, <code>PIL.Image.Image</code> or <code>dict</code>) &#x2014;
Data passed as input to Image feature.`,name:"value"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/image.py#L91",returnDescription:`
<p><code>dict</code> with \u201Cpath\u201D and \u201Cbytes\u201D fields</p>
`}}),tu=new E({props:{name:"flatten",anchor:"datasets.Image.flatten",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/features/image.py#L181"}}),au=new Oa({}),su=new E({props:{name:"class datasets.MetricInfo",anchor:"datasets.MetricInfo",parameters:[{name:"description",val:": str"},{name:"citation",val:": str"},{name:"features",val:": 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:"metric_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/datasets/blob/2.11.0/src/datasets/info.py#L490"}}),nu=new E({props:{name:"from_directory",anchor:"datasets.MetricInfo.from_directory",parameters:[{name:"metric_info_dir",val:""}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/info.py#L545"}}),Yd=new T({props:{anchor:"datasets.MetricInfo.from_directory.example",$$slots:{default:[Ybe]},$$scope:{ctx:k}}}),ou=new E({props:{name:"write_to_directory",anchor:"datasets.MetricInfo.write_to_directory",parameters:[{name:"metric_info_dir",val:""},{name:"pretty_print",val:" = False"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/info.py#L525"}}),Jd=new T({props:{anchor:"datasets.MetricInfo.write_to_directory.example",$$slots:{default:[Jbe]},$$scope:{ctx:k}}}),lu=new Oa({}),iu=new E({props:{name:"class datasets.Metric",anchor:"datasets.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:"datasets.Metric.config_name",description:`<strong>config_name</strong> (<code>str</code>) &#x2014; This is used to define a hash specific to a metrics computation script and prevents the metric&#x2019;s data
to be overridden when the metric loading script is modified.`,name:"config_name"},{anchor:"datasets.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:"datasets.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:"datasets.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:"datasets.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:"datasets.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/datasets/v2.11.0/en/package_reference/main_classes#datasets.Metric.compute">datasets.Metric.compute()</a> is run.',name:"seed"},{anchor:"datasets.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:"datasets.Metric.max_concurrent_cache_files",description:"<strong>max_concurrent_cache_files</strong> (<code>int</code>) &#x2014; Max number of concurrent metrics cache files (default 10000).",name:"max_concurrent_cache_files"},{anchor:"datasets.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/datasets/blob/2.11.0/src/datasets/metric.py#L146"}}),Zd=new Due({props:{version:"2.5.0",$$slots:{default:[Qbe]},$$scope:{ctx:k}}}),du=new E({props:{name:"add",anchor:"datasets.Metric.add",parameters:[{name:"prediction",val:" = None"},{name:"reference",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Metric.add.prediction",description:"<strong>prediction</strong> (list/array/tensor, optional) &#x2014; Predictions.",name:"prediction"},{anchor:"datasets.Metric.add.reference",description:"<strong>reference</strong> (list/array/tensor, optional) &#x2014; References.",name:"reference"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/metric.py#L521"}}),Xd=new T({props:{anchor:"datasets.Metric.add.example",$$slots:{default:[Zbe]},$$scope:{ctx:k}}}),cu=new E({props:{name:"add_batch",anchor:"datasets.Metric.add_batch",parameters:[{name:"predictions",val:" = None"},{name:"references",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Metric.add_batch.predictions",description:"<strong>predictions</strong> (list/array/tensor, optional) &#x2014; Predictions.",name:"predictions"},{anchor:"datasets.Metric.add_batch.references",description:"<strong>references</strong> (list/array/tensor, optional) &#x2014; References.",name:"references"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/metric.py#L474"}}),ec=new T({props:{anchor:"datasets.Metric.add_batch.example",$$slots:{default:[Xbe]},$$scope:{ctx:k}}}),pu=new E({props:{name:"compute",anchor:"datasets.Metric.compute",parameters:[{name:"predictions",val:" = None"},{name:"references",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.Metric.compute.predictions",description:"<strong>predictions</strong> (list/array/tensor, optional) &#x2014; Predictions.",name:"predictions"},{anchor:"datasets.Metric.compute.references",description:"<strong>references</strong> (list/array/tensor, optional) &#x2014; References.",name:"references"},{anchor:"datasets.Metric.compute.*kwargs",description:`*<strong>*kwargs</strong> (optional) &#x2014; Keyword arguments that will be forwarded to the metrics <code>_compute</code>
method (see details in the docstring).`,name:"*kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/metric.py#L403",returnDescription:`
<p>dict or None</p>
<ul>
<li>Dictionary with the metrics if this metric is run on the main process (<code>process_id == 0</code>).</li>
<li>None if the metric is not run on the main process (<code>process_id != 0</code>).</li>
</ul>
`}}),tc=new T({props:{anchor:"datasets.Metric.compute.example",$$slots:{default:[e1e]},$$scope:{ctx:k}}}),mu=new E({props:{name:"download_and_prepare",anchor:"datasets.Metric.download_and_prepare",parameters:[{name:"download_config",val:": typing.Optional[datasets.download.download_config.DownloadConfig] = None"},{name:"dl_manager",val:": typing.Optional[datasets.download.download_manager.DownloadManager] = None"}],parametersDescription:[{anchor:"datasets.Metric.download_and_prepare.download_config",description:'<strong>download_config</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.DownloadConfig">DownloadConfig</a>, optional) &#x2014; Specific download configuration parameters.',name:"download_config"},{anchor:"datasets.Metric.download_and_prepare.dl_manager",description:'<strong>dl_manager</strong> (<a href="/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.DownloadManager">DownloadManager</a>, optional) &#x2014; Specific download manager to use.',name:"dl_manager"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/metric.py#L604"}}),hu=new Oa({}),fu=new E({props:{name:"class datasets.filesystems.S3FileSystem",anchor:"datasets.filesystems.S3FileSystem",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"datasets.filesystems.S3FileSystem.anon",description:`<strong>anon</strong> (<code>bool</code>, default to <code>False</code>) &#x2014;
Whether to use anonymous connection (public buckets only). If <code>False</code>, uses the key/secret given,
or boto&#x2019;s credential resolver (client_kwargs, environment, variables, config files, EC2 IAM server, in that order).`,name:"anon"},{anchor:"datasets.filesystems.S3FileSystem.key",description:`<strong>key</strong> (<code>str</code>) &#x2014;
If not anonymous, use this access key ID, if specified.`,name:"key"},{anchor:"datasets.filesystems.S3FileSystem.secret",description:`<strong>secret</strong> (<code>str</code>) &#x2014;
If not anonymous, use this secret access key, if specified.`,name:"secret"},{anchor:"datasets.filesystems.S3FileSystem.token",description:`<strong>token</strong> (<code>str</code>) &#x2014;
If not anonymous, use this security token, if specified.`,name:"token"},{anchor:"datasets.filesystems.S3FileSystem.use_ssl",description:`<strong>use_ssl</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to use SSL in connections to S3; may be faster without, but insecure. If <code>use_ssl</code> is
also set in <code>client_kwargs</code>, the value set in <code>client_kwargs</code> will take priority.`,name:"use_ssl"},{anchor:"datasets.filesystems.S3FileSystem.s3_additional_kwargs",description:`<strong>s3_additional_kwargs</strong> (<code>dict</code>) &#x2014;
Parameters that are used when calling S3 API methods. Typically used for things
like ServerSideEncryption.`,name:"s3_additional_kwargs"},{anchor:"datasets.filesystems.S3FileSystem.client_kwargs",description:`<strong>client_kwargs</strong> (<code>dict</code>) &#x2014;
Parameters for the botocore client.`,name:"client_kwargs"},{anchor:"datasets.filesystems.S3FileSystem.requester_pays",description:`<strong>requester_pays</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether <code>RequesterPays</code> buckets are supported.`,name:"requester_pays"},{anchor:"datasets.filesystems.S3FileSystem.default_block_size",description:`<strong>default_block_size</strong> (<code>int</code>) &#x2014;
If given, the default block size value used for <code>open()</code>, if no specific value is given at all time.
The built-in default is 5MB.`,name:"default_block_size"},{anchor:"datasets.filesystems.S3FileSystem.default_fill_cache",description:`<strong>default_fill_cache</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether to use cache filling with open by default. Refer to <code>S3File.open</code>.`,name:"default_fill_cache"},{anchor:"datasets.filesystems.S3FileSystem.default_cache_type",description:`<strong>default_cache_type</strong> (<code>str</code>, defaults to <code>bytes</code>) &#x2014;
If given, the default <code>cache_type</code> value used for <code>open()</code>. Set to <code>none</code> if no
caching is desired. See fsspec&#x2019;s documentation for other available <code>cache_type</code> values.`,name:"default_cache_type"},{anchor:"datasets.filesystems.S3FileSystem.version_aware",description:`<strong>version_aware</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to support bucket versioning. If enable this will require the user to have
the necessary IAM permissions for dealing with versioned objects.`,name:"version_aware"},{anchor:"datasets.filesystems.S3FileSystem.cache_regions",description:`<strong>cache_regions</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to cache bucket regions. Whenever a new bucket is used, it will
first find out which region it belongs to and then use the client for that region.`,name:"cache_regions"},{anchor:"datasets.filesystems.S3FileSystem.asynchronous",description:`<strong>asynchronous</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether this instance is to be used from inside coroutines.`,name:"asynchronous"},{anchor:"datasets.filesystems.S3FileSystem.config_kwargs",description:`<strong>config_kwargs</strong> (<code>dict</code>) &#x2014;
Parameters passed to <code>botocore.client.Config</code>.
**kwargs &#x2014;
Other parameters for core session.`,name:"config_kwargs"},{anchor:"datasets.filesystems.S3FileSystem.session",description:`<strong>session</strong> (<code>aiobotocore.session.AioSession</code>) &#x2014;
Session to be used for all connections. This session will be used inplace of creating
a new session inside S3FileSystem. For example: <code>aiobotocore.session.AioSession(profile=&apos;test_user&apos;)</code>.`,name:"session"},{anchor:"datasets.filesystems.S3FileSystem.skip_instance_cache",description:`<strong>skip_instance_cache</strong> (<code>bool</code>) &#x2014;
Control reuse of instances. Passed on to <code>fsspec</code>.`,name:"skip_instance_cache"},{anchor:"datasets.filesystems.S3FileSystem.use_listings_cache",description:`<strong>use_listings_cache</strong> (<code>bool</code>) &#x2014;
Control reuse of directory listings. Passed on to <code>fsspec</code>.`,name:"use_listings_cache"},{anchor:"datasets.filesystems.S3FileSystem.listings_expiry_time",description:`<strong>listings_expiry_time</strong> (<code>int</code> or <code>float</code>) &#x2014;
Control reuse of directory listings. Passed on to <code>fsspec</code>.`,name:"listings_expiry_time"},{anchor:"datasets.filesystems.S3FileSystem.max_paths",description:"<strong>max_paths</strong> (<code>int</code>) &#x2014; Control reuse of directory listings. Passed on to <code>fsspec</code>.",name:"max_paths"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/filesystems/s3filesystem.py#L4"}}),rc=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example",$$slots:{default:[t1e]},$$scope:{ctx:k}}}),oc=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example-2",$$slots:{default:[a1e]},$$scope:{ctx:k}}}),lc=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example-3",$$slots:{default:[s1e]},$$scope:{ctx:k}}}),ic=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example-4",$$slots:{default:[n1e]},$$scope:{ctx:k}}}),dc=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example-5",$$slots:{default:[r1e]},$$scope:{ctx:k}}}),uu=new E({props:{name:"datasets.filesystems.extract_path_from_uri",anchor:"datasets.filesystems.extract_path_from_uri",parameters:[{name:"dataset_path",val:": str"}],parametersDescription:[{anchor:"datasets.filesystems.extract_path_from_uri.dataset_path",description:`<strong>dataset_path</strong> (<code>str</code>) &#x2014;
Path (e.g. <code>dataset/train</code>) or remote uri (e.g. <code>s3://my-bucket/dataset/train</code>) of the dataset directory.`,name:"dataset_path"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/filesystems/__init__.py#L30"}}),_u=new E({props:{name:"datasets.filesystems.is_remote_filesystem",anchor:"datasets.filesystems.is_remote_filesystem",parameters:[{name:"fs",val:": AbstractFileSystem"}],parametersDescription:[{anchor:"datasets.filesystems.is_remote_filesystem.fs",description:`<strong>fs</strong> (<code>fsspec.spec.AbstractFileSystem</code>) &#x2014;
An abstract super-class for pythonic file-systems, e.g. <code>fsspec.filesystem(&apos;file&apos;)</code> or <a href="/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.filesystems.S3FileSystem">datasets.filesystems.S3FileSystem</a>.`,name:"fs"}],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/filesystems/__init__.py#L43"}}),bu=new Oa({}),$u=new E({props:{name:"class datasets.fingerprint.Hasher",anchor:"datasets.fingerprint.Hasher",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.11.0/src/datasets/fingerprint.py#L211"}}),{c(){c=s("meta"),u=m(),f=s("h1"),d=s("a"),g=s("span"),_(t.$$.fragment),p=m(),ce=s("span"),B=o("Main classes"),pe=m(),ge=s("h2"),Te=s("a"),ue=s("span"),_(za.$$.fragment),Ou=m(),qo=s("span"),H6=o("DatasetInfo"),r3=m(),me=s("div"),_(Jc.$$.fragment),G6=m(),Q$=s("p"),K6=o("Information about a dataset."),W6=m(),zu=s("p"),Z$=s("code"),Y6=o("DatasetInfo"),J6=o(` documents datasets, including its name, version, and features.
See the constructor arguments and properties for a full list.`),Q6=m(),X$=s("p"),Z6=o("Not all fields are known on construction and may be updated later."),X6=m(),Ne=s("div"),_(Qc.$$.fragment),e8=m(),Rn=s("p"),t8=o("Create "),Su=s("a"),a8=o("DatasetInfo"),s8=o(" from the JSON file in "),ex=s("code"),n8=o("dataset_info_dir"),r8=o("."),o8=m(),Zc=s("p"),l8=o(`This function updates all the dynamically generated fields (num_examples,
hash, time of creation,\u2026) of the `),Vu=s("a"),i8=o("DatasetInfo"),d8=o("."),c8=m(),tx=s("p"),p8=o("This will overwrite all previous metadata."),m8=m(),_(Io.$$.fragment),h8=m(),Sa=s("div"),_(Xc.$$.fragment),f8=m(),Bn=s("p"),g8=o("Write "),ax=s("code"),u8=o("DatasetInfo"),_8=o(" and license (if present) as JSON files to "),sx=s("code"),b8=o("dataset_info_dir"),$8=o("."),x8=m(),_(To.$$.fragment),o3=m(),Hn=s("h2"),No=s("a"),nx=s("span"),_(ep.$$.fragment),v8=m(),rx=s("span"),y8=o("Dataset"),l3=m(),Po=s("p"),j8=o("The base class "),Uu=s("a"),w8=o("Dataset"),D8=o(" implements a Dataset backed by an Apache Arrow table."),i3=m(),q=s("div"),_(tp.$$.fragment),k8=m(),ox=s("p"),E8=o("A Dataset backed by an Arrow table."),q8=m(),$t=s("div"),_(ap.$$.fragment),I8=m(),lx=s("p"),T8=o("Add column to Dataset."),N8=m(),ix=s("p"),P8=o("<Added version=\u201C1.7\u201D/>"),A8=m(),_(Ao.$$.fragment),L8=m(),xt=s("div"),_(sp.$$.fragment),F8=m(),dx=s("p"),C8=o("Add item to Dataset."),O8=m(),cx=s("p"),z8=o("<Added version=\u201C1.7\u201D/>"),S8=m(),_(Lo.$$.fragment),V8=m(),Fo=s("div"),_(np.$$.fragment),U8=m(),px=s("p"),M8=o("Instantiate a Dataset backed by an Arrow table at filename."),R8=m(),Co=s("div"),_(rp.$$.fragment),B8=m(),mx=s("p"),H8=o("Instantiate a Dataset backed by an Arrow buffer."),G8=m(),Pe=s("div"),_(op.$$.fragment),K8=m(),Ht=s("p"),W8=o("Convert "),hx=s("code"),Y8=o("pandas.DataFrame"),J8=o(" to a "),fx=s("code"),Q8=o("pyarrow.Table"),Z8=o(" to create a "),Mu=s("a"),X8=o("Dataset"),eq=o("."),tq=m(),Gn=s("p"),aq=o("The column types in the resulting Arrow Table are inferred from the dtypes of the "),gx=s("code"),sq=o("pandas.Series"),nq=o(` in the
DataFrame. In the case of non-object Series, the NumPy dtype is translated to its Arrow equivalent. In the
case of `),ux=s("code"),rq=o("object"),oq=o(", we need to guess the datatype by looking at the Python objects in this Series."),lq=m(),Gt=s("p"),iq=o("Be aware that Series of the "),_x=s("code"),dq=o("object"),cq=o(` dtype don\u2019t carry enough information to always lead to a meaningful Arrow
type. In the case that we cannot infer a type, e.g. because the DataFrame is of length 0 or the Series only
contains `),bx=s("code"),pq=o("None/nan"),mq=o(" objects, the type is set to "),$x=s("code"),hq=o("null"),fq=o(`. This behavior can be avoided by constructing explicit
features and passing it to this function.`),gq=m(),_(Oo.$$.fragment),uq=m(),zo=s("div"),_(lp.$$.fragment),_q=m(),Kt=s("p"),bq=o("Convert "),xx=s("code"),$q=o("dict"),xq=o(" to a "),vx=s("code"),vq=o("pyarrow.Table"),yq=o(" to create a "),Ru=s("a"),jq=o("Dataset"),wq=o("."),Dq=m(),vt=s("div"),_(ip.$$.fragment),kq=m(),yx=s("p"),Eq=o("Create a Dataset from a generator."),qq=m(),_(So.$$.fragment),Iq=m(),_(Vo.$$.fragment),Tq=m(),Va=s("div"),_(dp.$$.fragment),Nq=m(),jx=s("p"),Pq=o("The Apache Arrow table backing the dataset."),Aq=m(),_(Uo.$$.fragment),Lq=m(),Ua=s("div"),_(cp.$$.fragment),Fq=m(),wx=s("p"),Cq=o("The cache files containing the Apache Arrow table backing the dataset."),Oq=m(),_(Mo.$$.fragment),zq=m(),Ma=s("div"),_(pp.$$.fragment),Sq=m(),Dx=s("p"),Vq=o("Number of columns in the dataset."),Uq=m(),_(Ro.$$.fragment),Mq=m(),Ra=s("div"),_(mp.$$.fragment),Rq=m(),hp=s("p"),Bq=o("Number of rows in the dataset (same as "),Bo=s("a"),Hq=o("Dataset."),kx=s("strong"),Gq=o("len"),Kq=o("()"),Wq=o(")."),Yq=m(),_(Ho.$$.fragment),Jq=m(),Ba=s("div"),_(fp.$$.fragment),Qq=m(),Ex=s("p"),Zq=o("Names of the columns in the dataset."),Xq=m(),_(Go.$$.fragment),e9=m(),Ha=s("div"),_(gp.$$.fragment),t9=m(),qx=s("p"),a9=o("Shape of the dataset (number of columns, number of rows)."),s9=m(),_(Ko.$$.fragment),n9=m(),yt=s("div"),_(up.$$.fragment),r9=m(),Ix=s("p"),o9=o("Return a list of the unique elements in a column."),l9=m(),Tx=s("p"),i9=o("This is implemented in the low-level backend and as such, very fast."),d9=m(),_(Wo.$$.fragment),c9=m(),Ga=s("div"),_(_p.$$.fragment),p9=m(),Nx=s("p"),m9=o(`Flatten the table.
Each column with a struct type is flattened into one column per struct field.
Other columns are left unchanged.`),h9=m(),_(Yo.$$.fragment),f9=m(),Ka=s("div"),_(bp.$$.fragment),g9=m(),Px=s("p"),u9=o("Cast the dataset to a new set of features."),_9=m(),_(Jo.$$.fragment),b9=m(),Wa=s("div"),_($p.$$.fragment),$9=m(),Ax=s("p"),x9=o("Cast column to feature for decoding."),v9=m(),_(Qo.$$.fragment),y9=m(),jt=s("div"),_(xp.$$.fragment),j9=m(),Lx=s("p"),w9=o("Remove one or several column(s) in the dataset and the features associated to them."),D9=m(),Kn=s("p"),k9=o("You can also remove a column using "),Bu=s("a"),E9=o("map()"),q9=o(" with "),Fx=s("code"),I9=o("remove_columns"),T9=o(` but the present method
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),N9=m(),_(Zo.$$.fragment),P9=m(),Ya=s("div"),_(vp.$$.fragment),A9=m(),Cx=s("p"),L9=o(`Rename a column in the dataset, and move the features associated to the original column under the new column
name.`),F9=m(),_(Xo.$$.fragment),C9=m(),Ja=s("div"),_(yp.$$.fragment),O9=m(),Ox=s("p"),z9=o(`Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.`),S9=m(),_(el.$$.fragment),V9=m(),Qa=s("div"),_(jp.$$.fragment),U9=m(),zx=s("p"),M9=o(`Select one or several column(s) in the dataset and the features
associated to them.`),R9=m(),_(tl.$$.fragment),B9=m(),Za=s("div"),_(wp.$$.fragment),H9=m(),Dp=s("p"),G9=o("Casts the given column as "),Hu=s("a"),K9=o("ClassLabel"),W9=o(" and updates the table."),Y9=m(),_(al.$$.fragment),J9=m(),Xa=s("div"),_(kp.$$.fragment),Q9=m(),Sx=s("p"),Z9=o("Number of rows in the dataset."),X9=m(),_(sl.$$.fragment),eI=m(),es=s("div"),_(Ep.$$.fragment),tI=m(),Vx=s("p"),aI=o("Iterate through the examples."),sI=m(),qp=s("p"),nI=o("If a formatting is set with "),Gu=s("a"),rI=o("Dataset.set_format()"),oI=o(` rows will be returned with the
selected format.`),lI=m(),ts=s("div"),_(Ip.$$.fragment),iI=m(),Tp=s("p"),dI=o("Iterate through the batches of size "),Ux=s("em"),cI=o("batch_size"),pI=o("."),mI=m(),Np=s("p"),hI=o("If a formatting is set with ["),Mx=s("em"),fI=o("~datasets.Dataset.set_format"),gI=o(`] rows will be returned with the
selected format.`),uI=m(),nl=s("div"),_(Pp.$$.fragment),_I=m(),Wn=s("p"),bI=o("To be used in a "),Rx=s("code"),$I=o("with"),xI=o(" statement. Set "),Bx=s("code"),vI=o("__getitem__"),yI=o(" return format (type and columns)."),jI=m(),Ae=s("div"),_(Ap.$$.fragment),wI=m(),Qe=s("p"),DI=o("Set "),Hx=s("code"),kI=o("__getitem__"),EI=o(` return format (type and columns). The data formatting is applied on-the-fly.
The format `),Gx=s("code"),qI=o("type"),II=o(" (for example \u201Cnumpy\u201D) is used to format batches when using "),Kx=s("code"),TI=o("__getitem__"),NI=o(`.
It\u2019s also possible to use custom transforms for formatting using `),Ku=s("a"),PI=o("set_transform()"),AI=o("."),LI=m(),Wt=s("p"),FI=o("It is possible to call "),Wu=s("a"),CI=o("map()"),OI=o(" after calling "),Wx=s("code"),zI=o("set_format"),SI=o(". Since "),Yx=s("code"),VI=o("map"),UI=o(" may add new columns, then the list of formatted columns"),MI=m(),_(rl.$$.fragment),RI=m(),_(ol.$$.fragment),BI=m(),as=s("div"),_(Lp.$$.fragment),HI=m(),Ze=s("p"),GI=o("Set "),Jx=s("code"),KI=o("__getitem__"),WI=o(" return format using this transform. The transform is applied on-the-fly on batches when "),Qx=s("code"),YI=o("__getitem__"),JI=o(` is called.
As `),Yu=s("a"),QI=o("set_format()"),ZI=o(", this can be reset using "),Ju=s("a"),XI=o("reset_format()"),eT=o("."),tT=m(),_(ll.$$.fragment),aT=m(),wt=s("div"),_(Fp.$$.fragment),sT=m(),Cp=s("p"),nT=o("Reset "),Zx=s("code"),rT=o("__getitem__"),oT=o(" return format to python objects and all columns."),lT=m(),Qu=s("p"),iT=o("Same as "),Xx=s("code"),dT=o("self.set_format()"),cT=m(),_(il.$$.fragment),pT=m(),Le=s("div"),_(Op.$$.fragment),mT=m(),Yt=s("p"),hT=o("Set "),ev=s("code"),fT=o("__getitem__"),gT=o(` return format (type and columns). The data formatting is applied on-the-fly.
The format `),tv=s("code"),uT=o("type"),_T=o(" (for example \u201Cnumpy\u201D) is used to format batches when using "),av=s("code"),bT=o("__getitem__"),$T=o("."),xT=m(),zp=s("p"),vT=o("It\u2019s also possible to use custom transforms for formatting using "),Zu=s("a"),yT=o("with_transform()"),jT=o("."),wT=m(),Jt=s("p"),DT=o("Contrary to "),Xu=s("a"),kT=o("set_format()"),ET=o(", "),sv=s("code"),qT=o("with_format"),IT=o(" returns a new "),e_=s("a"),TT=o("Dataset"),NT=o(" object."),PT=m(),_(dl.$$.fragment),AT=m(),Fe=s("div"),_(Sp.$$.fragment),LT=m(),Yn=s("p"),FT=o("Set "),nv=s("code"),CT=o("__getitem__"),OT=o(" return format using this transform. The transform is applied on-the-fly on batches when "),rv=s("code"),zT=o("__getitem__"),ST=o(" is called."),VT=m(),Jn=s("p"),UT=o("As "),t_=s("a"),MT=o("set_format()"),RT=o(", this can be reset using "),a_=s("a"),BT=o("reset_format()"),HT=o("."),GT=m(),Qt=s("p"),KT=o("Contrary to "),s_=s("a"),WT=o("set_transform()"),YT=o(", "),ov=s("code"),JT=o("with_transform"),QT=o(" returns a new "),n_=s("a"),ZT=o("Dataset"),XT=o(" object."),eN=m(),_(cl.$$.fragment),tN=m(),pl=s("div"),_(Vp.$$.fragment),aN=m(),lv=s("p"),sN=o("Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."),nN=m(),Dt=s("div"),_(Up.$$.fragment),rN=m(),iv=s("p"),oN=o(`Clean up all cache files in the dataset cache directory, excepted the currently used cache file if there is
one.`),lN=m(),dv=s("p"),iN=o("Be careful when running this command that no other process is currently using other cache files."),dN=m(),_(ml.$$.fragment),cN=m(),Ce=s("div"),_(Mp.$$.fragment),pN=m(),cv=s("p"),mN=o(`Apply a function to all the examples in the table (individually or in batches) and update the table.
If your function returns a column that already exists, then it overwrites it.`),hN=m(),Rp=s("p"),fN=o("You can specify whether the function should be batched or not with the "),pv=s("code"),gN=o("batched"),uN=o(" parameter:"),_N=m(),Qn=s("ul"),Zn=s("li"),bN=o("If batched is "),mv=s("code"),$N=o("False"),xN=o(`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),hv=s("code"),vN=o('{"text": "Hello there !"}'),yN=o("."),jN=m(),Zt=s("li"),wN=o("If batched is "),fv=s("code"),DN=o("True"),kN=o(" and "),gv=s("code"),EN=o("batch_size"),qN=o(` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
A batch is a dictionary, e.g. a batch of 1 example is `),uv=s("code"),IN=o('{"text": ["Hello there !"]}'),TN=o("."),NN=m(),Y=s("li"),PN=o("If batched is "),_v=s("code"),AN=o("True"),LN=o(" and "),bv=s("code"),FN=o("batch_size"),CN=o(" is "),$v=s("code"),ON=o("n > 1"),zN=o(", then the function takes a batch of "),xv=s("code"),SN=o("n"),VN=o(" examples as input and can return a batch with "),vv=s("code"),UN=o("n"),MN=o(` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),yv=s("code"),RN=o("n"),BN=o(` examples.
A batch is a dictionary, e.g. a batch of `),jv=s("code"),HN=o("n"),GN=o(" examples is "),wv=s("code"),KN=o('{"text": ["Hello there !"] * n}'),WN=o("."),YN=m(),_(hl.$$.fragment),JN=m(),ss=s("div"),_(Bp.$$.fragment),QN=m(),Dv=s("p"),ZN=o(`Apply a filter function to all the elements in the table in batches
and update the table so that the dataset only includes examples according to the filter function.`),XN=m(),_(fl.$$.fragment),eP=m(),ns=s("div"),_(Hp.$$.fragment),tP=m(),kv=s("p"),aP=o("Create a new dataset with rows selected following the list/array of indices."),sP=m(),_(gl.$$.fragment),nP=m(),rs=s("div"),_(Gp.$$.fragment),rP=m(),Ev=s("p"),oP=o("Create a new dataset sorted according to a single or multiple columns."),lP=m(),_(ul.$$.fragment),iP=m(),Z=s("div"),_(Kp.$$.fragment),dP=m(),qv=s("p"),cP=o("Create a new Dataset where the rows are shuffled."),pP=m(),Iv=s("p"),mP=o(`Currently shuffling uses numpy random generators.
You can either supply a NumPy BitGenerator to use, or a seed to initiate NumPy\u2019s default random generator (PCG64).`),hP=m(),Xt=s("p"),fP=o("Shuffling takes the list of indices "),Tv=s("code"),gP=o("[0:len(my_dataset)]"),uP=o(` and shuffles it to create an indices mapping.
However as soon as your `),r_=s("a"),_P=o("Dataset"),bP=o(` has an indices mapping, the speed can become 10x slower.
This is because there is an extra step to get the row index to read using the indices mapping, and most importantly, you aren\u2019t reading contiguous chunks of data anymore.
To restore the speed, you\u2019d need to rewrite the entire dataset on your disk again using `),o_=s("a"),$P=o("Dataset.flatten_indices()"),xP=o(", which removes the indices mapping."),vP=m(),_(_l.$$.fragment),yP=m(),Xn=s("p"),jP=o("In this case, we recommend switching to an "),l_=s("a"),wP=o("IterableDataset"),DP=o(" and leveraging its fast approximate shuffling method "),i_=s("a"),kP=o("IterableDataset.shuffle()"),EP=o("."),qP=m(),_(bl.$$.fragment),IP=m(),_($l.$$.fragment),TP=m(),kt=s("div"),_(Wp.$$.fragment),NP=m(),te=s("p"),PP=o("Return a dictionary ("),d_=s("a"),AP=o("datasets.DatasetDict"),LP=o(") with two random train and test subsets ("),Nv=s("code"),FP=o("train"),CP=o(" and "),Pv=s("code"),OP=o("test"),zP=m(),Av=s("code"),SP=o("Dataset"),VP=o(` splits).
Splits are created from the dataset according to `),Lv=s("code"),UP=o("test_size"),MP=o(", "),Fv=s("code"),RP=o("train_size"),BP=o(" and "),Cv=s("code"),HP=o("shuffle"),GP=o("."),KP=m(),Yp=s("p"),WP=o("This method is similar to scikit-learn "),Ov=s("code"),YP=o("train_test_split"),JP=o("."),QP=m(),_(xl.$$.fragment),ZP=m(),_e=s("div"),_(Jp.$$.fragment),XP=m(),er=s("p"),eA=o("Return the "),zv=s("code"),tA=o("index"),aA=o("-nth shard from dataset split into "),Sv=s("code"),sA=o("num_shards"),nA=o(" pieces."),rA=m(),tr=s("p"),oA=o("This shards deterministically. "),Vv=s("code"),lA=o("dset.shard(n, i)"),iA=o(` will contain all elements of dset whose
index mod `),Uv=s("code"),dA=o("n = i"),cA=o("."),pA=m(),be=s("p"),Mv=s("code"),mA=o("dset.shard(n, i, contiguous=True)"),hA=o(` will instead split dset into contiguous chunks,
so it can be easily concatenated back together after processing. If `),Rv=s("code"),fA=o("n % i == l"),gA=o(`, then the
first `),Bv=s("code"),uA=o("l"),_A=o(" shards will have length "),Hv=s("code"),bA=o("(n // i) + 1"),$A=o(", and the remaining shards will have length "),Gv=s("code"),xA=o("(n // i)"),vA=o(`.
`),Kv=s("code"),yA=o("datasets.concatenate([dset.shard(n, i, contiguous=True) for i in range(n)])"),jA=o(` will return
a dataset with the same order as the original.`),wA=m(),Qp=s("p"),DA=o("Be sure to shard before using any randomizing operator (such as "),Wv=s("code"),kA=o("shuffle"),EA=o(`).
It is best if the shard operator is used early in the dataset pipeline.`),qA=m(),_(vl.$$.fragment),IA=m(),os=s("div"),_(Zp.$$.fragment),TA=m(),ae=s("p"),NA=o("Create a "),Yv=s("code"),PA=o("tf.data.Dataset"),AA=o(" from the underlying Dataset. This "),Jv=s("code"),LA=o("tf.data.Dataset"),FA=o(` will load and collate batches from
the Dataset, and is suitable for passing to methods like `),Qv=s("code"),CA=o("model.fit()"),OA=o(" or "),Zv=s("code"),zA=o("model.predict()"),SA=o(`. The dataset will yield
`),Xv=s("code"),VA=o("dicts"),UA=o(" for both inputs and labels unless the "),e0=s("code"),MA=o("dict"),RA=o(` would contain only a single key, in which case a raw
`),t0=s("code"),BA=o("tf.Tensor"),HA=o(" is yielded instead."),GA=m(),_(yl.$$.fragment),KA=m(),Et=s("div"),_(Xp.$$.fragment),WA=m(),a0=s("p"),YA=o(`Pushes the dataset to the hub as a Parquet dataset.
The dataset is pushed using HTTP requests and does not need to have neither git or git-lfs installed.`),JA=m(),Xe=s("p"),QA=o("The resulting Parquet files are self-contained by default. If your dataset contains "),c_=s("a"),ZA=o("Image"),XA=o(" or "),p_=s("a"),eL=o("Audio"),tL=o(`
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `),s0=s("code"),aL=o("embed_external_files"),sL=o(" to "),n0=s("code"),nL=o("False"),rL=o("."),oL=m(),_(jl.$$.fragment),lL=m(),Oe=s("div"),_(em.$$.fragment),iL=m(),ar=s("p"),dL=o("Saves a dataset to a dataset directory, or in a filesystem using either "),r0=s("code"),cL=o("s3fs.S3FileSystem"),pL=o(` or
any implementation of `),o0=s("code"),mL=o("fsspec.spec.AbstractFileSystem"),hL=o("."),fL=m(),sr=s("p"),gL=o("For "),m_=s("a"),uL=o("Image"),_L=o(" and "),h_=s("a"),bL=o("Audio"),$L=o(" data:"),xL=m(),l0=s("p"),vL=o(`All the Image() and Audio() data are stored in the arrow files.
If you want to store paths or urls, please use the Value(\u201Cstring\u201D) type.`),yL=m(),_(wl.$$.fragment),jL=m(),ls=s("div"),_(tm.$$.fragment),wL=m(),ea=s("p"),DL=o("Loads a dataset that was previously saved using "),i0=s("code"),kL=o("save_to_disk"),EL=o(` from a dataset directory, or from a
filesystem using either `),d0=s("code"),qL=o("s3fs.S3FileSystem"),IL=o(` or any implementation of
`),c0=s("code"),TL=o("fsspec.spec.AbstractFileSystem"),NL=o("."),PL=m(),_(Dl.$$.fragment),AL=m(),kl=s("div"),_(am.$$.fragment),LL=m(),p0=s("p"),FL=o("Create and cache a new Dataset by flattening the indices mapping."),CL=m(),is=s("div"),_(sm.$$.fragment),OL=m(),m0=s("p"),zL=o("Exports the dataset to csv"),SL=m(),_(El.$$.fragment),VL=m(),ds=s("div"),_(nm.$$.fragment),UL=m(),rm=s("p"),ML=o("Returns the dataset as a "),h0=s("code"),RL=o("pandas.DataFrame"),BL=o(". Can also return a generator for large datasets."),HL=m(),_(ql.$$.fragment),GL=m(),cs=s("div"),_(om.$$.fragment),KL=m(),f0=s("p"),WL=o("Returns the dataset as a Python dict. Can also return a generator for large datasets."),YL=m(),_(Il.$$.fragment),JL=m(),ps=s("div"),_(lm.$$.fragment),QL=m(),g0=s("p"),ZL=o("Export the dataset to JSON Lines or JSON."),XL=m(),_(Tl.$$.fragment),eF=m(),ms=s("div"),_(im.$$.fragment),tF=m(),u0=s("p"),aF=o("Exports the dataset to parquet"),sF=m(),_(Nl.$$.fragment),nF=m(),hs=s("div"),_(dm.$$.fragment),rF=m(),_0=s("p"),oF=o("Exports the dataset to a SQL database."),lF=m(),_(Pl.$$.fragment),iF=m(),qt=s("div"),_(cm.$$.fragment),dF=m(),nr=s("p"),cF=o(`Add a dense index using Faiss for fast retrieval.
By default the index is done over the vectors of the specified column.
You can specify `),b0=s("code"),pF=o("device"),mF=o(" if you want to run it on GPU ("),$0=s("code"),hF=o("device"),fF=o(` must be the GPU index).
You can find more information about Faiss here:`),gF=m(),x0=s("ul"),f_=s("li"),uF=o("For "),pm=s("a"),_F=o("string factory"),bF=m(),_(Al.$$.fragment),$F=m(),fs=s("div"),_(mm.$$.fragment),xF=m(),ta=s("p"),vF=o(`Add a dense index using Faiss for fast retrieval.
The index is created using the vectors of `),v0=s("code"),yF=o("external_arrays"),jF=o(`.
You can specify `),y0=s("code"),wF=o("device"),DF=o(" if you want to run it on GPU ("),j0=s("code"),kF=o("device"),EF=o(` must be the GPU index).
You can find more information about Faiss here:`),qF=m(),w0=s("ul"),g_=s("li"),IF=o("For "),hm=s("a"),TF=o("string factory"),NF=m(),Ll=s("div"),_(fm.$$.fragment),PF=m(),D0=s("p"),AF=o("Save a FaissIndex on disk."),LF=m(),gs=s("div"),_(gm.$$.fragment),FF=m(),k0=s("p"),CF=o("Load a FaissIndex from disk."),OF=m(),um=s("p"),zF=o(`If you want to do additional configurations, you can have access to the faiss index object by doing
`),E0=s("code"),SF=o(".get_index(index_name).faiss_index"),VF=o(" to make it fit your needs."),UF=m(),us=s("div"),_(_m.$$.fragment),MF=m(),q0=s("p"),RF=o("Add a text index using ElasticSearch for fast retrieval. This is done in-place."),BF=m(),_(Fl.$$.fragment),HF=m(),Cl=s("div"),_(bm.$$.fragment),GF=m(),I0=s("p"),KF=o("Load an existing text index using ElasticSearch for fast retrieval."),WF=m(),Ol=s("div"),_($m.$$.fragment),YF=m(),xm=s("p"),JF=o("List the "),T0=s("code"),QF=o("colindex_nameumns"),ZF=o("/identifiers of all the attached indexes."),XF=m(),zl=s("div"),_(vm.$$.fragment),eC=m(),ym=s("p"),tC=o("List the "),N0=s("code"),aC=o("index_name"),sC=o("/identifiers of all the attached indexes."),nC=m(),Sl=s("div"),_(jm.$$.fragment),rC=m(),P0=s("p"),oC=o("Drop the index with the specified column."),lC=m(),Vl=s("div"),_(wm.$$.fragment),iC=m(),A0=s("p"),dC=o("Find the nearest examples indices in the dataset to the query."),cC=m(),Ul=s("div"),_(Dm.$$.fragment),pC=m(),L0=s("p"),mC=o("Find the nearest examples indices in the dataset to the query."),hC=m(),Ml=s("div"),_(km.$$.fragment),fC=m(),F0=s("p"),gC=o("Find the nearest examples in the dataset to the query."),uC=m(),Rl=s("div"),_(Em.$$.fragment),_C=m(),C0=s("p"),bC=o("Find the nearest examples in the dataset to the query."),$C=m(),Bl=s("div"),_(qm.$$.fragment),xC=m(),u_=s("p"),__=s("a"),vC=o("DatasetInfo"),yC=o(" object containing all the metadata in the dataset."),jC=m(),Hl=s("div"),_(Im.$$.fragment),wC=m(),b_=s("p"),$_=s("a"),DC=o("NamedSplit"),kC=o(" object corresponding to a named dataset split."),EC=m(),x_=s("div"),_(Tm.$$.fragment),qC=m(),v_=s("div"),_(Nm.$$.fragment),IC=m(),y_=s("div"),_(Pm.$$.fragment),TC=m(),j_=s("div"),_(Am.$$.fragment),NC=m(),w_=s("div"),_(Lm.$$.fragment),PC=m(),D_=s("div"),_(Fm.$$.fragment),AC=m(),k_=s("div"),_(Cm.$$.fragment),LC=m(),E_=s("div"),_(Om.$$.fragment),FC=m(),q_=s("div"),_(zm.$$.fragment),CC=m(),I_=s("div"),_(Sm.$$.fragment),OC=m(),T_=s("div"),_(Vm.$$.fragment),zC=m(),N_=s("div"),_(Um.$$.fragment),SC=m(),P_=s("div"),_(Mm.$$.fragment),VC=m(),_s=s("div"),_(Rm.$$.fragment),UC=m(),O0=s("p"),MC=o("Create Dataset from CSV file(s)."),RC=m(),_(Gl.$$.fragment),BC=m(),bs=s("div"),_(Bm.$$.fragment),HC=m(),z0=s("p"),GC=o("Create Dataset from JSON or JSON Lines file(s)."),KC=m(),_(Kl.$$.fragment),WC=m(),$s=s("div"),_(Hm.$$.fragment),YC=m(),S0=s("p"),JC=o("Create Dataset from Parquet file(s)."),QC=m(),_(Wl.$$.fragment),ZC=m(),xs=s("div"),_(Gm.$$.fragment),XC=m(),V0=s("p"),eO=o("Create Dataset from text file(s)."),tO=m(),_(Yl.$$.fragment),aO=m(),It=s("div"),_(Km.$$.fragment),sO=m(),U0=s("p"),nO=o("Create Dataset from SQL query or database table."),rO=m(),_(Jl.$$.fragment),oO=m(),_(Ql.$$.fragment),lO=m(),vs=s("div"),_(Wm.$$.fragment),iO=m(),rr=s("p"),dO=o("Prepare a dataset for the given task by casting the dataset\u2019s "),A_=s("a"),cO=o("Features"),pO=o(" to standardized column names and types as detailed in "),L_=s("a"),M0=s("code"),mO=o("datasets.tasks"),hO=o("."),fO=m(),or=s("p"),gO=o("Casts "),R0=s("code"),uO=o("datasets.DatasetInfo.features"),_O=o(" according to a task-specific schema. Intended for single-use only, so all task templates are removed from "),B0=s("code"),bO=o("datasets.DatasetInfo.task_templates"),$O=o(" after casting."),xO=m(),ys=s("div"),_(Ym.$$.fragment),vO=m(),Jm=s("p"),yO=o("Align the dataset\u2019s label ID and label name mapping to match an input "),H0=s("code"),jO=o("label2id"),wO=o(` mapping.
This is useful when you want to ensure that a model\u2019s predicted labels are aligned with the dataset.
The alignment in done using the lowercase label names.`),DO=m(),_(Zl.$$.fragment),d3=m(),aa=s("div"),_(Qm.$$.fragment),kO=m(),lr=s("p"),EO=o("Converts a list of "),F_=s("a"),qO=o("Dataset"),IO=o(" with the same schema into a single "),C_=s("a"),TO=o("Dataset"),NO=o("."),PO=m(),_(Xl.$$.fragment),c3=m(),se=s("div"),_(Zm.$$.fragment),AO=m(),G0=s("p"),LO=o(`Interleave several datasets (sources) into a single dataset.
The new dataset is constructed by alternating between the sources to get the examples.`),FO=m(),ir=s("p"),CO=o("You can use this function on a list of "),O_=s("a"),OO=o("Dataset"),zO=o(" objects, or on a list of "),z_=s("a"),SO=o("IterableDataset"),VO=o(" objects."),UO=m(),Xm=s("ul"),dr=s("li"),MO=o("If "),K0=s("code"),RO=o("probabilities"),BO=o(" is "),W0=s("code"),HO=o("None"),GO=o(" (default) the new dataset is constructed by cycling between each source to get the examples."),KO=m(),cr=s("li"),WO=o("If "),Y0=s("code"),YO=o("probabilities"),JO=o(" is not "),J0=s("code"),QO=o("None"),ZO=o(", the new dataset is constructed by getting examples from a random source at a time according to the provided probabilities."),XO=m(),pr=s("p"),ez=o("The resulting dataset ends when one of the source datasets runs out of examples except when "),Q0=s("code"),tz=o("oversampling"),az=o(" is "),Z0=s("code"),sz=o("True"),nz=o(`,
in which case, the resulting dataset ends when all datasets have ran out of examples at least one time.`),rz=m(),X0=s("p"),oz=o("Example:"),lz=m(),_(ei.$$.fragment),p3=m(),he=s("div"),_(eh.$$.fragment),iz=m(),mr=s("p"),dz=o("Split a dataset for the node at rank "),ey=s("code"),cz=o("rank"),pz=o(" in a pool of nodes of size "),ty=s("code"),mz=o("world_size"),hz=o("."),fz=m(),ay=s("p"),gz=o("For map-style datasets:"),uz=m(),sy=s("p"),_z=o(`Each node is assigned a chunk of data, e.g. rank 0 is given the first chunk of the dataset.
To maximize data loading throughput, chunks are made of contiguous data on disk if possible.`),bz=m(),ny=s("p"),$z=o("For iterable datasets:"),xz=m(),sa=s("p"),vz=o("If the dataset has a number of shards that is a factor of "),ry=s("code"),yz=o("world_size"),jz=o(" (i.e. if "),oy=s("code"),wz=o("dataset.n_shards % world_size == 0"),Dz=o(`),
then the shards are evenly assigned across the nodes, which is the most optimized.
Otherwise, each node keeps 1 example out of `),ly=s("code"),kz=o("world_size"),Ez=o(", skipping the other examples."),m3=m(),De=s("div"),_(th.$$.fragment),qz=m(),iy=s("p"),Iz=o(`When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it\u2019s already been computed.`),Tz=m(),dy=s("p"),Nz=o(`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),Pz=m(),cy=s("p"),Az=o(`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),Lz=m(),et=s("ul"),py=s("li"),Fz=o("cache files are always recreated"),Cz=m(),my=s("li"),Oz=o("cache files are written to a temporary directory that is deleted when session closes"),zz=m(),hy=s("li"),Sz=o("cache files are named using a random hash instead of the dataset fingerprint"),Vz=m(),ah=s("li"),Uz=o("use "),S_=s("a"),Mz=o("save_to_disk()"),Rz=o(" to save a transformed dataset or it will be deleted when session closes"),Bz=m(),na=s("li"),Hz=o("caching doesn\u2019t affect "),V_=s("a"),Gz=o("load_dataset()"),Kz=o(`. If you want to regenerate a dataset from scratch you should use
the `),fy=s("code"),Wz=o("download_mode"),Yz=o(" parameter in "),U_=s("a"),Jz=o("load_dataset()"),Qz=o("."),h3=m(),ke=s("div"),_(sh.$$.fragment),Zz=m(),gy=s("p"),Xz=o(`When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it\u2019s already been computed.`),eS=m(),uy=s("p"),tS=o(`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),aS=m(),_y=s("p"),sS=o(`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),nS=m(),tt=s("ul"),by=s("li"),rS=o("cache files are always recreated"),oS=m(),$y=s("li"),lS=o("cache files are written to a temporary directory that is deleted when session closes"),iS=m(),xy=s("li"),dS=o("cache files are named using a random hash instead of the dataset fingerprint"),cS=m(),nh=s("li"),pS=o("use "),M_=s("a"),mS=o("save_to_disk()"),hS=o(" to save a transformed dataset or it will be deleted when session closes"),fS=m(),ra=s("li"),gS=o("caching doesn\u2019t affect "),R_=s("a"),uS=o("load_dataset()"),_S=o(`. If you want to regenerate a dataset from scratch you should use
the `),vy=s("code"),bS=o("download_mode"),$S=o(" parameter in "),B_=s("a"),xS=o("load_dataset()"),vS=o("."),f3=m(),Ee=s("div"),_(rh.$$.fragment),yS=m(),yy=s("p"),jS=o(`When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it\u2019s already been computed.`),wS=m(),jy=s("p"),DS=o(`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),kS=m(),wy=s("p"),ES=o(`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),qS=m(),at=s("ul"),Dy=s("li"),IS=o("cache files are always recreated"),TS=m(),ky=s("li"),NS=o("cache files are written to a temporary directory that is deleted when session closes"),PS=m(),Ey=s("li"),AS=o("cache files are named using a random hash instead of the dataset fingerprint"),LS=m(),oh=s("li"),FS=o("use "),H_=s("a"),CS=o("save_to_disk()"),OS=o("] to save a transformed dataset or it will be deleted when session closes"),zS=m(),oa=s("li"),SS=o("caching doesn\u2019t affect "),G_=s("a"),VS=o("load_dataset()"),US=o(`. If you want to regenerate a dataset from scratch you should use
the `),qy=s("code"),MS=o("download_mode"),RS=o(" parameter in "),K_=s("a"),BS=o("load_dataset()"),HS=o("."),g3=m(),hr=s("h2"),ti=s("a"),Iy=s("span"),_(lh.$$.fragment),GS=m(),Ty=s("span"),KS=o("DatasetDict"),u3=m(),ai=s("p"),WS=o("Dictionary with split names as keys (\u2018train\u2019, \u2018test\u2019 for example), and "),Ny=s("code"),YS=o("Dataset"),JS=o(` objects as values.
It also has dataset transform methods like map or filter, to process all the splits at once.`),_3=m(),A=s("div"),_(ih.$$.fragment),QS=m(),Py=s("p"),ZS=o("A dictionary (dict of str: datasets.Dataset) with dataset transforms methods (map, filter, etc.)"),XS=m(),js=s("div"),_(dh.$$.fragment),eV=m(),Ay=s("p"),tV=o("The Apache Arrow tables backing each split."),aV=m(),_(si.$$.fragment),sV=m(),ws=s("div"),_(ch.$$.fragment),nV=m(),Ly=s("p"),rV=o("The cache files containing the Apache Arrow table backing each split."),oV=m(),_(ni.$$.fragment),lV=m(),Ds=s("div"),_(ph.$$.fragment),iV=m(),Fy=s("p"),dV=o("Number of columns in each split of the dataset."),cV=m(),_(ri.$$.fragment),pV=m(),ks=s("div"),_(mh.$$.fragment),mV=m(),hh=s("p"),hV=o("Number of rows in each split of the dataset (same as "),oi=s("a"),fV=o("datasets.Dataset."),Cy=s("strong"),gV=o("len"),uV=o("()"),_V=o(")."),bV=m(),_(li.$$.fragment),$V=m(),Es=s("div"),_(fh.$$.fragment),xV=m(),Oy=s("p"),vV=o("Names of the columns in each split of the dataset."),yV=m(),_(ii.$$.fragment),jV=m(),qs=s("div"),_(gh.$$.fragment),wV=m(),zy=s("p"),DV=o("Shape of each split of the dataset (number of columns, number of rows)."),kV=m(),_(di.$$.fragment),EV=m(),Tt=s("div"),_(uh.$$.fragment),qV=m(),Sy=s("p"),IV=o("Return a list of the unique elements in a column for each split."),TV=m(),Vy=s("p"),NV=o("This is implemented in the low-level backend and as such, very fast."),PV=m(),_(ci.$$.fragment),AV=m(),Is=s("div"),_(_h.$$.fragment),LV=m(),Uy=s("p"),FV=o(`Clean up all cache files in the dataset cache directory, excepted the currently used cache file if there is one.
Be careful when running this command that no other process is currently using other cache files.`),CV=m(),_(pi.$$.fragment),OV=m(),Ts=s("div"),_(bh.$$.fragment),zV=m(),My=s("p"),SV=o(`Apply a function to all the elements in the table (individually or in batches)
and update the table (if function does updated examples).
The transformation is applied to all the datasets of the dataset dictionary.`),VV=m(),_(mi.$$.fragment),UV=m(),Ns=s("div"),_($h.$$.fragment),MV=m(),Ry=s("p"),RV=o(`Apply a filter function to all the elements in the table in batches
and update the table so that the dataset only includes examples according to the filter function.
The transformation is applied to all the datasets of the dataset dictionary.`),BV=m(),_(hi.$$.fragment),HV=m(),Ps=s("div"),_(xh.$$.fragment),GV=m(),By=s("p"),KV=o("Create a new dataset sorted according to a single or multiple columns."),WV=m(),_(fi.$$.fragment),YV=m(),ze=s("div"),_(vh.$$.fragment),JV=m(),Hy=s("p"),QV=o("Create a new Dataset where the rows are shuffled."),ZV=m(),Gy=s("p"),XV=o("The transformation is applied to all the datasets of the dataset dictionary."),eU=m(),Ky=s("p"),tU=o(`Currently shuffling uses numpy random generators.
You can either supply a NumPy BitGenerator to use, or a seed to initiate NumPy\u2019s default random generator (PCG64).`),aU=m(),_(gi.$$.fragment),sU=m(),Se=s("div"),_(yh.$$.fragment),nU=m(),jh=s("p"),rU=o("Set "),Wy=s("code"),oU=o("__getitem__"),lU=o(` return format (type and columns).
The format is set for every dataset in the dataset dictionary.`),iU=m(),st=s("p"),dU=o("It is possible to call "),Yy=s("code"),cU=o("map"),pU=o(" after calling "),Jy=s("code"),mU=o("set_format"),hU=o(". Since "),Qy=s("code"),fU=o("map"),gU=o(` may add new columns, then the list of formatted columns
gets updated. In this case, if you apply `),Zy=s("code"),uU=o("map"),_U=o(" on a dataset to add a new column, then this column will be formatted:"),bU=m(),Xy=s("p"),ej=s("code"),$U=o("new formatted columns = (all columns - previously unformatted columns)"),xU=m(),_(ui.$$.fragment),vU=m(),Nt=s("div"),_(wh.$$.fragment),yU=m(),Dh=s("p"),jU=o("Reset "),tj=s("code"),wU=o("__getitem__"),DU=o(` return format to python objects and all columns.
The transformation is applied to all the datasets of the dataset dictionary.`),kU=m(),W_=s("p"),EU=o("Same as "),aj=s("code"),qU=o("self.set_format()"),IU=m(),_(_i.$$.fragment),TU=m(),bi=s("div"),_(kh.$$.fragment),NU=m(),fr=s("p"),PU=o("To be used in a "),sj=s("code"),AU=o("with"),LU=o(" statement. Set "),nj=s("code"),FU=o("__getitem__"),CU=o(` return format (type and columns).
The transformation is applied to all the datasets of the dataset dictionary.`),OU=m(),Ve=s("div"),_(Eh.$$.fragment),zU=m(),la=s("p"),SU=o("Set "),rj=s("code"),VU=o("__getitem__"),UU=o(` return format (type and columns). The data formatting is applied on-the-fly.
The format `),oj=s("code"),MU=o("type"),RU=o(" (for example \u201Cnumpy\u201D) is used to format batches when using "),lj=s("code"),BU=o("__getitem__"),HU=o(`.
The format is set for every dataset in the dataset dictionary.`),GU=m(),qh=s("p"),KU=o("It\u2019s also possible to use custom transforms for formatting using "),Y_=s("a"),WU=o("with_transform()"),YU=o("."),JU=m(),nt=s("p"),QU=o("Contrary to "),J_=s("a"),ZU=o("set_format()"),XU=o(", "),ij=s("code"),eM=o("with_format"),tM=o(" returns a new "),Q_=s("a"),aM=o("DatasetDict"),sM=o(" object with new "),Z_=s("a"),nM=o("Dataset"),rM=o(" objects."),oM=m(),_($i.$$.fragment),lM=m(),Ue=s("div"),_(Ih.$$.fragment),iM=m(),gr=s("p"),dM=o("Set "),dj=s("code"),cM=o("__getitem__"),pM=o(" return format using this transform. The transform is applied on-the-fly on batches when "),cj=s("code"),mM=o("__getitem__"),hM=o(` is called.
The transform is set for every dataset in the dataset dictionary`),fM=m(),ur=s("p"),gM=o("As "),X_=s("a"),uM=o("set_format()"),_M=o(", this can be reset using "),eb=s("a"),bM=o("reset_format()"),$M=o("."),xM=m(),rt=s("p"),vM=o("Contrary to "),pj=s("code"),yM=o("set_transform()"),jM=o(", "),mj=s("code"),wM=o("with_transform"),DM=o(" returns a new "),tb=s("a"),kM=o("DatasetDict"),EM=o(" object with new "),ab=s("a"),qM=o("Dataset"),IM=o(" objects."),TM=m(),_(xi.$$.fragment),NM=m(),As=s("div"),_(Th.$$.fragment),PM=m(),hj=s("p"),AM=o(`Flatten the Apache Arrow Table of each split (nested features are flatten).
Each column with a struct type is flattened into one column per struct field.
Other columns are left unchanged.`),LM=m(),_(vi.$$.fragment),FM=m(),Pt=s("div"),_(Nh.$$.fragment),CM=m(),fj=s("p"),OM=o(`Cast the dataset to a new set of features.
The transformation is applied to all the datasets of the dataset dictionary.`),zM=m(),ia=s("p"),SM=o("You can also remove a column using "),sb=s("a"),VM=o("Dataset.map()"),UM=o(" with "),gj=s("code"),MM=o("feature"),RM=o(" but "),uj=s("code"),BM=o("cast"),HM=o(`
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),GM=m(),_(yi.$$.fragment),KM=m(),Ls=s("div"),_(Ph.$$.fragment),WM=m(),_j=s("p"),YM=o("Cast column to feature for decoding."),JM=m(),_(ji.$$.fragment),QM=m(),Me=s("div"),_(Ah.$$.fragment),ZM=m(),bj=s("p"),XM=o(`Remove one or several column(s) from each split in the dataset
and the features associated to the column(s).`),eR=m(),$j=s("p"),tR=o("The transformation is applied to all the splits of the dataset dictionary."),aR=m(),_r=s("p"),sR=o("You can also remove a column using "),nb=s("a"),nR=o("Dataset.map()"),rR=o(" with "),xj=s("code"),oR=o("remove_columns"),lR=o(` but the present method
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),iR=m(),_(wi.$$.fragment),dR=m(),Re=s("div"),_(Lh.$$.fragment),cR=m(),vj=s("p"),pR=o(`Rename a column in the dataset and move the features associated to the original column under the new column name.
The transformation is applied to all the datasets of the dataset dictionary.`),mR=m(),br=s("p"),hR=o("You can also rename a column using "),rb=s("a"),fR=o("map()"),gR=o(" with "),yj=s("code"),uR=o("remove_columns"),_R=o(" but the present method:"),bR=m(),Fh=s("ul"),jj=s("li"),$R=o("takes care of moving the original features under the new column name."),xR=m(),wj=s("li"),vR=o("doesn\u2019t copy the data to a new dataset and is thus much faster."),yR=m(),_(Di.$$.fragment),jR=m(),Fs=s("div"),_(Ch.$$.fragment),wR=m(),Dj=s("p"),DR=o(`Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.
The transformation is applied to all the datasets of the dataset dictionary.`),kR=m(),_(ki.$$.fragment),ER=m(),At=s("div"),_(Oh.$$.fragment),qR=m(),kj=s("p"),IR=o(`Select one or several column(s) from each split in the dataset and
the features associated to the column(s).`),TR=m(),Ej=s("p"),NR=o(`The transformation is applied to all the splits of the dataset
dictionary.`),PR=m(),_(Ei.$$.fragment),AR=m(),Cs=s("div"),_(zh.$$.fragment),LR=m(),Sh=s("p"),FR=o("Casts the given column as "),ob=s("a"),CR=o("ClassLabel"),OR=o(" and updates the tables."),zR=m(),_(qi.$$.fragment),SR=m(),Be=s("div"),_(Vh.$$.fragment),VR=m(),$r=s("p"),UR=o("Pushes the "),lb=s("a"),MR=o("DatasetDict"),RR=o(` to the hub as a Parquet dataset.
The `),ib=s("a"),BR=o("DatasetDict"),HR=o(" is pushed using HTTP requests and does not need to have neither git or git-lfs installed."),GR=m(),qj=s("p"),KR=o("Each dataset split will be pushed independently. The pushed dataset will keep the original split names."),WR=m(),da=s("p"),YR=o("The resulting Parquet files are self-contained by default: if your dataset contains "),db=s("a"),JR=o("Image"),QR=o(" or "),cb=s("a"),ZR=o("Audio"),XR=o(`
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `),Ij=s("code"),eB=o("embed_external_files"),tB=o(" to False."),aB=m(),_(Ii.$$.fragment),sB=m(),He=s("div"),_(Uh.$$.fragment),nB=m(),xr=s("p"),rB=o("Saves a dataset dict to a filesystem using either "),pb=s("a"),oB=o("S3FileSystem"),lB=o(` or
`),Tj=s("code"),iB=o("fsspec.spec.AbstractFileSystem"),dB=o("."),cB=m(),vr=s("p"),pB=o("For "),mb=s("a"),mB=o("Image"),hB=o(" and "),hb=s("a"),fB=o("Audio"),gB=o(" data:"),uB=m(),Nj=s("p"),_B=o(`All the Image() and Audio() data are stored in the arrow files.
If you want to store paths or urls, please use the Value(\u201Cstring\u201D) type.`),bB=m(),_(Ti.$$.fragment),$B=m(),Os=s("div"),_(Mh.$$.fragment),xB=m(),ca=s("p"),vB=o("Load a dataset that was previously saved using "),Pj=s("code"),yB=o("save_to_disk"),jB=o(` from a filesystem using either
`),fb=s("a"),wB=o("S3FileSystem"),DB=o(" or "),Aj=s("code"),kB=o("fsspec.spec.AbstractFileSystem"),EB=o("."),qB=m(),_(Ni.$$.fragment),IB=m(),zs=s("div"),_(Rh.$$.fragment),TB=m(),Bh=s("p"),NB=o("Create "),gb=s("a"),PB=o("DatasetDict"),AB=o(" from CSV file(s)."),LB=m(),_(Pi.$$.fragment),FB=m(),Ss=s("div"),_(Hh.$$.fragment),CB=m(),Gh=s("p"),OB=o("Create "),ub=s("a"),zB=o("DatasetDict"),SB=o(" from JSON Lines file(s)."),VB=m(),_(Ai.$$.fragment),UB=m(),Vs=s("div"),_(Kh.$$.fragment),MB=m(),Wh=s("p"),RB=o("Create "),_b=s("a"),BB=o("DatasetDict"),HB=o(" from Parquet file(s)."),GB=m(),_(Li.$$.fragment),KB=m(),Us=s("div"),_(Yh.$$.fragment),WB=m(),Jh=s("p"),YB=o("Create "),bb=s("a"),JB=o("DatasetDict"),QB=o(" from text file(s)."),ZB=m(),_(Fi.$$.fragment),XB=m(),Ms=s("div"),_(Qh.$$.fragment),eH=m(),yr=s("p"),tH=o("Prepare a dataset for the given task by casting the dataset\u2019s "),$b=s("a"),aH=o("Features"),sH=o(" to standardized column names and types as detailed in "),xb=s("a"),Lj=s("code"),nH=o("datasets.tasks"),rH=o("."),oH=m(),jr=s("p"),lH=o("Casts "),Fj=s("code"),iH=o("datasets.DatasetInfo.features"),dH=o(" according to a task-specific schema. Intended for single-use only, so all task templates are removed from "),Cj=s("code"),cH=o("datasets.DatasetInfo.task_templates"),pH=o(" after casting."),b3=m(),vb=s("a"),$3=m(),wr=s("h2"),Ci=s("a"),Oj=s("span"),_(Zh.$$.fragment),mH=m(),zj=s("span"),hH=o("IterableDataset"),x3=m(),Oi=s("p"),fH=o("The base class "),yb=s("a"),gH=o("IterableDataset"),uH=o(" implements an iterable Dataset backed by python generators."),v3=m(),F=s("div"),_(Xh.$$.fragment),_H=m(),Sj=s("p"),bH=o("A Dataset backed by an iterable."),$H=m(),Lt=s("div"),_(ef.$$.fragment),xH=m(),Vj=s("p"),vH=o("Create an Iterable Dataset from a generator."),yH=m(),_(zi.$$.fragment),jH=m(),_(Si.$$.fragment),wH=m(),Rs=s("div"),_(tf.$$.fragment),DH=m(),Uj=s("p"),kH=o(`Remove one or several column(s) in the dataset and the features associated to them.
The removal is done on-the-fly on the examples when iterating over the dataset.`),EH=m(),_(Vi.$$.fragment),qH=m(),Bs=s("div"),_(af.$$.fragment),IH=m(),Mj=s("p"),TH=o(`Select one or several column(s) in the dataset and the features
associated to them. The selection is done on-the-fly on the examples
when iterating over the dataset.`),NH=m(),_(Ui.$$.fragment),PH=m(),Hs=s("div"),_(sf.$$.fragment),AH=m(),Rj=s("p"),LH=o("Cast column to feature for decoding."),FH=m(),_(Mi.$$.fragment),CH=m(),Gs=s("div"),_(nf.$$.fragment),OH=m(),Bj=s("p"),zH=o("Cast the dataset to a new set of features."),SH=m(),_(Ri.$$.fragment),VH=m(),jb=s("div"),_(rf.$$.fragment),UH=m(),Bi=s("div"),_(of.$$.fragment),MH=m(),lf=s("p"),RH=o("Iterate through the batches of size "),Hj=s("em"),BH=o("batch_size"),HH=o("."),GH=m(),Ge=s("div"),_(df.$$.fragment),KH=m(),Gj=s("p"),WH=o(`Apply a function to all the examples in the iterable dataset (individually or in batches) and update them.
If your function returns a column that already exists, then it overwrites it.
The function is applied on-the-fly on the examples when iterating over the dataset.`),YH=m(),cf=s("p"),JH=o("You can specify whether the function should be batched or not with the "),Kj=s("code"),QH=o("batched"),ZH=o(" parameter:"),XH=m(),Dr=s("ul"),kr=s("li"),eG=o("If batched is "),Wj=s("code"),tG=o("False"),aG=o(`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),Yj=s("code"),sG=o('{"text": "Hello there !"}'),nG=o("."),rG=m(),Er=s("li"),oG=o("If batched is "),Jj=s("code"),lG=o("True"),iG=o(" and "),Qj=s("code"),dG=o("batch_size"),cG=o(` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
A batch is a dictionary, e.g. a batch of 1 example is {\u201Ctext\u201D: [\u201CHello there !\u201D]}.`),pG=m(),J=s("li"),mG=o("If batched is "),Zj=s("code"),hG=o("True"),fG=o(" and "),Xj=s("code"),gG=o("batch_size"),uG=o(" is "),ew=s("code"),_G=o("n"),bG=o(" > 1, then the function takes a batch of "),tw=s("code"),$G=o("n"),xG=o(" examples as input and can return a batch with "),aw=s("code"),vG=o("n"),yG=o(` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),sw=s("code"),jG=o("n"),wG=o(` examples.
A batch is a dictionary, e.g. a batch of `),nw=s("code"),DG=o("n"),kG=o(" examples is "),rw=s("code"),EG=o('{"text": ["Hello there !"] * n}'),qG=o("."),IG=m(),_(Hi.$$.fragment),TG=m(),Ks=s("div"),_(pf.$$.fragment),NG=m(),ow=s("p"),PG=o(`Rename a column in the dataset, and move the features associated to the original column under the new column
name.`),AG=m(),_(Gi.$$.fragment),LG=m(),Ws=s("div"),_(mf.$$.fragment),FG=m(),lw=s("p"),CG=o(`Apply a filter function to all the elements so that the dataset only includes examples according to the filter function.
The filtering is done on-the-fly when iterating over the dataset.`),OG=m(),_(Ki.$$.fragment),zG=m(),$e=s("div"),_(hf.$$.fragment),SG=m(),iw=s("p"),VG=o("Randomly shuffles the elements of this dataset."),UG=m(),ff=s("p"),MG=o("This dataset fills a buffer with "),dw=s("code"),RG=o("buffer_size"),BG=o(` elements, then randomly samples elements from this buffer,
replacing the selected elements with new elements. For perfect shuffling, a buffer size greater than or
equal to the full size of the dataset is required.`),HG=m(),qr=s("p"),GG=o("For instance, if your dataset contains 10,000 elements but "),cw=s("code"),KG=o("buffer_size"),WG=o(" is set to 1000, then "),pw=s("code"),YG=o("shuffle"),JG=o(` will
initially select a random element from only the first 1000 elements in the buffer. Once an element is
selected, its space in the buffer is replaced by the next (i.e. 1,001-st) element,
maintaining the 1000 element buffer.`),QG=m(),Ir=s("p"),ZG=o(`If the dataset is made of several shards, it also does shuffle the order of the shards.
However if the order has been fixed by using `),wb=s("a"),XG=o("skip()"),eK=o(" or "),Db=s("a"),tK=o("take()"),aK=o(`
then the order of the shards is kept unchanged.`),sK=m(),_(Wi.$$.fragment),nK=m(),Ys=s("div"),_(gf.$$.fragment),rK=m(),Tr=s("p"),oK=o("Create a new "),kb=s("a"),lK=o("IterableDataset"),iK=o(" that skips the first "),mw=s("code"),dK=o("n"),cK=o(" elements."),pK=m(),_(Yi.$$.fragment),mK=m(),Js=s("div"),_(uf.$$.fragment),hK=m(),Nr=s("p"),fK=o("Create a new "),Eb=s("a"),gK=o("IterableDataset"),uK=o(" with only the first "),hw=s("code"),_K=o("n"),bK=o(" elements."),$K=m(),_(Ji.$$.fragment),xK=m(),Qi=s("div"),_(_f.$$.fragment),vK=m(),qb=s("p"),Ib=s("a"),yK=o("DatasetInfo"),jK=o(" object containing all the metadata in the dataset."),wK=m(),Zi=s("div"),_(bf.$$.fragment),DK=m(),Tb=s("p"),Nb=s("a"),kK=o("NamedSplit"),EK=o(" object corresponding to a named dataset split."),qK=m(),Pb=s("div"),_($f.$$.fragment),IK=m(),Ab=s("div"),_(xf.$$.fragment),TK=m(),Lb=s("div"),_(vf.$$.fragment),NK=m(),Fb=s("div"),_(yf.$$.fragment),PK=m(),Cb=s("div"),_(jf.$$.fragment),AK=m(),Ob=s("div"),_(wf.$$.fragment),LK=m(),zb=s("div"),_(Df.$$.fragment),FK=m(),Sb=s("div"),_(kf.$$.fragment),CK=m(),Vb=s("div"),_(Ef.$$.fragment),OK=m(),Ub=s("div"),_(qf.$$.fragment),zK=m(),Mb=s("div"),_(If.$$.fragment),SK=m(),Rb=s("div"),_(Tf.$$.fragment),VK=m(),Bb=s("div"),_(Nf.$$.fragment),y3=m(),Pr=s("h2"),Xi=s("a"),fw=s("span"),_(Pf.$$.fragment),UK=m(),gw=s("span"),MK=o("IterableDatasetDict"),j3=m(),ed=s("p"),RK=o("Dictionary with split names as keys (\u2018train\u2019, \u2018test\u2019 for example), and "),uw=s("code"),BK=o("IterableDataset"),HK=o(" objects as values."),w3=m(),R=s("div"),_(Af.$$.fragment),GK=m(),Ke=s("div"),_(Lf.$$.fragment),KK=m(),_w=s("p"),WK=o(`Apply a function to all the examples in the iterable dataset (individually or in batches) and update them.
If your function returns a column that already exists, then it overwrites it.
The function is applied on-the-fly on the examples when iterating over the dataset.
The transformation is applied to all the datasets of the dataset dictionary.`),YK=m(),Ff=s("p"),JK=o("You can specify whether the function should be batched or not with the "),bw=s("code"),QK=o("batched"),ZK=o(" parameter:"),XK=m(),Ar=s("ul"),Lr=s("li"),eW=o("If batched is "),$w=s("code"),tW=o("False"),aW=o(`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),xw=s("code"),sW=o('{"text": "Hello there !"}'),nW=o("."),rW=m(),pa=s("li"),oW=o("If batched is "),vw=s("code"),lW=o("True"),iW=o(" and "),yw=s("code"),dW=o("batch_size"),cW=o(` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
A batch is a dictionary, e.g. a batch of 1 example is `),jw=s("code"),pW=o('{"text": ["Hello there !"]}'),mW=o("."),hW=m(),Q=s("li"),fW=o("If batched is "),ww=s("code"),gW=o("True"),uW=o(" and "),Dw=s("code"),_W=o("batch_size"),bW=o(" is "),kw=s("code"),$W=o("n"),xW=o(" > 1, then the function takes a batch of "),Ew=s("code"),vW=o("n"),yW=o(" examples as input and can return a batch with "),qw=s("code"),jW=o("n"),wW=o(` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),Iw=s("code"),DW=o("n"),kW=o(` examples.
A batch is a dictionary, e.g. a batch of `),Tw=s("code"),EW=o("n"),qW=o(" examples is "),Nw=s("code"),IW=o('{"text": ["Hello there !"] * n}'),TW=o("."),NW=m(),_(td.$$.fragment),PW=m(),Qs=s("div"),_(Cf.$$.fragment),AW=m(),Pw=s("p"),LW=o(`Apply a filter function to all the elements so that the dataset only includes examples according to the filter function.
The filtering is done on-the-fly when iterating over the dataset.
The filtering is applied to all the datasets of the dataset dictionary.`),FW=m(),_(ad.$$.fragment),CW=m(),xe=s("div"),_(Of.$$.fragment),OW=m(),Aw=s("p"),zW=o(`Randomly shuffles the elements of this dataset.
The shuffling is applied to all the datasets of the dataset dictionary.`),SW=m(),Lw=s("p"),VW=o(`This dataset fills a buffer with buffer_size elements, then randomly samples elements from this buffer,
replacing the selected elements with new elements. For perfect shuffling, a buffer size greater than or
equal to the full size of the dataset is required.`),UW=m(),Fr=s("p"),MW=o("For instance, if your dataset contains 10,000 elements but "),Fw=s("code"),RW=o("buffer_size"),BW=o(" is set to 1000, then "),Cw=s("code"),HW=o("shuffle"),GW=o(` will
initially select a random element from only the first 1000 elements in the buffer. Once an element is
selected, its space in the buffer is replaced by the next (i.e. 1,001-st) element,
maintaining the 1000 element buffer.`),KW=m(),ma=s("p"),WW=o("If the dataset is made of several shards, it also does "),Ow=s("code"),YW=o("shuffle"),JW=o(` the order of the shards.
However if the order has been fixed by using `),Hb=s("a"),QW=o("skip()"),ZW=o(" or "),Gb=s("a"),XW=o("take()"),eY=o(`
then the order of the shards is kept unchanged.`),tY=m(),_(sd.$$.fragment),aY=m(),Zs=s("div"),_(zf.$$.fragment),sY=m(),zw=s("p"),nY=o(`Return a dataset with the specified format.
This method only supports the \u201Ctorch\u201D format for now.
The format is set to all the datasets of the dataset dictionary.`),rY=m(),_(nd.$$.fragment),oY=m(),Xs=s("div"),_(Sf.$$.fragment),lY=m(),Sw=s("p"),iY=o(`Cast the dataset to a new set of features.
The type casting is applied to all the datasets of the dataset dictionary.`),dY=m(),_(rd.$$.fragment),cY=m(),en=s("div"),_(Vf.$$.fragment),pY=m(),Vw=s("p"),mY=o(`Cast column to feature for decoding.
The type casting is applied to all the datasets of the dataset dictionary.`),hY=m(),_(od.$$.fragment),fY=m(),tn=s("div"),_(Uf.$$.fragment),gY=m(),Uw=s("p"),uY=o(`Remove one or several column(s) in the dataset and the features associated to them.
The removal is done on-the-fly on the examples when iterating over the dataset.
The removal is applied to all the datasets of the dataset dictionary.`),_Y=m(),_(ld.$$.fragment),bY=m(),an=s("div"),_(Mf.$$.fragment),$Y=m(),Mw=s("p"),xY=o(`Rename a column in the dataset, and move the features associated to the original column under the new column
name.
The renaming is applied to all the datasets of the dataset dictionary.`),vY=m(),_(id.$$.fragment),yY=m(),sn=s("div"),_(Rf.$$.fragment),jY=m(),Rw=s("p"),wY=o(`Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.
The renaming is applied to all the datasets of the dataset dictionary.`),DY=m(),_(dd.$$.fragment),kY=m(),nn=s("div"),_(Bf.$$.fragment),EY=m(),Bw=s("p"),qY=o(`Select one or several column(s) in the dataset and the features
associated to them. The selection is done on-the-fly on the examples
when iterating over the dataset. The selection is applied to all the
datasets of the dataset dictionary.`),IY=m(),_(cd.$$.fragment),D3=m(),Cr=s("h2"),pd=s("a"),Hw=s("span"),_(Hf.$$.fragment),TY=m(),Gw=s("span"),NY=o("Features"),k3=m(),S=s("div"),_(Gf.$$.fragment),PY=m(),Kw=s("p"),AY=o("A special dictionary that defines the internal structure of a dataset."),LY=m(),Kf=s("p"),FY=o("Instantiated with a dictionary of type "),Ww=s("code"),CY=o("dict[str, FieldType]"),OY=o(`, where keys are the desired column names,
and values are the type of that column.`),zY=m(),Kb=s("p"),Yw=s("code"),SY=o("FieldType"),VY=o(" can be one of the following:"),UY=m(),ne=s("ul"),Jw=s("li"),ha=s("p"),MY=o("a "),Wb=s("a"),RY=o("Value"),BY=o(" feature specifies a single typed value, e.g. "),Qw=s("code"),HY=o("int64"),GY=o(" or "),Zw=s("code"),KY=o("string"),WY=o("."),YY=m(),Xw=s("li"),Wf=s("p"),JY=o("a "),Yb=s("a"),QY=o("ClassLabel"),ZY=o(` feature specifies a field with a predefined set of classes which can have labels
associated to them and will be stored as integers in the dataset.`),XY=m(),e7=s("li"),Yf=s("p"),eJ=o("a python "),t7=s("code"),tJ=o("dict"),aJ=o(` which specifies that the field is a nested field containing a mapping of sub-fields to sub-fields
features. It\u2019s possible to have nested fields of nested fields in an arbitrary manner.`),sJ=m(),Jf=s("li"),ot=s("p"),nJ=o("a python "),a7=s("code"),rJ=o("list"),oJ=o(" or a "),Jb=s("a"),lJ=o("Sequence"),iJ=o(` specifies that the field contains a list of objects. The python
`),s7=s("code"),dJ=o("list"),cJ=o(" or "),Qb=s("a"),pJ=o("Sequence"),mJ=o(` should be provided with a single sub-feature as an example of the feature
type hosted in this list.`),hJ=m(),_(md.$$.fragment),fJ=m(),n7=s("li"),lt=s("p"),gJ=o("a "),Zb=s("a"),uJ=o("Array2D"),_J=o(", "),Xb=s("a"),bJ=o("Array3D"),$J=o(", "),e1=s("a"),xJ=o("Array4D"),vJ=o(" or "),t1=s("a"),yJ=o("Array5D"),jJ=o(" feature for multidimensional arrays."),wJ=m(),r7=s("li"),Qf=s("p"),DJ=o("an "),a1=s("a"),kJ=o("Audio"),EJ=o(` feature to store the absolute path to an audio file or a dictionary with the relative path
to an audio file (\u201Cpath\u201D key) and its bytes content (\u201Cbytes\u201D key). This feature extracts the audio data.`),qJ=m(),o7=s("li"),fa=s("p"),IJ=o("an "),s1=s("a"),TJ=o("Image"),NJ=o(" feature to store the absolute path to an image file, an "),l7=s("code"),PJ=o("np.ndarray"),AJ=o(" object, a "),i7=s("code"),LJ=o("PIL.Image.Image"),FJ=o(` object
or a dictionary with the relative path to an image file (\u201Cpath\u201D key) and its bytes content (\u201Cbytes\u201D key). This feature extracts the image data.`),CJ=m(),d7=s("li"),hd=s("p"),n1=s("a"),OJ=o("Translation"),zJ=o(" and "),r1=s("a"),SJ=o("TranslationVariableLanguages"),VJ=o(", the two features specific to Machine Translation."),UJ=m(),rn=s("div"),_(Zf.$$.fragment),MJ=m(),Xf=s("p"),RJ=o("Make a deep copy of "),o1=s("a"),BJ=o("Features"),HJ=o("."),GJ=m(),_(fd.$$.fragment),KJ=m(),gd=s("div"),_(eg.$$.fragment),WJ=m(),c7=s("p"),YJ=o("Decode batch with custom feature decoding."),JJ=m(),ud=s("div"),_(tg.$$.fragment),QJ=m(),p7=s("p"),ZJ=o("Decode column with custom feature decoding."),XJ=m(),_d=s("div"),_(ag.$$.fragment),eQ=m(),m7=s("p"),tQ=o("Decode example with custom feature decoding."),aQ=m(),bd=s("div"),_(sg.$$.fragment),sQ=m(),h7=s("p"),nQ=o("Encode batch into a format for Arrow."),rQ=m(),$d=s("div"),_(ng.$$.fragment),oQ=m(),f7=s("p"),lQ=o("Encode column into a format for Arrow."),iQ=m(),xd=s("div"),_(rg.$$.fragment),dQ=m(),g7=s("p"),cQ=o("Encode example into a format for Arrow."),pQ=m(),Ft=s("div"),_(og.$$.fragment),mQ=m(),lg=s("p"),hQ=o(`Flatten the features. Every dictionary column is removed and is replaced by
all the subfields it contains. The new fields are named by concatenating the
name of the original column and the subfield name like this: `),u7=s("code"),fQ=o("<original>.<subfield>"),gQ=o("."),uQ=m(),ig=s("p"),_Q=o(`If a column contains nested dictionaries, then all the lower-level subfields names are
also concatenated to form new columns: `),_7=s("code"),bQ=o("<original>.<subfield>.<subsubfield>"),$Q=o(", etc."),xQ=m(),_(vd.$$.fragment),vQ=m(),yd=s("div"),_(dg.$$.fragment),yQ=m(),cg=s("p"),jQ=o("Construct "),l1=s("a"),wQ=o("Features"),DQ=o(` from Arrow Schema.
It also checks the schema metadata for Hugging Face Datasets features.`),kQ=m(),We=s("div"),_(pg.$$.fragment),EQ=m(),mg=s("p"),qQ=o("Construct ["),b7=s("em"),IQ=o("Features"),TQ=o("] from dict."),NQ=m(),Or=s("p"),PQ=o(`Regenerate the nested feature object from a deserialized dict.
We use the `),$7=s("em"),AQ=o("_type"),LQ=o(" key to infer the dataclass name of the feature "),x7=s("em"),FQ=o("FieldType"),CQ=o("."),OQ=m(),ga=s("p"),zQ=o(`It allows for a convenient constructor syntax
to define features from deserialized JSON dictionaries. This function is used in particular when deserializing
a [`),v7=s("em"),SQ=o("DatasetInfo"),VQ=o(`] that was dumped to a JSON object. This acts as an analogue to
[`),y7=s("em"),UQ=o("Features.from_arrow_schema"),MQ=o(`] and handles the recursive field-by-field instantiation, but doesn\u2019t require
any mapping to/from pyarrow, except for the fact that it takes advantage of the mapping of pyarrow primitive
dtypes that [`),j7=s("em"),RQ=o("Value"),BQ=o("] automatically performs."),HQ=m(),_(jd.$$.fragment),GQ=m(),Ct=s("div"),_(hg.$$.fragment),KQ=m(),fg=s("p"),WQ=o("Reorder Features fields to match the field order of other ["),w7=s("em"),YQ=o("Features"),JQ=o("]."),QQ=m(),D7=s("p"),ZQ=o(`The order of the fields is important since it matters for the underlying arrow data.
Re-ordering the fields allows to make the underlying arrow data type match.`),XQ=m(),_(wd.$$.fragment),E3=m(),ua=s("div"),_(gg.$$.fragment),eZ=m(),k7=s("p"),tZ=o(`Construct a list of feature from a single type or a dict of types.
Mostly here for compatiblity with tfds.`),aZ=m(),_(Dd.$$.fragment),q3=m(),K=s("div"),_(ug.$$.fragment),sZ=m(),E7=s("p"),nZ=o("Feature type for integer class labels."),rZ=m(),_g=s("p"),oZ=o("There are 3 ways to define a "),q7=s("code"),lZ=o("ClassLabel"),iZ=o(", which correspond to the 3 arguments:"),dZ=m(),zr=s("ul"),i1=s("li"),I7=s("code"),cZ=o("num_classes"),pZ=o(": Create 0 to (num_classes-1) labels."),mZ=m(),d1=s("li"),T7=s("code"),hZ=o("names"),fZ=o(": List of label strings."),gZ=m(),c1=s("li"),N7=s("code"),uZ=o("names_file"),_Z=o(": File containing the list of labels."),bZ=m(),P7=s("p"),$Z=o(`Under the hood the labels are stored as integers.
You can use negative integers to represent unknown/missing labels.`),xZ=m(),_(kd.$$.fragment),vZ=m(),on=s("div"),_(bg.$$.fragment),yZ=m(),Sr=s("p"),jZ=o("Cast an Arrow array to the "),A7=s("code"),wZ=o("ClassLabel"),DZ=o(` arrow storage type.
The Arrow types that can be converted to the `),L7=s("code"),kZ=o("ClassLabel"),EZ=o(" pyarrow storage type are:"),qZ=m(),$g=s("ul"),F7=s("li"),C7=s("code"),IZ=o("pa.string()"),TZ=m(),O7=s("li"),z7=s("code"),NZ=o("pa.int()"),PZ=m(),Ot=s("div"),_(xg.$$.fragment),AZ=m(),Vr=s("p"),LZ=o("Conversion "),S7=s("code"),FZ=o("integer"),CZ=o(" => class name "),V7=s("code"),OZ=o("string"),zZ=o("."),SZ=m(),vg=s("p"),VZ=o("Regarding unknown/missing labels: passing negative integers raises "),U7=s("code"),UZ=o("ValueError"),MZ=o("."),RZ=m(),_(Ed.$$.fragment),BZ=m(),ln=s("div"),_(yg.$$.fragment),HZ=m(),Ur=s("p"),GZ=o("Conversion class name "),M7=s("code"),KZ=o("string"),WZ=o(" => "),R7=s("code"),YZ=o("integer"),JZ=o("."),QZ=m(),_(qd.$$.fragment),I3=m(),it=s("div"),_(jg.$$.fragment),ZZ=m(),wg=s("p"),XZ=o("The "),B7=s("code"),eX=o("Value"),tX=o(" dtypes are as follows:"),aX=m(),O=s("ul"),H7=s("li"),G7=s("code"),sX=o("null"),nX=m(),K7=s("li"),W7=s("code"),rX=o("bool"),oX=m(),Y7=s("li"),J7=s("code"),lX=o("int8"),iX=m(),Q7=s("li"),Z7=s("code"),dX=o("int16"),cX=m(),X7=s("li"),eD=s("code"),pX=o("int32"),mX=m(),tD=s("li"),aD=s("code"),hX=o("int64"),fX=m(),sD=s("li"),nD=s("code"),gX=o("uint8"),uX=m(),rD=s("li"),oD=s("code"),_X=o("uint16"),bX=m(),lD=s("li"),iD=s("code"),$X=o("uint32"),xX=m(),dD=s("li"),cD=s("code"),vX=o("uint64"),yX=m(),pD=s("li"),mD=s("code"),jX=o("float16"),wX=m(),p1=s("li"),hD=s("code"),DX=o("float32"),kX=o(" (alias float)"),EX=m(),m1=s("li"),fD=s("code"),qX=o("float64"),IX=o(" (alias double)"),TX=m(),gD=s("li"),uD=s("code"),NX=o("time32[(s|ms)]"),PX=m(),_D=s("li"),bD=s("code"),AX=o("time64[(us|ns)]"),LX=m(),$D=s("li"),xD=s("code"),FX=o("timestamp[(s|ms|us|ns)]"),CX=m(),vD=s("li"),yD=s("code"),OX=o("timestamp[(s|ms|us|ns), tz=(tzstring)]"),zX=m(),jD=s("li"),wD=s("code"),SX=o("date32"),VX=m(),DD=s("li"),kD=s("code"),UX=o("date64"),MX=m(),ED=s("li"),qD=s("code"),RX=o("duration[(s|ms|us|ns)]"),BX=m(),ID=s("li"),TD=s("code"),HX=o("decimal128(precision, scale)"),GX=m(),ND=s("li"),PD=s("code"),KX=o("decimal256(precision, scale)"),WX=m(),AD=s("li"),LD=s("code"),YX=o("binary"),JX=m(),FD=s("li"),CD=s("code"),QX=o("large_binary"),ZX=m(),OD=s("li"),zD=s("code"),XX=o("string"),eee=m(),SD=s("li"),VD=s("code"),tee=o("large_string"),aee=m(),_(Id.$$.fragment),T3=m(),dt=s("div"),_(Dg.$$.fragment),see=m(),h1=s("p"),UD=s("code"),nee=o("FeatureConnector"),ree=o(` for translations with fixed languages per example.
Here for compatiblity with tfds.`),oee=m(),_(Td.$$.fragment),lee=m(),Nd=s("div"),_(kg.$$.fragment),iee=m(),MD=s("p"),dee=o("Flatten the Translation feature into a dictionary."),N3=m(),ct=s("div"),_(Eg.$$.fragment),cee=m(),f1=s("p"),RD=s("code"),pee=o("FeatureConnector"),mee=o(` for translations with variable languages per example.
Here for compatiblity with tfds.`),hee=m(),_(Pd.$$.fragment),fee=m(),Ad=s("div"),_(qg.$$.fragment),gee=m(),BD=s("p"),uee=o("Flatten the TranslationVariableLanguages feature into a dictionary."),P3=m(),_a=s("div"),_(Ig.$$.fragment),_ee=m(),HD=s("p"),bee=o("Create a two-dimensional array."),$ee=m(),_(Ld.$$.fragment),A3=m(),ba=s("div"),_(Tg.$$.fragment),xee=m(),GD=s("p"),vee=o("Create a three-dimensional array."),yee=m(),_(Fd.$$.fragment),L3=m(),$a=s("div"),_(Ng.$$.fragment),jee=m(),KD=s("p"),wee=o("Create a four-dimensional array."),Dee=m(),_(Cd.$$.fragment),F3=m(),xa=s("div"),_(Pg.$$.fragment),kee=m(),WD=s("p"),Eee=o("Create a five-dimensional array."),qee=m(),_(Od.$$.fragment),C3=m(),H=s("div"),_(Ag.$$.fragment),Iee=m(),Lg=s("p"),Tee=o("Audio "),YD=s("code"),Nee=o("Feature"),Pee=o(" to extract audio data from an audio file."),Aee=m(),JD=s("p"),Lee=o("Input: The Audio feature accepts as input:"),Fee=m(),Mr=s("ul"),QD=s("li"),Fg=s("p"),Cee=o("A "),ZD=s("code"),Oee=o("str"),zee=o(": Absolute path to the audio file (i.e. random access is allowed)."),See=m(),Rr=s("li"),Cg=s("p"),Vee=o("A "),XD=s("code"),Uee=o("dict"),Mee=o(" with the keys:"),Ree=m(),Og=s("ul"),g1=s("li"),ek=s("code"),Bee=o("path"),Hee=o(": String with relative path of the audio file to the archive file."),Gee=m(),u1=s("li"),tk=s("code"),Kee=o("bytes"),Wee=o(": Bytes content of the audio file."),Yee=m(),ak=s("p"),Jee=o("This is useful for archived files with sequential access."),Qee=m(),Br=s("li"),zg=s("p"),Zee=o("A "),sk=s("code"),Xee=o("dict"),ete=o(" with the keys:"),tte=m(),Hr=s("ul"),_1=s("li"),nk=s("code"),ate=o("path"),ste=o(": String with relative path of the audio file to the archive file."),nte=m(),b1=s("li"),rk=s("code"),rte=o("array"),ote=o(": Array containing the audio sample"),lte=m(),$1=s("li"),ok=s("code"),ite=o("sampling_rate"),dte=o(": Integer corresponding to the sampling rate of the audio sample."),cte=m(),lk=s("p"),pte=o("This is useful for archived files with sequential access."),mte=m(),_(zd.$$.fragment),hte=m(),dn=s("div"),_(Sg.$$.fragment),fte=m(),ik=s("p"),gte=o(`Cast an Arrow array to the Audio arrow storage type.
The Arrow types that can be converted to the Audio pyarrow storage type are:`),ute=m(),pt=s("ul"),x1=s("li"),dk=s("code"),_te=o("pa.string()"),bte=o(" - it must contain the \u201Cpath\u201D data"),$te=m(),v1=s("li"),ck=s("code"),xte=o("pa.binary()"),vte=o(" - it must contain the audio bytes"),yte=m(),pk=s("li"),mk=s("code"),jte=o('pa.struct({"bytes": pa.binary()})'),wte=m(),hk=s("li"),fk=s("code"),Dte=o('pa.struct({"path": pa.string()})'),kte=m(),y1=s("li"),gk=s("code"),Ete=o('pa.struct({"bytes": pa.binary(), "path": pa.string()})'),qte=o("  - order doesn\u2019t matter"),Ite=m(),Sd=s("div"),_(Vg.$$.fragment),Tte=m(),uk=s("p"),Nte=o("Decode example audio file into audio data."),Pte=m(),Vd=s("div"),_(Ug.$$.fragment),Ate=m(),_k=s("p"),Lte=o("Embed audio files into the Arrow array."),Fte=m(),Ud=s("div"),_(Mg.$$.fragment),Cte=m(),bk=s("p"),Ote=o("Encode example into a format for Arrow."),zte=m(),Md=s("div"),_(Rg.$$.fragment),Ste=m(),$k=s("p"),Vte=o("If in the decodable state, raise an error, otherwise flatten the feature into a dictionary."),O3=m(),G=s("div"),_(Bg.$$.fragment),Ute=m(),Hg=s("p"),Mte=o("Image "),xk=s("code"),Rte=o("Feature"),Bte=o(" to read image data from an image file."),Hte=m(),vk=s("p"),Gte=o("Input: The Image feature accepts as input:"),Kte=m(),va=s("ul"),yk=s("li"),Gg=s("p"),Wte=o("A "),jk=s("code"),Yte=o("str"),Jte=o(": Absolute path to the image file (i.e. random access is allowed)."),Qte=m(),Gr=s("li"),Kg=s("p"),Zte=o("A "),wk=s("code"),Xte=o("dict"),eae=o(" with the keys:"),tae=m(),Wg=s("ul"),j1=s("li"),Dk=s("code"),aae=o("path"),sae=o(": String with relative path of the image file to the archive file."),nae=m(),w1=s("li"),kk=s("code"),rae=o("bytes"),oae=o(": Bytes of the image file."),lae=m(),Ek=s("p"),iae=o("This is useful for archived files with sequential access."),dae=m(),qk=s("li"),Yg=s("p"),cae=o("An "),Ik=s("code"),pae=o("np.ndarray"),mae=o(": NumPy array representing an image."),hae=m(),Tk=s("li"),Jg=s("p"),fae=o("A "),Nk=s("code"),gae=o("PIL.Image.Image"),uae=o(": PIL image object."),_ae=m(),_(Rd.$$.fragment),bae=m(),cn=s("div"),_(Qg.$$.fragment),$ae=m(),Pk=s("p"),xae=o(`Cast an Arrow array to the Image arrow storage type.
The Arrow types that can be converted to the Image pyarrow storage type are:`),vae=m(),qe=s("ul"),D1=s("li"),Ak=s("code"),yae=o("pa.string()"),jae=o(" - it must contain the \u201Cpath\u201D data"),wae=m(),k1=s("li"),Lk=s("code"),Dae=o("pa.binary()"),kae=o(" - it must contain the image bytes"),Eae=m(),Fk=s("li"),Ck=s("code"),qae=o('pa.struct({"bytes": pa.binary()})'),Iae=m(),Ok=s("li"),zk=s("code"),Tae=o('pa.struct({"path": pa.string()})'),Nae=m(),E1=s("li"),Sk=s("code"),Pae=o('pa.struct({"bytes": pa.binary(), "path": pa.string()})'),Aae=o("  - order doesn\u2019t matter"),Lae=m(),q1=s("li"),Vk=s("code"),Fae=o("pa.list(*)"),Cae=o(" - it must contain the image array data"),Oae=m(),Bd=s("div"),_(Zg.$$.fragment),zae=m(),Uk=s("p"),Sae=o("Decode example image file into image data."),Vae=m(),Hd=s("div"),_(Xg.$$.fragment),Uae=m(),Mk=s("p"),Mae=o("Embed image files into the Arrow array."),Rae=m(),Gd=s("div"),_(eu.$$.fragment),Bae=m(),Rk=s("p"),Hae=o("Encode example into a format for Arrow."),Gae=m(),Kd=s("div"),_(tu.$$.fragment),Kae=m(),Bk=s("p"),Wae=o("If in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary."),z3=m(),Kr=s("h2"),Wd=s("a"),Hk=s("span"),_(au.$$.fragment),Yae=m(),Gk=s("span"),Jae=o("MetricInfo"),S3=m(),fe=s("div"),_(su.$$.fragment),Qae=m(),Kk=s("p"),Zae=o("Information about a metric."),Xae=m(),I1=s("p"),Wk=s("code"),ese=o("MetricInfo"),tse=o(` documents a metric, including its name, version, and features.
See the constructor arguments and properties for a full list.`),ase=m(),Yk=s("p"),sse=o("Note: Not all fields are known on construction and may be updated later."),nse=m(),pn=s("div"),_(nu.$$.fragment),rse=m(),ru=s("p"),ose=o("Create MetricInfo from the JSON file in "),Jk=s("code"),lse=o("metric_info_dir"),ise=o("."),dse=m(),_(Yd.$$.fragment),cse=m(),mn=s("div"),_(ou.$$.fragment),pse=m(),ya=s("p"),mse=o("Write "),Qk=s("code"),hse=o("MetricInfo"),fse=o(" as JSON to "),Zk=s("code"),gse=o("metric_info_dir"),use=o(`.
Also save the license separately in LICENCE.
If `),Xk=s("code"),_se=o("pretty_print"),bse=o(" is True, the JSON will be pretty-printed with the indent level of 4."),$se=m(),_(Jd.$$.fragment),V3=m(),Wr=s("h2"),Qd=s("a"),e4=s("span"),_(lu.$$.fragment),xse=m(),t4=s("span"),vse=o("Metric"),U3=m(),hn=s("p"),yse=o("The base class "),a4=s("code"),jse=o("Metric"),wse=o(" implements a Metric backed by one or several "),T1=s("a"),Dse=o("Dataset"),kse=o("."),M3=m(),re=s("div"),_(iu.$$.fragment),Ese=m(),s4=s("p"),qse=o("A Metric is the base class and common API for all metrics."),Ise=m(),_(Zd.$$.fragment),Tse=m(),fn=s("div"),_(du.$$.fragment),Nse=m(),n4=s("p"),Pse=o("Add one prediction and reference for the metric\u2019s stack."),Ase=m(),_(Xd.$$.fragment),Lse=m(),gn=s("div"),_(cu.$$.fragment),Fse=m(),r4=s("p"),Cse=o("Add a batch of predictions and references for the metric\u2019s stack."),Ose=m(),_(ec.$$.fragment),zse=m(),zt=s("div"),_(pu.$$.fragment),Sse=m(),o4=s("p"),Vse=o("Compute the metrics."),Use=m(),l4=s("p"),Mse=o("Usage of positional arguments is not allowed to prevent mistakes."),Rse=m(),_(tc.$$.fragment),Bse=m(),ac=s("div"),_(mu.$$.fragment),Hse=m(),i4=s("p"),Gse=o("Downloads and prepares dataset for reading."),R3=m(),Yr=s("h2"),sc=s("a"),d4=s("span"),_(hu.$$.fragment),Kse=m(),c4=s("span"),Wse=o("Filesystems"),B3=m(),V=s("div"),_(fu.$$.fragment),Yse=m(),nc=s("p"),p4=s("code"),Jse=o("datasets.filesystems.S3FileSystem"),Qse=o(" is a subclass of "),gu=s("a"),m4=s("code"),Zse=o("s3fs.S3FileSystem"),Xse=o("."),ene=m(),ja=s("p"),tne=o("Users can use this class to access S3 as if it were a file system. It exposes a filesystem-like API (ls, cp, open, etc.) on top of S3 storage. Provide credentials either explicitly ("),h4=s("code"),ane=o("key="),sne=o(", "),f4=s("code"),nne=o("secret="),rne=o(") or with boto\u2019s credential methods. See botocore documentation for more information. If no credentials are available, use "),g4=s("code"),one=o("anon=True"),lne=o("."),ine=m(),u4=s("p"),dne=o("Examples:"),cne=m(),_4=s("p"),pne=o("Listing files from public S3 bucket."),mne=m(),_(rc.$$.fragment),hne=m(),Jr=s("p"),fne=o("Listing files from private S3 bucket using "),b4=s("code"),gne=o("aws_access_key_id"),une=o(" and "),$4=s("code"),_ne=o("aws_secret_access_key"),bne=o("."),$ne=m(),_(oc.$$.fragment),xne=m(),wa=s("p"),vne=o("Using "),x4=s("code"),yne=o("S3Filesystem"),jne=o(" with "),v4=s("code"),wne=o("botocore.session.Session"),Dne=o(" and custom "),y4=s("code"),kne=o("aws_profile"),Ene=o("."),qne=m(),_(lc.$$.fragment),Ine=m(),Qr=s("p"),Tne=o("Loading dataset from S3 using "),j4=s("code"),Nne=o("S3Filesystem"),Pne=o(" and "),N1=s("a"),Ane=o("load_from_disk()"),Lne=o("."),Fne=m(),_(ic.$$.fragment),Cne=m(),Zr=s("p"),One=o("Saving dataset to S3 using "),w4=s("code"),zne=o("S3Filesystem"),Sne=o(" and "),P1=s("a"),Vne=o("Dataset.save_to_disk()"),Une=o("."),Mne=m(),_(dc.$$.fragment),H3=m(),Xr=s("div"),_(uu.$$.fragment),Rne=m(),eo=s("p"),Bne=o("Preprocesses "),D4=s("code"),Hne=o("dataset_path"),Gne=o(" and removes remote filesystem (e.g. removing "),k4=s("code"),Kne=o("s3://"),Wne=o(")."),G3=m(),to=s("div"),_(_u.$$.fragment),Yne=m(),E4=s("p"),Jne=o("Validates if filesystem has remote protocol."),K3=m(),ao=s("h2"),cc=s("a"),q4=s("span"),_(bu.$$.fragment),Qne=m(),I4=s("span"),Zne=o("Fingerprint"),W3=m(),so=s("div"),_($u.$$.fragment),Xne=m(),T4=s("p"),ere=o("Hasher that accepts python objects as inputs."),this.h()},l(i){const j=jue('[data-svelte="svelte-1phssyn"]',document.head);c=n(j,"META",{name:!0,content:!0}),j.forEach(a),u=h(i),f=n(i,"H1",{class:!0});var xu=r(f);d=n(xu,"A",{id:!0,class:!0,href:!0});var N4=r(d);g=n(N4,"SPAN",{});var P4=r(g);b(t.$$.fragment,P4),P4.forEach(a),N4.forEach(a),p=h(xu),ce=n(xu,"SPAN",{});var A4=r(ce);B=l(A4,"Main classes"),A4.forEach(a),xu.forEach(a),pe=h(i),ge=n(i,"H2",{class:!0});var vu=r(ge);Te=n(vu,"A",{id:!0,class:!0,href:!0});var L4=r(Te);ue=n(L4,"SPAN",{});var F4=r(ue);b(za.$$.fragment,F4),F4.forEach(a),L4.forEach(a),Ou=h(vu),qo=n(vu,"SPAN",{});var C4=r(qo);H6=l(C4,"DatasetInfo"),C4.forEach(a),vu.forEach(a),r3=h(i),me=n(i,"DIV",{class:!0});var Ie=r(me);b(Jc.$$.fragment,Ie),G6=h(Ie),Q$=n(Ie,"P",{});var O4=r(Q$);K6=l(O4,"Information about a dataset."),O4.forEach(a),W6=h(Ie),zu=n(Ie,"P",{});var A1=r(zu);Z$=n(A1,"CODE",{});var z4=r(Z$);Y6=l(z4,"DatasetInfo"),z4.forEach(a),J6=l(A1,` documents datasets, including its name, version, and features.
See the constructor arguments and properties for a full list.`),A1.forEach(a),Q6=h(Ie),X$=n(Ie,"P",{});var S4=r(X$);Z6=l(S4,"Not all fields are known on construction and may be updated later."),S4.forEach(a),X6=h(Ie),Ne=n(Ie,"DIV",{class:!0});var mt=r(Ne);b(Qc.$$.fragment,mt),e8=h(mt),Rn=n(mt,"P",{});var no=r(Rn);t8=l(no,"Create "),Su=n(no,"A",{href:!0});var V4=r(Su);a8=l(V4,"DatasetInfo"),V4.forEach(a),s8=l(no," from the JSON file in "),ex=n(no,"CODE",{});var U4=r(ex);n8=l(U4,"dataset_info_dir"),U4.forEach(a),r8=l(no,"."),no.forEach(a),o8=h(mt),Zc=n(mt,"P",{});var yu=r(Zc);l8=l(yu,`This function updates all the dynamically generated fields (num_examples,
hash, time of creation,\u2026) of the `),Vu=n(yu,"A",{href:!0});var M4=r(Vu);i8=l(M4,"DatasetInfo"),M4.forEach(a),d8=l(yu,"."),yu.forEach(a),c8=h(mt),tx=n(mt,"P",{});var R4=r(tx);p8=l(R4,"This will overwrite all previous metadata."),R4.forEach(a),m8=h(mt),b(Io.$$.fragment,mt),mt.forEach(a),h8=h(Ie),Sa=n(Ie,"DIV",{class:!0});var ro=r(Sa);b(Xc.$$.fragment,ro),f8=h(ro),Bn=n(ro,"P",{});var oo=r(Bn);g8=l(oo,"Write "),ax=n(oo,"CODE",{});var B4=r(ax);u8=l(B4,"DatasetInfo"),B4.forEach(a),_8=l(oo," and license (if present) as JSON files to "),sx=n(oo,"CODE",{});var H4=r(sx);b8=l(H4,"dataset_info_dir"),H4.forEach(a),$8=l(oo,"."),oo.forEach(a),x8=h(ro),b(To.$$.fragment,ro),ro.forEach(a),Ie.forEach(a),o3=h(i),Hn=n(i,"H2",{class:!0});var ju=r(Hn);No=n(ju,"A",{id:!0,class:!0,href:!0});var G4=r(No);nx=n(G4,"SPAN",{});var K4=r(nx);b(ep.$$.fragment,K4),K4.forEach(a),G4.forEach(a),v8=h(ju),rx=n(ju,"SPAN",{});var W4=r(rx);y8=l(W4,"Dataset"),W4.forEach(a),ju.forEach(a),l3=h(i),Po=n(i,"P",{});var wu=r(Po);j8=l(wu,"The base class "),Uu=n(wu,"A",{href:!0});var Y4=r(Uu);w8=l(Y4,"Dataset"),Y4.forEach(a),D8=l(wu," implements a Dataset backed by an Apache Arrow table."),wu.forEach(a),i3=h(i),q=n(i,"DIV",{class:!0});var I=r(q);b(tp.$$.fragment,I),k8=h(I),ox=n(I,"P",{});var J4=r(ox);E8=l(J4,"A Dataset backed by an Arrow table."),J4.forEach(a),q8=h(I),$t=n(I,"DIV",{class:!0});var Da=r($t);b(ap.$$.fragment,Da),I8=h(Da),lx=n(Da,"P",{});var Q4=r(lx);T8=l(Q4,"Add column to Dataset."),Q4.forEach(a),N8=h(Da),ix=n(Da,"P",{});var Z4=r(ix);P8=l(Z4,"<Added version=\u201C1.7\u201D/>"),Z4.forEach(a),A8=h(Da),b(Ao.$$.fragment,Da),Da.forEach(a),L8=h(I),xt=n(I,"DIV",{class:!0});var ka=r(xt);b(sp.$$.fragment,ka),F8=h(ka),dx=n(ka,"P",{});var X4=r(dx);C8=l(X4,"Add item to Dataset."),X4.forEach(a),O8=h(ka),cx=n(ka,"P",{});var eE=r(cx);z8=l(eE,"<Added version=\u201C1.7\u201D/>"),eE.forEach(a),S8=h(ka),b(Lo.$$.fragment,ka),ka.forEach(a),V8=h(I),Fo=n(I,"DIV",{class:!0});var Du=r(Fo);b(np.$$.fragment,Du),U8=h(Du),px=n(Du,"P",{});var tE=r(px);M8=l(tE,"Instantiate a Dataset backed by an Arrow table at filename."),tE.forEach(a),Du.forEach(a),R8=h(I),Co=n(I,"DIV",{class:!0});var ku=r(Co);b(rp.$$.fragment,ku),B8=h(ku),mx=n(ku,"P",{});var aE=r(mx);H8=l(aE,"Instantiate a Dataset backed by an Arrow buffer."),aE.forEach(a),ku.forEach(a),G8=h(I),Pe=n(I,"DIV",{class:!0});var ht=r(Pe);b(op.$$.fragment,ht),K8=h(ht),Ht=n(ht,"P",{});var Ea=r(Ht);W8=l(Ea,"Convert "),hx=n(Ea,"CODE",{});var sE=r(hx);Y8=l(sE,"pandas.DataFrame"),sE.forEach(a),J8=l(Ea," to a "),fx=n(Ea,"CODE",{});var nE=r(fx);Q8=l(nE,"pyarrow.Table"),nE.forEach(a),Z8=l(Ea," to create a "),Mu=n(Ea,"A",{href:!0});var rE=r(Mu);X8=l(rE,"Dataset"),rE.forEach(a),eq=l(Ea,"."),Ea.forEach(a),tq=h(ht),Gn=n(ht,"P",{});var lo=r(Gn);aq=l(lo,"The column types in the resulting Arrow Table are inferred from the dtypes of the "),gx=n(lo,"CODE",{});var oE=r(gx);sq=l(oE,"pandas.Series"),oE.forEach(a),nq=l(lo,` in the
DataFrame. In the case of non-object Series, the NumPy dtype is translated to its Arrow equivalent. In the
case of `),ux=n(lo,"CODE",{});var lE=r(ux);rq=l(lE,"object"),lE.forEach(a),oq=l(lo,", we need to guess the datatype by looking at the Python objects in this Series."),lo.forEach(a),lq=h(ht),Gt=n(ht,"P",{});var qa=r(Gt);iq=l(qa,"Be aware that Series of the "),_x=n(qa,"CODE",{});var iE=r(_x);dq=l(iE,"object"),iE.forEach(a),cq=l(qa,` dtype don\u2019t carry enough information to always lead to a meaningful Arrow
type. In the case that we cannot infer a type, e.g. because the DataFrame is of length 0 or the Series only
contains `),bx=n(qa,"CODE",{});var dE=r(bx);pq=l(dE,"None/nan"),dE.forEach(a),mq=l(qa," objects, the type is set to "),$x=n(qa,"CODE",{});var cE=r($x);hq=l(cE,"null"),cE.forEach(a),fq=l(qa,`. This behavior can be avoided by constructing explicit
features and passing it to this function.`),qa.forEach(a),gq=h(ht),b(Oo.$$.fragment,ht),ht.forEach(a),uq=h(I),zo=n(I,"DIV",{class:!0});var Eu=r(zo);b(lp.$$.fragment,Eu),_q=h(Eu),Kt=n(Eu,"P",{});var Ia=r(Kt);bq=l(Ia,"Convert "),xx=n(Ia,"CODE",{});var pE=r(xx);$q=l(pE,"dict"),pE.forEach(a),xq=l(Ia," to a "),vx=n(Ia,"CODE",{});var mE=r(vx);vq=l(mE,"pyarrow.Table"),mE.forEach(a),yq=l(Ia," to create a "),Ru=n(Ia,"A",{href:!0});var hE=r(Ru);jq=l(hE,"Dataset"),hE.forEach(a),wq=l(Ia,"."),Ia.forEach(a),Eu.forEach(a),Dq=h(I),vt=n(I,"DIV",{class:!0});var Ta=r(vt);b(ip.$$.fragment,Ta),kq=h(Ta),yx=n(Ta,"P",{});var fE=r(yx);Eq=l(fE,"Create a Dataset from a generator."),fE.forEach(a),qq=h(Ta),b(So.$$.fragment,Ta),Iq=h(Ta),b(Vo.$$.fragment,Ta),Ta.forEach(a),Tq=h(I),Va=n(I,"DIV",{class:!0});var io=r(Va);b(dp.$$.fragment,io),Nq=h(io),jx=n(io,"P",{});var gE=r(jx);Pq=l(gE,"The Apache Arrow table backing the dataset."),gE.forEach(a),Aq=h(io),b(Uo.$$.fragment,io),io.forEach(a),Lq=h(I),Ua=n(I,"DIV",{class:!0});var co=r(Ua);b(cp.$$.fragment,co),Fq=h(co),wx=n(co,"P",{});var uE=r(wx);Cq=l(uE,"The cache files containing the Apache Arrow table backing the dataset."),uE.forEach(a),Oq=h(co),b(Mo.$$.fragment,co),co.forEach(a),zq=h(I),Ma=n(I,"DIV",{class:!0});var po=r(Ma);b(pp.$$.fragment,po),Sq=h(po),Dx=n(po,"P",{});var _E=r(Dx);Vq=l(_E,"Number of columns in the dataset."),_E.forEach(a),Uq=h(po),b(Ro.$$.fragment,po),po.forEach(a),Mq=h(I),Ra=n(I,"DIV",{class:!0});var mo=r(Ra);b(mp.$$.fragment,mo),Rq=h(mo),hp=n(mo,"P",{});var qu=r(hp);Bq=l(qu,"Number of rows in the dataset (same as "),Bo=n(qu,"A",{href:!0});var Iu=r(Bo);Hq=l(Iu,"Dataset."),kx=n(Iu,"STRONG",{});var bE=r(kx);Gq=l(bE,"len"),bE.forEach(a),Kq=l(Iu,"()"),Iu.forEach(a),Wq=l(qu,")."),qu.forEach(a),Yq=h(mo),b(Ho.$$.fragment,mo),mo.forEach(a),Jq=h(I),Ba=n(I,"DIV",{class:!0});var ho=r(Ba);b(fp.$$.fragment,ho),Qq=h(ho),Ex=n(ho,"P",{});var $E=r(Ex);Zq=l($E,"Names of the columns in the dataset."),$E.forEach(a),Xq=h(ho),b(Go.$$.fragment,ho),ho.forEach(a),e9=h(I),Ha=n(I,"DIV",{class:!0});var fo=r(Ha);b(gp.$$.fragment,fo),t9=h(fo),qx=n(fo,"P",{});var xE=r(qx);a9=l(xE,"Shape of the dataset (number of columns, number of rows)."),xE.forEach(a),s9=h(fo),b(Ko.$$.fragment,fo),fo.forEach(a),n9=h(I),yt=n(I,"DIV",{class:!0});var Na=r(yt);b(up.$$.fragment,Na),r9=h(Na),Ix=n(Na,"P",{});var vE=r(Ix);o9=l(vE,"Return a list of the unique elements in a column."),vE.forEach(a),l9=h(Na),Tx=n(Na,"P",{});var yE=r(Tx);i9=l(yE,"This is implemented in the low-level backend and as such, very fast."),yE.forEach(a),d9=h(Na),b(Wo.$$.fragment,Na),Na.forEach(a),c9=h(I),Ga=n(I,"DIV",{class:!0});var go=r(Ga);b(_p.$$.fragment,go),p9=h(go),Nx=n(go,"P",{});var jE=r(Nx);m9=l(jE,`Flatten the table.
Each column with a struct type is flattened into one column per struct field.
Other columns are left unchanged.`),jE.forEach(a),h9=h(go),b(Yo.$$.fragment,go),go.forEach(a),f9=h(I),Ka=n(I,"DIV",{class:!0});var uo=r(Ka);b(bp.$$.fragment,uo),g9=h(uo),Px=n(uo,"P",{});var wE=r(Px);u9=l(wE,"Cast the dataset to a new set of features."),wE.forEach(a),_9=h(uo),b(Jo.$$.fragment,uo),uo.forEach(a),b9=h(I),Wa=n(I,"DIV",{class:!0});var _o=r(Wa);b($p.$$.fragment,_o),$9=h(_o),Ax=n(_o,"P",{});var DE=r(Ax);x9=l(DE,"Cast column to feature for decoding."),DE.forEach(a),v9=h(_o),b(Qo.$$.fragment,_o),_o.forEach(a),y9=h(I),jt=n(I,"DIV",{class:!0});var Pa=r(jt);b(xp.$$.fragment,Pa),j9=h(Pa),Lx=n(Pa,"P",{});var kE=r(Lx);w9=l(kE,"Remove one or several column(s) in the dataset and the features associated to them."),kE.forEach(a),D9=h(Pa),Kn=n(Pa,"P",{});var bo=r(Kn);k9=l(bo,"You can also remove a column using "),Bu=n(bo,"A",{href:!0});var EE=r(Bu);E9=l(EE,"map()"),EE.forEach(a),q9=l(bo," with "),Fx=n(bo,"CODE",{});var qE=r(Fx);I9=l(qE,"remove_columns"),qE.forEach(a),T9=l(bo,` but the present method
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),bo.forEach(a),N9=h(Pa),b(Zo.$$.fragment,Pa),Pa.forEach(a),P9=h(I),Ya=n(I,"DIV",{class:!0});var $o=r(Ya);b(vp.$$.fragment,$o),A9=h($o),Cx=n($o,"P",{});var IE=r(Cx);L9=l(IE,`Rename a column in the dataset, and move the features associated to the original column under the new column
name.`),IE.forEach(a),F9=h($o),b(Xo.$$.fragment,$o),$o.forEach(a),C9=h(I),Ja=n(I,"DIV",{class:!0});var xo=r(Ja);b(yp.$$.fragment,xo),O9=h(xo),Ox=n(xo,"P",{});var TE=r(Ox);z9=l(TE,`Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.`),TE.forEach(a),S9=h(xo),b(el.$$.fragment,xo),xo.forEach(a),V9=h(I),Qa=n(I,"DIV",{class:!0});var vo=r(Qa);b(jp.$$.fragment,vo),U9=h(vo),zx=n(vo,"P",{});var NE=r(zx);M9=l(NE,`Select one or several column(s) in the dataset and the features
associated to them.`),NE.forEach(a),R9=h(vo),b(tl.$$.fragment,vo),vo.forEach(a),B9=h(I),Za=n(I,"DIV",{class:!0});var yo=r(Za);b(wp.$$.fragment,yo),H9=h(yo),Dp=n(yo,"P",{});var Tu=r(Dp);G9=l(Tu,"Casts the given column as "),Hu=n(Tu,"A",{href:!0});var PE=r(Hu);K9=l(PE,"ClassLabel"),PE.forEach(a),W9=l(Tu," and updates the table."),Tu.forEach(a),Y9=h(yo),b(al.$$.fragment,yo),yo.forEach(a),J9=h(I),Xa=n(I,"DIV",{class:!0});var jo=r(Xa);b(kp.$$.fragment,jo),Q9=h(jo),Sx=n(jo,"P",{});var AE=r(Sx);Z9=l(AE,"Number of rows in the dataset."),AE.forEach(a),X9=h(jo),b(sl.$$.fragment,jo),jo.forEach(a),eI=h(I),es=n(I,"DIV",{class:!0});var wo=r(es);b(Ep.$$.fragment,wo),tI=h(wo),Vx=n(wo,"P",{});var LE=r(Vx);aI=l(LE,"Iterate through the examples."),LE.forEach(a),sI=h(wo),qp=n(wo,"P",{});var Nu=r(qp);nI=l(Nu,"If a formatting is set with "),Gu=n(Nu,"A",{href:!0});var FE=r(Gu);rI=l(FE,"Dataset.set_format()"),FE.forEach(a),oI=l(Nu,` rows will be returned with the
selected format.`),Nu.forEach(a),wo.forEach(a),lI=h(I),ts=n(I,"DIV",{class:!0});var Do=r(ts);b(Ip.$$.fragment,Do),iI=h(Do),Tp=n(Do,"P",{});var Pu=r(Tp);dI=l(Pu,"Iterate through the batches of size "),Ux=n(Pu,"EM",{});var CE=r(Ux);cI=l(CE,"batch_size"),CE.forEach(a),pI=l(Pu,"."),Pu.forEach(a),mI=h(Do),Np=n(Do,"P",{});var Au=r(Np);hI=l(Au,"If a formatting is set with ["),Mx=n(Au,"EM",{});var OE=r(Mx);fI=l(OE,"~datasets.Dataset.set_format"),OE.forEach(a),gI=l(Au,`] rows will be returned with the
selected format.`),Au.forEach(a),Do.forEach(a),uI=h(I),nl=n(I,"DIV",{class:!0});var Lu=r(nl);b(Pp.$$.fragment,Lu),_I=h(Lu),Wn=n(Lu,"P",{});var ko=r(Wn);bI=l(ko,"To be used in a "),Rx=n(ko,"CODE",{});var zE=r(Rx);$I=l(zE,"with"),zE.forEach(a),xI=l(ko," statement. Set "),Bx=n(ko,"CODE",{});var SE=r(Bx);vI=l(SE,"__getitem__"),SE.forEach(a),yI=l(ko," return format (type and columns)."),ko.forEach(a),Lu.forEach(a),jI=h(I),Ae=n(I,"DIV",{class:!0});var ft=r(Ae);b(Ap.$$.fragment,ft),wI=h(ft),Qe=n(ft,"P",{});var gt=r(Qe);DI=l(gt,"Set "),Hx=n(gt,"CODE",{});var VE=r(Hx);kI=l(VE,"__getitem__"),VE.forEach(a),EI=l(gt,` return format (type and columns). The data formatting is applied on-the-fly.
The format `),Gx=n(gt,"CODE",{});var UE=r(Gx);qI=l(UE,"type"),UE.forEach(a),II=l(gt," (for example \u201Cnumpy\u201D) is used to format batches when using "),Kx=n(gt,"CODE",{});var ME=r(Kx);TI=l(ME,"__getitem__"),ME.forEach(a),NI=l(gt,`.
It\u2019s also possible to use custom transforms for formatting using `),Ku=n(gt,"A",{href:!0});var RE=r(Ku);PI=l(RE,"set_transform()"),RE.forEach(a),AI=l(gt,"."),gt.forEach(a),LI=h(ft),Wt=n(ft,"P",{});var Aa=r(Wt);FI=l(Aa,"It is possible to call "),Wu=n(Aa,"A",{href:!0});var BE=r(Wu);CI=l(BE,"map()"),BE.forEach(a),OI=l(Aa," after calling "),Wx=n(Aa,"CODE",{});var HE=r(Wx);zI=l(HE,"set_format"),HE.forEach(a),SI=l(Aa,". Since "),Yx=n(Aa,"CODE",{});var GE=r(Yx);VI=l(GE,"map"),GE.forEach(a),UI=l(Aa," may add new columns, then the list of formatted columns"),Aa.forEach(a),MI=h(ft),b(rl.$$.fragment,ft),RI=h(ft),b(ol.$$.fragment,ft),ft.forEach(a),BI=h(I),as=n(I,"DIV",{class:!0});var Eo=r(as);b(Lp.$$.fragment,Eo),HI=h(Eo),Ze=n(Eo,"P",{});var ut=r(Ze);GI=l(ut,"Set "),Jx=n(ut,"CODE",{});var KE=r(Jx);KI=l(KE,"__getitem__"),KE.forEach(a),WI=l(ut," return format using this transform. The transform is applied on-the-fly on batches when "),Qx=n(ut,"CODE",{});var WE=r(Qx);YI=l(WE,"__getitem__"),WE.forEach(a),JI=l(ut,` is called.
As `),Yu=n(ut,"A",{href:!0});var YE=r(Yu);QI=l(YE,"set_format()"),YE.forEach(a),ZI=l(ut,", this can be reset using "),Ju=n(ut,"A",{href:!0});var JE=r(Ju);XI=l(JE,"reset_format()"),JE.forEach(a),eT=l(ut,"."),ut.forEach(a),tT=h(Eo),b(ll.$$.fragment,Eo),Eo.forEach(a),aT=h(I),wt=n(I,"DIV",{class:!0});var La=r(wt);b(Fp.$$.fragment,La),sT=h(La),Cp=n(La,"P",{});var Fu=r(Cp);nT=l(Fu,"Reset "),Zx=n(Fu,"CODE",{});var QE=r(Zx);rT=l(QE,"__getitem__"),QE.forEach(a),oT=l(Fu," return format to python objects and all columns."),Fu.forEach(a),lT=h(La),Qu=n(La,"P",{});var L1=r(Qu);iT=l(L1,"Same as "),Xx=n(L1,"CODE",{});var ZE=r(Xx);dT=l(ZE,"self.set_format()"),ZE.forEach(a),L1.forEach(a),cT=h(La),b(il.$$.fragment,La),La.forEach(a),pT=h(I),Le=n(I,"DIV",{class:!0});var _t=r(Le);b(Op.$$.fragment,_t),mT=h(_t),Yt=n(_t,"P",{});var Fa=r(Yt);hT=l(Fa,"Set "),ev=n(Fa,"CODE",{});var XE=r(ev);fT=l(XE,"__getitem__"),XE.forEach(a),gT=l(Fa,` return format (type and columns). The data formatting is applied on-the-fly.
The format `),tv=n(Fa,"CODE",{});var e3=r(tv);uT=l(e3,"type"),e3.forEach(a),_T=l(Fa," (for example \u201Cnumpy\u201D) is used to format batches when using "),av=n(Fa,"CODE",{});var t3=r(av);bT=l(t3,"__getitem__"),t3.forEach(a),$T=l(Fa,"."),Fa.forEach(a),xT=h(_t),zp=n(_t,"P",{});var Cu=r(zp);vT=l(Cu,"It\u2019s also possible to use custom transforms for formatting using "),Zu=n(Cu,"A",{href:!0});var a3=r(Zu);yT=l(a3,"with_transform()"),a3.forEach(a),jT=l(Cu,"."),Cu.forEach(a),wT=h(_t),Jt=n(_t,"P",{});var Ca=r(Jt);DT=l(Ca,"Contrary to "),Xu=n(Ca,"A",{href:!0});var Nre=r(Xu);kT=l(Nre,"set_format()"),Nre.forEach(a),ET=l(Ca,", "),sv=n(Ca,"CODE",{});var Pre=r(sv);qT=l(Pre,"with_format"),Pre.forEach(a),IT=l(Ca," returns a new "),e_=n(Ca,"A",{href:!0});var Are=r(e_);TT=l(Are,"Dataset"),Are.forEach(a),NT=l(Ca," object."),Ca.forEach(a),PT=h(_t),b(dl.$$.fragment,_t),_t.forEach(a),AT=h(I),Fe=n(I,"DIV",{class:!0});var un=r(Fe);b(Sp.$$.fragment,un),LT=h(un),Yn=n(un,"P",{});var F1=r(Yn);FT=l(F1,"Set "),nv=n(F1,"CODE",{});var Lre=r(nv);CT=l(Lre,"__getitem__"),Lre.forEach(a),OT=l(F1," return format using this transform. The transform is applied on-the-fly on batches when "),rv=n(F1,"CODE",{});var Fre=r(rv);zT=l(Fre,"__getitem__"),Fre.forEach(a),ST=l(F1," is called."),F1.forEach(a),VT=h(un),Jn=n(un,"P",{});var C1=r(Jn);UT=l(C1,"As "),t_=n(C1,"A",{href:!0});var Cre=r(t_);MT=l(Cre,"set_format()"),Cre.forEach(a),RT=l(C1,", this can be reset using "),a_=n(C1,"A",{href:!0});var Ore=r(a_);BT=l(Ore,"reset_format()"),Ore.forEach(a),HT=l(C1,"."),C1.forEach(a),GT=h(un),Qt=n(un,"P",{});var pc=r(Qt);KT=l(pc,"Contrary to "),s_=n(pc,"A",{href:!0});var zre=r(s_);WT=l(zre,"set_transform()"),zre.forEach(a),YT=l(pc,", "),ov=n(pc,"CODE",{});var Sre=r(ov);JT=l(Sre,"with_transform"),Sre.forEach(a),QT=l(pc," returns a new "),n_=n(pc,"A",{href:!0});var Vre=r(n_);ZT=l(Vre,"Dataset"),Vre.forEach(a),XT=l(pc," object."),pc.forEach(a),eN=h(un),b(cl.$$.fragment,un),un.forEach(a),tN=h(I),pl=n(I,"DIV",{class:!0});var J3=r(pl);b(Vp.$$.fragment,J3),aN=h(J3),lv=n(J3,"P",{});var Ure=r(lv);sN=l(Ure,"Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."),Ure.forEach(a),J3.forEach(a),nN=h(I),Dt=n(I,"DIV",{class:!0});var mc=r(Dt);b(Up.$$.fragment,mc),rN=h(mc),iv=n(mc,"P",{});var Mre=r(iv);oN=l(Mre,`Clean up all cache files in the dataset cache directory, excepted the currently used cache file if there is
one.`),Mre.forEach(a),lN=h(mc),dv=n(mc,"P",{});var Rre=r(dv);iN=l(Rre,"Be careful when running this command that no other process is currently using other cache files."),Rre.forEach(a),dN=h(mc),b(ml.$$.fragment,mc),mc.forEach(a),cN=h(I),Ce=n(I,"DIV",{class:!0});var _n=r(Ce);b(Mp.$$.fragment,_n),pN=h(_n),cv=n(_n,"P",{});var Bre=r(cv);mN=l(Bre,`Apply a function to all the examples in the table (individually or in batches) and update the table.
If your function returns a column that already exists, then it overwrites it.`),Bre.forEach(a),hN=h(_n),Rp=n(_n,"P",{});var Q3=r(Rp);fN=l(Q3,"You can specify whether the function should be batched or not with the "),pv=n(Q3,"CODE",{});var Hre=r(pv);gN=l(Hre,"batched"),Hre.forEach(a),uN=l(Q3," parameter:"),Q3.forEach(a),_N=h(_n),Qn=n(_n,"UL",{});var O1=r(Qn);Zn=n(O1,"LI",{});var z1=r(Zn);bN=l(z1,"If batched is "),mv=n(z1,"CODE",{});var Gre=r(mv);$N=l(Gre,"False"),Gre.forEach(a),xN=l(z1,`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),hv=n(z1,"CODE",{});var Kre=r(hv);vN=l(Kre,'{"text": "Hello there !"}'),Kre.forEach(a),yN=l(z1,"."),z1.forEach(a),jN=h(O1),Zt=n(O1,"LI",{});var hc=r(Zt);wN=l(hc,"If batched is "),fv=n(hc,"CODE",{});var Wre=r(fv);DN=l(Wre,"True"),Wre.forEach(a),kN=l(hc," and "),gv=n(hc,"CODE",{});var Yre=r(gv);EN=l(Yre,"batch_size"),Yre.forEach(a),qN=l(hc,` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
A batch is a dictionary, e.g. a batch of 1 example is `),uv=n(hc,"CODE",{});var Jre=r(uv);IN=l(Jre,'{"text": ["Hello there !"]}'),Jre.forEach(a),TN=l(hc,"."),hc.forEach(a),NN=h(O1),Y=n(O1,"LI",{});var oe=r(Y);PN=l(oe,"If batched is "),_v=n(oe,"CODE",{});var Qre=r(_v);AN=l(Qre,"True"),Qre.forEach(a),LN=l(oe," and "),bv=n(oe,"CODE",{});var Zre=r(bv);FN=l(Zre,"batch_size"),Zre.forEach(a),CN=l(oe," is "),$v=n(oe,"CODE",{});var Xre=r($v);ON=l(Xre,"n > 1"),Xre.forEach(a),zN=l(oe,", then the function takes a batch of "),xv=n(oe,"CODE",{});var eoe=r(xv);SN=l(eoe,"n"),eoe.forEach(a),VN=l(oe," examples as input and can return a batch with "),vv=n(oe,"CODE",{});var toe=r(vv);UN=l(toe,"n"),toe.forEach(a),MN=l(oe,` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),yv=n(oe,"CODE",{});var aoe=r(yv);RN=l(aoe,"n"),aoe.forEach(a),BN=l(oe,` examples.
A batch is a dictionary, e.g. a batch of `),jv=n(oe,"CODE",{});var soe=r(jv);HN=l(soe,"n"),soe.forEach(a),GN=l(oe," examples is "),wv=n(oe,"CODE",{});var noe=r(wv);KN=l(noe,'{"text": ["Hello there !"] * n}'),noe.forEach(a),WN=l(oe,"."),oe.forEach(a),O1.forEach(a),YN=h(_n),b(hl.$$.fragment,_n),_n.forEach(a),JN=h(I),ss=n(I,"DIV",{class:!0});var S1=r(ss);b(Bp.$$.fragment,S1),QN=h(S1),Dv=n(S1,"P",{});var roe=r(Dv);ZN=l(roe,`Apply a filter function to all the elements in the table in batches
and update the table so that the dataset only includes examples according to the filter function.`),roe.forEach(a),XN=h(S1),b(fl.$$.fragment,S1),S1.forEach(a),eP=h(I),ns=n(I,"DIV",{class:!0});var V1=r(ns);b(Hp.$$.fragment,V1),tP=h(V1),kv=n(V1,"P",{});var ooe=r(kv);aP=l(ooe,"Create a new dataset with rows selected following the list/array of indices."),ooe.forEach(a),sP=h(V1),b(gl.$$.fragment,V1),V1.forEach(a),nP=h(I),rs=n(I,"DIV",{class:!0});var U1=r(rs);b(Gp.$$.fragment,U1),rP=h(U1),Ev=n(U1,"P",{});var loe=r(Ev);oP=l(loe,"Create a new dataset sorted according to a single or multiple columns."),loe.forEach(a),lP=h(U1),b(ul.$$.fragment,U1),U1.forEach(a),iP=h(I),Z=n(I,"DIV",{class:!0});var ve=r(Z);b(Kp.$$.fragment,ve),dP=h(ve),qv=n(ve,"P",{});var ioe=r(qv);cP=l(ioe,"Create a new Dataset where the rows are shuffled."),ioe.forEach(a),pP=h(ve),Iv=n(ve,"P",{});var doe=r(Iv);mP=l(doe,`Currently shuffling uses numpy random generators.
You can either supply a NumPy BitGenerator to use, or a seed to initiate NumPy\u2019s default random generator (PCG64).`),doe.forEach(a),hP=h(ve),Xt=n(ve,"P",{});var fc=r(Xt);fP=l(fc,"Shuffling takes the list of indices "),Tv=n(fc,"CODE",{});var coe=r(Tv);gP=l(coe,"[0:len(my_dataset)]"),coe.forEach(a),uP=l(fc,` and shuffles it to create an indices mapping.
However as soon as your `),r_=n(fc,"A",{href:!0});var poe=r(r_);_P=l(poe,"Dataset"),poe.forEach(a),bP=l(fc,` has an indices mapping, the speed can become 10x slower.
This is because there is an extra step to get the row index to read using the indices mapping, and most importantly, you aren\u2019t reading contiguous chunks of data anymore.
To restore the speed, you\u2019d need to rewrite the entire dataset on your disk again using `),o_=n(fc,"A",{href:!0});var moe=r(o_);$P=l(moe,"Dataset.flatten_indices()"),moe.forEach(a),xP=l(fc,", which removes the indices mapping."),fc.forEach(a),vP=h(ve),b(_l.$$.fragment,ve),yP=h(ve),Xn=n(ve,"P",{});var M1=r(Xn);jP=l(M1,"In this case, we recommend switching to an "),l_=n(M1,"A",{href:!0});var hoe=r(l_);wP=l(hoe,"IterableDataset"),hoe.forEach(a),DP=l(M1," and leveraging its fast approximate shuffling method "),i_=n(M1,"A",{href:!0});var foe=r(i_);kP=l(foe,"IterableDataset.shuffle()"),foe.forEach(a),EP=l(M1,"."),M1.forEach(a),qP=h(ve),b(bl.$$.fragment,ve),IP=h(ve),b($l.$$.fragment,ve),ve.forEach(a),TP=h(I),kt=n(I,"DIV",{class:!0});var gc=r(kt);b(Wp.$$.fragment,gc),NP=h(gc),te=n(gc,"P",{});var ye=r(te);PP=l(ye,"Return a dictionary ("),d_=n(ye,"A",{href:!0});var goe=r(d_);AP=l(goe,"datasets.DatasetDict"),goe.forEach(a),LP=l(ye,") with two random train and test subsets ("),Nv=n(ye,"CODE",{});var uoe=r(Nv);FP=l(uoe,"train"),uoe.forEach(a),CP=l(ye," and "),Pv=n(ye,"CODE",{});var _oe=r(Pv);OP=l(_oe,"test"),_oe.forEach(a),zP=h(ye),Av=n(ye,"CODE",{});var boe=r(Av);SP=l(boe,"Dataset"),boe.forEach(a),VP=l(ye,` splits).
Splits are created from the dataset according to `),Lv=n(ye,"CODE",{});var $oe=r(Lv);UP=l($oe,"test_size"),$oe.forEach(a),MP=l(ye,", "),Fv=n(ye,"CODE",{});var xoe=r(Fv);RP=l(xoe,"train_size"),xoe.forEach(a),BP=l(ye," and "),Cv=n(ye,"CODE",{});var voe=r(Cv);HP=l(voe,"shuffle"),voe.forEach(a),GP=l(ye,"."),ye.forEach(a),KP=h(gc),Yp=n(gc,"P",{});var Z3=r(Yp);WP=l(Z3,"This method is similar to scikit-learn "),Ov=n(Z3,"CODE",{});var yoe=r(Ov);YP=l(yoe,"train_test_split"),yoe.forEach(a),JP=l(Z3,"."),Z3.forEach(a),QP=h(gc),b(xl.$$.fragment,gc),gc.forEach(a),ZP=h(I),_e=n(I,"DIV",{class:!0});var St=r(_e);b(Jp.$$.fragment,St),XP=h(St),er=n(St,"P",{});var R1=r(er);eA=l(R1,"Return the "),zv=n(R1,"CODE",{});var joe=r(zv);tA=l(joe,"index"),joe.forEach(a),aA=l(R1,"-nth shard from dataset split into "),Sv=n(R1,"CODE",{});var woe=r(Sv);sA=l(woe,"num_shards"),woe.forEach(a),nA=l(R1," pieces."),R1.forEach(a),rA=h(St),tr=n(St,"P",{});var B1=r(tr);oA=l(B1,"This shards deterministically. "),Vv=n(B1,"CODE",{});var Doe=r(Vv);lA=l(Doe,"dset.shard(n, i)"),Doe.forEach(a),iA=l(B1,` will contain all elements of dset whose
index mod `),Uv=n(B1,"CODE",{});var koe=r(Uv);dA=l(koe,"n = i"),koe.forEach(a),cA=l(B1,"."),B1.forEach(a),pA=h(St),be=n(St,"P",{});var bt=r(be);Mv=n(bt,"CODE",{});var Eoe=r(Mv);mA=l(Eoe,"dset.shard(n, i, contiguous=True)"),Eoe.forEach(a),hA=l(bt,` will instead split dset into contiguous chunks,
so it can be easily concatenated back together after processing. If `),Rv=n(bt,"CODE",{});var qoe=r(Rv);fA=l(qoe,"n % i == l"),qoe.forEach(a),gA=l(bt,`, then the
first `),Bv=n(bt,"CODE",{});var Ioe=r(Bv);uA=l(Ioe,"l"),Ioe.forEach(a),_A=l(bt," shards will have length "),Hv=n(bt,"CODE",{});var Toe=r(Hv);bA=l(Toe,"(n // i) + 1"),Toe.forEach(a),$A=l(bt,", and the remaining shards will have length "),Gv=n(bt,"CODE",{});var Noe=r(Gv);xA=l(Noe,"(n // i)"),Noe.forEach(a),vA=l(bt,`.
`),Kv=n(bt,"CODE",{});var Poe=r(Kv);yA=l(Poe,"datasets.concatenate([dset.shard(n, i, contiguous=True) for i in range(n)])"),Poe.forEach(a),jA=l(bt,` will return
a dataset with the same order as the original.`),bt.forEach(a),wA=h(St),Qp=n(St,"P",{});var X3=r(Qp);DA=l(X3,"Be sure to shard before using any randomizing operator (such as "),Wv=n(X3,"CODE",{});var Aoe=r(Wv);kA=l(Aoe,"shuffle"),Aoe.forEach(a),EA=l(X3,`).
It is best if the shard operator is used early in the dataset pipeline.`),X3.forEach(a),qA=h(St),b(vl.$$.fragment,St),St.forEach(a),IA=h(I),os=n(I,"DIV",{class:!0});var H1=r(os);b(Zp.$$.fragment,H1),TA=h(H1),ae=n(H1,"P",{});var je=r(ae);NA=l(je,"Create a "),Yv=n(je,"CODE",{});var Loe=r(Yv);PA=l(Loe,"tf.data.Dataset"),Loe.forEach(a),AA=l(je," from the underlying Dataset. This "),Jv=n(je,"CODE",{});var Foe=r(Jv);LA=l(Foe,"tf.data.Dataset"),Foe.forEach(a),FA=l(je,` will load and collate batches from
the Dataset, and is suitable for passing to methods like `),Qv=n(je,"CODE",{});var Coe=r(Qv);CA=l(Coe,"model.fit()"),Coe.forEach(a),OA=l(je," or "),Zv=n(je,"CODE",{});var Ooe=r(Zv);zA=l(Ooe,"model.predict()"),Ooe.forEach(a),SA=l(je,`. The dataset will yield
`),Xv=n(je,"CODE",{});var zoe=r(Xv);VA=l(zoe,"dicts"),zoe.forEach(a),UA=l(je," for both inputs and labels unless the "),e0=n(je,"CODE",{});var Soe=r(e0);MA=l(Soe,"dict"),Soe.forEach(a),RA=l(je,` would contain only a single key, in which case a raw
`),t0=n(je,"CODE",{});var Voe=r(t0);BA=l(Voe,"tf.Tensor"),Voe.forEach(a),HA=l(je," is yielded instead."),je.forEach(a),GA=h(H1),b(yl.$$.fragment,H1),H1.forEach(a),KA=h(I),Et=n(I,"DIV",{class:!0});var uc=r(Et);b(Xp.$$.fragment,uc),WA=h(uc),a0=n(uc,"P",{});var Uoe=r(a0);YA=l(Uoe,`Pushes the dataset to the hub as a Parquet dataset.
The dataset is pushed using HTTP requests and does not need to have neither git or git-lfs installed.`),Uoe.forEach(a),JA=h(uc),Xe=n(uc,"P",{});var bn=r(Xe);QA=l(bn,"The resulting Parquet files are self-contained by default. If your dataset contains "),c_=n(bn,"A",{href:!0});var Moe=r(c_);ZA=l(Moe,"Image"),Moe.forEach(a),XA=l(bn," or "),p_=n(bn,"A",{href:!0});var Roe=r(p_);eL=l(Roe,"Audio"),Roe.forEach(a),tL=l(bn,`
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `),s0=n(bn,"CODE",{});var Boe=r(s0);aL=l(Boe,"embed_external_files"),Boe.forEach(a),sL=l(bn," to "),n0=n(bn,"CODE",{});var Hoe=r(n0);nL=l(Hoe,"False"),Hoe.forEach(a),rL=l(bn,"."),bn.forEach(a),oL=h(uc),b(jl.$$.fragment,uc),uc.forEach(a),lL=h(I),Oe=n(I,"DIV",{class:!0});var $n=r(Oe);b(em.$$.fragment,$n),iL=h($n),ar=n($n,"P",{});var G1=r(ar);dL=l(G1,"Saves a dataset to a dataset directory, or in a filesystem using either "),r0=n(G1,"CODE",{});var Goe=r(r0);cL=l(Goe,"s3fs.S3FileSystem"),Goe.forEach(a),pL=l(G1,` or
any implementation of `),o0=n(G1,"CODE",{});var Koe=r(o0);mL=l(Koe,"fsspec.spec.AbstractFileSystem"),Koe.forEach(a),hL=l(G1,"."),G1.forEach(a),fL=h($n),sr=n($n,"P",{});var K1=r(sr);gL=l(K1,"For "),m_=n(K1,"A",{href:!0});var Woe=r(m_);uL=l(Woe,"Image"),Woe.forEach(a),_L=l(K1," and "),h_=n(K1,"A",{href:!0});var Yoe=r(h_);bL=l(Yoe,"Audio"),Yoe.forEach(a),$L=l(K1," data:"),K1.forEach(a),xL=h($n),l0=n($n,"P",{});var Joe=r(l0);vL=l(Joe,`All the Image() and Audio() data are stored in the arrow files.
If you want to store paths or urls, please use the Value(\u201Cstring\u201D) type.`),Joe.forEach(a),yL=h($n),b(wl.$$.fragment,$n),$n.forEach(a),jL=h(I),ls=n(I,"DIV",{class:!0});var W1=r(ls);b(tm.$$.fragment,W1),wL=h(W1),ea=n(W1,"P",{});var _c=r(ea);DL=l(_c,"Loads a dataset that was previously saved using "),i0=n(_c,"CODE",{});var Qoe=r(i0);kL=l(Qoe,"save_to_disk"),Qoe.forEach(a),EL=l(_c,` from a dataset directory, or from a
filesystem using either `),d0=n(_c,"CODE",{});var Zoe=r(d0);qL=l(Zoe,"s3fs.S3FileSystem"),Zoe.forEach(a),IL=l(_c,` or any implementation of
`),c0=n(_c,"CODE",{});var Xoe=r(c0);TL=l(Xoe,"fsspec.spec.AbstractFileSystem"),Xoe.forEach(a),NL=l(_c,"."),_c.forEach(a),PL=h(W1),b(Dl.$$.fragment,W1),W1.forEach(a),AL=h(I),kl=n(I,"DIV",{class:!0});var e5=r(kl);b(am.$$.fragment,e5),LL=h(e5),p0=n(e5,"P",{});var ele=r(p0);FL=l(ele,"Create and cache a new Dataset by flattening the indices mapping."),ele.forEach(a),e5.forEach(a),CL=h(I),is=n(I,"DIV",{class:!0});var Y1=r(is);b(sm.$$.fragment,Y1),OL=h(Y1),m0=n(Y1,"P",{});var tle=r(m0);zL=l(tle,"Exports the dataset to csv"),tle.forEach(a),SL=h(Y1),b(El.$$.fragment,Y1),Y1.forEach(a),VL=h(I),ds=n(I,"DIV",{class:!0});var J1=r(ds);b(nm.$$.fragment,J1),UL=h(J1),rm=n(J1,"P",{});var t5=r(rm);ML=l(t5,"Returns the dataset as a "),h0=n(t5,"CODE",{});var ale=r(h0);RL=l(ale,"pandas.DataFrame"),ale.forEach(a),BL=l(t5,". Can also return a generator for large datasets."),t5.forEach(a),HL=h(J1),b(ql.$$.fragment,J1),J1.forEach(a),GL=h(I),cs=n(I,"DIV",{class:!0});var Q1=r(cs);b(om.$$.fragment,Q1),KL=h(Q1),f0=n(Q1,"P",{});var sle=r(f0);WL=l(sle,"Returns the dataset as a Python dict. Can also return a generator for large datasets."),sle.forEach(a),YL=h(Q1),b(Il.$$.fragment,Q1),Q1.forEach(a),JL=h(I),ps=n(I,"DIV",{class:!0});var Z1=r(ps);b(lm.$$.fragment,Z1),QL=h(Z1),g0=n(Z1,"P",{});var nle=r(g0);ZL=l(nle,"Export the dataset to JSON Lines or JSON."),nle.forEach(a),XL=h(Z1),b(Tl.$$.fragment,Z1),Z1.forEach(a),eF=h(I),ms=n(I,"DIV",{class:!0});var X1=r(ms);b(im.$$.fragment,X1),tF=h(X1),u0=n(X1,"P",{});var rle=r(u0);aF=l(rle,"Exports the dataset to parquet"),rle.forEach(a),sF=h(X1),b(Nl.$$.fragment,X1),X1.forEach(a),nF=h(I),hs=n(I,"DIV",{class:!0});var e2=r(hs);b(dm.$$.fragment,e2),rF=h(e2),_0=n(e2,"P",{});var ole=r(_0);oF=l(ole,"Exports the dataset to a SQL database."),ole.forEach(a),lF=h(e2),b(Pl.$$.fragment,e2),e2.forEach(a),iF=h(I),qt=n(I,"DIV",{class:!0});var bc=r(qt);b(cm.$$.fragment,bc),dF=h(bc),nr=n(bc,"P",{});var t2=r(nr);cF=l(t2,`Add a dense index using Faiss for fast retrieval.
By default the index is done over the vectors of the specified column.
You can specify `),b0=n(t2,"CODE",{});var lle=r(b0);pF=l(lle,"device"),lle.forEach(a),mF=l(t2," if you want to run it on GPU ("),$0=n(t2,"CODE",{});var ile=r($0);hF=l(ile,"device"),ile.forEach(a),fF=l(t2,` must be the GPU index).
You can find more information about Faiss here:`),t2.forEach(a),gF=h(bc),x0=n(bc,"UL",{});var dle=r(x0);f_=n(dle,"LI",{});var tre=r(f_);uF=l(tre,"For "),pm=n(tre,"A",{href:!0,rel:!0});var cle=r(pm);_F=l(cle,"string factory"),cle.forEach(a),tre.forEach(a),dle.forEach(a),bF=h(bc),b(Al.$$.fragment,bc),bc.forEach(a),$F=h(I),fs=n(I,"DIV",{class:!0});var a2=r(fs);b(mm.$$.fragment,a2),xF=h(a2),ta=n(a2,"P",{});var $c=r(ta);vF=l($c,`Add a dense index using Faiss for fast retrieval.
The index is created using the vectors of `),v0=n($c,"CODE",{});var ple=r(v0);yF=l(ple,"external_arrays"),ple.forEach(a),jF=l($c,`.
You can specify `),y0=n($c,"CODE",{});var mle=r(y0);wF=l(mle,"device"),mle.forEach(a),DF=l($c," if you want to run it on GPU ("),j0=n($c,"CODE",{});var hle=r(j0);kF=l(hle,"device"),hle.forEach(a),EF=l($c,` must be the GPU index).
You can find more information about Faiss here:`),$c.forEach(a),qF=h(a2),w0=n(a2,"UL",{});var fle=r(w0);g_=n(fle,"LI",{});var are=r(g_);IF=l(are,"For "),hm=n(are,"A",{href:!0,rel:!0});var gle=r(hm);TF=l(gle,"string factory"),gle.forEach(a),are.forEach(a),fle.forEach(a),a2.forEach(a),NF=h(I),Ll=n(I,"DIV",{class:!0});var a5=r(Ll);b(fm.$$.fragment,a5),PF=h(a5),D0=n(a5,"P",{});var ule=r(D0);AF=l(ule,"Save a FaissIndex on disk."),ule.forEach(a),a5.forEach(a),LF=h(I),gs=n(I,"DIV",{class:!0});var s2=r(gs);b(gm.$$.fragment,s2),FF=h(s2),k0=n(s2,"P",{});var _le=r(k0);CF=l(_le,"Load a FaissIndex from disk."),_le.forEach(a),OF=h(s2),um=n(s2,"P",{});var s5=r(um);zF=l(s5,`If you want to do additional configurations, you can have access to the faiss index object by doing
`),E0=n(s5,"CODE",{});var ble=r(E0);SF=l(ble,".get_index(index_name).faiss_index"),ble.forEach(a),VF=l(s5," to make it fit your needs."),s5.forEach(a),s2.forEach(a),UF=h(I),us=n(I,"DIV",{class:!0});var n2=r(us);b(_m.$$.fragment,n2),MF=h(n2),q0=n(n2,"P",{});var $le=r(q0);RF=l($le,"Add a text index using ElasticSearch for fast retrieval. This is done in-place."),$le.forEach(a),BF=h(n2),b(Fl.$$.fragment,n2),n2.forEach(a),HF=h(I),Cl=n(I,"DIV",{class:!0});var n5=r(Cl);b(bm.$$.fragment,n5),GF=h(n5),I0=n(n5,"P",{});var xle=r(I0);KF=l(xle,"Load an existing text index using ElasticSearch for fast retrieval."),xle.forEach(a),n5.forEach(a),WF=h(I),Ol=n(I,"DIV",{class:!0});var r5=r(Ol);b($m.$$.fragment,r5),YF=h(r5),xm=n(r5,"P",{});var o5=r(xm);JF=l(o5,"List the "),T0=n(o5,"CODE",{});var vle=r(T0);QF=l(vle,"colindex_nameumns"),vle.forEach(a),ZF=l(o5,"/identifiers of all the attached indexes."),o5.forEach(a),r5.forEach(a),XF=h(I),zl=n(I,"DIV",{class:!0});var l5=r(zl);b(vm.$$.fragment,l5),eC=h(l5),ym=n(l5,"P",{});var i5=r(ym);tC=l(i5,"List the "),N0=n(i5,"CODE",{});var yle=r(N0);aC=l(yle,"index_name"),yle.forEach(a),sC=l(i5,"/identifiers of all the attached indexes."),i5.forEach(a),l5.forEach(a),nC=h(I),Sl=n(I,"DIV",{class:!0});var d5=r(Sl);b(jm.$$.fragment,d5),rC=h(d5),P0=n(d5,"P",{});var jle=r(P0);oC=l(jle,"Drop the index with the specified column."),jle.forEach(a),d5.forEach(a),lC=h(I),Vl=n(I,"DIV",{class:!0});var c5=r(Vl);b(wm.$$.fragment,c5),iC=h(c5),A0=n(c5,"P",{});var wle=r(A0);dC=l(wle,"Find the nearest examples indices in the dataset to the query."),wle.forEach(a),c5.forEach(a),cC=h(I),Ul=n(I,"DIV",{class:!0});var p5=r(Ul);b(Dm.$$.fragment,p5),pC=h(p5),L0=n(p5,"P",{});var Dle=r(L0);mC=l(Dle,"Find the nearest examples indices in the dataset to the query."),Dle.forEach(a),p5.forEach(a),hC=h(I),Ml=n(I,"DIV",{class:!0});var m5=r(Ml);b(km.$$.fragment,m5),fC=h(m5),F0=n(m5,"P",{});var kle=r(F0);gC=l(kle,"Find the nearest examples in the dataset to the query."),kle.forEach(a),m5.forEach(a),uC=h(I),Rl=n(I,"DIV",{class:!0});var h5=r(Rl);b(Em.$$.fragment,h5),_C=h(h5),C0=n(h5,"P",{});var Ele=r(C0);bC=l(Ele,"Find the nearest examples in the dataset to the query."),Ele.forEach(a),h5.forEach(a),$C=h(I),Bl=n(I,"DIV",{class:!0});var f5=r(Bl);b(qm.$$.fragment,f5),xC=h(f5),u_=n(f5,"P",{});var sre=r(u_);__=n(sre,"A",{href:!0});var qle=r(__);vC=l(qle,"DatasetInfo"),qle.forEach(a),yC=l(sre," object containing all the metadata in the dataset."),sre.forEach(a),f5.forEach(a),jC=h(I),Hl=n(I,"DIV",{class:!0});var g5=r(Hl);b(Im.$$.fragment,g5),wC=h(g5),b_=n(g5,"P",{});var nre=r(b_);$_=n(nre,"A",{href:!0});var Ile=r($_);DC=l(Ile,"NamedSplit"),Ile.forEach(a),kC=l(nre," object corresponding to a named dataset split."),nre.forEach(a),g5.forEach(a),EC=h(I),x_=n(I,"DIV",{class:!0});var Tle=r(x_);b(Tm.$$.fragment,Tle),Tle.forEach(a),qC=h(I),v_=n(I,"DIV",{class:!0});var Nle=r(v_);b(Nm.$$.fragment,Nle),Nle.forEach(a),IC=h(I),y_=n(I,"DIV",{class:!0});var Ple=r(y_);b(Pm.$$.fragment,Ple),Ple.forEach(a),TC=h(I),j_=n(I,"DIV",{class:!0});var Ale=r(j_);b(Am.$$.fragment,Ale),Ale.forEach(a),NC=h(I),w_=n(I,"DIV",{class:!0});var Lle=r(w_);b(Lm.$$.fragment,Lle),Lle.forEach(a),PC=h(I),D_=n(I,"DIV",{class:!0});var Fle=r(D_);b(Fm.$$.fragment,Fle),Fle.forEach(a),AC=h(I),k_=n(I,"DIV",{class:!0});var Cle=r(k_);b(Cm.$$.fragment,Cle),Cle.forEach(a),LC=h(I),E_=n(I,"DIV",{class:!0});var Ole=r(E_);b(Om.$$.fragment,Ole),Ole.forEach(a),FC=h(I),q_=n(I,"DIV",{class:!0});var zle=r(q_);b(zm.$$.fragment,zle),zle.forEach(a),CC=h(I),I_=n(I,"DIV",{class:!0});var Sle=r(I_);b(Sm.$$.fragment,Sle),Sle.forEach(a),OC=h(I),T_=n(I,"DIV",{class:!0});var Vle=r(T_);b(Vm.$$.fragment,Vle),Vle.forEach(a),zC=h(I),N_=n(I,"DIV",{class:!0});var Ule=r(N_);b(Um.$$.fragment,Ule),Ule.forEach(a),SC=h(I),P_=n(I,"DIV",{class:!0});var Mle=r(P_);b(Mm.$$.fragment,Mle),Mle.forEach(a),VC=h(I),_s=n(I,"DIV",{class:!0});var r2=r(_s);b(Rm.$$.fragment,r2),UC=h(r2),O0=n(r2,"P",{});var Rle=r(O0);MC=l(Rle,"Create Dataset from CSV file(s)."),Rle.forEach(a),RC=h(r2),b(Gl.$$.fragment,r2),r2.forEach(a),BC=h(I),bs=n(I,"DIV",{class:!0});var o2=r(bs);b(Bm.$$.fragment,o2),HC=h(o2),z0=n(o2,"P",{});var Ble=r(z0);GC=l(Ble,"Create Dataset from JSON or JSON Lines file(s)."),Ble.forEach(a),KC=h(o2),b(Kl.$$.fragment,o2),o2.forEach(a),WC=h(I),$s=n(I,"DIV",{class:!0});var l2=r($s);b(Hm.$$.fragment,l2),YC=h(l2),S0=n(l2,"P",{});var Hle=r(S0);JC=l(Hle,"Create Dataset from Parquet file(s)."),Hle.forEach(a),QC=h(l2),b(Wl.$$.fragment,l2),l2.forEach(a),ZC=h(I),xs=n(I,"DIV",{class:!0});var i2=r(xs);b(Gm.$$.fragment,i2),XC=h(i2),V0=n(i2,"P",{});var Gle=r(V0);eO=l(Gle,"Create Dataset from text file(s)."),Gle.forEach(a),tO=h(i2),b(Yl.$$.fragment,i2),i2.forEach(a),aO=h(I),It=n(I,"DIV",{class:!0});var xc=r(It);b(Km.$$.fragment,xc),sO=h(xc),U0=n(xc,"P",{});var Kle=r(U0);nO=l(Kle,"Create Dataset from SQL query or database table."),Kle.forEach(a),rO=h(xc),b(Jl.$$.fragment,xc),oO=h(xc),b(Ql.$$.fragment,xc),xc.forEach(a),lO=h(I),vs=n(I,"DIV",{class:!0});var d2=r(vs);b(Wm.$$.fragment,d2),iO=h(d2),rr=n(d2,"P",{});var c2=r(rr);dO=l(c2,"Prepare a dataset for the given task by casting the dataset\u2019s "),A_=n(c2,"A",{href:!0});var Wle=r(A_);cO=l(Wle,"Features"),Wle.forEach(a),pO=l(c2," to standardized column names and types as detailed in "),L_=n(c2,"A",{href:!0});var Yle=r(L_);M0=n(Yle,"CODE",{});var Jle=r(M0);mO=l(Jle,"datasets.tasks"),Jle.forEach(a),Yle.forEach(a),hO=l(c2,"."),c2.forEach(a),fO=h(d2),or=n(d2,"P",{});var p2=r(or);gO=l(p2,"Casts "),R0=n(p2,"CODE",{});var Qle=r(R0);uO=l(Qle,"datasets.DatasetInfo.features"),Qle.forEach(a),_O=l(p2," according to a task-specific schema. Intended for single-use only, so all task templates are removed from "),B0=n(p2,"CODE",{});var Zle=r(B0);bO=l(Zle,"datasets.DatasetInfo.task_templates"),Zle.forEach(a),$O=l(p2," after casting."),p2.forEach(a),d2.forEach(a),xO=h(I),ys=n(I,"DIV",{class:!0});var m2=r(ys);b(Ym.$$.fragment,m2),vO=h(m2),Jm=n(m2,"P",{});var u5=r(Jm);yO=l(u5,"Align the dataset\u2019s label ID and label name mapping to match an input "),H0=n(u5,"CODE",{});var Xle=r(H0);jO=l(Xle,"label2id"),Xle.forEach(a),wO=l(u5,` mapping.
This is useful when you want to ensure that a model\u2019s predicted labels are aligned with the dataset.
The alignment in done using the lowercase label names.`),u5.forEach(a),DO=h(m2),b(Zl.$$.fragment,m2),m2.forEach(a),I.forEach(a),d3=h(i),aa=n(i,"DIV",{class:!0});var h2=r(aa);b(Qm.$$.fragment,h2),kO=h(h2),lr=n(h2,"P",{});var f2=r(lr);EO=l(f2,"Converts a list of "),F_=n(f2,"A",{href:!0});var eie=r(F_);qO=l(eie,"Dataset"),eie.forEach(a),IO=l(f2," with the same schema into a single "),C_=n(f2,"A",{href:!0});var tie=r(C_);TO=l(tie,"Dataset"),tie.forEach(a),NO=l(f2,"."),f2.forEach(a),PO=h(h2),b(Xl.$$.fragment,h2),h2.forEach(a),c3=h(i),se=n(i,"DIV",{class:!0});var Ye=r(se);b(Zm.$$.fragment,Ye),AO=h(Ye),G0=n(Ye,"P",{});var aie=r(G0);LO=l(aie,`Interleave several datasets (sources) into a single dataset.
The new dataset is constructed by alternating between the sources to get the examples.`),aie.forEach(a),FO=h(Ye),ir=n(Ye,"P",{});var g2=r(ir);CO=l(g2,"You can use this function on a list of "),O_=n(g2,"A",{href:!0});var sie=r(O_);OO=l(sie,"Dataset"),sie.forEach(a),zO=l(g2," objects, or on a list of "),z_=n(g2,"A",{href:!0});var nie=r(z_);SO=l(nie,"IterableDataset"),nie.forEach(a),VO=l(g2," objects."),g2.forEach(a),UO=h(Ye),Xm=n(Ye,"UL",{});var _5=r(Xm);dr=n(_5,"LI",{});var u2=r(dr);MO=l(u2,"If "),K0=n(u2,"CODE",{});var rie=r(K0);RO=l(rie,"probabilities"),rie.forEach(a),BO=l(u2," is "),W0=n(u2,"CODE",{});var oie=r(W0);HO=l(oie,"None"),oie.forEach(a),GO=l(u2," (default) the new dataset is constructed by cycling between each source to get the examples."),u2.forEach(a),KO=h(_5),cr=n(_5,"LI",{});var _2=r(cr);WO=l(_2,"If "),Y0=n(_2,"CODE",{});var lie=r(Y0);YO=l(lie,"probabilities"),lie.forEach(a),JO=l(_2," is not "),J0=n(_2,"CODE",{});var iie=r(J0);QO=l(iie,"None"),iie.forEach(a),ZO=l(_2,", the new dataset is constructed by getting examples from a random source at a time according to the provided probabilities."),_2.forEach(a),_5.forEach(a),XO=h(Ye),pr=n(Ye,"P",{});var b2=r(pr);ez=l(b2,"The resulting dataset ends when one of the source datasets runs out of examples except when "),Q0=n(b2,"CODE",{});var die=r(Q0);tz=l(die,"oversampling"),die.forEach(a),az=l(b2," is "),Z0=n(b2,"CODE",{});var cie=r(Z0);sz=l(cie,"True"),cie.forEach(a),nz=l(b2,`,
in which case, the resulting dataset ends when all datasets have ran out of examples at least one time.`),b2.forEach(a),rz=h(Ye),X0=n(Ye,"P",{});var pie=r(X0);oz=l(pie,"Example:"),pie.forEach(a),lz=h(Ye),b(ei.$$.fragment,Ye),Ye.forEach(a),p3=h(i),he=n(i,"DIV",{class:!0});var Vt=r(he);b(eh.$$.fragment,Vt),iz=h(Vt),mr=n(Vt,"P",{});var $2=r(mr);dz=l($2,"Split a dataset for the node at rank "),ey=n($2,"CODE",{});var mie=r(ey);cz=l(mie,"rank"),mie.forEach(a),pz=l($2," in a pool of nodes of size "),ty=n($2,"CODE",{});var hie=r(ty);mz=l(hie,"world_size"),hie.forEach(a),hz=l($2,"."),$2.forEach(a),fz=h(Vt),ay=n(Vt,"P",{});var fie=r(ay);gz=l(fie,"For map-style datasets:"),fie.forEach(a),uz=h(Vt),sy=n(Vt,"P",{});var gie=r(sy);_z=l(gie,`Each node is assigned a chunk of data, e.g. rank 0 is given the first chunk of the dataset.
To maximize data loading throughput, chunks are made of contiguous data on disk if possible.`),gie.forEach(a),bz=h(Vt),ny=n(Vt,"P",{});var uie=r(ny);$z=l(uie,"For iterable datasets:"),uie.forEach(a),xz=h(Vt),sa=n(Vt,"P",{});var vc=r(sa);vz=l(vc,"If the dataset has a number of shards that is a factor of "),ry=n(vc,"CODE",{});var _ie=r(ry);yz=l(_ie,"world_size"),_ie.forEach(a),jz=l(vc," (i.e. if "),oy=n(vc,"CODE",{});var bie=r(oy);wz=l(bie,"dataset.n_shards % world_size == 0"),bie.forEach(a),Dz=l(vc,`),
then the shards are evenly assigned across the nodes, which is the most optimized.
Otherwise, each node keeps 1 example out of `),ly=n(vc,"CODE",{});var $ie=r(ly);kz=l($ie,"world_size"),$ie.forEach(a),Ez=l(vc,", skipping the other examples."),vc.forEach(a),Vt.forEach(a),m3=h(i),De=n(i,"DIV",{class:!0});var xn=r(De);b(th.$$.fragment,xn),qz=h(xn),iy=n(xn,"P",{});var xie=r(iy);Iz=l(xie,`When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it\u2019s already been computed.`),xie.forEach(a),Tz=h(xn),dy=n(xn,"P",{});var vie=r(dy);Nz=l(vie,`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),vie.forEach(a),Pz=h(xn),cy=n(xn,"P",{});var yie=r(cy);Az=l(yie,`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),yie.forEach(a),Lz=h(xn),et=n(xn,"UL",{});var vn=r(et);py=n(vn,"LI",{});var jie=r(py);Fz=l(jie,"cache files are always recreated"),jie.forEach(a),Cz=h(vn),my=n(vn,"LI",{});var wie=r(my);Oz=l(wie,"cache files are written to a temporary directory that is deleted when session closes"),wie.forEach(a),zz=h(vn),hy=n(vn,"LI",{});var Die=r(hy);Sz=l(Die,"cache files are named using a random hash instead of the dataset fingerprint"),Die.forEach(a),Vz=h(vn),ah=n(vn,"LI",{});var b5=r(ah);Uz=l(b5,"use "),S_=n(b5,"A",{href:!0});var kie=r(S_);Mz=l(kie,"save_to_disk()"),kie.forEach(a),Rz=l(b5," to save a transformed dataset or it will be deleted when session closes"),b5.forEach(a),Bz=h(vn),na=n(vn,"LI",{});var yc=r(na);Hz=l(yc,"caching doesn\u2019t affect "),V_=n(yc,"A",{href:!0});var Eie=r(V_);Gz=l(Eie,"load_dataset()"),Eie.forEach(a),Kz=l(yc,`. If you want to regenerate a dataset from scratch you should use
the `),fy=n(yc,"CODE",{});var qie=r(fy);Wz=l(qie,"download_mode"),qie.forEach(a),Yz=l(yc," parameter in "),U_=n(yc,"A",{href:!0});var Iie=r(U_);Jz=l(Iie,"load_dataset()"),Iie.forEach(a),Qz=l(yc,"."),yc.forEach(a),vn.forEach(a),xn.forEach(a),h3=h(i),ke=n(i,"DIV",{class:!0});var yn=r(ke);b(sh.$$.fragment,yn),Zz=h(yn),gy=n(yn,"P",{});var Tie=r(gy);Xz=l(Tie,`When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it\u2019s already been computed.`),Tie.forEach(a),eS=h(yn),uy=n(yn,"P",{});var Nie=r(uy);tS=l(Nie,`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),Nie.forEach(a),aS=h(yn),_y=n(yn,"P",{});var Pie=r(_y);sS=l(Pie,`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),Pie.forEach(a),nS=h(yn),tt=n(yn,"UL",{});var jn=r(tt);by=n(jn,"LI",{});var Aie=r(by);rS=l(Aie,"cache files are always recreated"),Aie.forEach(a),oS=h(jn),$y=n(jn,"LI",{});var Lie=r($y);lS=l(Lie,"cache files are written to a temporary directory that is deleted when session closes"),Lie.forEach(a),iS=h(jn),xy=n(jn,"LI",{});var Fie=r(xy);dS=l(Fie,"cache files are named using a random hash instead of the dataset fingerprint"),Fie.forEach(a),cS=h(jn),nh=n(jn,"LI",{});var $5=r(nh);pS=l($5,"use "),M_=n($5,"A",{href:!0});var Cie=r(M_);mS=l(Cie,"save_to_disk()"),Cie.forEach(a),hS=l($5," to save a transformed dataset or it will be deleted when session closes"),$5.forEach(a),fS=h(jn),ra=n(jn,"LI",{});var jc=r(ra);gS=l(jc,"caching doesn\u2019t affect "),R_=n(jc,"A",{href:!0});var Oie=r(R_);uS=l(Oie,"load_dataset()"),Oie.forEach(a),_S=l(jc,`. If you want to regenerate a dataset from scratch you should use
the `),vy=n(jc,"CODE",{});var zie=r(vy);bS=l(zie,"download_mode"),zie.forEach(a),$S=l(jc," parameter in "),B_=n(jc,"A",{href:!0});var Sie=r(B_);xS=l(Sie,"load_dataset()"),Sie.forEach(a),vS=l(jc,"."),jc.forEach(a),jn.forEach(a),yn.forEach(a),f3=h(i),Ee=n(i,"DIV",{class:!0});var wn=r(Ee);b(rh.$$.fragment,wn),yS=h(wn),yy=n(wn,"P",{});var Vie=r(yy);jS=l(Vie,`When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it\u2019s already been computed.`),Vie.forEach(a),wS=h(wn),jy=n(wn,"P",{});var Uie=r(jy);DS=l(Uie,`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),Uie.forEach(a),kS=h(wn),wy=n(wn,"P",{});var Mie=r(wy);ES=l(Mie,`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),Mie.forEach(a),qS=h(wn),at=n(wn,"UL",{});var Dn=r(at);Dy=n(Dn,"LI",{});var Rie=r(Dy);IS=l(Rie,"cache files are always recreated"),Rie.forEach(a),TS=h(Dn),ky=n(Dn,"LI",{});var Bie=r(ky);NS=l(Bie,"cache files are written to a temporary directory that is deleted when session closes"),Bie.forEach(a),PS=h(Dn),Ey=n(Dn,"LI",{});var Hie=r(Ey);AS=l(Hie,"cache files are named using a random hash instead of the dataset fingerprint"),Hie.forEach(a),LS=h(Dn),oh=n(Dn,"LI",{});var x5=r(oh);FS=l(x5,"use "),H_=n(x5,"A",{href:!0});var Gie=r(H_);CS=l(Gie,"save_to_disk()"),Gie.forEach(a),OS=l(x5,"] to save a transformed dataset or it will be deleted when session closes"),x5.forEach(a),zS=h(Dn),oa=n(Dn,"LI",{});var wc=r(oa);SS=l(wc,"caching doesn\u2019t affect "),G_=n(wc,"A",{href:!0});var Kie=r(G_);VS=l(Kie,"load_dataset()"),Kie.forEach(a),US=l(wc,`. If you want to regenerate a dataset from scratch you should use
the `),qy=n(wc,"CODE",{});var Wie=r(qy);MS=l(Wie,"download_mode"),Wie.forEach(a),RS=l(wc," parameter in "),K_=n(wc,"A",{href:!0});var Yie=r(K_);BS=l(Yie,"load_dataset()"),Yie.forEach(a),HS=l(wc,"."),wc.forEach(a),Dn.forEach(a),wn.forEach(a),g3=h(i),hr=n(i,"H2",{class:!0});var v5=r(hr);ti=n(v5,"A",{id:!0,class:!0,href:!0});var Jie=r(ti);Iy=n(Jie,"SPAN",{});var Qie=r(Iy);b(lh.$$.fragment,Qie),Qie.forEach(a),Jie.forEach(a),GS=h(v5),Ty=n(v5,"SPAN",{});var Zie=r(Ty);KS=l(Zie,"DatasetDict"),Zie.forEach(a),v5.forEach(a),u3=h(i),ai=n(i,"P",{});var y5=r(ai);WS=l(y5,"Dictionary with split names as keys (\u2018train\u2019, \u2018test\u2019 for example), and "),Ny=n(y5,"CODE",{});var Xie=r(Ny);YS=l(Xie,"Dataset"),Xie.forEach(a),JS=l(y5,` objects as values.
It also has dataset transform methods like map or filter, to process all the splits at once.`),y5.forEach(a),_3=h(i),A=n(i,"DIV",{class:!0});var L=r(A);b(ih.$$.fragment,L),QS=h(L),Py=n(L,"P",{});var ede=r(Py);ZS=l(ede,"A dictionary (dict of str: datasets.Dataset) with dataset transforms methods (map, filter, etc.)"),ede.forEach(a),XS=h(L),js=n(L,"DIV",{class:!0});var x2=r(js);b(dh.$$.fragment,x2),eV=h(x2),Ay=n(x2,"P",{});var tde=r(Ay);tV=l(tde,"The Apache Arrow tables backing each split."),tde.forEach(a),aV=h(x2),b(si.$$.fragment,x2),x2.forEach(a),sV=h(L),ws=n(L,"DIV",{class:!0});var v2=r(ws);b(ch.$$.fragment,v2),nV=h(v2),Ly=n(v2,"P",{});var ade=r(Ly);rV=l(ade,"The cache files containing the Apache Arrow table backing each split."),ade.forEach(a),oV=h(v2),b(ni.$$.fragment,v2),v2.forEach(a),lV=h(L),Ds=n(L,"DIV",{class:!0});var y2=r(Ds);b(ph.$$.fragment,y2),iV=h(y2),Fy=n(y2,"P",{});var sde=r(Fy);dV=l(sde,"Number of columns in each split of the dataset."),sde.forEach(a),cV=h(y2),b(ri.$$.fragment,y2),y2.forEach(a),pV=h(L),ks=n(L,"DIV",{class:!0});var j2=r(ks);b(mh.$$.fragment,j2),mV=h(j2),hh=n(j2,"P",{});var j5=r(hh);hV=l(j5,"Number of rows in each split of the dataset (same as "),oi=n(j5,"A",{href:!0});var w5=r(oi);fV=l(w5,"datasets.Dataset."),Cy=n(w5,"STRONG",{});var nde=r(Cy);gV=l(nde,"len"),nde.forEach(a),uV=l(w5,"()"),w5.forEach(a),_V=l(j5,")."),j5.forEach(a),bV=h(j2),b(li.$$.fragment,j2),j2.forEach(a),$V=h(L),Es=n(L,"DIV",{class:!0});var w2=r(Es);b(fh.$$.fragment,w2),xV=h(w2),Oy=n(w2,"P",{});var rde=r(Oy);vV=l(rde,"Names of the columns in each split of the dataset."),rde.forEach(a),yV=h(w2),b(ii.$$.fragment,w2),w2.forEach(a),jV=h(L),qs=n(L,"DIV",{class:!0});var D2=r(qs);b(gh.$$.fragment,D2),wV=h(D2),zy=n(D2,"P",{});var ode=r(zy);DV=l(ode,"Shape of each split of the dataset (number of columns, number of rows)."),ode.forEach(a),kV=h(D2),b(di.$$.fragment,D2),D2.forEach(a),EV=h(L),Tt=n(L,"DIV",{class:!0});var Dc=r(Tt);b(uh.$$.fragment,Dc),qV=h(Dc),Sy=n(Dc,"P",{});var lde=r(Sy);IV=l(lde,"Return a list of the unique elements in a column for each split."),lde.forEach(a),TV=h(Dc),Vy=n(Dc,"P",{});var ide=r(Vy);NV=l(ide,"This is implemented in the low-level backend and as such, very fast."),ide.forEach(a),PV=h(Dc),b(ci.$$.fragment,Dc),Dc.forEach(a),AV=h(L),Is=n(L,"DIV",{class:!0});var k2=r(Is);b(_h.$$.fragment,k2),LV=h(k2),Uy=n(k2,"P",{});var dde=r(Uy);FV=l(dde,`Clean up all cache files in the dataset cache directory, excepted the currently used cache file if there is one.
Be careful when running this command that no other process is currently using other cache files.`),dde.forEach(a),CV=h(k2),b(pi.$$.fragment,k2),k2.forEach(a),OV=h(L),Ts=n(L,"DIV",{class:!0});var E2=r(Ts);b(bh.$$.fragment,E2),zV=h(E2),My=n(E2,"P",{});var cde=r(My);SV=l(cde,`Apply a function to all the elements in the table (individually or in batches)
and update the table (if function does updated examples).
The transformation is applied to all the datasets of the dataset dictionary.`),cde.forEach(a),VV=h(E2),b(mi.$$.fragment,E2),E2.forEach(a),UV=h(L),Ns=n(L,"DIV",{class:!0});var q2=r(Ns);b($h.$$.fragment,q2),MV=h(q2),Ry=n(q2,"P",{});var pde=r(Ry);RV=l(pde,`Apply a filter function to all the elements in the table in batches
and update the table so that the dataset only includes examples according to the filter function.
The transformation is applied to all the datasets of the dataset dictionary.`),pde.forEach(a),BV=h(q2),b(hi.$$.fragment,q2),q2.forEach(a),HV=h(L),Ps=n(L,"DIV",{class:!0});var I2=r(Ps);b(xh.$$.fragment,I2),GV=h(I2),By=n(I2,"P",{});var mde=r(By);KV=l(mde,"Create a new dataset sorted according to a single or multiple columns."),mde.forEach(a),WV=h(I2),b(fi.$$.fragment,I2),I2.forEach(a),YV=h(L),ze=n(L,"DIV",{class:!0});var kn=r(ze);b(vh.$$.fragment,kn),JV=h(kn),Hy=n(kn,"P",{});var hde=r(Hy);QV=l(hde,"Create a new Dataset where the rows are shuffled."),hde.forEach(a),ZV=h(kn),Gy=n(kn,"P",{});var fde=r(Gy);XV=l(fde,"The transformation is applied to all the datasets of the dataset dictionary."),fde.forEach(a),eU=h(kn),Ky=n(kn,"P",{});var gde=r(Ky);tU=l(gde,`Currently shuffling uses numpy random generators.
You can either supply a NumPy BitGenerator to use, or a seed to initiate NumPy\u2019s default random generator (PCG64).`),gde.forEach(a),aU=h(kn),b(gi.$$.fragment,kn),kn.forEach(a),sU=h(L),Se=n(L,"DIV",{class:!0});var En=r(Se);b(yh.$$.fragment,En),nU=h(En),jh=n(En,"P",{});var D5=r(jh);rU=l(D5,"Set "),Wy=n(D5,"CODE",{});var ude=r(Wy);oU=l(ude,"__getitem__"),ude.forEach(a),lU=l(D5,` return format (type and columns).
The format is set for every dataset in the dataset dictionary.`),D5.forEach(a),iU=h(En),st=n(En,"P",{});var qn=r(st);dU=l(qn,"It is possible to call "),Yy=n(qn,"CODE",{});var _de=r(Yy);cU=l(_de,"map"),_de.forEach(a),pU=l(qn," after calling "),Jy=n(qn,"CODE",{});var bde=r(Jy);mU=l(bde,"set_format"),bde.forEach(a),hU=l(qn,". Since "),Qy=n(qn,"CODE",{});var $de=r(Qy);fU=l($de,"map"),$de.forEach(a),gU=l(qn,` may add new columns, then the list of formatted columns
gets updated. In this case, if you apply `),Zy=n(qn,"CODE",{});var xde=r(Zy);uU=l(xde,"map"),xde.forEach(a),_U=l(qn," on a dataset to add a new column, then this column will be formatted:"),qn.forEach(a),bU=h(En),Xy=n(En,"P",{});var vde=r(Xy);ej=n(vde,"CODE",{});var yde=r(ej);$U=l(yde,"new formatted columns = (all columns - previously unformatted columns)"),yde.forEach(a),vde.forEach(a),xU=h(En),b(ui.$$.fragment,En),En.forEach(a),vU=h(L),Nt=n(L,"DIV",{class:!0});var kc=r(Nt);b(wh.$$.fragment,kc),yU=h(kc),Dh=n(kc,"P",{});var k5=r(Dh);jU=l(k5,"Reset "),tj=n(k5,"CODE",{});var jde=r(tj);wU=l(jde,"__getitem__"),jde.forEach(a),DU=l(k5,` return format to python objects and all columns.
The transformation is applied to all the datasets of the dataset dictionary.`),k5.forEach(a),kU=h(kc),W_=n(kc,"P",{});var rre=r(W_);EU=l(rre,"Same as "),aj=n(rre,"CODE",{});var wde=r(aj);qU=l(wde,"self.set_format()"),wde.forEach(a),rre.forEach(a),IU=h(kc),b(_i.$$.fragment,kc),kc.forEach(a),TU=h(L),bi=n(L,"DIV",{class:!0});var E5=r(bi);b(kh.$$.fragment,E5),NU=h(E5),fr=n(E5,"P",{});var T2=r(fr);PU=l(T2,"To be used in a "),sj=n(T2,"CODE",{});var Dde=r(sj);AU=l(Dde,"with"),Dde.forEach(a),LU=l(T2," statement. Set "),nj=n(T2,"CODE",{});var kde=r(nj);FU=l(kde,"__getitem__"),kde.forEach(a),CU=l(T2,` return format (type and columns).
The transformation is applied to all the datasets of the dataset dictionary.`),T2.forEach(a),E5.forEach(a),OU=h(L),Ve=n(L,"DIV",{class:!0});var In=r(Ve);b(Eh.$$.fragment,In),zU=h(In),la=n(In,"P",{});var Ec=r(la);SU=l(Ec,"Set "),rj=n(Ec,"CODE",{});var Ede=r(rj);VU=l(Ede,"__getitem__"),Ede.forEach(a),UU=l(Ec,` return format (type and columns). The data formatting is applied on-the-fly.
The format `),oj=n(Ec,"CODE",{});var qde=r(oj);MU=l(qde,"type"),qde.forEach(a),RU=l(Ec," (for example \u201Cnumpy\u201D) is used to format batches when using "),lj=n(Ec,"CODE",{});var Ide=r(lj);BU=l(Ide,"__getitem__"),Ide.forEach(a),HU=l(Ec,`.
The format is set for every dataset in the dataset dictionary.`),Ec.forEach(a),GU=h(In),qh=n(In,"P",{});var q5=r(qh);KU=l(q5,"It\u2019s also possible to use custom transforms for formatting using "),Y_=n(q5,"A",{href:!0});var Tde=r(Y_);WU=l(Tde,"with_transform()"),Tde.forEach(a),YU=l(q5,"."),q5.forEach(a),JU=h(In),nt=n(In,"P",{});var Tn=r(nt);QU=l(Tn,"Contrary to "),J_=n(Tn,"A",{href:!0});var Nde=r(J_);ZU=l(Nde,"set_format()"),Nde.forEach(a),XU=l(Tn,", "),ij=n(Tn,"CODE",{});var Pde=r(ij);eM=l(Pde,"with_format"),Pde.forEach(a),tM=l(Tn," returns a new "),Q_=n(Tn,"A",{href:!0});var Ade=r(Q_);aM=l(Ade,"DatasetDict"),Ade.forEach(a),sM=l(Tn," object with new "),Z_=n(Tn,"A",{href:!0});var Lde=r(Z_);nM=l(Lde,"Dataset"),Lde.forEach(a),rM=l(Tn," objects."),Tn.forEach(a),oM=h(In),b($i.$$.fragment,In),In.forEach(a),lM=h(L),Ue=n(L,"DIV",{class:!0});var Nn=r(Ue);b(Ih.$$.fragment,Nn),iM=h(Nn),gr=n(Nn,"P",{});var N2=r(gr);dM=l(N2,"Set "),dj=n(N2,"CODE",{});var Fde=r(dj);cM=l(Fde,"__getitem__"),Fde.forEach(a),pM=l(N2," return format using this transform. The transform is applied on-the-fly on batches when "),cj=n(N2,"CODE",{});var Cde=r(cj);mM=l(Cde,"__getitem__"),Cde.forEach(a),hM=l(N2,` is called.
The transform is set for every dataset in the dataset dictionary`),N2.forEach(a),fM=h(Nn),ur=n(Nn,"P",{});var P2=r(ur);gM=l(P2,"As "),X_=n(P2,"A",{href:!0});var Ode=r(X_);uM=l(Ode,"set_format()"),Ode.forEach(a),_M=l(P2,", this can be reset using "),eb=n(P2,"A",{href:!0});var zde=r(eb);bM=l(zde,"reset_format()"),zde.forEach(a),$M=l(P2,"."),P2.forEach(a),xM=h(Nn),rt=n(Nn,"P",{});var Pn=r(rt);vM=l(Pn,"Contrary to "),pj=n(Pn,"CODE",{});var Sde=r(pj);yM=l(Sde,"set_transform()"),Sde.forEach(a),jM=l(Pn,", "),mj=n(Pn,"CODE",{});var Vde=r(mj);wM=l(Vde,"with_transform"),Vde.forEach(a),DM=l(Pn," returns a new "),tb=n(Pn,"A",{href:!0});var Ude=r(tb);kM=l(Ude,"DatasetDict"),Ude.forEach(a),EM=l(Pn," object with new "),ab=n(Pn,"A",{href:!0});var Mde=r(ab);qM=l(Mde,"Dataset"),Mde.forEach(a),IM=l(Pn," objects."),Pn.forEach(a),TM=h(Nn),b(xi.$$.fragment,Nn),Nn.forEach(a),NM=h(L),As=n(L,"DIV",{class:!0});var A2=r(As);b(Th.$$.fragment,A2),PM=h(A2),hj=n(A2,"P",{});var Rde=r(hj);AM=l(Rde,`Flatten the Apache Arrow Table of each split (nested features are flatten).
Each column with a struct type is flattened into one column per struct field.
Other columns are left unchanged.`),Rde.forEach(a),LM=h(A2),b(vi.$$.fragment,A2),A2.forEach(a),FM=h(L),Pt=n(L,"DIV",{class:!0});var qc=r(Pt);b(Nh.$$.fragment,qc),CM=h(qc),fj=n(qc,"P",{});var Bde=r(fj);OM=l(Bde,`Cast the dataset to a new set of features.
The transformation is applied to all the datasets of the dataset dictionary.`),Bde.forEach(a),zM=h(qc),ia=n(qc,"P",{});var Ic=r(ia);SM=l(Ic,"You can also remove a column using "),sb=n(Ic,"A",{href:!0});var Hde=r(sb);VM=l(Hde,"Dataset.map()"),Hde.forEach(a),UM=l(Ic," with "),gj=n(Ic,"CODE",{});var Gde=r(gj);MM=l(Gde,"feature"),Gde.forEach(a),RM=l(Ic," but "),uj=n(Ic,"CODE",{});var Kde=r(uj);BM=l(Kde,"cast"),Kde.forEach(a),HM=l(Ic,`
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),Ic.forEach(a),GM=h(qc),b(yi.$$.fragment,qc),qc.forEach(a),KM=h(L),Ls=n(L,"DIV",{class:!0});var L2=r(Ls);b(Ph.$$.fragment,L2),WM=h(L2),_j=n(L2,"P",{});var Wde=r(_j);YM=l(Wde,"Cast column to feature for decoding."),Wde.forEach(a),JM=h(L2),b(ji.$$.fragment,L2),L2.forEach(a),QM=h(L),Me=n(L,"DIV",{class:!0});var An=r(Me);b(Ah.$$.fragment,An),ZM=h(An),bj=n(An,"P",{});var Yde=r(bj);XM=l(Yde,`Remove one or several column(s) from each split in the dataset
and the features associated to the column(s).`),Yde.forEach(a),eR=h(An),$j=n(An,"P",{});var Jde=r($j);tR=l(Jde,"The transformation is applied to all the splits of the dataset dictionary."),Jde.forEach(a),aR=h(An),_r=n(An,"P",{});var F2=r(_r);sR=l(F2,"You can also remove a column using "),nb=n(F2,"A",{href:!0});var Qde=r(nb);nR=l(Qde,"Dataset.map()"),Qde.forEach(a),rR=l(F2," with "),xj=n(F2,"CODE",{});var Zde=r(xj);oR=l(Zde,"remove_columns"),Zde.forEach(a),lR=l(F2,` but the present method
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),F2.forEach(a),iR=h(An),b(wi.$$.fragment,An),An.forEach(a),dR=h(L),Re=n(L,"DIV",{class:!0});var Ln=r(Re);b(Lh.$$.fragment,Ln),cR=h(Ln),vj=n(Ln,"P",{});var Xde=r(vj);pR=l(Xde,`Rename a column in the dataset and move the features associated to the original column under the new column name.
The transformation is applied to all the datasets of the dataset dictionary.`),Xde.forEach(a),mR=h(Ln),br=n(Ln,"P",{});var C2=r(br);hR=l(C2,"You can also rename a column using "),rb=n(C2,"A",{href:!0});var ece=r(rb);fR=l(ece,"map()"),ece.forEach(a),gR=l(C2," with "),yj=n(C2,"CODE",{});var tce=r(yj);uR=l(tce,"remove_columns"),tce.forEach(a),_R=l(C2," but the present method:"),C2.forEach(a),bR=h(Ln),Fh=n(Ln,"UL",{});var I5=r(Fh);jj=n(I5,"LI",{});var ace=r(jj);$R=l(ace,"takes care of moving the original features under the new column name."),ace.forEach(a),xR=h(I5),wj=n(I5,"LI",{});var sce=r(wj);vR=l(sce,"doesn\u2019t copy the data to a new dataset and is thus much faster."),sce.forEach(a),I5.forEach(a),yR=h(Ln),b(Di.$$.fragment,Ln),Ln.forEach(a),jR=h(L),Fs=n(L,"DIV",{class:!0});var O2=r(Fs);b(Ch.$$.fragment,O2),wR=h(O2),Dj=n(O2,"P",{});var nce=r(Dj);DR=l(nce,`Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.
The transformation is applied to all the datasets of the dataset dictionary.`),nce.forEach(a),kR=h(O2),b(ki.$$.fragment,O2),O2.forEach(a),ER=h(L),At=n(L,"DIV",{class:!0});var Tc=r(At);b(Oh.$$.fragment,Tc),qR=h(Tc),kj=n(Tc,"P",{});var rce=r(kj);IR=l(rce,`Select one or several column(s) from each split in the dataset and
the features associated to the column(s).`),rce.forEach(a),TR=h(Tc),Ej=n(Tc,"P",{});var oce=r(Ej);NR=l(oce,`The transformation is applied to all the splits of the dataset
dictionary.`),oce.forEach(a),PR=h(Tc),b(Ei.$$.fragment,Tc),Tc.forEach(a),AR=h(L),Cs=n(L,"DIV",{class:!0});var z2=r(Cs);b(zh.$$.fragment,z2),LR=h(z2),Sh=n(z2,"P",{});var T5=r(Sh);FR=l(T5,"Casts the given column as "),ob=n(T5,"A",{href:!0});var lce=r(ob);CR=l(lce,"ClassLabel"),lce.forEach(a),OR=l(T5," and updates the tables."),T5.forEach(a),zR=h(z2),b(qi.$$.fragment,z2),z2.forEach(a),SR=h(L),Be=n(L,"DIV",{class:!0});var Fn=r(Be);b(Vh.$$.fragment,Fn),VR=h(Fn),$r=n(Fn,"P",{});var S2=r($r);UR=l(S2,"Pushes the "),lb=n(S2,"A",{href:!0});var ice=r(lb);MR=l(ice,"DatasetDict"),ice.forEach(a),RR=l(S2,` to the hub as a Parquet dataset.
The `),ib=n(S2,"A",{href:!0});var dce=r(ib);BR=l(dce,"DatasetDict"),dce.forEach(a),HR=l(S2," is pushed using HTTP requests and does not need to have neither git or git-lfs installed."),S2.forEach(a),GR=h(Fn),qj=n(Fn,"P",{});var cce=r(qj);KR=l(cce,"Each dataset split will be pushed independently. The pushed dataset will keep the original split names."),cce.forEach(a),WR=h(Fn),da=n(Fn,"P",{});var Nc=r(da);YR=l(Nc,"The resulting Parquet files are self-contained by default: if your dataset contains "),db=n(Nc,"A",{href:!0});var pce=r(db);JR=l(pce,"Image"),pce.forEach(a),QR=l(Nc," or "),cb=n(Nc,"A",{href:!0});var mce=r(cb);ZR=l(mce,"Audio"),mce.forEach(a),XR=l(Nc,`
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `),Ij=n(Nc,"CODE",{});var hce=r(Ij);eB=l(hce,"embed_external_files"),hce.forEach(a),tB=l(Nc," to False."),Nc.forEach(a),aB=h(Fn),b(Ii.$$.fragment,Fn),Fn.forEach(a),sB=h(L),He=n(L,"DIV",{class:!0});var Cn=r(He);b(Uh.$$.fragment,Cn),nB=h(Cn),xr=n(Cn,"P",{});var V2=r(xr);rB=l(V2,"Saves a dataset dict to a filesystem using either "),pb=n(V2,"A",{href:!0});var fce=r(pb);oB=l(fce,"S3FileSystem"),fce.forEach(a),lB=l(V2,` or
`),Tj=n(V2,"CODE",{});var gce=r(Tj);iB=l(gce,"fsspec.spec.AbstractFileSystem"),gce.forEach(a),dB=l(V2,"."),V2.forEach(a),cB=h(Cn),vr=n(Cn,"P",{});var U2=r(vr);pB=l(U2,"For "),mb=n(U2,"A",{href:!0});var uce=r(mb);mB=l(uce,"Image"),uce.forEach(a),hB=l(U2," and "),hb=n(U2,"A",{href:!0});var _ce=r(hb);fB=l(_ce,"Audio"),_ce.forEach(a),gB=l(U2," data:"),U2.forEach(a),uB=h(Cn),Nj=n(Cn,"P",{});var bce=r(Nj);_B=l(bce,`All the Image() and Audio() data are stored in the arrow files.
If you want to store paths or urls, please use the Value(\u201Cstring\u201D) type.`),bce.forEach(a),bB=h(Cn),b(Ti.$$.fragment,Cn),Cn.forEach(a),$B=h(L),Os=n(L,"DIV",{class:!0});var M2=r(Os);b(Mh.$$.fragment,M2),xB=h(M2),ca=n(M2,"P",{});var Pc=r(ca);vB=l(Pc,"Load a dataset that was previously saved using "),Pj=n(Pc,"CODE",{});var $ce=r(Pj);yB=l($ce,"save_to_disk"),$ce.forEach(a),jB=l(Pc,` from a filesystem using either
`),fb=n(Pc,"A",{href:!0});var xce=r(fb);wB=l(xce,"S3FileSystem"),xce.forEach(a),DB=l(Pc," or "),Aj=n(Pc,"CODE",{});var vce=r(Aj);kB=l(vce,"fsspec.spec.AbstractFileSystem"),vce.forEach(a),EB=l(Pc,"."),Pc.forEach(a),qB=h(M2),b(Ni.$$.fragment,M2),M2.forEach(a),IB=h(L),zs=n(L,"DIV",{class:!0});var R2=r(zs);b(Rh.$$.fragment,R2),TB=h(R2),Bh=n(R2,"P",{});var N5=r(Bh);NB=l(N5,"Create "),gb=n(N5,"A",{href:!0});var yce=r(gb);PB=l(yce,"DatasetDict"),yce.forEach(a),AB=l(N5," from CSV file(s)."),N5.forEach(a),LB=h(R2),b(Pi.$$.fragment,R2),R2.forEach(a),FB=h(L),Ss=n(L,"DIV",{class:!0});var B2=r(Ss);b(Hh.$$.fragment,B2),CB=h(B2),Gh=n(B2,"P",{});var P5=r(Gh);OB=l(P5,"Create "),ub=n(P5,"A",{href:!0});var jce=r(ub);zB=l(jce,"DatasetDict"),jce.forEach(a),SB=l(P5," from JSON Lines file(s)."),P5.forEach(a),VB=h(B2),b(Ai.$$.fragment,B2),B2.forEach(a),UB=h(L),Vs=n(L,"DIV",{class:!0});var H2=r(Vs);b(Kh.$$.fragment,H2),MB=h(H2),Wh=n(H2,"P",{});var A5=r(Wh);RB=l(A5,"Create "),_b=n(A5,"A",{href:!0});var wce=r(_b);BB=l(wce,"DatasetDict"),wce.forEach(a),HB=l(A5," from Parquet file(s)."),A5.forEach(a),GB=h(H2),b(Li.$$.fragment,H2),H2.forEach(a),KB=h(L),Us=n(L,"DIV",{class:!0});var G2=r(Us);b(Yh.$$.fragment,G2),WB=h(G2),Jh=n(G2,"P",{});var L5=r(Jh);YB=l(L5,"Create "),bb=n(L5,"A",{href:!0});var Dce=r(bb);JB=l(Dce,"DatasetDict"),Dce.forEach(a),QB=l(L5," from text file(s)."),L5.forEach(a),ZB=h(G2),b(Fi.$$.fragment,G2),G2.forEach(a),XB=h(L),Ms=n(L,"DIV",{class:!0});var K2=r(Ms);b(Qh.$$.fragment,K2),eH=h(K2),yr=n(K2,"P",{});var W2=r(yr);tH=l(W2,"Prepare a dataset for the given task by casting the dataset\u2019s "),$b=n(W2,"A",{href:!0});var kce=r($b);aH=l(kce,"Features"),kce.forEach(a),sH=l(W2," to standardized column names and types as detailed in "),xb=n(W2,"A",{href:!0});var Ece=r(xb);Lj=n(Ece,"CODE",{});var qce=r(Lj);nH=l(qce,"datasets.tasks"),qce.forEach(a),Ece.forEach(a),rH=l(W2,"."),W2.forEach(a),oH=h(K2),jr=n(K2,"P",{});var Y2=r(jr);lH=l(Y2,"Casts "),Fj=n(Y2,"CODE",{});var Ice=r(Fj);iH=l(Ice,"datasets.DatasetInfo.features"),Ice.forEach(a),dH=l(Y2," according to a task-specific schema. Intended for single-use only, so all task templates are removed from "),Cj=n(Y2,"CODE",{});var Tce=r(Cj);cH=l(Tce,"datasets.DatasetInfo.task_templates"),Tce.forEach(a),pH=l(Y2," after casting."),Y2.forEach(a),K2.forEach(a),L.forEach(a),b3=h(i),vb=n(i,"A",{id:!0}),r(vb).forEach(a),$3=h(i),wr=n(i,"H2",{class:!0});var F5=r(wr);Ci=n(F5,"A",{id:!0,class:!0,href:!0});var Nce=r(Ci);Oj=n(Nce,"SPAN",{});var Pce=r(Oj);b(Zh.$$.fragment,Pce),Pce.forEach(a),Nce.forEach(a),mH=h(F5),zj=n(F5,"SPAN",{});var Ace=r(zj);hH=l(Ace,"IterableDataset"),Ace.forEach(a),F5.forEach(a),x3=h(i),Oi=n(i,"P",{});var C5=r(Oi);fH=l(C5,"The base class "),yb=n(C5,"A",{href:!0});var Lce=r(yb);gH=l(Lce,"IterableDataset"),Lce.forEach(a),uH=l(C5," implements an iterable Dataset backed by python generators."),C5.forEach(a),v3=h(i),F=n(i,"DIV",{class:!0});var C=r(F);b(Xh.$$.fragment,C),_H=h(C),Sj=n(C,"P",{});var Fce=r(Sj);bH=l(Fce,"A Dataset backed by an iterable."),Fce.forEach(a),$H=h(C),Lt=n(C,"DIV",{class:!0});var Ac=r(Lt);b(ef.$$.fragment,Ac),xH=h(Ac),Vj=n(Ac,"P",{});var Cce=r(Vj);vH=l(Cce,"Create an Iterable Dataset from a generator."),Cce.forEach(a),yH=h(Ac),b(zi.$$.fragment,Ac),jH=h(Ac),b(Si.$$.fragment,Ac),Ac.forEach(a),wH=h(C),Rs=n(C,"DIV",{class:!0});var J2=r(Rs);b(tf.$$.fragment,J2),DH=h(J2),Uj=n(J2,"P",{});var Oce=r(Uj);kH=l(Oce,`Remove one or several column(s) in the dataset and the features associated to them.
The removal is done on-the-fly on the examples when iterating over the dataset.`),Oce.forEach(a),EH=h(J2),b(Vi.$$.fragment,J2),J2.forEach(a),qH=h(C),Bs=n(C,"DIV",{class:!0});var Q2=r(Bs);b(af.$$.fragment,Q2),IH=h(Q2),Mj=n(Q2,"P",{});var zce=r(Mj);TH=l(zce,`Select one or several column(s) in the dataset and the features
associated to them. The selection is done on-the-fly on the examples
when iterating over the dataset.`),zce.forEach(a),NH=h(Q2),b(Ui.$$.fragment,Q2),Q2.forEach(a),PH=h(C),Hs=n(C,"DIV",{class:!0});var Z2=r(Hs);b(sf.$$.fragment,Z2),AH=h(Z2),Rj=n(Z2,"P",{});var Sce=r(Rj);LH=l(Sce,"Cast column to feature for decoding."),Sce.forEach(a),FH=h(Z2),b(Mi.$$.fragment,Z2),Z2.forEach(a),CH=h(C),Gs=n(C,"DIV",{class:!0});var X2=r(Gs);b(nf.$$.fragment,X2),OH=h(X2),Bj=n(X2,"P",{});var Vce=r(Bj);zH=l(Vce,"Cast the dataset to a new set of features."),Vce.forEach(a),SH=h(X2),b(Ri.$$.fragment,X2),X2.forEach(a),VH=h(C),jb=n(C,"DIV",{class:!0});var Uce=r(jb);b(rf.$$.fragment,Uce),Uce.forEach(a),UH=h(C),Bi=n(C,"DIV",{class:!0});var O5=r(Bi);b(of.$$.fragment,O5),MH=h(O5),lf=n(O5,"P",{});var z5=r(lf);RH=l(z5,"Iterate through the batches of size "),Hj=n(z5,"EM",{});var Mce=r(Hj);BH=l(Mce,"batch_size"),Mce.forEach(a),HH=l(z5,"."),z5.forEach(a),O5.forEach(a),GH=h(C),Ge=n(C,"DIV",{class:!0});var On=r(Ge);b(df.$$.fragment,On),KH=h(On),Gj=n(On,"P",{});var Rce=r(Gj);WH=l(Rce,`Apply a function to all the examples in the iterable dataset (individually or in batches) and update them.
If your function returns a column that already exists, then it overwrites it.
The function is applied on-the-fly on the examples when iterating over the dataset.`),Rce.forEach(a),YH=h(On),cf=n(On,"P",{});var S5=r(cf);JH=l(S5,"You can specify whether the function should be batched or not with the "),Kj=n(S5,"CODE",{});var Bce=r(Kj);QH=l(Bce,"batched"),Bce.forEach(a),ZH=l(S5," parameter:"),S5.forEach(a),XH=h(On),Dr=n(On,"UL",{});var e$=r(Dr);kr=n(e$,"LI",{});var t$=r(kr);eG=l(t$,"If batched is "),Wj=n(t$,"CODE",{});var Hce=r(Wj);tG=l(Hce,"False"),Hce.forEach(a),aG=l(t$,`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),Yj=n(t$,"CODE",{});var Gce=r(Yj);sG=l(Gce,'{"text": "Hello there !"}'),Gce.forEach(a),nG=l(t$,"."),t$.forEach(a),rG=h(e$),Er=n(e$,"LI",{});var a$=r(Er);oG=l(a$,"If batched is "),Jj=n(a$,"CODE",{});var Kce=r(Jj);lG=l(Kce,"True"),Kce.forEach(a),iG=l(a$," and "),Qj=n(a$,"CODE",{});var Wce=r(Qj);dG=l(Wce,"batch_size"),Wce.forEach(a),cG=l(a$,` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
A batch is a dictionary, e.g. a batch of 1 example is {\u201Ctext\u201D: [\u201CHello there !\u201D]}.`),a$.forEach(a),pG=h(e$),J=n(e$,"LI",{});var le=r(J);mG=l(le,"If batched is "),Zj=n(le,"CODE",{});var Yce=r(Zj);hG=l(Yce,"True"),Yce.forEach(a),fG=l(le," and "),Xj=n(le,"CODE",{});var Jce=r(Xj);gG=l(Jce,"batch_size"),Jce.forEach(a),uG=l(le," is "),ew=n(le,"CODE",{});var Qce=r(ew);_G=l(Qce,"n"),Qce.forEach(a),bG=l(le," > 1, then the function takes a batch of "),tw=n(le,"CODE",{});var Zce=r(tw);$G=l(Zce,"n"),Zce.forEach(a),xG=l(le," examples as input and can return a batch with "),aw=n(le,"CODE",{});var Xce=r(aw);vG=l(Xce,"n"),Xce.forEach(a),yG=l(le,` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),sw=n(le,"CODE",{});var epe=r(sw);jG=l(epe,"n"),epe.forEach(a),wG=l(le,` examples.
A batch is a dictionary, e.g. a batch of `),nw=n(le,"CODE",{});var tpe=r(nw);DG=l(tpe,"n"),tpe.forEach(a),kG=l(le," examples is "),rw=n(le,"CODE",{});var ape=r(rw);EG=l(ape,'{"text": ["Hello there !"] * n}'),ape.forEach(a),qG=l(le,"."),le.forEach(a),e$.forEach(a),IG=h(On),b(Hi.$$.fragment,On),On.forEach(a),TG=h(C),Ks=n(C,"DIV",{class:!0});var s$=r(Ks);b(pf.$$.fragment,s$),NG=h(s$),ow=n(s$,"P",{});var spe=r(ow);PG=l(spe,`Rename a column in the dataset, and move the features associated to the original column under the new column
name.`),spe.forEach(a),AG=h(s$),b(Gi.$$.fragment,s$),s$.forEach(a),LG=h(C),Ws=n(C,"DIV",{class:!0});var n$=r(Ws);b(mf.$$.fragment,n$),FG=h(n$),lw=n(n$,"P",{});var npe=r(lw);CG=l(npe,`Apply a filter function to all the elements so that the dataset only includes examples according to the filter function.
The filtering is done on-the-fly when iterating over the dataset.`),npe.forEach(a),OG=h(n$),b(Ki.$$.fragment,n$),n$.forEach(a),zG=h(C),$e=n(C,"DIV",{class:!0});var Ut=r($e);b(hf.$$.fragment,Ut),SG=h(Ut),iw=n(Ut,"P",{});var rpe=r(iw);VG=l(rpe,"Randomly shuffles the elements of this dataset."),rpe.forEach(a),UG=h(Ut),ff=n(Ut,"P",{});var V5=r(ff);MG=l(V5,"This dataset fills a buffer with "),dw=n(V5,"CODE",{});var ope=r(dw);RG=l(ope,"buffer_size"),ope.forEach(a),BG=l(V5,` elements, then randomly samples elements from this buffer,
replacing the selected elements with new elements. For perfect shuffling, a buffer size greater than or
equal to the full size of the dataset is required.`),V5.forEach(a),HG=h(Ut),qr=n(Ut,"P",{});var r$=r(qr);GG=l(r$,"For instance, if your dataset contains 10,000 elements but "),cw=n(r$,"CODE",{});var lpe=r(cw);KG=l(lpe,"buffer_size"),lpe.forEach(a),WG=l(r$," is set to 1000, then "),pw=n(r$,"CODE",{});var ipe=r(pw);YG=l(ipe,"shuffle"),ipe.forEach(a),JG=l(r$,` will
initially select a random element from only the first 1000 elements in the buffer. Once an element is
selected, its space in the buffer is replaced by the next (i.e. 1,001-st) element,
maintaining the 1000 element buffer.`),r$.forEach(a),QG=h(Ut),Ir=n(Ut,"P",{});var o$=r(Ir);ZG=l(o$,`If the dataset is made of several shards, it also does shuffle the order of the shards.
However if the order has been fixed by using `),wb=n(o$,"A",{href:!0});var dpe=r(wb);XG=l(dpe,"skip()"),dpe.forEach(a),eK=l(o$," or "),Db=n(o$,"A",{href:!0});var cpe=r(Db);tK=l(cpe,"take()"),cpe.forEach(a),aK=l(o$,`
then the order of the shards is kept unchanged.`),o$.forEach(a),sK=h(Ut),b(Wi.$$.fragment,Ut),Ut.forEach(a),nK=h(C),Ys=n(C,"DIV",{class:!0});var l$=r(Ys);b(gf.$$.fragment,l$),rK=h(l$),Tr=n(l$,"P",{});var i$=r(Tr);oK=l(i$,"Create a new "),kb=n(i$,"A",{href:!0});var ppe=r(kb);lK=l(ppe,"IterableDataset"),ppe.forEach(a),iK=l(i$," that skips the first "),mw=n(i$,"CODE",{});var mpe=r(mw);dK=l(mpe,"n"),mpe.forEach(a),cK=l(i$," elements."),i$.forEach(a),pK=h(l$),b(Yi.$$.fragment,l$),l$.forEach(a),mK=h(C),Js=n(C,"DIV",{class:!0});var d$=r(Js);b(uf.$$.fragment,d$),hK=h(d$),Nr=n(d$,"P",{});var c$=r(Nr);fK=l(c$,"Create a new "),Eb=n(c$,"A",{href:!0});var hpe=r(Eb);gK=l(hpe,"IterableDataset"),hpe.forEach(a),uK=l(c$," with only the first "),hw=n(c$,"CODE",{});var fpe=r(hw);_K=l(fpe,"n"),fpe.forEach(a),bK=l(c$," elements."),c$.forEach(a),$K=h(d$),b(Ji.$$.fragment,d$),d$.forEach(a),xK=h(C),Qi=n(C,"DIV",{class:!0});var U5=r(Qi);b(_f.$$.fragment,U5),vK=h(U5),qb=n(U5,"P",{});var ore=r(qb);Ib=n(ore,"A",{href:!0});var gpe=r(Ib);yK=l(gpe,"DatasetInfo"),gpe.forEach(a),jK=l(ore," object containing all the metadata in the dataset."),ore.forEach(a),U5.forEach(a),wK=h(C),Zi=n(C,"DIV",{class:!0});var M5=r(Zi);b(bf.$$.fragment,M5),DK=h(M5),Tb=n(M5,"P",{});var lre=r(Tb);Nb=n(lre,"A",{href:!0});var upe=r(Nb);kK=l(upe,"NamedSplit"),upe.forEach(a),EK=l(lre," object corresponding to a named dataset split."),lre.forEach(a),M5.forEach(a),qK=h(C),Pb=n(C,"DIV",{class:!0});var _pe=r(Pb);b($f.$$.fragment,_pe),_pe.forEach(a),IK=h(C),Ab=n(C,"DIV",{class:!0});var bpe=r(Ab);b(xf.$$.fragment,bpe),bpe.forEach(a),TK=h(C),Lb=n(C,"DIV",{class:!0});var $pe=r(Lb);b(vf.$$.fragment,$pe),$pe.forEach(a),NK=h(C),Fb=n(C,"DIV",{class:!0});var xpe=r(Fb);b(yf.$$.fragment,xpe),xpe.forEach(a),PK=h(C),Cb=n(C,"DIV",{class:!0});var vpe=r(Cb);b(jf.$$.fragment,vpe),vpe.forEach(a),AK=h(C),Ob=n(C,"DIV",{class:!0});var ype=r(Ob);b(wf.$$.fragment,ype),ype.forEach(a),LK=h(C),zb=n(C,"DIV",{class:!0});var jpe=r(zb);b(Df.$$.fragment,jpe),jpe.forEach(a),FK=h(C),Sb=n(C,"DIV",{class:!0});var wpe=r(Sb);b(kf.$$.fragment,wpe),wpe.forEach(a),CK=h(C),Vb=n(C,"DIV",{class:!0});var Dpe=r(Vb);b(Ef.$$.fragment,Dpe),Dpe.forEach(a),OK=h(C),Ub=n(C,"DIV",{class:!0});var kpe=r(Ub);b(qf.$$.fragment,kpe),kpe.forEach(a),zK=h(C),Mb=n(C,"DIV",{class:!0});var Epe=r(Mb);b(If.$$.fragment,Epe),Epe.forEach(a),SK=h(C),Rb=n(C,"DIV",{class:!0});var qpe=r(Rb);b(Tf.$$.fragment,qpe),qpe.forEach(a),VK=h(C),Bb=n(C,"DIV",{class:!0});var Ipe=r(Bb);b(Nf.$$.fragment,Ipe),Ipe.forEach(a),C.forEach(a),y3=h(i),Pr=n(i,"H2",{class:!0});var R5=r(Pr);Xi=n(R5,"A",{id:!0,class:!0,href:!0});var Tpe=r(Xi);fw=n(Tpe,"SPAN",{});var Npe=r(fw);b(Pf.$$.fragment,Npe),Npe.forEach(a),Tpe.forEach(a),UK=h(R5),gw=n(R5,"SPAN",{});var Ppe=r(gw);MK=l(Ppe,"IterableDatasetDict"),Ppe.forEach(a),R5.forEach(a),j3=h(i),ed=n(i,"P",{});var B5=r(ed);RK=l(B5,"Dictionary with split names as keys (\u2018train\u2019, \u2018test\u2019 for example), and "),uw=n(B5,"CODE",{});var Ape=r(uw);BK=l(Ape,"IterableDataset"),Ape.forEach(a),HK=l(B5," objects as values."),B5.forEach(a),w3=h(i),R=n(i,"DIV",{class:!0});var W=r(R);b(Af.$$.fragment,W),GK=h(W),Ke=n(W,"DIV",{class:!0});var zn=r(Ke);b(Lf.$$.fragment,zn),KK=h(zn),_w=n(zn,"P",{});var Lpe=r(_w);WK=l(Lpe,`Apply a function to all the examples in the iterable dataset (individually or in batches) and update them.
If your function returns a column that already exists, then it overwrites it.
The function is applied on-the-fly on the examples when iterating over the dataset.
The transformation is applied to all the datasets of the dataset dictionary.`),Lpe.forEach(a),YK=h(zn),Ff=n(zn,"P",{});var H5=r(Ff);JK=l(H5,"You can specify whether the function should be batched or not with the "),bw=n(H5,"CODE",{});var Fpe=r(bw);QK=l(Fpe,"batched"),Fpe.forEach(a),ZK=l(H5," parameter:"),H5.forEach(a),XK=h(zn),Ar=n(zn,"UL",{});var p$=r(Ar);Lr=n(p$,"LI",{});var m$=r(Lr);eW=l(m$,"If batched is "),$w=n(m$,"CODE",{});var Cpe=r($w);tW=l(Cpe,"False"),Cpe.forEach(a),aW=l(m$,`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),xw=n(m$,"CODE",{});var Ope=r(xw);sW=l(Ope,'{"text": "Hello there !"}'),Ope.forEach(a),nW=l(m$,"."),m$.forEach(a),rW=h(p$),pa=n(p$,"LI",{});var Lc=r(pa);oW=l(Lc,"If batched is "),vw=n(Lc,"CODE",{});var zpe=r(vw);lW=l(zpe,"True"),zpe.forEach(a),iW=l(Lc," and "),yw=n(Lc,"CODE",{});var Spe=r(yw);dW=l(Spe,"batch_size"),Spe.forEach(a),cW=l(Lc,` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
A batch is a dictionary, e.g. a batch of 1 example is `),jw=n(Lc,"CODE",{});var Vpe=r(jw);pW=l(Vpe,'{"text": ["Hello there !"]}'),Vpe.forEach(a),mW=l(Lc,"."),Lc.forEach(a),hW=h(p$),Q=n(p$,"LI",{});var ie=r(Q);fW=l(ie,"If batched is "),ww=n(ie,"CODE",{});var Upe=r(ww);gW=l(Upe,"True"),Upe.forEach(a),uW=l(ie," and "),Dw=n(ie,"CODE",{});var Mpe=r(Dw);_W=l(Mpe,"batch_size"),Mpe.forEach(a),bW=l(ie," is "),kw=n(ie,"CODE",{});var Rpe=r(kw);$W=l(Rpe,"n"),Rpe.forEach(a),xW=l(ie," > 1, then the function takes a batch of "),Ew=n(ie,"CODE",{});var Bpe=r(Ew);vW=l(Bpe,"n"),Bpe.forEach(a),yW=l(ie," examples as input and can return a batch with "),qw=n(ie,"CODE",{});var Hpe=r(qw);jW=l(Hpe,"n"),Hpe.forEach(a),wW=l(ie,` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),Iw=n(ie,"CODE",{});var Gpe=r(Iw);DW=l(Gpe,"n"),Gpe.forEach(a),kW=l(ie,` examples.
A batch is a dictionary, e.g. a batch of `),Tw=n(ie,"CODE",{});var Kpe=r(Tw);EW=l(Kpe,"n"),Kpe.forEach(a),qW=l(ie," examples is "),Nw=n(ie,"CODE",{});var Wpe=r(Nw);IW=l(Wpe,'{"text": ["Hello there !"] * n}'),Wpe.forEach(a),TW=l(ie,"."),ie.forEach(a),p$.forEach(a),NW=h(zn),b(td.$$.fragment,zn),zn.forEach(a),PW=h(W),Qs=n(W,"DIV",{class:!0});var h$=r(Qs);b(Cf.$$.fragment,h$),AW=h(h$),Pw=n(h$,"P",{});var Ype=r(Pw);LW=l(Ype,`Apply a filter function to all the elements so that the dataset only includes examples according to the filter function.
The filtering is done on-the-fly when iterating over the dataset.
The filtering is applied to all the datasets of the dataset dictionary.`),Ype.forEach(a),FW=h(h$),b(ad.$$.fragment,h$),h$.forEach(a),CW=h(W),xe=n(W,"DIV",{class:!0});var Mt=r(xe);b(Of.$$.fragment,Mt),OW=h(Mt),Aw=n(Mt,"P",{});var Jpe=r(Aw);zW=l(Jpe,`Randomly shuffles the elements of this dataset.
The shuffling is applied to all the datasets of the dataset dictionary.`),Jpe.forEach(a),SW=h(Mt),Lw=n(Mt,"P",{});var Qpe=r(Lw);VW=l(Qpe,`This dataset fills a buffer with buffer_size elements, then randomly samples elements from this buffer,
replacing the selected elements with new elements. For perfect shuffling, a buffer size greater than or
equal to the full size of the dataset is required.`),Qpe.forEach(a),UW=h(Mt),Fr=n(Mt,"P",{});var f$=r(Fr);MW=l(f$,"For instance, if your dataset contains 10,000 elements but "),Fw=n(f$,"CODE",{});var Zpe=r(Fw);RW=l(Zpe,"buffer_size"),Zpe.forEach(a),BW=l(f$," is set to 1000, then "),Cw=n(f$,"CODE",{});var Xpe=r(Cw);HW=l(Xpe,"shuffle"),Xpe.forEach(a),GW=l(f$,` will
initially select a random element from only the first 1000 elements in the buffer. Once an element is
selected, its space in the buffer is replaced by the next (i.e. 1,001-st) element,
maintaining the 1000 element buffer.`),f$.forEach(a),KW=h(Mt),ma=n(Mt,"P",{});var Fc=r(ma);WW=l(Fc,"If the dataset is made of several shards, it also does "),Ow=n(Fc,"CODE",{});var eme=r(Ow);YW=l(eme,"shuffle"),eme.forEach(a),JW=l(Fc,` the order of the shards.
However if the order has been fixed by using `),Hb=n(Fc,"A",{href:!0});var tme=r(Hb);QW=l(tme,"skip()"),tme.forEach(a),ZW=l(Fc," or "),Gb=n(Fc,"A",{href:!0});var ame=r(Gb);XW=l(ame,"take()"),ame.forEach(a),eY=l(Fc,`
then the order of the shards is kept unchanged.`),Fc.forEach(a),tY=h(Mt),b(sd.$$.fragment,Mt),Mt.forEach(a),aY=h(W),Zs=n(W,"DIV",{class:!0});var g$=r(Zs);b(zf.$$.fragment,g$),sY=h(g$),zw=n(g$,"P",{});var sme=r(zw);nY=l(sme,`Return a dataset with the specified format.
This method only supports the \u201Ctorch\u201D format for now.
The format is set to all the datasets of the dataset dictionary.`),sme.forEach(a),rY=h(g$),b(nd.$$.fragment,g$),g$.forEach(a),oY=h(W),Xs=n(W,"DIV",{class:!0});var u$=r(Xs);b(Sf.$$.fragment,u$),lY=h(u$),Sw=n(u$,"P",{});var nme=r(Sw);iY=l(nme,`Cast the dataset to a new set of features.
The type casting is applied to all the datasets of the dataset dictionary.`),nme.forEach(a),dY=h(u$),b(rd.$$.fragment,u$),u$.forEach(a),cY=h(W),en=n(W,"DIV",{class:!0});var _$=r(en);b(Vf.$$.fragment,_$),pY=h(_$),Vw=n(_$,"P",{});var rme=r(Vw);mY=l(rme,`Cast column to feature for decoding.
The type casting is applied to all the datasets of the dataset dictionary.`),rme.forEach(a),hY=h(_$),b(od.$$.fragment,_$),_$.forEach(a),fY=h(W),tn=n(W,"DIV",{class:!0});var b$=r(tn);b(Uf.$$.fragment,b$),gY=h(b$),Uw=n(b$,"P",{});var ome=r(Uw);uY=l(ome,`Remove one or several column(s) in the dataset and the features associated to them.
The removal is done on-the-fly on the examples when iterating over the dataset.
The removal is applied to all the datasets of the dataset dictionary.`),ome.forEach(a),_Y=h(b$),b(ld.$$.fragment,b$),b$.forEach(a),bY=h(W),an=n(W,"DIV",{class:!0});var $$=r(an);b(Mf.$$.fragment,$$),$Y=h($$),Mw=n($$,"P",{});var lme=r(Mw);xY=l(lme,`Rename a column in the dataset, and move the features associated to the original column under the new column
name.
The renaming is applied to all the datasets of the dataset dictionary.`),lme.forEach(a),vY=h($$),b(id.$$.fragment,$$),$$.forEach(a),yY=h(W),sn=n(W,"DIV",{class:!0});var x$=r(sn);b(Rf.$$.fragment,x$),jY=h(x$),Rw=n(x$,"P",{});var ime=r(Rw);wY=l(ime,`Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.
The renaming is applied to all the datasets of the dataset dictionary.`),ime.forEach(a),DY=h(x$),b(dd.$$.fragment,x$),x$.forEach(a),kY=h(W),nn=n(W,"DIV",{class:!0});var v$=r(nn);b(Bf.$$.fragment,v$),EY=h(v$),Bw=n(v$,"P",{});var dme=r(Bw);qY=l(dme,`Select one or several column(s) in the dataset and the features
associated to them. The selection is done on-the-fly on the examples
when iterating over the dataset. The selection is applied to all the
datasets of the dataset dictionary.`),dme.forEach(a),IY=h(v$),b(cd.$$.fragment,v$),v$.forEach(a),W.forEach(a),D3=h(i),Cr=n(i,"H2",{class:!0});var G5=r(Cr);pd=n(G5,"A",{id:!0,class:!0,href:!0});var cme=r(pd);Hw=n(cme,"SPAN",{});var pme=r(Hw);b(Hf.$$.fragment,pme),pme.forEach(a),cme.forEach(a),TY=h(G5),Gw=n(G5,"SPAN",{});var mme=r(Gw);NY=l(mme,"Features"),mme.forEach(a),G5.forEach(a),k3=h(i),S=n(i,"DIV",{class:!0});var U=r(S);b(Gf.$$.fragment,U),PY=h(U),Kw=n(U,"P",{});var hme=r(Kw);AY=l(hme,"A special dictionary that defines the internal structure of a dataset."),hme.forEach(a),LY=h(U),Kf=n(U,"P",{});var K5=r(Kf);FY=l(K5,"Instantiated with a dictionary of type "),Ww=n(K5,"CODE",{});var fme=r(Ww);CY=l(fme,"dict[str, FieldType]"),fme.forEach(a),OY=l(K5,`, where keys are the desired column names,
and values are the type of that column.`),K5.forEach(a),zY=h(U),Kb=n(U,"P",{});var ire=r(Kb);Yw=n(ire,"CODE",{});var gme=r(Yw);SY=l(gme,"FieldType"),gme.forEach(a),VY=l(ire," can be one of the following:"),ire.forEach(a),UY=h(U),ne=n(U,"UL",{});var we=r(ne);Jw=n(we,"LI",{});var ume=r(Jw);ha=n(ume,"P",{});var Cc=r(ha);MY=l(Cc,"a "),Wb=n(Cc,"A",{href:!0});var _me=r(Wb);RY=l(_me,"Value"),_me.forEach(a),BY=l(Cc," feature specifies a single typed value, e.g. "),Qw=n(Cc,"CODE",{});var bme=r(Qw);HY=l(bme,"int64"),bme.forEach(a),GY=l(Cc," or "),Zw=n(Cc,"CODE",{});var $me=r(Zw);KY=l($me,"string"),$me.forEach(a),WY=l(Cc,"."),Cc.forEach(a),ume.forEach(a),YY=h(we),Xw=n(we,"LI",{});var xme=r(Xw);Wf=n(xme,"P",{});var W5=r(Wf);JY=l(W5,"a "),Yb=n(W5,"A",{href:!0});var vme=r(Yb);QY=l(vme,"ClassLabel"),vme.forEach(a),ZY=l(W5,` feature specifies a field with a predefined set of classes which can have labels
associated to them and will be stored as integers in the dataset.`),W5.forEach(a),xme.forEach(a),XY=h(we),e7=n(we,"LI",{});var yme=r(e7);Yf=n(yme,"P",{});var Y5=r(Yf);eJ=l(Y5,"a python "),t7=n(Y5,"CODE",{});var jme=r(t7);tJ=l(jme,"dict"),jme.forEach(a),aJ=l(Y5,` which specifies that the field is a nested field containing a mapping of sub-fields to sub-fields
features. It\u2019s possible to have nested fields of nested fields in an arbitrary manner.`),Y5.forEach(a),yme.forEach(a),sJ=h(we),Jf=n(we,"LI",{});var J5=r(Jf);ot=n(J5,"P",{});var Sn=r(ot);nJ=l(Sn,"a python "),a7=n(Sn,"CODE",{});var wme=r(a7);rJ=l(wme,"list"),wme.forEach(a),oJ=l(Sn," or a "),Jb=n(Sn,"A",{href:!0});var Dme=r(Jb);lJ=l(Dme,"Sequence"),Dme.forEach(a),iJ=l(Sn,` specifies that the field contains a list of objects. The python
`),s7=n(Sn,"CODE",{});var kme=r(s7);dJ=l(kme,"list"),kme.forEach(a),cJ=l(Sn," or "),Qb=n(Sn,"A",{href:!0});var Eme=r(Qb);pJ=l(Eme,"Sequence"),Eme.forEach(a),mJ=l(Sn,` should be provided with a single sub-feature as an example of the feature
type hosted in this list.`),Sn.forEach(a),hJ=h(J5),b(md.$$.fragment,J5),J5.forEach(a),fJ=h(we),n7=n(we,"LI",{});var qme=r(n7);lt=n(qme,"P",{});var Vn=r(lt);gJ=l(Vn,"a "),Zb=n(Vn,"A",{href:!0});var Ime=r(Zb);uJ=l(Ime,"Array2D"),Ime.forEach(a),_J=l(Vn,", "),Xb=n(Vn,"A",{href:!0});var Tme=r(Xb);bJ=l(Tme,"Array3D"),Tme.forEach(a),$J=l(Vn,", "),e1=n(Vn,"A",{href:!0});var Nme=r(e1);xJ=l(Nme,"Array4D"),Nme.forEach(a),vJ=l(Vn," or "),t1=n(Vn,"A",{href:!0});var Pme=r(t1);yJ=l(Pme,"Array5D"),Pme.forEach(a),jJ=l(Vn," feature for multidimensional arrays."),Vn.forEach(a),qme.forEach(a),wJ=h(we),r7=n(we,"LI",{});var Ame=r(r7);Qf=n(Ame,"P",{});var Q5=r(Qf);DJ=l(Q5,"an "),a1=n(Q5,"A",{href:!0});var Lme=r(a1);kJ=l(Lme,"Audio"),Lme.forEach(a),EJ=l(Q5,` feature to store the absolute path to an audio file or a dictionary with the relative path
to an audio file (\u201Cpath\u201D key) and its bytes content (\u201Cbytes\u201D key). This feature extracts the audio data.`),Q5.forEach(a),Ame.forEach(a),qJ=h(we),o7=n(we,"LI",{});var Fme=r(o7);fa=n(Fme,"P",{});var Oc=r(fa);IJ=l(Oc,"an "),s1=n(Oc,"A",{href:!0});var Cme=r(s1);TJ=l(Cme,"Image"),Cme.forEach(a),NJ=l(Oc," feature to store the absolute path to an image file, an "),l7=n(Oc,"CODE",{});var Ome=r(l7);PJ=l(Ome,"np.ndarray"),Ome.forEach(a),AJ=l(Oc," object, a "),i7=n(Oc,"CODE",{});var zme=r(i7);LJ=l(zme,"PIL.Image.Image"),zme.forEach(a),FJ=l(Oc,` object
or a dictionary with the relative path to an image file (\u201Cpath\u201D key) and its bytes content (\u201Cbytes\u201D key). This feature extracts the image data.`),Oc.forEach(a),Fme.forEach(a),CJ=h(we),d7=n(we,"LI",{});var Sme=r(d7);hd=n(Sme,"P",{});var s3=r(hd);n1=n(s3,"A",{href:!0});var Vme=r(n1);OJ=l(Vme,"Translation"),Vme.forEach(a),zJ=l(s3," and "),r1=n(s3,"A",{href:!0});var Ume=r(r1);SJ=l(Ume,"TranslationVariableLanguages"),Ume.forEach(a),VJ=l(s3,", the two features specific to Machine Translation."),s3.forEach(a),Sme.forEach(a),we.forEach(a),UJ=h(U),rn=n(U,"DIV",{class:!0});var y$=r(rn);b(Zf.$$.fragment,y$),MJ=h(y$),Xf=n(y$,"P",{});var Z5=r(Xf);RJ=l(Z5,"Make a deep copy of "),o1=n(Z5,"A",{href:!0});var Mme=r(o1);BJ=l(Mme,"Features"),Mme.forEach(a),HJ=l(Z5,"."),Z5.forEach(a),GJ=h(y$),b(fd.$$.fragment,y$),y$.forEach(a),KJ=h(U),gd=n(U,"DIV",{class:!0});var X5=r(gd);b(eg.$$.fragment,X5),WJ=h(X5),c7=n(X5,"P",{});var Rme=r(c7);YJ=l(Rme,"Decode batch with custom feature decoding."),Rme.forEach(a),X5.forEach(a),JJ=h(U),ud=n(U,"DIV",{class:!0});var e6=r(ud);b(tg.$$.fragment,e6),QJ=h(e6),p7=n(e6,"P",{});var Bme=r(p7);ZJ=l(Bme,"Decode column with custom feature decoding."),Bme.forEach(a),e6.forEach(a),XJ=h(U),_d=n(U,"DIV",{class:!0});var t6=r(_d);b(ag.$$.fragment,t6),eQ=h(t6),m7=n(t6,"P",{});var Hme=r(m7);tQ=l(Hme,"Decode example with custom feature decoding."),Hme.forEach(a),t6.forEach(a),aQ=h(U),bd=n(U,"DIV",{class:!0});var a6=r(bd);b(sg.$$.fragment,a6),sQ=h(a6),h7=n(a6,"P",{});var Gme=r(h7);nQ=l(Gme,"Encode batch into a format for Arrow."),Gme.forEach(a),a6.forEach(a),rQ=h(U),$d=n(U,"DIV",{class:!0});var s6=r($d);b(ng.$$.fragment,s6),oQ=h(s6),f7=n(s6,"P",{});var Kme=r(f7);lQ=l(Kme,"Encode column into a format for Arrow."),Kme.forEach(a),s6.forEach(a),iQ=h(U),xd=n(U,"DIV",{class:!0});var n6=r(xd);b(rg.$$.fragment,n6),dQ=h(n6),g7=n(n6,"P",{});var Wme=r(g7);cQ=l(Wme,"Encode example into a format for Arrow."),Wme.forEach(a),n6.forEach(a),pQ=h(U),Ft=n(U,"DIV",{class:!0});var zc=r(Ft);b(og.$$.fragment,zc),mQ=h(zc),lg=n(zc,"P",{});var r6=r(lg);hQ=l(r6,`Flatten the features. Every dictionary column is removed and is replaced by
all the subfields it contains. The new fields are named by concatenating the
name of the original column and the subfield name like this: `),u7=n(r6,"CODE",{});var Yme=r(u7);fQ=l(Yme,"<original>.<subfield>"),Yme.forEach(a),gQ=l(r6,"."),r6.forEach(a),uQ=h(zc),ig=n(zc,"P",{});var o6=r(ig);_Q=l(o6,`If a column contains nested dictionaries, then all the lower-level subfields names are
also concatenated to form new columns: `),_7=n(o6,"CODE",{});var Jme=r(_7);bQ=l(Jme,"<original>.<subfield>.<subsubfield>"),Jme.forEach(a),$Q=l(o6,", etc."),o6.forEach(a),xQ=h(zc),b(vd.$$.fragment,zc),zc.forEach(a),vQ=h(U),yd=n(U,"DIV",{class:!0});var l6=r(yd);b(dg.$$.fragment,l6),yQ=h(l6),cg=n(l6,"P",{});var i6=r(cg);jQ=l(i6,"Construct "),l1=n(i6,"A",{href:!0});var Qme=r(l1);wQ=l(Qme,"Features"),Qme.forEach(a),DQ=l(i6,` from Arrow Schema.
It also checks the schema metadata for Hugging Face Datasets features.`),i6.forEach(a),l6.forEach(a),kQ=h(U),We=n(U,"DIV",{class:!0});var Un=r(We);b(pg.$$.fragment,Un),EQ=h(Un),mg=n(Un,"P",{});var d6=r(mg);qQ=l(d6,"Construct ["),b7=n(d6,"EM",{});var Zme=r(b7);IQ=l(Zme,"Features"),Zme.forEach(a),TQ=l(d6,"] from dict."),d6.forEach(a),NQ=h(Un),Or=n(Un,"P",{});var j$=r(Or);PQ=l(j$,`Regenerate the nested feature object from a deserialized dict.
We use the `),$7=n(j$,"EM",{});var Xme=r($7);AQ=l(Xme,"_type"),Xme.forEach(a),LQ=l(j$," key to infer the dataclass name of the feature "),x7=n(j$,"EM",{});var ehe=r(x7);FQ=l(ehe,"FieldType"),ehe.forEach(a),CQ=l(j$,"."),j$.forEach(a),OQ=h(Un),ga=n(Un,"P",{});var Sc=r(ga);zQ=l(Sc,`It allows for a convenient constructor syntax
to define features from deserialized JSON dictionaries. This function is used in particular when deserializing
a [`),v7=n(Sc,"EM",{});var the=r(v7);SQ=l(the,"DatasetInfo"),the.forEach(a),VQ=l(Sc,`] that was dumped to a JSON object. This acts as an analogue to
[`),y7=n(Sc,"EM",{});var ahe=r(y7);UQ=l(ahe,"Features.from_arrow_schema"),ahe.forEach(a),MQ=l(Sc,`] and handles the recursive field-by-field instantiation, but doesn\u2019t require
any mapping to/from pyarrow, except for the fact that it takes advantage of the mapping of pyarrow primitive
dtypes that [`),j7=n(Sc,"EM",{});var she=r(j7);RQ=l(she,"Value"),she.forEach(a),BQ=l(Sc,"] automatically performs."),Sc.forEach(a),HQ=h(Un),b(jd.$$.fragment,Un),Un.forEach(a),GQ=h(U),Ct=n(U,"DIV",{class:!0});var Vc=r(Ct);b(hg.$$.fragment,Vc),KQ=h(Vc),fg=n(Vc,"P",{});var c6=r(fg);WQ=l(c6,"Reorder Features fields to match the field order of other ["),w7=n(c6,"EM",{});var nhe=r(w7);YQ=l(nhe,"Features"),nhe.forEach(a),JQ=l(c6,"]."),c6.forEach(a),QQ=h(Vc),D7=n(Vc,"P",{});var rhe=r(D7);ZQ=l(rhe,`The order of the fields is important since it matters for the underlying arrow data.
Re-ordering the fields allows to make the underlying arrow data type match.`),rhe.forEach(a),XQ=h(Vc),b(wd.$$.fragment,Vc),Vc.forEach(a),U.forEach(a),E3=h(i),ua=n(i,"DIV",{class:!0});var w$=r(ua);b(gg.$$.fragment,w$),eZ=h(w$),k7=n(w$,"P",{});var ohe=r(k7);tZ=l(ohe,`Construct a list of feature from a single type or a dict of types.
Mostly here for compatiblity with tfds.`),ohe.forEach(a),aZ=h(w$),b(Dd.$$.fragment,w$),w$.forEach(a),q3=h(i),K=n(i,"DIV",{class:!0});var de=r(K);b(ug.$$.fragment,de),sZ=h(de),E7=n(de,"P",{});var lhe=r(E7);nZ=l(lhe,"Feature type for integer class labels."),lhe.forEach(a),rZ=h(de),_g=n(de,"P",{});var p6=r(_g);oZ=l(p6,"There are 3 ways to define a "),q7=n(p6,"CODE",{});var ihe=r(q7);lZ=l(ihe,"ClassLabel"),ihe.forEach(a),iZ=l(p6,", which correspond to the 3 arguments:"),p6.forEach(a),dZ=h(de),zr=n(de,"UL",{});var D$=r(zr);i1=n(D$,"LI",{});var dre=r(i1);I7=n(dre,"CODE",{});var dhe=r(I7);cZ=l(dhe,"num_classes"),dhe.forEach(a),pZ=l(dre,": Create 0 to (num_classes-1) labels."),dre.forEach(a),mZ=h(D$),d1=n(D$,"LI",{});var cre=r(d1);T7=n(cre,"CODE",{});var che=r(T7);hZ=l(che,"names"),che.forEach(a),fZ=l(cre,": List of label strings."),cre.forEach(a),gZ=h(D$),c1=n(D$,"LI",{});var pre=r(c1);N7=n(pre,"CODE",{});var phe=r(N7);uZ=l(phe,"names_file"),phe.forEach(a),_Z=l(pre,": File containing the list of labels."),pre.forEach(a),D$.forEach(a),bZ=h(de),P7=n(de,"P",{});var mhe=r(P7);$Z=l(mhe,`Under the hood the labels are stored as integers.
You can use negative integers to represent unknown/missing labels.`),mhe.forEach(a),xZ=h(de),b(kd.$$.fragment,de),vZ=h(de),on=n(de,"DIV",{class:!0});var k$=r(on);b(bg.$$.fragment,k$),yZ=h(k$),Sr=n(k$,"P",{});var E$=r(Sr);jZ=l(E$,"Cast an Arrow array to the "),A7=n(E$,"CODE",{});var hhe=r(A7);wZ=l(hhe,"ClassLabel"),hhe.forEach(a),DZ=l(E$,` arrow storage type.
The Arrow types that can be converted to the `),L7=n(E$,"CODE",{});var fhe=r(L7);kZ=l(fhe,"ClassLabel"),fhe.forEach(a),EZ=l(E$," pyarrow storage type are:"),E$.forEach(a),qZ=h(k$),$g=n(k$,"UL",{});var m6=r($g);F7=n(m6,"LI",{});var ghe=r(F7);C7=n(ghe,"CODE",{});var uhe=r(C7);IZ=l(uhe,"pa.string()"),uhe.forEach(a),ghe.forEach(a),TZ=h(m6),O7=n(m6,"LI",{});var _he=r(O7);z7=n(_he,"CODE",{});var bhe=r(z7);NZ=l(bhe,"pa.int()"),bhe.forEach(a),_he.forEach(a),m6.forEach(a),k$.forEach(a),PZ=h(de),Ot=n(de,"DIV",{class:!0});var Uc=r(Ot);b(xg.$$.fragment,Uc),AZ=h(Uc),Vr=n(Uc,"P",{});var q$=r(Vr);LZ=l(q$,"Conversion "),S7=n(q$,"CODE",{});var $he=r(S7);FZ=l($he,"integer"),$he.forEach(a),CZ=l(q$," => class name "),V7=n(q$,"CODE",{});var xhe=r(V7);OZ=l(xhe,"string"),xhe.forEach(a),zZ=l(q$,"."),q$.forEach(a),SZ=h(Uc),vg=n(Uc,"P",{});var h6=r(vg);VZ=l(h6,"Regarding unknown/missing labels: passing negative integers raises "),U7=n(h6,"CODE",{});var vhe=r(U7);UZ=l(vhe,"ValueError"),vhe.forEach(a),MZ=l(h6,"."),h6.forEach(a),RZ=h(Uc),b(Ed.$$.fragment,Uc),Uc.forEach(a),BZ=h(de),ln=n(de,"DIV",{class:!0});var I$=r(ln);b(yg.$$.fragment,I$),HZ=h(I$),Ur=n(I$,"P",{});var T$=r(Ur);GZ=l(T$,"Conversion class name "),M7=n(T$,"CODE",{});var yhe=r(M7);KZ=l(yhe,"string"),yhe.forEach(a),WZ=l(T$," => "),R7=n(T$,"CODE",{});var jhe=r(R7);YZ=l(jhe,"integer"),jhe.forEach(a),JZ=l(T$,"."),T$.forEach(a),QZ=h(I$),b(qd.$$.fragment,I$),I$.forEach(a),de.forEach(a),I3=h(i),it=n(i,"DIV",{class:!0});var Mc=r(it);b(jg.$$.fragment,Mc),ZZ=h(Mc),wg=n(Mc,"P",{});var f6=r(wg);XZ=l(f6,"The "),B7=n(f6,"CODE",{});var whe=r(B7);eX=l(whe,"Value"),whe.forEach(a),tX=l(f6," dtypes are as follows:"),f6.forEach(a),aX=h(Mc),O=n(Mc,"UL",{});var z=r(O);H7=n(z,"LI",{});var Dhe=r(H7);G7=n(Dhe,"CODE",{});var khe=r(G7);sX=l(khe,"null"),khe.forEach(a),Dhe.forEach(a),nX=h(z),K7=n(z,"LI",{});var Ehe=r(K7);W7=n(Ehe,"CODE",{});var qhe=r(W7);rX=l(qhe,"bool"),qhe.forEach(a),Ehe.forEach(a),oX=h(z),Y7=n(z,"LI",{});var Ihe=r(Y7);J7=n(Ihe,"CODE",{});var The=r(J7);lX=l(The,"int8"),The.forEach(a),Ihe.forEach(a),iX=h(z),Q7=n(z,"LI",{});var Nhe=r(Q7);Z7=n(Nhe,"CODE",{});var Phe=r(Z7);dX=l(Phe,"int16"),Phe.forEach(a),Nhe.forEach(a),cX=h(z),X7=n(z,"LI",{});var Ahe=r(X7);eD=n(Ahe,"CODE",{});var Lhe=r(eD);pX=l(Lhe,"int32"),Lhe.forEach(a),Ahe.forEach(a),mX=h(z),tD=n(z,"LI",{});var Fhe=r(tD);aD=n(Fhe,"CODE",{});var Che=r(aD);hX=l(Che,"int64"),Che.forEach(a),Fhe.forEach(a),fX=h(z),sD=n(z,"LI",{});var Ohe=r(sD);nD=n(Ohe,"CODE",{});var zhe=r(nD);gX=l(zhe,"uint8"),zhe.forEach(a),Ohe.forEach(a),uX=h(z),rD=n(z,"LI",{});var She=r(rD);oD=n(She,"CODE",{});var Vhe=r(oD);_X=l(Vhe,"uint16"),Vhe.forEach(a),She.forEach(a),bX=h(z),lD=n(z,"LI",{});var Uhe=r(lD);iD=n(Uhe,"CODE",{});var Mhe=r(iD);$X=l(Mhe,"uint32"),Mhe.forEach(a),Uhe.forEach(a),xX=h(z),dD=n(z,"LI",{});var Rhe=r(dD);cD=n(Rhe,"CODE",{});var Bhe=r(cD);vX=l(Bhe,"uint64"),Bhe.forEach(a),Rhe.forEach(a),yX=h(z),pD=n(z,"LI",{});var Hhe=r(pD);mD=n(Hhe,"CODE",{});var Ghe=r(mD);jX=l(Ghe,"float16"),Ghe.forEach(a),Hhe.forEach(a),wX=h(z),p1=n(z,"LI",{});var mre=r(p1);hD=n(mre,"CODE",{});var Khe=r(hD);DX=l(Khe,"float32"),Khe.forEach(a),kX=l(mre," (alias float)"),mre.forEach(a),EX=h(z),m1=n(z,"LI",{});var hre=r(m1);fD=n(hre,"CODE",{});var Whe=r(fD);qX=l(Whe,"float64"),Whe.forEach(a),IX=l(hre," (alias double)"),hre.forEach(a),TX=h(z),gD=n(z,"LI",{});var Yhe=r(gD);uD=n(Yhe,"CODE",{});var Jhe=r(uD);NX=l(Jhe,"time32[(s|ms)]"),Jhe.forEach(a),Yhe.forEach(a),PX=h(z),_D=n(z,"LI",{});var Qhe=r(_D);bD=n(Qhe,"CODE",{});var Zhe=r(bD);AX=l(Zhe,"time64[(us|ns)]"),Zhe.forEach(a),Qhe.forEach(a),LX=h(z),$D=n(z,"LI",{});var Xhe=r($D);xD=n(Xhe,"CODE",{});var efe=r(xD);FX=l(efe,"timestamp[(s|ms|us|ns)]"),efe.forEach(a),Xhe.forEach(a),CX=h(z),vD=n(z,"LI",{});var tfe=r(vD);yD=n(tfe,"CODE",{});var afe=r(yD);OX=l(afe,"timestamp[(s|ms|us|ns), tz=(tzstring)]"),afe.forEach(a),tfe.forEach(a),zX=h(z),jD=n(z,"LI",{});var sfe=r(jD);wD=n(sfe,"CODE",{});var nfe=r(wD);SX=l(nfe,"date32"),nfe.forEach(a),sfe.forEach(a),VX=h(z),DD=n(z,"LI",{});var rfe=r(DD);kD=n(rfe,"CODE",{});var ofe=r(kD);UX=l(ofe,"date64"),ofe.forEach(a),rfe.forEach(a),MX=h(z),ED=n(z,"LI",{});var lfe=r(ED);qD=n(lfe,"CODE",{});var ife=r(qD);RX=l(ife,"duration[(s|ms|us|ns)]"),ife.forEach(a),lfe.forEach(a),BX=h(z),ID=n(z,"LI",{});var dfe=r(ID);TD=n(dfe,"CODE",{});var cfe=r(TD);HX=l(cfe,"decimal128(precision, scale)"),cfe.forEach(a),dfe.forEach(a),GX=h(z),ND=n(z,"LI",{});var pfe=r(ND);PD=n(pfe,"CODE",{});var mfe=r(PD);KX=l(mfe,"decimal256(precision, scale)"),mfe.forEach(a),pfe.forEach(a),WX=h(z),AD=n(z,"LI",{});var hfe=r(AD);LD=n(hfe,"CODE",{});var ffe=r(LD);YX=l(ffe,"binary"),ffe.forEach(a),hfe.forEach(a),JX=h(z),FD=n(z,"LI",{});var gfe=r(FD);CD=n(gfe,"CODE",{});var ufe=r(CD);QX=l(ufe,"large_binary"),ufe.forEach(a),gfe.forEach(a),ZX=h(z),OD=n(z,"LI",{});var _fe=r(OD);zD=n(_fe,"CODE",{});var bfe=r(zD);XX=l(bfe,"string"),bfe.forEach(a),_fe.forEach(a),eee=h(z),SD=n(z,"LI",{});var $fe=r(SD);VD=n($fe,"CODE",{});var xfe=r(VD);tee=l(xfe,"large_string"),xfe.forEach(a),$fe.forEach(a),z.forEach(a),aee=h(Mc),b(Id.$$.fragment,Mc),Mc.forEach(a),T3=h(i),dt=n(i,"DIV",{class:!0});var Rc=r(dt);b(Dg.$$.fragment,Rc),see=h(Rc),h1=n(Rc,"P",{});var fre=r(h1);UD=n(fre,"CODE",{});var vfe=r(UD);nee=l(vfe,"FeatureConnector"),vfe.forEach(a),ree=l(fre,` for translations with fixed languages per example.
Here for compatiblity with tfds.`),fre.forEach(a),oee=h(Rc),b(Td.$$.fragment,Rc),lee=h(Rc),Nd=n(Rc,"DIV",{class:!0});var g6=r(Nd);b(kg.$$.fragment,g6),iee=h(g6),MD=n(g6,"P",{});var yfe=r(MD);dee=l(yfe,"Flatten the Translation feature into a dictionary."),yfe.forEach(a),g6.forEach(a),Rc.forEach(a),N3=h(i),ct=n(i,"DIV",{class:!0});var Bc=r(ct);b(Eg.$$.fragment,Bc),cee=h(Bc),f1=n(Bc,"P",{});var gre=r(f1);RD=n(gre,"CODE",{});var jfe=r(RD);pee=l(jfe,"FeatureConnector"),jfe.forEach(a),mee=l(gre,` for translations with variable languages per example.
Here for compatiblity with tfds.`),gre.forEach(a),hee=h(Bc),b(Pd.$$.fragment,Bc),fee=h(Bc),Ad=n(Bc,"DIV",{class:!0});var u6=r(Ad);b(qg.$$.fragment,u6),gee=h(u6),BD=n(u6,"P",{});var wfe=r(BD);uee=l(wfe,"Flatten the TranslationVariableLanguages feature into a dictionary."),wfe.forEach(a),u6.forEach(a),Bc.forEach(a),P3=h(i),_a=n(i,"DIV",{class:!0});var N$=r(_a);b(Ig.$$.fragment,N$),_ee=h(N$),HD=n(N$,"P",{});var Dfe=r(HD);bee=l(Dfe,"Create a two-dimensional array."),Dfe.forEach(a),$ee=h(N$),b(Ld.$$.fragment,N$),N$.forEach(a),A3=h(i),ba=n(i,"DIV",{class:!0});var P$=r(ba);b(Tg.$$.fragment,P$),xee=h(P$),GD=n(P$,"P",{});var kfe=r(GD);vee=l(kfe,"Create a three-dimensional array."),kfe.forEach(a),yee=h(P$),b(Fd.$$.fragment,P$),P$.forEach(a),L3=h(i),$a=n(i,"DIV",{class:!0});var A$=r($a);b(Ng.$$.fragment,A$),jee=h(A$),KD=n(A$,"P",{});var Efe=r(KD);wee=l(Efe,"Create a four-dimensional array."),Efe.forEach(a),Dee=h(A$),b(Cd.$$.fragment,A$),A$.forEach(a),F3=h(i),xa=n(i,"DIV",{class:!0});var L$=r(xa);b(Pg.$$.fragment,L$),kee=h(L$),WD=n(L$,"P",{});var qfe=r(WD);Eee=l(qfe,"Create a five-dimensional array."),qfe.forEach(a),qee=h(L$),b(Od.$$.fragment,L$),L$.forEach(a),C3=h(i),H=n(i,"DIV",{class:!0});var X=r(H);b(Ag.$$.fragment,X),Iee=h(X),Lg=n(X,"P",{});var _6=r(Lg);Tee=l(_6,"Audio "),YD=n(_6,"CODE",{});var Ife=r(YD);Nee=l(Ife,"Feature"),Ife.forEach(a),Pee=l(_6," to extract audio data from an audio file."),_6.forEach(a),Aee=h(X),JD=n(X,"P",{});var Tfe=r(JD);Lee=l(Tfe,"Input: The Audio feature accepts as input:"),Tfe.forEach(a),Fee=h(X),Mr=n(X,"UL",{});var F$=r(Mr);QD=n(F$,"LI",{});var Nfe=r(QD);Fg=n(Nfe,"P",{});var b6=r(Fg);Cee=l(b6,"A "),ZD=n(b6,"CODE",{});var Pfe=r(ZD);Oee=l(Pfe,"str"),Pfe.forEach(a),zee=l(b6,": Absolute path to the audio file (i.e. random access is allowed)."),b6.forEach(a),Nfe.forEach(a),See=h(F$),Rr=n(F$,"LI",{});var C$=r(Rr);Cg=n(C$,"P",{});var $6=r(Cg);Vee=l($6,"A "),XD=n($6,"CODE",{});var Afe=r(XD);Uee=l(Afe,"dict"),Afe.forEach(a),Mee=l($6," with the keys:"),$6.forEach(a),Ree=h(C$),Og=n(C$,"UL",{});var x6=r(Og);g1=n(x6,"LI",{});var ure=r(g1);ek=n(ure,"CODE",{});var Lfe=r(ek);Bee=l(Lfe,"path"),Lfe.forEach(a),Hee=l(ure,": String with relative path of the audio file to the archive file."),ure.forEach(a),Gee=h(x6),u1=n(x6,"LI",{});var _re=r(u1);tk=n(_re,"CODE",{});var Ffe=r(tk);Kee=l(Ffe,"bytes"),Ffe.forEach(a),Wee=l(_re,": Bytes content of the audio file."),_re.forEach(a),x6.forEach(a),Yee=h(C$),ak=n(C$,"P",{});var Cfe=r(ak);Jee=l(Cfe,"This is useful for archived files with sequential access."),Cfe.forEach(a),C$.forEach(a),Qee=h(F$),Br=n(F$,"LI",{});var O$=r(Br);zg=n(O$,"P",{});var v6=r(zg);Zee=l(v6,"A "),sk=n(v6,"CODE",{});var Ofe=r(sk);Xee=l(Ofe,"dict"),Ofe.forEach(a),ete=l(v6," with the keys:"),v6.forEach(a),tte=h(O$),Hr=n(O$,"UL",{});var z$=r(Hr);_1=n(z$,"LI",{});var bre=r(_1);nk=n(bre,"CODE",{});var zfe=r(nk);ate=l(zfe,"path"),zfe.forEach(a),ste=l(bre,": String with relative path of the audio file to the archive file."),bre.forEach(a),nte=h(z$),b1=n(z$,"LI",{});var $re=r(b1);rk=n($re,"CODE",{});var Sfe=r(rk);rte=l(Sfe,"array"),Sfe.forEach(a),ote=l($re,": Array containing the audio sample"),$re.forEach(a),lte=h(z$),$1=n(z$,"LI",{});var xre=r($1);ok=n(xre,"CODE",{});var Vfe=r(ok);ite=l(Vfe,"sampling_rate"),Vfe.forEach(a),dte=l(xre,": Integer corresponding to the sampling rate of the audio sample."),xre.forEach(a),z$.forEach(a),cte=h(O$),lk=n(O$,"P",{});var Ufe=r(lk);pte=l(Ufe,"This is useful for archived files with sequential access."),Ufe.forEach(a),O$.forEach(a),F$.forEach(a),mte=h(X),b(zd.$$.fragment,X),hte=h(X),dn=n(X,"DIV",{class:!0});var S$=r(dn);b(Sg.$$.fragment,S$),fte=h(S$),ik=n(S$,"P",{});var Mfe=r(ik);gte=l(Mfe,`Cast an Arrow array to the Audio arrow storage type.
The Arrow types that can be converted to the Audio pyarrow storage type are:`),Mfe.forEach(a),ute=h(S$),pt=n(S$,"UL",{});var Mn=r(pt);x1=n(Mn,"LI",{});var vre=r(x1);dk=n(vre,"CODE",{});var Rfe=r(dk);_te=l(Rfe,"pa.string()"),Rfe.forEach(a),bte=l(vre," - it must contain the \u201Cpath\u201D data"),vre.forEach(a),$te=h(Mn),v1=n(Mn,"LI",{});var yre=r(v1);ck=n(yre,"CODE",{});var Bfe=r(ck);xte=l(Bfe,"pa.binary()"),Bfe.forEach(a),vte=l(yre," - it must contain the audio bytes"),yre.forEach(a),yte=h(Mn),pk=n(Mn,"LI",{});var Hfe=r(pk);mk=n(Hfe,"CODE",{});var Gfe=r(mk);jte=l(Gfe,'pa.struct({"bytes": pa.binary()})'),Gfe.forEach(a),Hfe.forEach(a),wte=h(Mn),hk=n(Mn,"LI",{});var Kfe=r(hk);fk=n(Kfe,"CODE",{});var Wfe=r(fk);Dte=l(Wfe,'pa.struct({"path": pa.string()})'),Wfe.forEach(a),Kfe.forEach(a),kte=h(Mn),y1=n(Mn,"LI",{});var jre=r(y1);gk=n(jre,"CODE",{});var Yfe=r(gk);Ete=l(Yfe,'pa.struct({"bytes": pa.binary(), "path": pa.string()})'),Yfe.forEach(a),qte=l(jre,"  - order doesn\u2019t matter"),jre.forEach(a),Mn.forEach(a),S$.forEach(a),Ite=h(X),Sd=n(X,"DIV",{class:!0});var y6=r(Sd);b(Vg.$$.fragment,y6),Tte=h(y6),uk=n(y6,"P",{});var Jfe=r(uk);Nte=l(Jfe,"Decode example audio file into audio data."),Jfe.forEach(a),y6.forEach(a),Pte=h(X),Vd=n(X,"DIV",{class:!0});var j6=r(Vd);b(Ug.$$.fragment,j6),Ate=h(j6),_k=n(j6,"P",{});var Qfe=r(_k);Lte=l(Qfe,"Embed audio files into the Arrow array."),Qfe.forEach(a),j6.forEach(a),Fte=h(X),Ud=n(X,"DIV",{class:!0});var w6=r(Ud);b(Mg.$$.fragment,w6),Cte=h(w6),bk=n(w6,"P",{});var Zfe=r(bk);Ote=l(Zfe,"Encode example into a format for Arrow."),Zfe.forEach(a),w6.forEach(a),zte=h(X),Md=n(X,"DIV",{class:!0});var D6=r(Md);b(Rg.$$.fragment,D6),Ste=h(D6),$k=n(D6,"P",{});var Xfe=r($k);Vte=l(Xfe,"If in the decodable state, raise an error, otherwise flatten the feature into a dictionary."),Xfe.forEach(a),D6.forEach(a),X.forEach(a),O3=h(i),G=n(i,"DIV",{class:!0});var ee=r(G);b(Bg.$$.fragment,ee),Ute=h(ee),Hg=n(ee,"P",{});var k6=r(Hg);Mte=l(k6,"Image "),xk=n(k6,"CODE",{});var ege=r(xk);Rte=l(ege,"Feature"),ege.forEach(a),Bte=l(k6," to read image data from an image file."),k6.forEach(a),Hte=h(ee),vk=n(ee,"P",{});var tge=r(vk);Gte=l(tge,"Input: The Image feature accepts as input:"),tge.forEach(a),Kte=h(ee),va=n(ee,"UL",{});var Hc=r(va);yk=n(Hc,"LI",{});var age=r(yk);Gg=n(age,"P",{});var E6=r(Gg);Wte=l(E6,"A "),jk=n(E6,"CODE",{});var sge=r(jk);Yte=l(sge,"str"),sge.forEach(a),Jte=l(E6,": Absolute path to the image file (i.e. random access is allowed)."),E6.forEach(a),age.forEach(a),Qte=h(Hc),Gr=n(Hc,"LI",{});var V$=r(Gr);Kg=n(V$,"P",{});var q6=r(Kg);Zte=l(q6,"A "),wk=n(q6,"CODE",{});var nge=r(wk);Xte=l(nge,"dict"),nge.forEach(a),eae=l(q6," with the keys:"),q6.forEach(a),tae=h(V$),Wg=n(V$,"UL",{});var I6=r(Wg);j1=n(I6,"LI",{});var wre=r(j1);Dk=n(wre,"CODE",{});var rge=r(Dk);aae=l(rge,"path"),rge.forEach(a),sae=l(wre,": String with relative path of the image file to the archive file."),wre.forEach(a),nae=h(I6),w1=n(I6,"LI",{});var Dre=r(w1);kk=n(Dre,"CODE",{});var oge=r(kk);rae=l(oge,"bytes"),oge.forEach(a),oae=l(Dre,": Bytes of the image file."),Dre.forEach(a),I6.forEach(a),lae=h(V$),Ek=n(V$,"P",{});var lge=r(Ek);iae=l(lge,"This is useful for archived files with sequential access."),lge.forEach(a),V$.forEach(a),dae=h(Hc),qk=n(Hc,"LI",{});var ige=r(qk);Yg=n(ige,"P",{});var T6=r(Yg);cae=l(T6,"An "),Ik=n(T6,"CODE",{});var dge=r(Ik);pae=l(dge,"np.ndarray"),dge.forEach(a),mae=l(T6,": NumPy array representing an image."),T6.forEach(a),ige.forEach(a),hae=h(Hc),Tk=n(Hc,"LI",{});var cge=r(Tk);Jg=n(cge,"P",{});var N6=r(Jg);fae=l(N6,"A "),Nk=n(N6,"CODE",{});var pge=r(Nk);gae=l(pge,"PIL.Image.Image"),pge.forEach(a),uae=l(N6,": PIL image object."),N6.forEach(a),cge.forEach(a),Hc.forEach(a),_ae=h(ee),b(Rd.$$.fragment,ee),bae=h(ee),cn=n(ee,"DIV",{class:!0});var U$=r(cn);b(Qg.$$.fragment,U$),$ae=h(U$),Pk=n(U$,"P",{});var mge=r(Pk);xae=l(mge,`Cast an Arrow array to the Image arrow storage type.
The Arrow types that can be converted to the Image pyarrow storage type are:`),mge.forEach(a),vae=h(U$),qe=n(U$,"UL",{});var Rt=r(qe);D1=n(Rt,"LI",{});var kre=r(D1);Ak=n(kre,"CODE",{});var hge=r(Ak);yae=l(hge,"pa.string()"),hge.forEach(a),jae=l(kre," - it must contain the \u201Cpath\u201D data"),kre.forEach(a),wae=h(Rt),k1=n(Rt,"LI",{});var Ere=r(k1);Lk=n(Ere,"CODE",{});var fge=r(Lk);Dae=l(fge,"pa.binary()"),fge.forEach(a),kae=l(Ere," - it must contain the image bytes"),Ere.forEach(a),Eae=h(Rt),Fk=n(Rt,"LI",{});var gge=r(Fk);Ck=n(gge,"CODE",{});var uge=r(Ck);qae=l(uge,'pa.struct({"bytes": pa.binary()})'),uge.forEach(a),gge.forEach(a),Iae=h(Rt),Ok=n(Rt,"LI",{});var _ge=r(Ok);zk=n(_ge,"CODE",{});var bge=r(zk);Tae=l(bge,'pa.struct({"path": pa.string()})'),bge.forEach(a),_ge.forEach(a),Nae=h(Rt),E1=n(Rt,"LI",{});var qre=r(E1);Sk=n(qre,"CODE",{});var $ge=r(Sk);Pae=l($ge,'pa.struct({"bytes": pa.binary(), "path": pa.string()})'),$ge.forEach(a),Aae=l(qre,"  - order doesn\u2019t matter"),qre.forEach(a),Lae=h(Rt),q1=n(Rt,"LI",{});var Ire=r(q1);Vk=n(Ire,"CODE",{});var xge=r(Vk);Fae=l(xge,"pa.list(*)"),xge.forEach(a),Cae=l(Ire," - it must contain the image array data"),Ire.forEach(a),Rt.forEach(a),U$.forEach(a),Oae=h(ee),Bd=n(ee,"DIV",{class:!0});var P6=r(Bd);b(Zg.$$.fragment,P6),zae=h(P6),Uk=n(P6,"P",{});var vge=r(Uk);Sae=l(vge,"Decode example image file into image data."),vge.forEach(a),P6.forEach(a),Vae=h(ee),Hd=n(ee,"DIV",{class:!0});var A6=r(Hd);b(Xg.$$.fragment,A6),Uae=h(A6),Mk=n(A6,"P",{});var yge=r(Mk);Mae=l(yge,"Embed image files into the Arrow array."),yge.forEach(a),A6.forEach(a),Rae=h(ee),Gd=n(ee,"DIV",{class:!0});var L6=r(Gd);b(eu.$$.fragment,L6),Bae=h(L6),Rk=n(L6,"P",{});var jge=r(Rk);Hae=l(jge,"Encode example into a format for Arrow."),jge.forEach(a),L6.forEach(a),Gae=h(ee),Kd=n(ee,"DIV",{class:!0});var F6=r(Kd);b(tu.$$.fragment,F6),Kae=h(F6),Bk=n(F6,"P",{});var wge=r(Bk);Wae=l(wge,"If in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary."),wge.forEach(a),F6.forEach(a),ee.forEach(a),z3=h(i),Kr=n(i,"H2",{class:!0});var C6=r(Kr);Wd=n(C6,"A",{id:!0,class:!0,href:!0});var Dge=r(Wd);Hk=n(Dge,"SPAN",{});var kge=r(Hk);b(au.$$.fragment,kge),kge.forEach(a),Dge.forEach(a),Yae=h(C6),Gk=n(C6,"SPAN",{});var Ege=r(Gk);Jae=l(Ege,"MetricInfo"),Ege.forEach(a),C6.forEach(a),S3=h(i),fe=n(i,"DIV",{class:!0});var Bt=r(fe);b(su.$$.fragment,Bt),Qae=h(Bt),Kk=n(Bt,"P",{});var qge=r(Kk);Zae=l(qge,"Information about a metric."),qge.forEach(a),Xae=h(Bt),I1=n(Bt,"P",{});var Tre=r(I1);Wk=n(Tre,"CODE",{});var Ige=r(Wk);ese=l(Ige,"MetricInfo"),Ige.forEach(a),tse=l(Tre,` documents a metric, including its name, version, and features.
See the constructor arguments and properties for a full list.`),Tre.forEach(a),ase=h(Bt),Yk=n(Bt,"P",{});var Tge=r(Yk);sse=l(Tge,"Note: Not all fields are known on construction and may be updated later."),Tge.forEach(a),nse=h(Bt),pn=n(Bt,"DIV",{class:!0});var M$=r(pn);b(nu.$$.fragment,M$),rse=h(M$),ru=n(M$,"P",{});var O6=r(ru);ose=l(O6,"Create MetricInfo from the JSON file in "),Jk=n(O6,"CODE",{});var Nge=r(Jk);lse=l(Nge,"metric_info_dir"),Nge.forEach(a),ise=l(O6,"."),O6.forEach(a),dse=h(M$),b(Yd.$$.fragment,M$),M$.forEach(a),cse=h(Bt),mn=n(Bt,"DIV",{class:!0});var R$=r(mn);b(ou.$$.fragment,R$),pse=h(R$),ya=n(R$,"P",{});var Gc=r(ya);mse=l(Gc,"Write "),Qk=n(Gc,"CODE",{});var Pge=r(Qk);hse=l(Pge,"MetricInfo"),Pge.forEach(a),fse=l(Gc," as JSON to "),Zk=n(Gc,"CODE",{});var Age=r(Zk);gse=l(Age,"metric_info_dir"),Age.forEach(a),use=l(Gc,`.
Also save the license separately in LICENCE.
If `),Xk=n(Gc,"CODE",{});var Lge=r(Xk);_se=l(Lge,"pretty_print"),Lge.forEach(a),bse=l(Gc," is True, the JSON will be pretty-printed with the indent level of 4."),Gc.forEach(a),$se=h(R$),b(Jd.$$.fragment,R$),R$.forEach(a),Bt.forEach(a),V3=h(i),Wr=n(i,"H2",{class:!0});var z6=r(Wr);Qd=n(z6,"A",{id:!0,class:!0,href:!0});var Fge=r(Qd);e4=n(Fge,"SPAN",{});var Cge=r(e4);b(lu.$$.fragment,Cge),Cge.forEach(a),Fge.forEach(a),xse=h(z6),t4=n(z6,"SPAN",{});var Oge=r(t4);vse=l(Oge,"Metric"),Oge.forEach(a),z6.forEach(a),U3=h(i),hn=n(i,"P",{});var B$=r(hn);yse=l(B$,"The base class "),a4=n(B$,"CODE",{});var zge=r(a4);jse=l(zge,"Metric"),zge.forEach(a),wse=l(B$," implements a Metric backed by one or several "),T1=n(B$,"A",{href:!0});var Sge=r(T1);Dse=l(Sge,"Dataset"),Sge.forEach(a),kse=l(B$,"."),B$.forEach(a),M3=h(i),re=n(i,"DIV",{class:!0});var Je=r(re);b(iu.$$.fragment,Je),Ese=h(Je),s4=n(Je,"P",{});var Vge=r(s4);qse=l(Vge,"A Metric is the base class and common API for all metrics."),Vge.forEach(a),Ise=h(Je),b(Zd.$$.fragment,Je),Tse=h(Je),fn=n(Je,"DIV",{class:!0});var H$=r(fn);b(du.$$.fragment,H$),Nse=h(H$),n4=n(H$,"P",{});var Uge=r(n4);Pse=l(Uge,"Add one prediction and reference for the metric\u2019s stack."),Uge.forEach(a),Ase=h(H$),b(Xd.$$.fragment,H$),H$.forEach(a),Lse=h(Je),gn=n(Je,"DIV",{class:!0});var G$=r(gn);b(cu.$$.fragment,G$),Fse=h(G$),r4=n(G$,"P",{});var Mge=r(r4);Cse=l(Mge,"Add a batch of predictions and references for the metric\u2019s stack."),Mge.forEach(a),Ose=h(G$),b(ec.$$.fragment,G$),G$.forEach(a),zse=h(Je),zt=n(Je,"DIV",{class:!0});var Kc=r(zt);b(pu.$$.fragment,Kc),Sse=h(Kc),o4=n(Kc,"P",{});var Rge=r(o4);Vse=l(Rge,"Compute the metrics."),Rge.forEach(a),Use=h(Kc),l4=n(Kc,"P",{});var Bge=r(l4);Mse=l(Bge,"Usage of positional arguments is not allowed to prevent mistakes."),Bge.forEach(a),Rse=h(Kc),b(tc.$$.fragment,Kc),Kc.forEach(a),Bse=h(Je),ac=n(Je,"DIV",{class:!0});var S6=r(ac);b(mu.$$.fragment,S6),Hse=h(S6),i4=n(S6,"P",{});var Hge=r(i4);Gse=l(Hge,"Downloads and prepares dataset for reading."),Hge.forEach(a),S6.forEach(a),Je.forEach(a),R3=h(i),Yr=n(i,"H2",{class:!0});var V6=r(Yr);sc=n(V6,"A",{id:!0,class:!0,href:!0});var Gge=r(sc);d4=n(Gge,"SPAN",{});var Kge=r(d4);b(hu.$$.fragment,Kge),Kge.forEach(a),Gge.forEach(a),Kse=h(V6),c4=n(V6,"SPAN",{});var Wge=r(c4);Wse=l(Wge,"Filesystems"),Wge.forEach(a),V6.forEach(a),B3=h(i),V=n(i,"DIV",{class:!0});var M=r(V);b(fu.$$.fragment,M),Yse=h(M),nc=n(M,"P",{});var n3=r(nc);p4=n(n3,"CODE",{});var Yge=r(p4);Jse=l(Yge,"datasets.filesystems.S3FileSystem"),Yge.forEach(a),Qse=l(n3," is a subclass of "),gu=n(n3,"A",{href:!0,rel:!0});var Jge=r(gu);m4=n(Jge,"CODE",{});var Qge=r(m4);Zse=l(Qge,"s3fs.S3FileSystem"),Qge.forEach(a),Jge.forEach(a),Xse=l(n3,"."),n3.forEach(a),ene=h(M),ja=n(M,"P",{});var Wc=r(ja);tne=l(Wc,"Users can use this class to access S3 as if it were a file system. It exposes a filesystem-like API (ls, cp, open, etc.) on top of S3 storage. Provide credentials either explicitly ("),h4=n(Wc,"CODE",{});var Zge=r(h4);ane=l(Zge,"key="),Zge.forEach(a),sne=l(Wc,", "),f4=n(Wc,"CODE",{});var Xge=r(f4);nne=l(Xge,"secret="),Xge.forEach(a),rne=l(Wc,") or with boto\u2019s credential methods. See botocore documentation for more information. If no credentials are available, use "),g4=n(Wc,"CODE",{});var eue=r(g4);one=l(eue,"anon=True"),eue.forEach(a),lne=l(Wc,"."),Wc.forEach(a),ine=h(M),u4=n(M,"P",{});var tue=r(u4);dne=l(tue,"Examples:"),tue.forEach(a),cne=h(M),_4=n(M,"P",{});var aue=r(_4);pne=l(aue,"Listing files from public S3 bucket."),aue.forEach(a),mne=h(M),b(rc.$$.fragment,M),hne=h(M),Jr=n(M,"P",{});var K$=r(Jr);fne=l(K$,"Listing files from private S3 bucket using "),b4=n(K$,"CODE",{});var sue=r(b4);gne=l(sue,"aws_access_key_id"),sue.forEach(a),une=l(K$," and "),$4=n(K$,"CODE",{});var nue=r($4);_ne=l(nue,"aws_secret_access_key"),nue.forEach(a),bne=l(K$,"."),K$.forEach(a),$ne=h(M),b(oc.$$.fragment,M),xne=h(M),wa=n(M,"P",{});var Yc=r(wa);vne=l(Yc,"Using "),x4=n(Yc,"CODE",{});var rue=r(x4);yne=l(rue,"S3Filesystem"),rue.forEach(a),jne=l(Yc," with "),v4=n(Yc,"CODE",{});var oue=r(v4);wne=l(oue,"botocore.session.Session"),oue.forEach(a),Dne=l(Yc," and custom "),y4=n(Yc,"CODE",{});var lue=r(y4);kne=l(lue,"aws_profile"),lue.forEach(a),Ene=l(Yc,"."),Yc.forEach(a),qne=h(M),b(lc.$$.fragment,M),Ine=h(M),Qr=n(M,"P",{});var W$=r(Qr);Tne=l(W$,"Loading dataset from S3 using "),j4=n(W$,"CODE",{});var iue=r(j4);Nne=l(iue,"S3Filesystem"),iue.forEach(a),Pne=l(W$," and "),N1=n(W$,"A",{href:!0});var due=r(N1);Ane=l(due,"load_from_disk()"),due.forEach(a),Lne=l(W$,"."),W$.forEach(a),Fne=h(M),b(ic.$$.fragment,M),Cne=h(M),Zr=n(M,"P",{});var Y$=r(Zr);One=l(Y$,"Saving dataset to S3 using "),w4=n(Y$,"CODE",{});var cue=r(w4);zne=l(cue,"S3Filesystem"),cue.forEach(a),Sne=l(Y$," and "),P1=n(Y$,"A",{href:!0});var pue=r(P1);Vne=l(pue,"Dataset.save_to_disk()"),pue.forEach(a),Une=l(Y$,"."),Y$.forEach(a),Mne=h(M),b(dc.$$.fragment,M),M.forEach(a),H3=h(i),Xr=n(i,"DIV",{class:!0});var U6=r(Xr);b(uu.$$.fragment,U6),Rne=h(U6),eo=n(U6,"P",{});var J$=r(eo);Bne=l(J$,"Preprocesses "),D4=n(J$,"CODE",{});var mue=r(D4);Hne=l(mue,"dataset_path"),mue.forEach(a),Gne=l(J$," and removes remote filesystem (e.g. removing "),k4=n(J$,"CODE",{});var hue=r(k4);Kne=l(hue,"s3://"),hue.forEach(a),Wne=l(J$,")."),J$.forEach(a),U6.forEach(a),G3=h(i),to=n(i,"DIV",{class:!0});var M6=r(to);b(_u.$$.fragment,M6),Yne=h(M6),E4=n(M6,"P",{});var fue=r(E4);Jne=l(fue,"Validates if filesystem has remote protocol."),fue.forEach(a),M6.forEach(a),K3=h(i),ao=n(i,"H2",{class:!0});var R6=r(ao);cc=n(R6,"A",{id:!0,class:!0,href:!0});var gue=r(cc);q4=n(gue,"SPAN",{});var uue=r(q4);b(bu.$$.fragment,uue),uue.forEach(a),gue.forEach(a),Qne=h(R6),I4=n(R6,"SPAN",{});var _ue=r(I4);Zne=l(_ue,"Fingerprint"),_ue.forEach(a),R6.forEach(a),W3=h(i),so=n(i,"DIV",{class:!0});var B6=r(so);b($u.$$.fragment,B6),Xne=h(B6),T4=n(B6,"P",{});var bue=r(T4);ere=l(bue,"Hasher that accepts python objects as inputs."),bue.forEach(a),B6.forEach(a),this.h()},h(){w(c,"name","hf:doc:metadata"),w(c,"content",JSON.stringify(l1e)),w(d,"id","main-classes"),w(d,"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"),w(d,"href","#main-classes"),w(f,"class","relative group"),w(Te,"id","datasets.DatasetInfo"),w(Te,"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"),w(Te,"href","#datasets.DatasetInfo"),w(ge,"class","relative group"),w(Su,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetInfo"),w(Vu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetInfo"),w(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Sa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(No,"id","datasets.Dataset"),w(No,"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"),w(No,"href","#datasets.Dataset"),w(Hn,"class","relative group"),w(Uu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Mu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ru,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Va,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ua,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ma,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Bo,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.__len__"),w(Ra,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ba,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ha,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ga,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ka,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Wa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Bu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map"),w(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ya,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ja,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Qa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Hu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.ClassLabel"),w(Za,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Xa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Gu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(es,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ts,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(nl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ku,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_transform"),w(Wu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map"),w(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Yu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(Ju,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.reset_format"),w(as,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Zu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.with_transform"),w(Xu,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(e_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(t_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(a_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.reset_format"),w(s_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_transform"),w(n_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(pl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ss,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ns,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(rs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(r_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(o_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.flatten_indices"),w(l_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset"),w(i_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset.shuffle"),w(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(d_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(os,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(c_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Image"),w(p_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio"),w(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(m_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Image"),w(h_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio"),w(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ls,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(kl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(is,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ds,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(cs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ps,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ms,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(hs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(pm,"href","https://github.com/facebookresearch/faiss/wiki/The-index-factory"),w(pm,"rel","nofollow"),w(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(hm,"href","https://github.com/facebookresearch/faiss/wiki/The-index-factory"),w(hm,"rel","nofollow"),w(fs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ll,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(gs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(us,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Cl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ol,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(zl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Sl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Vl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ul,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ml,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Rl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(__,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetInfo"),w(Bl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w($_,"href","/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.NamedSplit"),w(Hl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(x_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(v_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(y_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(j_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(w_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(D_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(k_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(E_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(I_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(T_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(N_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(P_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(_s,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(bs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w($s,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(xs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(A_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features"),w(L_,"href","./task_templates"),w(vs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ys,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(F_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(C_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(aa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(O_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(z_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset"),w(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(S_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk"),w(V_,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_dataset"),w(U_,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_dataset"),w(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(M_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk"),w(R_,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_dataset"),w(B_,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_dataset"),w(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(H_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk"),w(G_,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_dataset"),w(K_,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_dataset"),w(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ti,"id","datasets.DatasetDict"),w(ti,"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"),w(ti,"href","#datasets.DatasetDict"),w(hr,"class","relative group"),w(js,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ws,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ds,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(oi,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.__len__"),w(ks,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Es,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(qs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Is,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ts,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ns,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ps,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(bi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Y_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.with_transform"),w(J_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict.set_format"),w(Q_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(Z_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(X_,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(eb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.reset_format"),w(tb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(ab,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(As,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(sb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map"),w(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ls,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(nb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map"),w(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(rb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map"),w(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Fs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ob,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.ClassLabel"),w(Cs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(lb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(ib,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(db,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Image"),w(cb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio"),w(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(pb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.filesystems.S3FileSystem"),w(mb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Image"),w(hb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio"),w(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(fb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.filesystems.S3FileSystem"),w(Os,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(gb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(zs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ub,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(Ss,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(_b,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(Vs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(bb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetDict"),w(Us,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w($b,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features"),w(xb,"href","./task_templates"),w(Ms,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(vb,"id","package_reference_features"),w(Ci,"id","datasets.IterableDataset"),w(Ci,"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"),w(Ci,"href","#datasets.IterableDataset"),w(wr,"class","relative group"),w(yb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset"),w(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Rs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Bs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Hs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Gs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(jb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Bi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ks,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ws,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(wb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset.skip"),w(Db,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset.take"),w($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(kb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset"),w(Ys,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Eb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset"),w(Js,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ib,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.DatasetInfo"),w(Qi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Nb,"href","/docs/datasets/v2.11.0/en/package_reference/builder_classes#datasets.NamedSplit"),w(Zi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Pb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ab,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Lb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Fb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Cb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ob,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(zb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Sb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Vb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ub,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Mb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Rb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Bb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Xi,"id","datasets.IterableDatasetDict"),w(Xi,"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"),w(Xi,"href","#datasets.IterableDatasetDict"),w(Pr,"class","relative group"),w(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Qs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Hb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset.skip"),w(Gb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.IterableDataset.take"),w(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Zs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Xs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(en,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(tn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(an,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(pd,"id","datasets.Features"),w(pd,"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"),w(pd,"href","#datasets.Features"),w(Cr,"class","relative group"),w(Wb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Value"),w(Yb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.ClassLabel"),w(Jb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Sequence"),w(Qb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Sequence"),w(Zb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Array2D"),w(Xb,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Array3D"),w(e1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Array4D"),w(t1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Array5D"),w(a1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio"),w(s1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Image"),w(n1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Translation"),w(r1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.TranslationVariableLanguages"),w(o1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features"),w(rn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(gd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ud,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(_d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(bd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w($d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(xd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(l1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features"),w(yd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ua,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(on,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ln,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Nd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ad,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(_a,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ba,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w($a,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(xa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Sd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Vd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ud,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Md,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Bd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Hd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Gd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Kd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Wd,"id","datasets.MetricInfo"),w(Wd,"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"),w(Wd,"href","#datasets.MetricInfo"),w(Kr,"class","relative group"),w(pn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(mn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Qd,"id","datasets.Metric"),w(Qd,"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"),w(Qd,"href","#datasets.Metric"),w(Wr,"class","relative group"),w(T1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset"),w(fn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ac,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(sc,"id","datasets.filesystems.S3FileSystem"),w(sc,"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"),w(sc,"href","#datasets.filesystems.S3FileSystem"),w(Yr,"class","relative group"),w(gu,"href","https://s3fs.readthedocs.io/en/latest/api.html"),w(gu,"rel","nofollow"),w(N1,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_from_disk"),w(P1,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk"),w(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Xr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(cc,"id","datasets.fingerprint.Hasher"),w(cc,"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"),w(cc,"href","#datasets.fingerprint.Hasher"),w(ao,"class","relative group"),w(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,j){e(document.head,c),D(i,u,j),D(i,f,j),e(f,d),e(d,g),$(t,g,null),e(f,p),e(f,ce),e(ce,B),D(i,pe,j),D(i,ge,j),e(ge,Te),e(Te,ue),$(za,ue,null),e(ge,Ou),e(ge,qo),e(qo,H6),D(i,r3,j),D(i,me,j),$(Jc,me,null),e(me,G6),e(me,Q$),e(Q$,K6),e(me,W6),e(me,zu),e(zu,Z$),e(Z$,Y6),e(zu,J6),e(me,Q6),e(me,X$),e(X$,Z6),e(me,X6),e(me,Ne),$(Qc,Ne,null),e(Ne,e8),e(Ne,Rn),e(Rn,t8),e(Rn,Su),e(Su,a8),e(Rn,s8),e(Rn,ex),e(ex,n8),e(Rn,r8),e(Ne,o8),e(Ne,Zc),e(Zc,l8),e(Zc,Vu),e(Vu,i8),e(Zc,d8),e(Ne,c8),e(Ne,tx),e(tx,p8),e(Ne,m8),$(Io,Ne,null),e(me,h8),e(me,Sa),$(Xc,Sa,null),e(Sa,f8),e(Sa,Bn),e(Bn,g8),e(Bn,ax),e(ax,u8),e(Bn,_8),e(Bn,sx),e(sx,b8),e(Bn,$8),e(Sa,x8),$(To,Sa,null),D(i,o3,j),D(i,Hn,j),e(Hn,No),e(No,nx),$(ep,nx,null),e(Hn,v8),e(Hn,rx),e(rx,y8),D(i,l3,j),D(i,Po,j),e(Po,j8),e(Po,Uu),e(Uu,w8),e(Po,D8),D(i,i3,j),D(i,q,j),$(tp,q,null),e(q,k8),e(q,ox),e(ox,E8),e(q,q8),e(q,$t),$(ap,$t,null),e($t,I8),e($t,lx),e(lx,T8),e($t,N8),e($t,ix),e(ix,P8),e($t,A8),$(Ao,$t,null),e(q,L8),e(q,xt),$(sp,xt,null),e(xt,F8),e(xt,dx),e(dx,C8),e(xt,O8),e(xt,cx),e(cx,z8),e(xt,S8),$(Lo,xt,null),e(q,V8),e(q,Fo),$(np,Fo,null),e(Fo,U8),e(Fo,px),e(px,M8),e(q,R8),e(q,Co),$(rp,Co,null),e(Co,B8),e(Co,mx),e(mx,H8),e(q,G8),e(q,Pe),$(op,Pe,null),e(Pe,K8),e(Pe,Ht),e(Ht,W8),e(Ht,hx),e(hx,Y8),e(Ht,J8),e(Ht,fx),e(fx,Q8),e(Ht,Z8),e(Ht,Mu),e(Mu,X8),e(Ht,eq),e(Pe,tq),e(Pe,Gn),e(Gn,aq),e(Gn,gx),e(gx,sq),e(Gn,nq),e(Gn,ux),e(ux,rq),e(Gn,oq),e(Pe,lq),e(Pe,Gt),e(Gt,iq),e(Gt,_x),e(_x,dq),e(Gt,cq),e(Gt,bx),e(bx,pq),e(Gt,mq),e(Gt,$x),e($x,hq),e(Gt,fq),e(Pe,gq),$(Oo,Pe,null),e(q,uq),e(q,zo),$(lp,zo,null),e(zo,_q),e(zo,Kt),e(Kt,bq),e(Kt,xx),e(xx,$q),e(Kt,xq),e(Kt,vx),e(vx,vq),e(Kt,yq),e(Kt,Ru),e(Ru,jq),e(Kt,wq),e(q,Dq),e(q,vt),$(ip,vt,null),e(vt,kq),e(vt,yx),e(yx,Eq),e(vt,qq),$(So,vt,null),e(vt,Iq),$(Vo,vt,null),e(q,Tq),e(q,Va),$(dp,Va,null),e(Va,Nq),e(Va,jx),e(jx,Pq),e(Va,Aq),$(Uo,Va,null),e(q,Lq),e(q,Ua),$(cp,Ua,null),e(Ua,Fq),e(Ua,wx),e(wx,Cq),e(Ua,Oq),$(Mo,Ua,null),e(q,zq),e(q,Ma),$(pp,Ma,null),e(Ma,Sq),e(Ma,Dx),e(Dx,Vq),e(Ma,Uq),$(Ro,Ma,null),e(q,Mq),e(q,Ra),$(mp,Ra,null),e(Ra,Rq),e(Ra,hp),e(hp,Bq),e(hp,Bo),e(Bo,Hq),e(Bo,kx),e(kx,Gq),e(Bo,Kq),e(hp,Wq),e(Ra,Yq),$(Ho,Ra,null),e(q,Jq),e(q,Ba),$(fp,Ba,null),e(Ba,Qq),e(Ba,Ex),e(Ex,Zq),e(Ba,Xq),$(Go,Ba,null),e(q,e9),e(q,Ha),$(gp,Ha,null),e(Ha,t9),e(Ha,qx),e(qx,a9),e(Ha,s9),$(Ko,Ha,null),e(q,n9),e(q,yt),$(up,yt,null),e(yt,r9),e(yt,Ix),e(Ix,o9),e(yt,l9),e(yt,Tx),e(Tx,i9),e(yt,d9),$(Wo,yt,null),e(q,c9),e(q,Ga),$(_p,Ga,null),e(Ga,p9),e(Ga,Nx),e(Nx,m9),e(Ga,h9),$(Yo,Ga,null),e(q,f9),e(q,Ka),$(bp,Ka,null),e(Ka,g9),e(Ka,Px),e(Px,u9),e(Ka,_9),$(Jo,Ka,null),e(q,b9),e(q,Wa),$($p,Wa,null),e(Wa,$9),e(Wa,Ax),e(Ax,x9),e(Wa,v9),$(Qo,Wa,null),e(q,y9),e(q,jt),$(xp,jt,null),e(jt,j9),e(jt,Lx),e(Lx,w9),e(jt,D9),e(jt,Kn),e(Kn,k9),e(Kn,Bu),e(Bu,E9),e(Kn,q9),e(Kn,Fx),e(Fx,I9),e(Kn,T9),e(jt,N9),$(Zo,jt,null),e(q,P9),e(q,Ya),$(vp,Ya,null),e(Ya,A9),e(Ya,Cx),e(Cx,L9),e(Ya,F9),$(Xo,Ya,null),e(q,C9),e(q,Ja),$(yp,Ja,null),e(Ja,O9),e(Ja,Ox),e(Ox,z9),e(Ja,S9),$(el,Ja,null),e(q,V9),e(q,Qa),$(jp,Qa,null),e(Qa,U9),e(Qa,zx),e(zx,M9),e(Qa,R9),$(tl,Qa,null),e(q,B9),e(q,Za),$(wp,Za,null),e(Za,H9),e(Za,Dp),e(Dp,G9),e(Dp,Hu),e(Hu,K9),e(Dp,W9),e(Za,Y9),$(al,Za,null),e(q,J9),e(q,Xa),$(kp,Xa,null),e(Xa,Q9),e(Xa,Sx),e(Sx,Z9),e(Xa,X9),$(sl,Xa,null),e(q,eI),e(q,es),$(Ep,es,null),e(es,tI),e(es,Vx),e(Vx,aI),e(es,sI),e(es,qp),e(qp,nI),e(qp,Gu),e(Gu,rI),e(qp,oI),e(q,lI),e(q,ts),$(Ip,ts,null),e(ts,iI),e(ts,Tp),e(Tp,dI),e(Tp,Ux),e(Ux,cI),e(Tp,pI),e(ts,mI),e(ts,Np),e(Np,hI),e(Np,Mx),e(Mx,fI),e(Np,gI),e(q,uI),e(q,nl),$(Pp,nl,null),e(nl,_I),e(nl,Wn),e(Wn,bI),e(Wn,Rx),e(Rx,$I),e(Wn,xI),e(Wn,Bx),e(Bx,vI),e(Wn,yI),e(q,jI),e(q,Ae),$(Ap,Ae,null),e(Ae,wI),e(Ae,Qe),e(Qe,DI),e(Qe,Hx),e(Hx,kI),e(Qe,EI),e(Qe,Gx),e(Gx,qI),e(Qe,II),e(Qe,Kx),e(Kx,TI),e(Qe,NI),e(Qe,Ku),e(Ku,PI),e(Qe,AI),e(Ae,LI),e(Ae,Wt),e(Wt,FI),e(Wt,Wu),e(Wu,CI),e(Wt,OI),e(Wt,Wx),e(Wx,zI),e(Wt,SI),e(Wt,Yx),e(Yx,VI),e(Wt,UI),e(Ae,MI),$(rl,Ae,null),e(Ae,RI),$(ol,Ae,null),e(q,BI),e(q,as),$(Lp,as,null),e(as,HI),e(as,Ze),e(Ze,GI),e(Ze,Jx),e(Jx,KI),e(Ze,WI),e(Ze,Qx),e(Qx,YI),e(Ze,JI),e(Ze,Yu),e(Yu,QI),e(Ze,ZI),e(Ze,Ju),e(Ju,XI),e(Ze,eT),e(as,tT),$(ll,as,null),e(q,aT),e(q,wt),$(Fp,wt,null),e(wt,sT),e(wt,Cp),e(Cp,nT),e(Cp,Zx),e(Zx,rT),e(Cp,oT),e(wt,lT),e(wt,Qu),e(Qu,iT),e(Qu,Xx),e(Xx,dT),e(wt,cT),$(il,wt,null),e(q,pT),e(q,Le),$(Op,Le,null),e(Le,mT),e(Le,Yt),e(Yt,hT),e(Yt,ev),e(ev,fT),e(Yt,gT),e(Yt,tv),e(tv,uT),e(Yt,_T),e(Yt,av),e(av,bT),e(Yt,$T),e(Le,xT),e(Le,zp),e(zp,vT),e(zp,Zu),e(Zu,yT),e(zp,jT),e(Le,wT),e(Le,Jt),e(Jt,DT),e(Jt,Xu),e(Xu,kT),e(Jt,ET),e(Jt,sv),e(sv,qT),e(Jt,IT),e(Jt,e_),e(e_,TT),e(Jt,NT),e(Le,PT),$(dl,Le,null),e(q,AT),e(q,Fe),$(Sp,Fe,null),e(Fe,LT),e(Fe,Yn),e(Yn,FT),e(Yn,nv),e(nv,CT),e(Yn,OT),e(Yn,rv),e(rv,zT),e(Yn,ST),e(Fe,VT),e(Fe,Jn),e(Jn,UT),e(Jn,t_),e(t_,MT),e(Jn,RT),e(Jn,a_),e(a_,BT),e(Jn,HT),e(Fe,GT),e(Fe,Qt),e(Qt,KT),e(Qt,s_),e(s_,WT),e(Qt,YT),e(Qt,ov),e(ov,JT),e(Qt,QT),e(Qt,n_),e(n_,ZT),e(Qt,XT),e(Fe,eN),$(cl,Fe,null),e(q,tN),e(q,pl),$(Vp,pl,null),e(pl,aN),e(pl,lv),e(lv,sN),e(q,nN),e(q,Dt),$(Up,Dt,null),e(Dt,rN),e(Dt,iv),e(iv,oN),e(Dt,lN),e(Dt,dv),e(dv,iN),e(Dt,dN),$(ml,Dt,null),e(q,cN),e(q,Ce),$(Mp,Ce,null),e(Ce,pN),e(Ce,cv),e(cv,mN),e(Ce,hN),e(Ce,Rp),e(Rp,fN),e(Rp,pv),e(pv,gN),e(Rp,uN),e(Ce,_N),e(Ce,Qn),e(Qn,Zn),e(Zn,bN),e(Zn,mv),e(mv,$N),e(Zn,xN),e(Zn,hv),e(hv,vN),e(Zn,yN),e(Qn,jN),e(Qn,Zt),e(Zt,wN),e(Zt,fv),e(fv,DN),e(Zt,kN),e(Zt,gv),e(gv,EN),e(Zt,qN),e(Zt,uv),e(uv,IN),e(Zt,TN),e(Qn,NN),e(Qn,Y),e(Y,PN),e(Y,_v),e(_v,AN),e(Y,LN),e(Y,bv),e(bv,FN),e(Y,CN),e(Y,$v),e($v,ON),e(Y,zN),e(Y,xv),e(xv,SN),e(Y,VN),e(Y,vv),e(vv,UN),e(Y,MN),e(Y,yv),e(yv,RN),e(Y,BN),e(Y,jv),e(jv,HN),e(Y,GN),e(Y,wv),e(wv,KN),e(Y,WN),e(Ce,YN),$(hl,Ce,null),e(q,JN),e(q,ss),$(Bp,ss,null),e(ss,QN),e(ss,Dv),e(Dv,ZN),e(ss,XN),$(fl,ss,null),e(q,eP),e(q,ns),$(Hp,ns,null),e(ns,tP),e(ns,kv),e(kv,aP),e(ns,sP),$(gl,ns,null),e(q,nP),e(q,rs),$(Gp,rs,null),e(rs,rP),e(rs,Ev),e(Ev,oP),e(rs,lP),$(ul,rs,null),e(q,iP),e(q,Z),$(Kp,Z,null),e(Z,dP),e(Z,qv),e(qv,cP),e(Z,pP),e(Z,Iv),e(Iv,mP),e(Z,hP),e(Z,Xt),e(Xt,fP),e(Xt,Tv),e(Tv,gP),e(Xt,uP),e(Xt,r_),e(r_,_P),e(Xt,bP),e(Xt,o_),e(o_,$P),e(Xt,xP),e(Z,vP),$(_l,Z,null),e(Z,yP),e(Z,Xn),e(Xn,jP),e(Xn,l_),e(l_,wP),e(Xn,DP),e(Xn,i_),e(i_,kP),e(Xn,EP),e(Z,qP),$(bl,Z,null),e(Z,IP),$($l,Z,null),e(q,TP),e(q,kt),$(Wp,kt,null),e(kt,NP),e(kt,te),e(te,PP),e(te,d_),e(d_,AP),e(te,LP),e(te,Nv),e(Nv,FP),e(te,CP),e(te,Pv),e(Pv,OP),e(te,zP),e(te,Av),e(Av,SP),e(te,VP),e(te,Lv),e(Lv,UP),e(te,MP),e(te,Fv),e(Fv,RP),e(te,BP),e(te,Cv),e(Cv,HP),e(te,GP),e(kt,KP),e(kt,Yp),e(Yp,WP),e(Yp,Ov),e(Ov,YP),e(Yp,JP),e(kt,QP),$(xl,kt,null),e(q,ZP),e(q,_e),$(Jp,_e,null),e(_e,XP),e(_e,er),e(er,eA),e(er,zv),e(zv,tA),e(er,aA),e(er,Sv),e(Sv,sA),e(er,nA),e(_e,rA),e(_e,tr),e(tr,oA),e(tr,Vv),e(Vv,lA),e(tr,iA),e(tr,Uv),e(Uv,dA),e(tr,cA),e(_e,pA),e(_e,be),e(be,Mv),e(Mv,mA),e(be,hA),e(be,Rv),e(Rv,fA),e(be,gA),e(be,Bv),e(Bv,uA),e(be,_A),e(be,Hv),e(Hv,bA),e(be,$A),e(be,Gv),e(Gv,xA),e(be,vA),e(be,Kv),e(Kv,yA),e(be,jA),e(_e,wA),e(_e,Qp),e(Qp,DA),e(Qp,Wv),e(Wv,kA),e(Qp,EA),e(_e,qA),$(vl,_e,null),e(q,IA),e(q,os),$(Zp,os,null),e(os,TA),e(os,ae),e(ae,NA),e(ae,Yv),e(Yv,PA),e(ae,AA),e(ae,Jv),e(Jv,LA),e(ae,FA),e(ae,Qv),e(Qv,CA),e(ae,OA),e(ae,Zv),e(Zv,zA),e(ae,SA),e(ae,Xv),e(Xv,VA),e(ae,UA),e(ae,e0),e(e0,MA),e(ae,RA),e(ae,t0),e(t0,BA),e(ae,HA),e(os,GA),$(yl,os,null),e(q,KA),e(q,Et),$(Xp,Et,null),e(Et,WA),e(Et,a0),e(a0,YA),e(Et,JA),e(Et,Xe),e(Xe,QA),e(Xe,c_),e(c_,ZA),e(Xe,XA),e(Xe,p_),e(p_,eL),e(Xe,tL),e(Xe,s0),e(s0,aL),e(Xe,sL),e(Xe,n0),e(n0,nL),e(Xe,rL),e(Et,oL),$(jl,Et,null),e(q,lL),e(q,Oe),$(em,Oe,null),e(Oe,iL),e(Oe,ar),e(ar,dL),e(ar,r0),e(r0,cL),e(ar,pL),e(ar,o0),e(o0,mL),e(ar,hL),e(Oe,fL),e(Oe,sr),e(sr,gL),e(sr,m_),e(m_,uL),e(sr,_L),e(sr,h_),e(h_,bL),e(sr,$L),e(Oe,xL),e(Oe,l0),e(l0,vL),e(Oe,yL),$(wl,Oe,null),e(q,jL),e(q,ls),$(tm,ls,null),e(ls,wL),e(ls,ea),e(ea,DL),e(ea,i0),e(i0,kL),e(ea,EL),e(ea,d0),e(d0,qL),e(ea,IL),e(ea,c0),e(c0,TL),e(ea,NL),e(ls,PL),$(Dl,ls,null),e(q,AL),e(q,kl),$(am,kl,null),e(kl,LL),e(kl,p0),e(p0,FL),e(q,CL),e(q,is),$(sm,is,null),e(is,OL),e(is,m0),e(m0,zL),e(is,SL),$(El,is,null),e(q,VL),e(q,ds),$(nm,ds,null),e(ds,UL),e(ds,rm),e(rm,ML),e(rm,h0),e(h0,RL),e(rm,BL),e(ds,HL),$(ql,ds,null),e(q,GL),e(q,cs),$(om,cs,null),e(cs,KL),e(cs,f0),e(f0,WL),e(cs,YL),$(Il,cs,null),e(q,JL),e(q,ps),$(lm,ps,null),e(ps,QL),e(ps,g0),e(g0,ZL),e(ps,XL),$(Tl,ps,null),e(q,eF),e(q,ms),$(im,ms,null),e(ms,tF),e(ms,u0),e(u0,aF),e(ms,sF),$(Nl,ms,null),e(q,nF),e(q,hs),$(dm,hs,null),e(hs,rF),e(hs,_0),e(_0,oF),e(hs,lF),$(Pl,hs,null),e(q,iF),e(q,qt),$(cm,qt,null),e(qt,dF),e(qt,nr),e(nr,cF),e(nr,b0),e(b0,pF),e(nr,mF),e(nr,$0),e($0,hF),e(nr,fF),e(qt,gF),e(qt,x0),e(x0,f_),e(f_,uF),e(f_,pm),e(pm,_F),e(qt,bF),$(Al,qt,null),e(q,$F),e(q,fs),$(mm,fs,null),e(fs,xF),e(fs,ta),e(ta,vF),e(ta,v0),e(v0,yF),e(ta,jF),e(ta,y0),e(y0,wF),e(ta,DF),e(ta,j0),e(j0,kF),e(ta,EF),e(fs,qF),e(fs,w0),e(w0,g_),e(g_,IF),e(g_,hm),e(hm,TF),e(q,NF),e(q,Ll),$(fm,Ll,null),e(Ll,PF),e(Ll,D0),e(D0,AF),e(q,LF),e(q,gs),$(gm,gs,null),e(gs,FF),e(gs,k0),e(k0,CF),e(gs,OF),e(gs,um),e(um,zF),e(um,E0),e(E0,SF),e(um,VF),e(q,UF),e(q,us),$(_m,us,null),e(us,MF),e(us,q0),e(q0,RF),e(us,BF),$(Fl,us,null),e(q,HF),e(q,Cl),$(bm,Cl,null),e(Cl,GF),e(Cl,I0),e(I0,KF),e(q,WF),e(q,Ol),$($m,Ol,null),e(Ol,YF),e(Ol,xm),e(xm,JF),e(xm,T0),e(T0,QF),e(xm,ZF),e(q,XF),e(q,zl),$(vm,zl,null),e(zl,eC),e(zl,ym),e(ym,tC),e(ym,N0),e(N0,aC),e(ym,sC),e(q,nC),e(q,Sl),$(jm,Sl,null),e(Sl,rC),e(Sl,P0),e(P0,oC),e(q,lC),e(q,Vl),$(wm,Vl,null),e(Vl,iC),e(Vl,A0),e(A0,dC),e(q,cC),e(q,Ul),$(Dm,Ul,null),e(Ul,pC),e(Ul,L0),e(L0,mC),e(q,hC),e(q,Ml),$(km,Ml,null),e(Ml,fC),e(Ml,F0),e(F0,gC),e(q,uC),e(q,Rl),$(Em,Rl,null),e(Rl,_C),e(Rl,C0),e(C0,bC),e(q,$C),e(q,Bl),$(qm,Bl,null),e(Bl,xC),e(Bl,u_),e(u_,__),e(__,vC),e(u_,yC),e(q,jC),e(q,Hl),$(Im,Hl,null),e(Hl,wC),e(Hl,b_),e(b_,$_),e($_,DC),e(b_,kC),e(q,EC),e(q,x_),$(Tm,x_,null),e(q,qC),e(q,v_),$(Nm,v_,null),e(q,IC),e(q,y_),$(Pm,y_,null),e(q,TC),e(q,j_),$(Am,j_,null),e(q,NC),e(q,w_),$(Lm,w_,null),e(q,PC),e(q,D_),$(Fm,D_,null),e(q,AC),e(q,k_),$(Cm,k_,null),e(q,LC),e(q,E_),$(Om,E_,null),e(q,FC),e(q,q_),$(zm,q_,null),e(q,CC),e(q,I_),$(Sm,I_,null),e(q,OC),e(q,T_),$(Vm,T_,null),e(q,zC),e(q,N_),$(Um,N_,null),e(q,SC),e(q,P_),$(Mm,P_,null),e(q,VC),e(q,_s),$(Rm,_s,null),e(_s,UC),e(_s,O0),e(O0,MC),e(_s,RC),$(Gl,_s,null),e(q,BC),e(q,bs),$(Bm,bs,null),e(bs,HC),e(bs,z0),e(z0,GC),e(bs,KC),$(Kl,bs,null),e(q,WC),e(q,$s),$(Hm,$s,null),e($s,YC),e($s,S0),e(S0,JC),e($s,QC),$(Wl,$s,null),e(q,ZC),e(q,xs),$(Gm,xs,null),e(xs,XC),e(xs,V0),e(V0,eO),e(xs,tO),$(Yl,xs,null),e(q,aO),e(q,It),$(Km,It,null),e(It,sO),e(It,U0),e(U0,nO),e(It,rO),$(Jl,It,null),e(It,oO),$(Ql,It,null),e(q,lO),e(q,vs),$(Wm,vs,null),e(vs,iO),e(vs,rr),e(rr,dO),e(rr,A_),e(A_,cO),e(rr,pO),e(rr,L_),e(L_,M0),e(M0,mO),e(rr,hO),e(vs,fO),e(vs,or),e(or,gO),e(or,R0),e(R0,uO),e(or,_O),e(or,B0),e(B0,bO),e(or,$O),e(q,xO),e(q,ys),$(Ym,ys,null),e(ys,vO),e(ys,Jm),e(Jm,yO),e(Jm,H0),e(H0,jO),e(Jm,wO),e(ys,DO),$(Zl,ys,null),D(i,d3,j),D(i,aa,j),$(Qm,aa,null),e(aa,kO),e(aa,lr),e(lr,EO),e(lr,F_),e(F_,qO),e(lr,IO),e(lr,C_),e(C_,TO),e(lr,NO),e(aa,PO),$(Xl,aa,null),D(i,c3,j),D(i,se,j),$(Zm,se,null),e(se,AO),e(se,G0),e(G0,LO),e(se,FO),e(se,ir),e(ir,CO),e(ir,O_),e(O_,OO),e(ir,zO),e(ir,z_),e(z_,SO),e(ir,VO),e(se,UO),e(se,Xm),e(Xm,dr),e(dr,MO),e(dr,K0),e(K0,RO),e(dr,BO),e(dr,W0),e(W0,HO),e(dr,GO),e(Xm,KO),e(Xm,cr),e(cr,WO),e(cr,Y0),e(Y0,YO),e(cr,JO),e(cr,J0),e(J0,QO),e(cr,ZO),e(se,XO),e(se,pr),e(pr,ez),e(pr,Q0),e(Q0,tz),e(pr,az),e(pr,Z0),e(Z0,sz),e(pr,nz),e(se,rz),e(se,X0),e(X0,oz),e(se,lz),$(ei,se,null),D(i,p3,j),D(i,he,j),$(eh,he,null),e(he,iz),e(he,mr),e(mr,dz),e(mr,ey),e(ey,cz),e(mr,pz),e(mr,ty),e(ty,mz),e(mr,hz),e(he,fz),e(he,ay),e(ay,gz),e(he,uz),e(he,sy),e(sy,_z),e(he,bz),e(he,ny),e(ny,$z),e(he,xz),e(he,sa),e(sa,vz),e(sa,ry),e(ry,yz),e(sa,jz),e(sa,oy),e(oy,wz),e(sa,Dz),e(sa,ly),e(ly,kz),e(sa,Ez),D(i,m3,j),D(i,De,j),$(th,De,null),e(De,qz),e(De,iy),e(iy,Iz),e(De,Tz),e(De,dy),e(dy,Nz),e(De,Pz),e(De,cy),e(cy,Az),e(De,Lz),e(De,et),e(et,py),e(py,Fz),e(et,Cz),e(et,my),e(my,Oz),e(et,zz),e(et,hy),e(hy,Sz),e(et,Vz),e(et,ah),e(ah,Uz),e(ah,S_),e(S_,Mz),e(ah,Rz),e(et,Bz),e(et,na),e(na,Hz),e(na,V_),e(V_,Gz),e(na,Kz),e(na,fy),e(fy,Wz),e(na,Yz),e(na,U_),e(U_,Jz),e(na,Qz),D(i,h3,j),D(i,ke,j),$(sh,ke,null),e(ke,Zz),e(ke,gy),e(gy,Xz),e(ke,eS),e(ke,uy),e(uy,tS),e(ke,aS),e(ke,_y),e(_y,sS),e(ke,nS),e(ke,tt),e(tt,by),e(by,rS),e(tt,oS),e(tt,$y),e($y,lS),e(tt,iS),e(tt,xy),e(xy,dS),e(tt,cS),e(tt,nh),e(nh,pS),e(nh,M_),e(M_,mS),e(nh,hS),e(tt,fS),e(tt,ra),e(ra,gS),e(ra,R_),e(R_,uS),e(ra,_S),e(ra,vy),e(vy,bS),e(ra,$S),e(ra,B_),e(B_,xS),e(ra,vS),D(i,f3,j),D(i,Ee,j),$(rh,Ee,null),e(Ee,yS),e(Ee,yy),e(yy,jS),e(Ee,wS),e(Ee,jy),e(jy,DS),e(Ee,kS),e(Ee,wy),e(wy,ES),e(Ee,qS),e(Ee,at),e(at,Dy),e(Dy,IS),e(at,TS),e(at,ky),e(ky,NS),e(at,PS),e(at,Ey),e(Ey,AS),e(at,LS),e(at,oh),e(oh,FS),e(oh,H_),e(H_,CS),e(oh,OS),e(at,zS),e(at,oa),e(oa,SS),e(oa,G_),e(G_,VS),e(oa,US),e(oa,qy),e(qy,MS),e(oa,RS),e(oa,K_),e(K_,BS),e(oa,HS),D(i,g3,j),D(i,hr,j),e(hr,ti),e(ti,Iy),$(lh,Iy,null),e(hr,GS),e(hr,Ty),e(Ty,KS),D(i,u3,j),D(i,ai,j),e(ai,WS),e(ai,Ny),e(Ny,YS),e(ai,JS),D(i,_3,j),D(i,A,j),$(ih,A,null),e(A,QS),e(A,Py),e(Py,ZS),e(A,XS),e(A,js),$(dh,js,null),e(js,eV),e(js,Ay),e(Ay,tV),e(js,aV),$(si,js,null),e(A,sV),e(A,ws),$(ch,ws,null),e(ws,nV),e(ws,Ly),e(Ly,rV),e(ws,oV),$(ni,ws,null),e(A,lV),e(A,Ds),$(ph,Ds,null),e(Ds,iV),e(Ds,Fy),e(Fy,dV),e(Ds,cV),$(ri,Ds,null),e(A,pV),e(A,ks),$(mh,ks,null),e(ks,mV),e(ks,hh),e(hh,hV),e(hh,oi),e(oi,fV),e(oi,Cy),e(Cy,gV),e(oi,uV),e(hh,_V),e(ks,bV),$(li,ks,null),e(A,$V),e(A,Es),$(fh,Es,null),e(Es,xV),e(Es,Oy),e(Oy,vV),e(Es,yV),$(ii,Es,null),e(A,jV),e(A,qs),$(gh,qs,null),e(qs,wV),e(qs,zy),e(zy,DV),e(qs,kV),$(di,qs,null),e(A,EV),e(A,Tt),$(uh,Tt,null),e(Tt,qV),e(Tt,Sy),e(Sy,IV),e(Tt,TV),e(Tt,Vy),e(Vy,NV),e(Tt,PV),$(ci,Tt,null),e(A,AV),e(A,Is),$(_h,Is,null),e(Is,LV),e(Is,Uy),e(Uy,FV),e(Is,CV),$(pi,Is,null),e(A,OV),e(A,Ts),$(bh,Ts,null),e(Ts,zV),e(Ts,My),e(My,SV),e(Ts,VV),$(mi,Ts,null),e(A,UV),e(A,Ns),$($h,Ns,null),e(Ns,MV),e(Ns,Ry),e(Ry,RV),e(Ns,BV),$(hi,Ns,null),e(A,HV),e(A,Ps),$(xh,Ps,null),e(Ps,GV),e(Ps,By),e(By,KV),e(Ps,WV),$(fi,Ps,null),e(A,YV),e(A,ze),$(vh,ze,null),e(ze,JV),e(ze,Hy),e(Hy,QV),e(ze,ZV),e(ze,Gy),e(Gy,XV),e(ze,eU),e(ze,Ky),e(Ky,tU),e(ze,aU),$(gi,ze,null),e(A,sU),e(A,Se),$(yh,Se,null),e(Se,nU),e(Se,jh),e(jh,rU),e(jh,Wy),e(Wy,oU),e(jh,lU),e(Se,iU),e(Se,st),e(st,dU),e(st,Yy),e(Yy,cU),e(st,pU),e(st,Jy),e(Jy,mU),e(st,hU),e(st,Qy),e(Qy,fU),e(st,gU),e(st,Zy),e(Zy,uU),e(st,_U),e(Se,bU),e(Se,Xy),e(Xy,ej),e(ej,$U),e(Se,xU),$(ui,Se,null),e(A,vU),e(A,Nt),$(wh,Nt,null),e(Nt,yU),e(Nt,Dh),e(Dh,jU),e(Dh,tj),e(tj,wU),e(Dh,DU),e(Nt,kU),e(Nt,W_),e(W_,EU),e(W_,aj),e(aj,qU),e(Nt,IU),$(_i,Nt,null),e(A,TU),e(A,bi),$(kh,bi,null),e(bi,NU),e(bi,fr),e(fr,PU),e(fr,sj),e(sj,AU),e(fr,LU),e(fr,nj),e(nj,FU),e(fr,CU),e(A,OU),e(A,Ve),$(Eh,Ve,null),e(Ve,zU),e(Ve,la),e(la,SU),e(la,rj),e(rj,VU),e(la,UU),e(la,oj),e(oj,MU),e(la,RU),e(la,lj),e(lj,BU),e(la,HU),e(Ve,GU),e(Ve,qh),e(qh,KU),e(qh,Y_),e(Y_,WU),e(qh,YU),e(Ve,JU),e(Ve,nt),e(nt,QU),e(nt,J_),e(J_,ZU),e(nt,XU),e(nt,ij),e(ij,eM),e(nt,tM),e(nt,Q_),e(Q_,aM),e(nt,sM),e(nt,Z_),e(Z_,nM),e(nt,rM),e(Ve,oM),$($i,Ve,null),e(A,lM),e(A,Ue),$(Ih,Ue,null),e(Ue,iM),e(Ue,gr),e(gr,dM),e(gr,dj),e(dj,cM),e(gr,pM),e(gr,cj),e(cj,mM),e(gr,hM),e(Ue,fM),e(Ue,ur),e(ur,gM),e(ur,X_),e(X_,uM),e(ur,_M),e(ur,eb),e(eb,bM),e(ur,$M),e(Ue,xM),e(Ue,rt),e(rt,vM),e(rt,pj),e(pj,yM),e(rt,jM),e(rt,mj),e(mj,wM),e(rt,DM),e(rt,tb),e(tb,kM),e(rt,EM),e(rt,ab),e(ab,qM),e(rt,IM),e(Ue,TM),$(xi,Ue,null),e(A,NM),e(A,As),$(Th,As,null),e(As,PM),e(As,hj),e(hj,AM),e(As,LM),$(vi,As,null),e(A,FM),e(A,Pt),$(Nh,Pt,null),e(Pt,CM),e(Pt,fj),e(fj,OM),e(Pt,zM),e(Pt,ia),e(ia,SM),e(ia,sb),e(sb,VM),e(ia,UM),e(ia,gj),e(gj,MM),e(ia,RM),e(ia,uj),e(uj,BM),e(ia,HM),e(Pt,GM),$(yi,Pt,null),e(A,KM),e(A,Ls),$(Ph,Ls,null),e(Ls,WM),e(Ls,_j),e(_j,YM),e(Ls,JM),$(ji,Ls,null),e(A,QM),e(A,Me),$(Ah,Me,null),e(Me,ZM),e(Me,bj),e(bj,XM),e(Me,eR),e(Me,$j),e($j,tR),e(Me,aR),e(Me,_r),e(_r,sR),e(_r,nb),e(nb,nR),e(_r,rR),e(_r,xj),e(xj,oR),e(_r,lR),e(Me,iR),$(wi,Me,null),e(A,dR),e(A,Re),$(Lh,Re,null),e(Re,cR),e(Re,vj),e(vj,pR),e(Re,mR),e(Re,br),e(br,hR),e(br,rb),e(rb,fR),e(br,gR),e(br,yj),e(yj,uR),e(br,_R),e(Re,bR),e(Re,Fh),e(Fh,jj),e(jj,$R),e(Fh,xR),e(Fh,wj),e(wj,vR),e(Re,yR),$(Di,Re,null),e(A,jR),e(A,Fs),$(Ch,Fs,null),e(Fs,wR),e(Fs,Dj),e(Dj,DR),e(Fs,kR),$(ki,Fs,null),e(A,ER),e(A,At),$(Oh,At,null),e(At,qR),e(At,kj),e(kj,IR),e(At,TR),e(At,Ej),e(Ej,NR),e(At,PR),$(Ei,At,null),e(A,AR),e(A,Cs),$(zh,Cs,null),e(Cs,LR),e(Cs,Sh),e(Sh,FR),e(Sh,ob),e(ob,CR),e(Sh,OR),e(Cs,zR),$(qi,Cs,null),e(A,SR),e(A,Be),$(Vh,Be,null),e(Be,VR),e(Be,$r),e($r,UR),e($r,lb),e(lb,MR),e($r,RR),e($r,ib),e(ib,BR),e($r,HR),e(Be,GR),e(Be,qj),e(qj,KR),e(Be,WR),e(Be,da),e(da,YR),e(da,db),e(db,JR),e(da,QR),e(da,cb),e(cb,ZR),e(da,XR),e(da,Ij),e(Ij,eB),e(da,tB),e(Be,aB),$(Ii,Be,null),e(A,sB),e(A,He),$(Uh,He,null),e(He,nB),e(He,xr),e(xr,rB),e(xr,pb),e(pb,oB),e(xr,lB),e(xr,Tj),e(Tj,iB),e(xr,dB),e(He,cB),e(He,vr),e(vr,pB),e(vr,mb),e(mb,mB),e(vr,hB),e(vr,hb),e(hb,fB),e(vr,gB),e(He,uB),e(He,Nj),e(Nj,_B),e(He,bB),$(Ti,He,null),e(A,$B),e(A,Os),$(Mh,Os,null),e(Os,xB),e(Os,ca),e(ca,vB),e(ca,Pj),e(Pj,yB),e(ca,jB),e(ca,fb),e(fb,wB),e(ca,DB),e(ca,Aj),e(Aj,kB),e(ca,EB),e(Os,qB),$(Ni,Os,null),e(A,IB),e(A,zs),$(Rh,zs,null),e(zs,TB),e(zs,Bh),e(Bh,NB),e(Bh,gb),e(gb,PB),e(Bh,AB),e(zs,LB),$(Pi,zs,null),e(A,FB),e(A,Ss),$(Hh,Ss,null),e(Ss,CB),e(Ss,Gh),e(Gh,OB),e(Gh,ub),e(ub,zB),e(Gh,SB),e(Ss,VB),$(Ai,Ss,null),e(A,UB),e(A,Vs),$(Kh,Vs,null),e(Vs,MB),e(Vs,Wh),e(Wh,RB),e(Wh,_b),e(_b,BB),e(Wh,HB),e(Vs,GB),$(Li,Vs,null),e(A,KB),e(A,Us),$(Yh,Us,null),e(Us,WB),e(Us,Jh),e(Jh,YB),e(Jh,bb),e(bb,JB),e(Jh,QB),e(Us,ZB),$(Fi,Us,null),e(A,XB),e(A,Ms),$(Qh,Ms,null),e(Ms,eH),e(Ms,yr),e(yr,tH),e(yr,$b),e($b,aH),e(yr,sH),e(yr,xb),e(xb,Lj),e(Lj,nH),e(yr,rH),e(Ms,oH),e(Ms,jr),e(jr,lH),e(jr,Fj),e(Fj,iH),e(jr,dH),e(jr,Cj),e(Cj,cH),e(jr,pH),D(i,b3,j),D(i,vb,j),D(i,$3,j),D(i,wr,j),e(wr,Ci),e(Ci,Oj),$(Zh,Oj,null),e(wr,mH),e(wr,zj),e(zj,hH),D(i,x3,j),D(i,Oi,j),e(Oi,fH),e(Oi,yb),e(yb,gH),e(Oi,uH),D(i,v3,j),D(i,F,j),$(Xh,F,null),e(F,_H),e(F,Sj),e(Sj,bH),e(F,$H),e(F,Lt),$(ef,Lt,null),e(Lt,xH),e(Lt,Vj),e(Vj,vH),e(Lt,yH),$(zi,Lt,null),e(Lt,jH),$(Si,Lt,null),e(F,wH),e(F,Rs),$(tf,Rs,null),e(Rs,DH),e(Rs,Uj),e(Uj,kH),e(Rs,EH),$(Vi,Rs,null),e(F,qH),e(F,Bs),$(af,Bs,null),e(Bs,IH),e(Bs,Mj),e(Mj,TH),e(Bs,NH),$(Ui,Bs,null),e(F,PH),e(F,Hs),$(sf,Hs,null),e(Hs,AH),e(Hs,Rj),e(Rj,LH),e(Hs,FH),$(Mi,Hs,null),e(F,CH),e(F,Gs),$(nf,Gs,null),e(Gs,OH),e(Gs,Bj),e(Bj,zH),e(Gs,SH),$(Ri,Gs,null),e(F,VH),e(F,jb),$(rf,jb,null),e(F,UH),e(F,Bi),$(of,Bi,null),e(Bi,MH),e(Bi,lf),e(lf,RH),e(lf,Hj),e(Hj,BH),e(lf,HH),e(F,GH),e(F,Ge),$(df,Ge,null),e(Ge,KH),e(Ge,Gj),e(Gj,WH),e(Ge,YH),e(Ge,cf),e(cf,JH),e(cf,Kj),e(Kj,QH),e(cf,ZH),e(Ge,XH),e(Ge,Dr),e(Dr,kr),e(kr,eG),e(kr,Wj),e(Wj,tG),e(kr,aG),e(kr,Yj),e(Yj,sG),e(kr,nG),e(Dr,rG),e(Dr,Er),e(Er,oG),e(Er,Jj),e(Jj,lG),e(Er,iG),e(Er,Qj),e(Qj,dG),e(Er,cG),e(Dr,pG),e(Dr,J),e(J,mG),e(J,Zj),e(Zj,hG),e(J,fG),e(J,Xj),e(Xj,gG),e(J,uG),e(J,ew),e(ew,_G),e(J,bG),e(J,tw),e(tw,$G),e(J,xG),e(J,aw),e(aw,vG),e(J,yG),e(J,sw),e(sw,jG),e(J,wG),e(J,nw),e(nw,DG),e(J,kG),e(J,rw),e(rw,EG),e(J,qG),e(Ge,IG),$(Hi,Ge,null),e(F,TG),e(F,Ks),$(pf,Ks,null),e(Ks,NG),e(Ks,ow),e(ow,PG),e(Ks,AG),$(Gi,Ks,null),e(F,LG),e(F,Ws),$(mf,Ws,null),e(Ws,FG),e(Ws,lw),e(lw,CG),e(Ws,OG),$(Ki,Ws,null),e(F,zG),e(F,$e),$(hf,$e,null),e($e,SG),e($e,iw),e(iw,VG),e($e,UG),e($e,ff),e(ff,MG),e(ff,dw),e(dw,RG),e(ff,BG),e($e,HG),e($e,qr),e(qr,GG),e(qr,cw),e(cw,KG),e(qr,WG),e(qr,pw),e(pw,YG),e(qr,JG),e($e,QG),e($e,Ir),e(Ir,ZG),e(Ir,wb),e(wb,XG),e(Ir,eK),e(Ir,Db),e(Db,tK),e(Ir,aK),e($e,sK),$(Wi,$e,null),e(F,nK),e(F,Ys),$(gf,Ys,null),e(Ys,rK),e(Ys,Tr),e(Tr,oK),e(Tr,kb),e(kb,lK),e(Tr,iK),e(Tr,mw),e(mw,dK),e(Tr,cK),e(Ys,pK),$(Yi,Ys,null),e(F,mK),e(F,Js),$(uf,Js,null),e(Js,hK),e(Js,Nr),e(Nr,fK),e(Nr,Eb),e(Eb,gK),e(Nr,uK),e(Nr,hw),e(hw,_K),e(Nr,bK),e(Js,$K),$(Ji,Js,null),e(F,xK),e(F,Qi),$(_f,Qi,null),e(Qi,vK),e(Qi,qb),e(qb,Ib),e(Ib,yK),e(qb,jK),e(F,wK),e(F,Zi),$(bf,Zi,null),e(Zi,DK),e(Zi,Tb),e(Tb,Nb),e(Nb,kK),e(Tb,EK),e(F,qK),e(F,Pb),$($f,Pb,null),e(F,IK),e(F,Ab),$(xf,Ab,null),e(F,TK),e(F,Lb),$(vf,Lb,null),e(F,NK),e(F,Fb),$(yf,Fb,null),e(F,PK),e(F,Cb),$(jf,Cb,null),e(F,AK),e(F,Ob),$(wf,Ob,null),e(F,LK),e(F,zb),$(Df,zb,null),e(F,FK),e(F,Sb),$(kf,Sb,null),e(F,CK),e(F,Vb),$(Ef,Vb,null),e(F,OK),e(F,Ub),$(qf,Ub,null),e(F,zK),e(F,Mb),$(If,Mb,null),e(F,SK),e(F,Rb),$(Tf,Rb,null),e(F,VK),e(F,Bb),$(Nf,Bb,null),D(i,y3,j),D(i,Pr,j),e(Pr,Xi),e(Xi,fw),$(Pf,fw,null),e(Pr,UK),e(Pr,gw),e(gw,MK),D(i,j3,j),D(i,ed,j),e(ed,RK),e(ed,uw),e(uw,BK),e(ed,HK),D(i,w3,j),D(i,R,j),$(Af,R,null),e(R,GK),e(R,Ke),$(Lf,Ke,null),e(Ke,KK),e(Ke,_w),e(_w,WK),e(Ke,YK),e(Ke,Ff),e(Ff,JK),e(Ff,bw),e(bw,QK),e(Ff,ZK),e(Ke,XK),e(Ke,Ar),e(Ar,Lr),e(Lr,eW),e(Lr,$w),e($w,tW),e(Lr,aW),e(Lr,xw),e(xw,sW),e(Lr,nW),e(Ar,rW),e(Ar,pa),e(pa,oW),e(pa,vw),e(vw,lW),e(pa,iW),e(pa,yw),e(yw,dW),e(pa,cW),e(pa,jw),e(jw,pW),e(pa,mW),e(Ar,hW),e(Ar,Q),e(Q,fW),e(Q,ww),e(ww,gW),e(Q,uW),e(Q,Dw),e(Dw,_W),e(Q,bW),e(Q,kw),e(kw,$W),e(Q,xW),e(Q,Ew),e(Ew,vW),e(Q,yW),e(Q,qw),e(qw,jW),e(Q,wW),e(Q,Iw),e(Iw,DW),e(Q,kW),e(Q,Tw),e(Tw,EW),e(Q,qW),e(Q,Nw),e(Nw,IW),e(Q,TW),e(Ke,NW),$(td,Ke,null),e(R,PW),e(R,Qs),$(Cf,Qs,null),e(Qs,AW),e(Qs,Pw),e(Pw,LW),e(Qs,FW),$(ad,Qs,null),e(R,CW),e(R,xe),$(Of,xe,null),e(xe,OW),e(xe,Aw),e(Aw,zW),e(xe,SW),e(xe,Lw),e(Lw,VW),e(xe,UW),e(xe,Fr),e(Fr,MW),e(Fr,Fw),e(Fw,RW),e(Fr,BW),e(Fr,Cw),e(Cw,HW),e(Fr,GW),e(xe,KW),e(xe,ma),e(ma,WW),e(ma,Ow),e(Ow,YW),e(ma,JW),e(ma,Hb),e(Hb,QW),e(ma,ZW),e(ma,Gb),e(Gb,XW),e(ma,eY),e(xe,tY),$(sd,xe,null),e(R,aY),e(R,Zs),$(zf,Zs,null),e(Zs,sY),e(Zs,zw),e(zw,nY),e(Zs,rY),$(nd,Zs,null),e(R,oY),e(R,Xs),$(Sf,Xs,null),e(Xs,lY),e(Xs,Sw),e(Sw,iY),e(Xs,dY),$(rd,Xs,null),e(R,cY),e(R,en),$(Vf,en,null),e(en,pY),e(en,Vw),e(Vw,mY),e(en,hY),$(od,en,null),e(R,fY),e(R,tn),$(Uf,tn,null),e(tn,gY),e(tn,Uw),e(Uw,uY),e(tn,_Y),$(ld,tn,null),e(R,bY),e(R,an),$(Mf,an,null),e(an,$Y),e(an,Mw),e(Mw,xY),e(an,vY),$(id,an,null),e(R,yY),e(R,sn),$(Rf,sn,null),e(sn,jY),e(sn,Rw),e(Rw,wY),e(sn,DY),$(dd,sn,null),e(R,kY),e(R,nn),$(Bf,nn,null),e(nn,EY),e(nn,Bw),e(Bw,qY),e(nn,IY),$(cd,nn,null),D(i,D3,j),D(i,Cr,j),e(Cr,pd),e(pd,Hw),$(Hf,Hw,null),e(Cr,TY),e(Cr,Gw),e(Gw,NY),D(i,k3,j),D(i,S,j),$(Gf,S,null),e(S,PY),e(S,Kw),e(Kw,AY),e(S,LY),e(S,Kf),e(Kf,FY),e(Kf,Ww),e(Ww,CY),e(Kf,OY),e(S,zY),e(S,Kb),e(Kb,Yw),e(Yw,SY),e(Kb,VY),e(S,UY),e(S,ne),e(ne,Jw),e(Jw,ha),e(ha,MY),e(ha,Wb),e(Wb,RY),e(ha,BY),e(ha,Qw),e(Qw,HY),e(ha,GY),e(ha,Zw),e(Zw,KY),e(ha,WY),e(ne,YY),e(ne,Xw),e(Xw,Wf),e(Wf,JY),e(Wf,Yb),e(Yb,QY),e(Wf,ZY),e(ne,XY),e(ne,e7),e(e7,Yf),e(Yf,eJ),e(Yf,t7),e(t7,tJ),e(Yf,aJ),e(ne,sJ),e(ne,Jf),e(Jf,ot),e(ot,nJ),e(ot,a7),e(a7,rJ),e(ot,oJ),e(ot,Jb),e(Jb,lJ),e(ot,iJ),e(ot,s7),e(s7,dJ),e(ot,cJ),e(ot,Qb),e(Qb,pJ),e(ot,mJ),e(Jf,hJ),$(md,Jf,null),e(ne,fJ),e(ne,n7),e(n7,lt),e(lt,gJ),e(lt,Zb),e(Zb,uJ),e(lt,_J),e(lt,Xb),e(Xb,bJ),e(lt,$J),e(lt,e1),e(e1,xJ),e(lt,vJ),e(lt,t1),e(t1,yJ),e(lt,jJ),e(ne,wJ),e(ne,r7),e(r7,Qf),e(Qf,DJ),e(Qf,a1),e(a1,kJ),e(Qf,EJ),e(ne,qJ),e(ne,o7),e(o7,fa),e(fa,IJ),e(fa,s1),e(s1,TJ),e(fa,NJ),e(fa,l7),e(l7,PJ),e(fa,AJ),e(fa,i7),e(i7,LJ),e(fa,FJ),e(ne,CJ),e(ne,d7),e(d7,hd),e(hd,n1),e(n1,OJ),e(hd,zJ),e(hd,r1),e(r1,SJ),e(hd,VJ),e(S,UJ),e(S,rn),$(Zf,rn,null),e(rn,MJ),e(rn,Xf),e(Xf,RJ),e(Xf,o1),e(o1,BJ),e(Xf,HJ),e(rn,GJ),$(fd,rn,null),e(S,KJ),e(S,gd),$(eg,gd,null),e(gd,WJ),e(gd,c7),e(c7,YJ),e(S,JJ),e(S,ud),$(tg,ud,null),e(ud,QJ),e(ud,p7),e(p7,ZJ),e(S,XJ),e(S,_d),$(ag,_d,null),e(_d,eQ),e(_d,m7),e(m7,tQ),e(S,aQ),e(S,bd),$(sg,bd,null),e(bd,sQ),e(bd,h7),e(h7,nQ),e(S,rQ),e(S,$d),$(ng,$d,null),e($d,oQ),e($d,f7),e(f7,lQ),e(S,iQ),e(S,xd),$(rg,xd,null),e(xd,dQ),e(xd,g7),e(g7,cQ),e(S,pQ),e(S,Ft),$(og,Ft,null),e(Ft,mQ),e(Ft,lg),e(lg,hQ),e(lg,u7),e(u7,fQ),e(lg,gQ),e(Ft,uQ),e(Ft,ig),e(ig,_Q),e(ig,_7),e(_7,bQ),e(ig,$Q),e(Ft,xQ),$(vd,Ft,null),e(S,vQ),e(S,yd),$(dg,yd,null),e(yd,yQ),e(yd,cg),e(cg,jQ),e(cg,l1),e(l1,wQ),e(cg,DQ),e(S,kQ),e(S,We),$(pg,We,null),e(We,EQ),e(We,mg),e(mg,qQ),e(mg,b7),e(b7,IQ),e(mg,TQ),e(We,NQ),e(We,Or),e(Or,PQ),e(Or,$7),e($7,AQ),e(Or,LQ),e(Or,x7),e(x7,FQ),e(Or,CQ),e(We,OQ),e(We,ga),e(ga,zQ),e(ga,v7),e(v7,SQ),e(ga,VQ),e(ga,y7),e(y7,UQ),e(ga,MQ),e(ga,j7),e(j7,RQ),e(ga,BQ),e(We,HQ),$(jd,We,null),e(S,GQ),e(S,Ct),$(hg,Ct,null),e(Ct,KQ),e(Ct,fg),e(fg,WQ),e(fg,w7),e(w7,YQ),e(fg,JQ),e(Ct,QQ),e(Ct,D7),e(D7,ZQ),e(Ct,XQ),$(wd,Ct,null),D(i,E3,j),D(i,ua,j),$(gg,ua,null),e(ua,eZ),e(ua,k7),e(k7,tZ),e(ua,aZ),$(Dd,ua,null),D(i,q3,j),D(i,K,j),$(ug,K,null),e(K,sZ),e(K,E7),e(E7,nZ),e(K,rZ),e(K,_g),e(_g,oZ),e(_g,q7),e(q7,lZ),e(_g,iZ),e(K,dZ),e(K,zr),e(zr,i1),e(i1,I7),e(I7,cZ),e(i1,pZ),e(zr,mZ),e(zr,d1),e(d1,T7),e(T7,hZ),e(d1,fZ),e(zr,gZ),e(zr,c1),e(c1,N7),e(N7,uZ),e(c1,_Z),e(K,bZ),e(K,P7),e(P7,$Z),e(K,xZ),$(kd,K,null),e(K,vZ),e(K,on),$(bg,on,null),e(on,yZ),e(on,Sr),e(Sr,jZ),e(Sr,A7),e(A7,wZ),e(Sr,DZ),e(Sr,L7),e(L7,kZ),e(Sr,EZ),e(on,qZ),e(on,$g),e($g,F7),e(F7,C7),e(C7,IZ),e($g,TZ),e($g,O7),e(O7,z7),e(z7,NZ),e(K,PZ),e(K,Ot),$(xg,Ot,null),e(Ot,AZ),e(Ot,Vr),e(Vr,LZ),e(Vr,S7),e(S7,FZ),e(Vr,CZ),e(Vr,V7),e(V7,OZ),e(Vr,zZ),e(Ot,SZ),e(Ot,vg),e(vg,VZ),e(vg,U7),e(U7,UZ),e(vg,MZ),e(Ot,RZ),$(Ed,Ot,null),e(K,BZ),e(K,ln),$(yg,ln,null),e(ln,HZ),e(ln,Ur),e(Ur,GZ),e(Ur,M7),e(M7,KZ),e(Ur,WZ),e(Ur,R7),e(R7,YZ),e(Ur,JZ),e(ln,QZ),$(qd,ln,null),D(i,I3,j),D(i,it,j),$(jg,it,null),e(it,ZZ),e(it,wg),e(wg,XZ),e(wg,B7),e(B7,eX),e(wg,tX),e(it,aX),e(it,O),e(O,H7),e(H7,G7),e(G7,sX),e(O,nX),e(O,K7),e(K7,W7),e(W7,rX),e(O,oX),e(O,Y7),e(Y7,J7),e(J7,lX),e(O,iX),e(O,Q7),e(Q7,Z7),e(Z7,dX),e(O,cX),e(O,X7),e(X7,eD),e(eD,pX),e(O,mX),e(O,tD),e(tD,aD),e(aD,hX),e(O,fX),e(O,sD),e(sD,nD),e(nD,gX),e(O,uX),e(O,rD),e(rD,oD),e(oD,_X),e(O,bX),e(O,lD),e(lD,iD),e(iD,$X),e(O,xX),e(O,dD),e(dD,cD),e(cD,vX),e(O,yX),e(O,pD),e(pD,mD),e(mD,jX),e(O,wX),e(O,p1),e(p1,hD),e(hD,DX),e(p1,kX),e(O,EX),e(O,m1),e(m1,fD),e(fD,qX),e(m1,IX),e(O,TX),e(O,gD),e(gD,uD),e(uD,NX),e(O,PX),e(O,_D),e(_D,bD),e(bD,AX),e(O,LX),e(O,$D),e($D,xD),e(xD,FX),e(O,CX),e(O,vD),e(vD,yD),e(yD,OX),e(O,zX),e(O,jD),e(jD,wD),e(wD,SX),e(O,VX),e(O,DD),e(DD,kD),e(kD,UX),e(O,MX),e(O,ED),e(ED,qD),e(qD,RX),e(O,BX),e(O,ID),e(ID,TD),e(TD,HX),e(O,GX),e(O,ND),e(ND,PD),e(PD,KX),e(O,WX),e(O,AD),e(AD,LD),e(LD,YX),e(O,JX),e(O,FD),e(FD,CD),e(CD,QX),e(O,ZX),e(O,OD),e(OD,zD),e(zD,XX),e(O,eee),e(O,SD),e(SD,VD),e(VD,tee),e(it,aee),$(Id,it,null),D(i,T3,j),D(i,dt,j),$(Dg,dt,null),e(dt,see),e(dt,h1),e(h1,UD),e(UD,nee),e(h1,ree),e(dt,oee),$(Td,dt,null),e(dt,lee),e(dt,Nd),$(kg,Nd,null),e(Nd,iee),e(Nd,MD),e(MD,dee),D(i,N3,j),D(i,ct,j),$(Eg,ct,null),e(ct,cee),e(ct,f1),e(f1,RD),e(RD,pee),e(f1,mee),e(ct,hee),$(Pd,ct,null),e(ct,fee),e(ct,Ad),$(qg,Ad,null),e(Ad,gee),e(Ad,BD),e(BD,uee),D(i,P3,j),D(i,_a,j),$(Ig,_a,null),e(_a,_ee),e(_a,HD),e(HD,bee),e(_a,$ee),$(Ld,_a,null),D(i,A3,j),D(i,ba,j),$(Tg,ba,null),e(ba,xee),e(ba,GD),e(GD,vee),e(ba,yee),$(Fd,ba,null),D(i,L3,j),D(i,$a,j),$(Ng,$a,null),e($a,jee),e($a,KD),e(KD,wee),e($a,Dee),$(Cd,$a,null),D(i,F3,j),D(i,xa,j),$(Pg,xa,null),e(xa,kee),e(xa,WD),e(WD,Eee),e(xa,qee),$(Od,xa,null),D(i,C3,j),D(i,H,j),$(Ag,H,null),e(H,Iee),e(H,Lg),e(Lg,Tee),e(Lg,YD),e(YD,Nee),e(Lg,Pee),e(H,Aee),e(H,JD),e(JD,Lee),e(H,Fee),e(H,Mr),e(Mr,QD),e(QD,Fg),e(Fg,Cee),e(Fg,ZD),e(ZD,Oee),e(Fg,zee),e(Mr,See),e(Mr,Rr),e(Rr,Cg),e(Cg,Vee),e(Cg,XD),e(XD,Uee),e(Cg,Mee),e(Rr,Ree),e(Rr,Og),e(Og,g1),e(g1,ek),e(ek,Bee),e(g1,Hee),e(Og,Gee),e(Og,u1),e(u1,tk),e(tk,Kee),e(u1,Wee),e(Rr,Yee),e(Rr,ak),e(ak,Jee),e(Mr,Qee),e(Mr,Br),e(Br,zg),e(zg,Zee),e(zg,sk),e(sk,Xee),e(zg,ete),e(Br,tte),e(Br,Hr),e(Hr,_1),e(_1,nk),e(nk,ate),e(_1,ste),e(Hr,nte),e(Hr,b1),e(b1,rk),e(rk,rte),e(b1,ote),e(Hr,lte),e(Hr,$1),e($1,ok),e(ok,ite),e($1,dte),e(Br,cte),e(Br,lk),e(lk,pte),e(H,mte),$(zd,H,null),e(H,hte),e(H,dn),$(Sg,dn,null),e(dn,fte),e(dn,ik),e(ik,gte),e(dn,ute),e(dn,pt),e(pt,x1),e(x1,dk),e(dk,_te),e(x1,bte),e(pt,$te),e(pt,v1),e(v1,ck),e(ck,xte),e(v1,vte),e(pt,yte),e(pt,pk),e(pk,mk),e(mk,jte),e(pt,wte),e(pt,hk),e(hk,fk),e(fk,Dte),e(pt,kte),e(pt,y1),e(y1,gk),e(gk,Ete),e(y1,qte),e(H,Ite),e(H,Sd),$(Vg,Sd,null),e(Sd,Tte),e(Sd,uk),e(uk,Nte),e(H,Pte),e(H,Vd),$(Ug,Vd,null),e(Vd,Ate),e(Vd,_k),e(_k,Lte),e(H,Fte),e(H,Ud),$(Mg,Ud,null),e(Ud,Cte),e(Ud,bk),e(bk,Ote),e(H,zte),e(H,Md),$(Rg,Md,null),e(Md,Ste),e(Md,$k),e($k,Vte),D(i,O3,j),D(i,G,j),$(Bg,G,null),e(G,Ute),e(G,Hg),e(Hg,Mte),e(Hg,xk),e(xk,Rte),e(Hg,Bte),e(G,Hte),e(G,vk),e(vk,Gte),e(G,Kte),e(G,va),e(va,yk),e(yk,Gg),e(Gg,Wte),e(Gg,jk),e(jk,Yte),e(Gg,Jte),e(va,Qte),e(va,Gr),e(Gr,Kg),e(Kg,Zte),e(Kg,wk),e(wk,Xte),e(Kg,eae),e(Gr,tae),e(Gr,Wg),e(Wg,j1),e(j1,Dk),e(Dk,aae),e(j1,sae),e(Wg,nae),e(Wg,w1),e(w1,kk),e(kk,rae),e(w1,oae),e(Gr,lae),e(Gr,Ek),e(Ek,iae),e(va,dae),e(va,qk),e(qk,Yg),e(Yg,cae),e(Yg,Ik),e(Ik,pae),e(Yg,mae),e(va,hae),e(va,Tk),e(Tk,Jg),e(Jg,fae),e(Jg,Nk),e(Nk,gae),e(Jg,uae),e(G,_ae),$(Rd,G,null),e(G,bae),e(G,cn),$(Qg,cn,null),e(cn,$ae),e(cn,Pk),e(Pk,xae),e(cn,vae),e(cn,qe),e(qe,D1),e(D1,Ak),e(Ak,yae),e(D1,jae),e(qe,wae),e(qe,k1),e(k1,Lk),e(Lk,Dae),e(k1,kae),e(qe,Eae),e(qe,Fk),e(Fk,Ck),e(Ck,qae),e(qe,Iae),e(qe,Ok),e(Ok,zk),e(zk,Tae),e(qe,Nae),e(qe,E1),e(E1,Sk),e(Sk,Pae),e(E1,Aae),e(qe,Lae),e(qe,q1),e(q1,Vk),e(Vk,Fae),e(q1,Cae),e(G,Oae),e(G,Bd),$(Zg,Bd,null),e(Bd,zae),e(Bd,Uk),e(Uk,Sae),e(G,Vae),e(G,Hd),$(Xg,Hd,null),e(Hd,Uae),e(Hd,Mk),e(Mk,Mae),e(G,Rae),e(G,Gd),$(eu,Gd,null),e(Gd,Bae),e(Gd,Rk),e(Rk,Hae),e(G,Gae),e(G,Kd),$(tu,Kd,null),e(Kd,Kae),e(Kd,Bk),e(Bk,Wae),D(i,z3,j),D(i,Kr,j),e(Kr,Wd),e(Wd,Hk),$(au,Hk,null),e(Kr,Yae),e(Kr,Gk),e(Gk,Jae),D(i,S3,j),D(i,fe,j),$(su,fe,null),e(fe,Qae),e(fe,Kk),e(Kk,Zae),e(fe,Xae),e(fe,I1),e(I1,Wk),e(Wk,ese),e(I1,tse),e(fe,ase),e(fe,Yk),e(Yk,sse),e(fe,nse),e(fe,pn),$(nu,pn,null),e(pn,rse),e(pn,ru),e(ru,ose),e(ru,Jk),e(Jk,lse),e(ru,ise),e(pn,dse),$(Yd,pn,null),e(fe,cse),e(fe,mn),$(ou,mn,null),e(mn,pse),e(mn,ya),e(ya,mse),e(ya,Qk),e(Qk,hse),e(ya,fse),e(ya,Zk),e(Zk,gse),e(ya,use),e(ya,Xk),e(Xk,_se),e(ya,bse),e(mn,$se),$(Jd,mn,null),D(i,V3,j),D(i,Wr,j),e(Wr,Qd),e(Qd,e4),$(lu,e4,null),e(Wr,xse),e(Wr,t4),e(t4,vse),D(i,U3,j),D(i,hn,j),e(hn,yse),e(hn,a4),e(a4,jse),e(hn,wse),e(hn,T1),e(T1,Dse),e(hn,kse),D(i,M3,j),D(i,re,j),$(iu,re,null),e(re,Ese),e(re,s4),e(s4,qse),e(re,Ise),$(Zd,re,null),e(re,Tse),e(re,fn),$(du,fn,null),e(fn,Nse),e(fn,n4),e(n4,Pse),e(fn,Ase),$(Xd,fn,null),e(re,Lse),e(re,gn),$(cu,gn,null),e(gn,Fse),e(gn,r4),e(r4,Cse),e(gn,Ose),$(ec,gn,null),e(re,zse),e(re,zt),$(pu,zt,null),e(zt,Sse),e(zt,o4),e(o4,Vse),e(zt,Use),e(zt,l4),e(l4,Mse),e(zt,Rse),$(tc,zt,null),e(re,Bse),e(re,ac),$(mu,ac,null),e(ac,Hse),e(ac,i4),e(i4,Gse),D(i,R3,j),D(i,Yr,j),e(Yr,sc),e(sc,d4),$(hu,d4,null),e(Yr,Kse),e(Yr,c4),e(c4,Wse),D(i,B3,j),D(i,V,j),$(fu,V,null),e(V,Yse),e(V,nc),e(nc,p4),e(p4,Jse),e(nc,Qse),e(nc,gu),e(gu,m4),e(m4,Zse),e(nc,Xse),e(V,ene),e(V,ja),e(ja,tne),e(ja,h4),e(h4,ane),e(ja,sne),e(ja,f4),e(f4,nne),e(ja,rne),e(ja,g4),e(g4,one),e(ja,lne),e(V,ine),e(V,u4),e(u4,dne),e(V,cne),e(V,_4),e(_4,pne),e(V,mne),$(rc,V,null),e(V,hne),e(V,Jr),e(Jr,fne),e(Jr,b4),e(b4,gne),e(Jr,une),e(Jr,$4),e($4,_ne),e(Jr,bne),e(V,$ne),$(oc,V,null),e(V,xne),e(V,wa),e(wa,vne),e(wa,x4),e(x4,yne),e(wa,jne),e(wa,v4),e(v4,wne),e(wa,Dne),e(wa,y4),e(y4,kne),e(wa,Ene),e(V,qne),$(lc,V,null),e(V,Ine),e(V,Qr),e(Qr,Tne),e(Qr,j4),e(j4,Nne),e(Qr,Pne),e(Qr,N1),e(N1,Ane),e(Qr,Lne),e(V,Fne),$(ic,V,null),e(V,Cne),e(V,Zr),e(Zr,One),e(Zr,w4),e(w4,zne),e(Zr,Sne),e(Zr,P1),e(P1,Vne),e(Zr,Une),e(V,Mne),$(dc,V,null),D(i,H3,j),D(i,Xr,j),$(uu,Xr,null),e(Xr,Rne),e(Xr,eo),e(eo,Bne),e(eo,D4),e(D4,Hne),e(eo,Gne),e(eo,k4),e(k4,Kne),e(eo,Wne),D(i,G3,j),D(i,to,j),$(_u,to,null),e(to,Yne),e(to,E4),e(E4,Jne),D(i,K3,j),D(i,ao,j),e(ao,cc),e(cc,q4),$(bu,q4,null),e(ao,Qne),e(ao,I4),e(I4,Zne),D(i,W3,j),D(i,so,j),$($u,so,null),e(so,Xne),e(so,T4),e(T4,ere),Y3=!0},p(i,[j]){const xu={};j&2&&(xu.$$scope={dirty:j,ctx:i}),Io.$set(xu);const N4={};j&2&&(N4.$$scope={dirty:j,ctx:i}),To.$set(N4);const P4={};j&2&&(P4.$$scope={dirty:j,ctx:i}),Ao.$set(P4);const A4={};j&2&&(A4.$$scope={dirty:j,ctx:i}),Lo.$set(A4);const vu={};j&2&&(vu.$$scope={dirty:j,ctx:i}),Oo.$set(vu);const L4={};j&2&&(L4.$$scope={dirty:j,ctx:i}),So.$set(L4);const F4={};j&2&&(F4.$$scope={dirty:j,ctx:i}),Vo.$set(F4);const C4={};j&2&&(C4.$$scope={dirty:j,ctx:i}),Uo.$set(C4);const Ie={};j&2&&(Ie.$$scope={dirty:j,ctx:i}),Mo.$set(Ie);const O4={};j&2&&(O4.$$scope={dirty:j,ctx:i}),Ro.$set(O4);const A1={};j&2&&(A1.$$scope={dirty:j,ctx:i}),Ho.$set(A1);const z4={};j&2&&(z4.$$scope={dirty:j,ctx:i}),Go.$set(z4);const S4={};j&2&&(S4.$$scope={dirty:j,ctx:i}),Ko.$set(S4);const mt={};j&2&&(mt.$$scope={dirty:j,ctx:i}),Wo.$set(mt);const no={};j&2&&(no.$$scope={dirty:j,ctx:i}),Yo.$set(no);const V4={};j&2&&(V4.$$scope={dirty:j,ctx:i}),Jo.$set(V4);const U4={};j&2&&(U4.$$scope={dirty:j,ctx:i}),Qo.$set(U4);const yu={};j&2&&(yu.$$scope={dirty:j,ctx:i}),Zo.$set(yu);const M4={};j&2&&(M4.$$scope={dirty:j,ctx:i}),Xo.$set(M4);const R4={};j&2&&(R4.$$scope={dirty:j,ctx:i}),el.$set(R4);const ro={};j&2&&(ro.$$scope={dirty:j,ctx:i}),tl.$set(ro);const oo={};j&2&&(oo.$$scope={dirty:j,ctx:i}),al.$set(oo);const B4={};j&2&&(B4.$$scope={dirty:j,ctx:i}),sl.$set(B4);const H4={};j&2&&(H4.$$scope={dirty:j,ctx:i}),rl.$set(H4);const ju={};j&2&&(ju.$$scope={dirty:j,ctx:i}),ol.$set(ju);const G4={};j&2&&(G4.$$scope={dirty:j,ctx:i}),ll.$set(G4);const K4={};j&2&&(K4.$$scope={dirty:j,ctx:i}),il.$set(K4);const W4={};j&2&&(W4.$$scope={dirty:j,ctx:i}),dl.$set(W4);const wu={};j&2&&(wu.$$scope={dirty:j,ctx:i}),cl.$set(wu);const Y4={};j&2&&(Y4.$$scope={dirty:j,ctx:i}),ml.$set(Y4);const I={};j&2&&(I.$$scope={dirty:j,ctx:i}),hl.$set(I);const J4={};j&2&&(J4.$$scope={dirty:j,ctx:i}),fl.$set(J4);const Da={};j&2&&(Da.$$scope={dirty:j,ctx:i}),gl.$set(Da);const Q4={};j&2&&(Q4.$$scope={dirty:j,ctx:i}),ul.$set(Q4);const Z4={};j&2&&(Z4.$$scope={dirty:j,ctx:i}),_l.$set(Z4);const ka={};j&2&&(ka.$$scope={dirty:j,ctx:i}),bl.$set(ka);const X4={};j&2&&(X4.$$scope={dirty:j,ctx:i}),$l.$set(X4);const eE={};j&2&&(eE.$$scope={dirty:j,ctx:i}),xl.$set(eE);const Du={};j&2&&(Du.$$scope={dirty:j,ctx:i}),vl.$set(Du);const tE={};j&2&&(tE.$$scope={dirty:j,ctx:i}),yl.$set(tE);const ku={};j&2&&(ku.$$scope={dirty:j,ctx:i}),jl.$set(ku);const aE={};j&2&&(aE.$$scope={dirty:j,ctx:i}),wl.$set(aE);const ht={};j&2&&(ht.$$scope={dirty:j,ctx:i}),Dl.$set(ht);const Ea={};j&2&&(Ea.$$scope={dirty:j,ctx:i}),El.$set(Ea);const sE={};j&2&&(sE.$$scope={dirty:j,ctx:i}),ql.$set(sE);const nE={};j&2&&(nE.$$scope={dirty:j,ctx:i}),Il.$set(nE);const rE={};j&2&&(rE.$$scope={dirty:j,ctx:i}),Tl.$set(rE);const lo={};j&2&&(lo.$$scope={dirty:j,ctx:i}),Nl.$set(lo);const oE={};j&2&&(oE.$$scope={dirty:j,ctx:i}),Pl.$set(oE);const lE={};j&2&&(lE.$$scope={dirty:j,ctx:i}),Al.$set(lE);const qa={};j&2&&(qa.$$scope={dirty:j,ctx:i}),Fl.$set(qa);const iE={};j&2&&(iE.$$scope={dirty:j,ctx:i}),Gl.$set(iE);const dE={};j&2&&(dE.$$scope={dirty:j,ctx:i}),Kl.$set(dE);const cE={};j&2&&(cE.$$scope={dirty:j,ctx:i}),Wl.$set(cE);const Eu={};j&2&&(Eu.$$scope={dirty:j,ctx:i}),Yl.$set(Eu);const Ia={};j&2&&(Ia.$$scope={dirty:j,ctx:i}),Jl.$set(Ia);const pE={};j&2&&(pE.$$scope={dirty:j,ctx:i}),Ql.$set(pE);const mE={};j&2&&(mE.$$scope={dirty:j,ctx:i}),Zl.$set(mE);const hE={};j&2&&(hE.$$scope={dirty:j,ctx:i}),Xl.$set(hE);const Ta={};j&2&&(Ta.$$scope={dirty:j,ctx:i}),ei.$set(Ta);const fE={};j&2&&(fE.$$scope={dirty:j,ctx:i}),si.$set(fE);const io={};j&2&&(io.$$scope={dirty:j,ctx:i}),ni.$set(io);const gE={};j&2&&(gE.$$scope={dirty:j,ctx:i}),ri.$set(gE);const co={};j&2&&(co.$$scope={dirty:j,ctx:i}),li.$set(co);const uE={};j&2&&(uE.$$scope={dirty:j,ctx:i}),ii.$set(uE);const po={};j&2&&(po.$$scope={dirty:j,ctx:i}),di.$set(po);const _E={};j&2&&(_E.$$scope={dirty:j,ctx:i}),ci.$set(_E);const mo={};j&2&&(mo.$$scope={dirty:j,ctx:i}),pi.$set(mo);const qu={};j&2&&(qu.$$scope={dirty:j,ctx:i}),mi.$set(qu);const Iu={};j&2&&(Iu.$$scope={dirty:j,ctx:i}),hi.$set(Iu);const bE={};j&2&&(bE.$$scope={dirty:j,ctx:i}),fi.$set(bE);const ho={};j&2&&(ho.$$scope={dirty:j,ctx:i}),gi.$set(ho);const $E={};j&2&&($E.$$scope={dirty:j,ctx:i}),ui.$set($E);const fo={};j&2&&(fo.$$scope={dirty:j,ctx:i}),_i.$set(fo);const xE={};j&2&&(xE.$$scope={dirty:j,ctx:i}),$i.$set(xE);const Na={};j&2&&(Na.$$scope={dirty:j,ctx:i}),xi.$set(Na);const vE={};j&2&&(vE.$$scope={dirty:j,ctx:i}),vi.$set(vE);const yE={};j&2&&(yE.$$scope={dirty:j,ctx:i}),yi.$set(yE);const go={};j&2&&(go.$$scope={dirty:j,ctx:i}),ji.$set(go);const jE={};j&2&&(jE.$$scope={dirty:j,ctx:i}),wi.$set(jE);const uo={};j&2&&(uo.$$scope={dirty:j,ctx:i}),Di.$set(uo);const wE={};j&2&&(wE.$$scope={dirty:j,ctx:i}),ki.$set(wE);const _o={};j&2&&(_o.$$scope={dirty:j,ctx:i}),Ei.$set(_o);const DE={};j&2&&(DE.$$scope={dirty:j,ctx:i}),qi.$set(DE);const Pa={};j&2&&(Pa.$$scope={dirty:j,ctx:i}),Ii.$set(Pa);const kE={};j&2&&(kE.$$scope={dirty:j,ctx:i}),Ti.$set(kE);const bo={};j&2&&(bo.$$scope={dirty:j,ctx:i}),Ni.$set(bo);const EE={};j&2&&(EE.$$scope={dirty:j,ctx:i}),Pi.$set(EE);const qE={};j&2&&(qE.$$scope={dirty:j,ctx:i}),Ai.$set(qE);const $o={};j&2&&($o.$$scope={dirty:j,ctx:i}),Li.$set($o);const IE={};j&2&&(IE.$$scope={dirty:j,ctx:i}),Fi.$set(IE);const xo={};j&2&&(xo.$$scope={dirty:j,ctx:i}),zi.$set(xo);const TE={};j&2&&(TE.$$scope={dirty:j,ctx:i}),Si.$set(TE);const vo={};j&2&&(vo.$$scope={dirty:j,ctx:i}),Vi.$set(vo);const NE={};j&2&&(NE.$$scope={dirty:j,ctx:i}),Ui.$set(NE);const yo={};j&2&&(yo.$$scope={dirty:j,ctx:i}),Mi.$set(yo);const Tu={};j&2&&(Tu.$$scope={dirty:j,ctx:i}),Ri.$set(Tu);const PE={};j&2&&(PE.$$scope={dirty:j,ctx:i}),Hi.$set(PE);const jo={};j&2&&(jo.$$scope={dirty:j,ctx:i}),Gi.$set(jo);const AE={};j&2&&(AE.$$scope={dirty:j,ctx:i}),Ki.$set(AE);const wo={};j&2&&(wo.$$scope={dirty:j,ctx:i}),Wi.$set(wo);const LE={};j&2&&(LE.$$scope={dirty:j,ctx:i}),Yi.$set(LE);const Nu={};j&2&&(Nu.$$scope={dirty:j,ctx:i}),Ji.$set(Nu);const FE={};j&2&&(FE.$$scope={dirty:j,ctx:i}),td.$set(FE);const Do={};j&2&&(Do.$$scope={dirty:j,ctx:i}),ad.$set(Do);const Pu={};j&2&&(Pu.$$scope={dirty:j,ctx:i}),sd.$set(Pu);const CE={};j&2&&(CE.$$scope={dirty:j,ctx:i}),nd.$set(CE);const Au={};j&2&&(Au.$$scope={dirty:j,ctx:i}),rd.$set(Au);const OE={};j&2&&(OE.$$scope={dirty:j,ctx:i}),od.$set(OE);const Lu={};j&2&&(Lu.$$scope={dirty:j,ctx:i}),ld.$set(Lu);const ko={};j&2&&(ko.$$scope={dirty:j,ctx:i}),id.$set(ko);const zE={};j&2&&(zE.$$scope={dirty:j,ctx:i}),dd.$set(zE);const SE={};j&2&&(SE.$$scope={dirty:j,ctx:i}),cd.$set(SE);const ft={};j&2&&(ft.$$scope={dirty:j,ctx:i}),md.$set(ft);const gt={};j&2&&(gt.$$scope={dirty:j,ctx:i}),fd.$set(gt);const VE={};j&2&&(VE.$$scope={dirty:j,ctx:i}),vd.$set(VE);const UE={};j&2&&(UE.$$scope={dirty:j,ctx:i}),jd.$set(UE);const ME={};j&2&&(ME.$$scope={dirty:j,ctx:i}),wd.$set(ME);const RE={};j&2&&(RE.$$scope={dirty:j,ctx:i}),Dd.$set(RE);const Aa={};j&2&&(Aa.$$scope={dirty:j,ctx:i}),kd.$set(Aa);const BE={};j&2&&(BE.$$scope={dirty:j,ctx:i}),Ed.$set(BE);const HE={};j&2&&(HE.$$scope={dirty:j,ctx:i}),qd.$set(HE);const GE={};j&2&&(GE.$$scope={dirty:j,ctx:i}),Id.$set(GE);const Eo={};j&2&&(Eo.$$scope={dirty:j,ctx:i}),Td.$set(Eo);const ut={};j&2&&(ut.$$scope={dirty:j,ctx:i}),Pd.$set(ut);const KE={};j&2&&(KE.$$scope={dirty:j,ctx:i}),Ld.$set(KE);const WE={};j&2&&(WE.$$scope={dirty:j,ctx:i}),Fd.$set(WE);const YE={};j&2&&(YE.$$scope={dirty:j,ctx:i}),Cd.$set(YE);const JE={};j&2&&(JE.$$scope={dirty:j,ctx:i}),Od.$set(JE);const La={};j&2&&(La.$$scope={dirty:j,ctx:i}),zd.$set(La);const Fu={};j&2&&(Fu.$$scope={dirty:j,ctx:i}),Rd.$set(Fu);const QE={};j&2&&(QE.$$scope={dirty:j,ctx:i}),Yd.$set(QE);const L1={};j&2&&(L1.$$scope={dirty:j,ctx:i}),Jd.$set(L1);const ZE={};j&2&&(ZE.$$scope={dirty:j,ctx:i}),Zd.$set(ZE);const _t={};j&2&&(_t.$$scope={dirty:j,ctx:i}),Xd.$set(_t);const Fa={};j&2&&(Fa.$$scope={dirty:j,ctx:i}),ec.$set(Fa);const XE={};j&2&&(XE.$$scope={dirty:j,ctx:i}),tc.$set(XE);const e3={};j&2&&(e3.$$scope={dirty:j,ctx:i}),rc.$set(e3);const t3={};j&2&&(t3.$$scope={dirty:j,ctx:i}),oc.$set(t3);const Cu={};j&2&&(Cu.$$scope={dirty:j,ctx:i}),lc.$set(Cu);const a3={};j&2&&(a3.$$scope={dirty:j,ctx:i}),ic.$set(a3);const Ca={};j&2&&(Ca.$$scope={dirty:j,ctx:i}),dc.$set(Ca)},i(i){Y3||(x(t.$$.fragment,i),x(za.$$.fragment,i),x(Jc.$$.fragment,i),x(Qc.$$.fragment,i),x(Io.$$.fragment,i),x(Xc.$$.fragment,i),x(To.$$.fragment,i),x(ep.$$.fragment,i),x(tp.$$.fragment,i),x(ap.$$.fragment,i),x(Ao.$$.fragment,i),x(sp.$$.fragment,i),x(Lo.$$.fragment,i),x(np.$$.fragment,i),x(rp.$$.fragment,i),x(op.$$.fragment,i),x(Oo.$$.fragment,i),x(lp.$$.fragment,i),x(ip.$$.fragment,i),x(So.$$.fragment,i),x(Vo.$$.fragment,i),x(dp.$$.fragment,i),x(Uo.$$.fragment,i),x(cp.$$.fragment,i),x(Mo.$$.fragment,i),x(pp.$$.fragment,i),x(Ro.$$.fragment,i),x(mp.$$.fragment,i),x(Ho.$$.fragment,i),x(fp.$$.fragment,i),x(Go.$$.fragment,i),x(gp.$$.fragment,i),x(Ko.$$.fragment,i),x(up.$$.fragment,i),x(Wo.$$.fragment,i),x(_p.$$.fragment,i),x(Yo.$$.fragment,i),x(bp.$$.fragment,i),x(Jo.$$.fragment,i),x($p.$$.fragment,i),x(Qo.$$.fragment,i),x(xp.$$.fragment,i),x(Zo.$$.fragment,i),x(vp.$$.fragment,i),x(Xo.$$.fragment,i),x(yp.$$.fragment,i),x(el.$$.fragment,i),x(jp.$$.fragment,i),x(tl.$$.fragment,i),x(wp.$$.fragment,i),x(al.$$.fragment,i),x(kp.$$.fragment,i),x(sl.$$.fragment,i),x(Ep.$$.fragment,i),x(Ip.$$.fragment,i),x(Pp.$$.fragment,i),x(Ap.$$.fragment,i),x(rl.$$.fragment,i),x(ol.$$.fragment,i),x(Lp.$$.fragment,i),x(ll.$$.fragment,i),x(Fp.$$.fragment,i),x(il.$$.fragment,i),x(Op.$$.fragment,i),x(dl.$$.fragment,i),x(Sp.$$.fragment,i),x(cl.$$.fragment,i),x(Vp.$$.fragment,i),x(Up.$$.fragment,i),x(ml.$$.fragment,i),x(Mp.$$.fragment,i),x(hl.$$.fragment,i),x(Bp.$$.fragment,i),x(fl.$$.fragment,i),x(Hp.$$.fragment,i),x(gl.$$.fragment,i),x(Gp.$$.fragment,i),x(ul.$$.fragment,i),x(Kp.$$.fragment,i),x(_l.$$.fragment,i),x(bl.$$.fragment,i),x($l.$$.fragment,i),x(Wp.$$.fragment,i),x(xl.$$.fragment,i),x(Jp.$$.fragment,i),x(vl.$$.fragment,i),x(Zp.$$.fragment,i),x(yl.$$.fragment,i),x(Xp.$$.fragment,i),x(jl.$$.fragment,i),x(em.$$.fragment,i),x(wl.$$.fragment,i),x(tm.$$.fragment,i),x(Dl.$$.fragment,i),x(am.$$.fragment,i),x(sm.$$.fragment,i),x(El.$$.fragment,i),x(nm.$$.fragment,i),x(ql.$$.fragment,i),x(om.$$.fragment,i),x(Il.$$.fragment,i),x(lm.$$.fragment,i),x(Tl.$$.fragment,i),x(im.$$.fragment,i),x(Nl.$$.fragment,i),x(dm.$$.fragment,i),x(Pl.$$.fragment,i),x(cm.$$.fragment,i),x(Al.$$.fragment,i),x(mm.$$.fragment,i),x(fm.$$.fragment,i),x(gm.$$.fragment,i),x(_m.$$.fragment,i),x(Fl.$$.fragment,i),x(bm.$$.fragment,i),x($m.$$.fragment,i),x(vm.$$.fragment,i),x(jm.$$.fragment,i),x(wm.$$.fragment,i),x(Dm.$$.fragment,i),x(km.$$.fragment,i),x(Em.$$.fragment,i),x(qm.$$.fragment,i),x(Im.$$.fragment,i),x(Tm.$$.fragment,i),x(Nm.$$.fragment,i),x(Pm.$$.fragment,i),x(Am.$$.fragment,i),x(Lm.$$.fragment,i),x(Fm.$$.fragment,i),x(Cm.$$.fragment,i),x(Om.$$.fragment,i),x(zm.$$.fragment,i),x(Sm.$$.fragment,i),x(Vm.$$.fragment,i),x(Um.$$.fragment,i),x(Mm.$$.fragment,i),x(Rm.$$.fragment,i),x(Gl.$$.fragment,i),x(Bm.$$.fragment,i),x(Kl.$$.fragment,i),x(Hm.$$.fragment,i),x(Wl.$$.fragment,i),x(Gm.$$.fragment,i),x(Yl.$$.fragment,i),x(Km.$$.fragment,i),x(Jl.$$.fragment,i),x(Ql.$$.fragment,i),x(Wm.$$.fragment,i),x(Ym.$$.fragment,i),x(Zl.$$.fragment,i),x(Qm.$$.fragment,i),x(Xl.$$.fragment,i),x(Zm.$$.fragment,i),x(ei.$$.fragment,i),x(eh.$$.fragment,i),x(th.$$.fragment,i),x(sh.$$.fragment,i),x(rh.$$.fragment,i),x(lh.$$.fragment,i),x(ih.$$.fragment,i),x(dh.$$.fragment,i),x(si.$$.fragment,i),x(ch.$$.fragment,i),x(ni.$$.fragment,i),x(ph.$$.fragment,i),x(ri.$$.fragment,i),x(mh.$$.fragment,i),x(li.$$.fragment,i),x(fh.$$.fragment,i),x(ii.$$.fragment,i),x(gh.$$.fragment,i),x(di.$$.fragment,i),x(uh.$$.fragment,i),x(ci.$$.fragment,i),x(_h.$$.fragment,i),x(pi.$$.fragment,i),x(bh.$$.fragment,i),x(mi.$$.fragment,i),x($h.$$.fragment,i),x(hi.$$.fragment,i),x(xh.$$.fragment,i),x(fi.$$.fragment,i),x(vh.$$.fragment,i),x(gi.$$.fragment,i),x(yh.$$.fragment,i),x(ui.$$.fragment,i),x(wh.$$.fragment,i),x(_i.$$.fragment,i),x(kh.$$.fragment,i),x(Eh.$$.fragment,i),x($i.$$.fragment,i),x(Ih.$$.fragment,i),x(xi.$$.fragment,i),x(Th.$$.fragment,i),x(vi.$$.fragment,i),x(Nh.$$.fragment,i),x(yi.$$.fragment,i),x(Ph.$$.fragment,i),x(ji.$$.fragment,i),x(Ah.$$.fragment,i),x(wi.$$.fragment,i),x(Lh.$$.fragment,i),x(Di.$$.fragment,i),x(Ch.$$.fragment,i),x(ki.$$.fragment,i),x(Oh.$$.fragment,i),x(Ei.$$.fragment,i),x(zh.$$.fragment,i),x(qi.$$.fragment,i),x(Vh.$$.fragment,i),x(Ii.$$.fragment,i),x(Uh.$$.fragment,i),x(Ti.$$.fragment,i),x(Mh.$$.fragment,i),x(Ni.$$.fragment,i),x(Rh.$$.fragment,i),x(Pi.$$.fragment,i),x(Hh.$$.fragment,i),x(Ai.$$.fragment,i),x(Kh.$$.fragment,i),x(Li.$$.fragment,i),x(Yh.$$.fragment,i),x(Fi.$$.fragment,i),x(Qh.$$.fragment,i),x(Zh.$$.fragment,i),x(Xh.$$.fragment,i),x(ef.$$.fragment,i),x(zi.$$.fragment,i),x(Si.$$.fragment,i),x(tf.$$.fragment,i),x(Vi.$$.fragment,i),x(af.$$.fragment,i),x(Ui.$$.fragment,i),x(sf.$$.fragment,i),x(Mi.$$.fragment,i),x(nf.$$.fragment,i),x(Ri.$$.fragment,i),x(rf.$$.fragment,i),x(of.$$.fragment,i),x(df.$$.fragment,i),x(Hi.$$.fragment,i),x(pf.$$.fragment,i),x(Gi.$$.fragment,i),x(mf.$$.fragment,i),x(Ki.$$.fragment,i),x(hf.$$.fragment,i),x(Wi.$$.fragment,i),x(gf.$$.fragment,i),x(Yi.$$.fragment,i),x(uf.$$.fragment,i),x(Ji.$$.fragment,i),x(_f.$$.fragment,i),x(bf.$$.fragment,i),x($f.$$.fragment,i),x(xf.$$.fragment,i),x(vf.$$.fragment,i),x(yf.$$.fragment,i),x(jf.$$.fragment,i),x(wf.$$.fragment,i),x(Df.$$.fragment,i),x(kf.$$.fragment,i),x(Ef.$$.fragment,i),x(qf.$$.fragment,i),x(If.$$.fragment,i),x(Tf.$$.fragment,i),x(Nf.$$.fragment,i),x(Pf.$$.fragment,i),x(Af.$$.fragment,i),x(Lf.$$.fragment,i),x(td.$$.fragment,i),x(Cf.$$.fragment,i),x(ad.$$.fragment,i),x(Of.$$.fragment,i),x(sd.$$.fragment,i),x(zf.$$.fragment,i),x(nd.$$.fragment,i),x(Sf.$$.fragment,i),x(rd.$$.fragment,i),x(Vf.$$.fragment,i),x(od.$$.fragment,i),x(Uf.$$.fragment,i),x(ld.$$.fragment,i),x(Mf.$$.fragment,i),x(id.$$.fragment,i),x(Rf.$$.fragment,i),x(dd.$$.fragment,i),x(Bf.$$.fragment,i),x(cd.$$.fragment,i),x(Hf.$$.fragment,i),x(Gf.$$.fragment,i),x(md.$$.fragment,i),x(Zf.$$.fragment,i),x(fd.$$.fragment,i),x(eg.$$.fragment,i),x(tg.$$.fragment,i),x(ag.$$.fragment,i),x(sg.$$.fragment,i),x(ng.$$.fragment,i),x(rg.$$.fragment,i),x(og.$$.fragment,i),x(vd.$$.fragment,i),x(dg.$$.fragment,i),x(pg.$$.fragment,i),x(jd.$$.fragment,i),x(hg.$$.fragment,i),x(wd.$$.fragment,i),x(gg.$$.fragment,i),x(Dd.$$.fragment,i),x(ug.$$.fragment,i),x(kd.$$.fragment,i),x(bg.$$.fragment,i),x(xg.$$.fragment,i),x(Ed.$$.fragment,i),x(yg.$$.fragment,i),x(qd.$$.fragment,i),x(jg.$$.fragment,i),x(Id.$$.fragment,i),x(Dg.$$.fragment,i),x(Td.$$.fragment,i),x(kg.$$.fragment,i),x(Eg.$$.fragment,i),x(Pd.$$.fragment,i),x(qg.$$.fragment,i),x(Ig.$$.fragment,i),x(Ld.$$.fragment,i),x(Tg.$$.fragment,i),x(Fd.$$.fragment,i),x(Ng.$$.fragment,i),x(Cd.$$.fragment,i),x(Pg.$$.fragment,i),x(Od.$$.fragment,i),x(Ag.$$.fragment,i),x(zd.$$.fragment,i),x(Sg.$$.fragment,i),x(Vg.$$.fragment,i),x(Ug.$$.fragment,i),x(Mg.$$.fragment,i),x(Rg.$$.fragment,i),x(Bg.$$.fragment,i),x(Rd.$$.fragment,i),x(Qg.$$.fragment,i),x(Zg.$$.fragment,i),x(Xg.$$.fragment,i),x(eu.$$.fragment,i),x(tu.$$.fragment,i),x(au.$$.fragment,i),x(su.$$.fragment,i),x(nu.$$.fragment,i),x(Yd.$$.fragment,i),x(ou.$$.fragment,i),x(Jd.$$.fragment,i),x(lu.$$.fragment,i),x(iu.$$.fragment,i),x(Zd.$$.fragment,i),x(du.$$.fragment,i),x(Xd.$$.fragment,i),x(cu.$$.fragment,i),x(ec.$$.fragment,i),x(pu.$$.fragment,i),x(tc.$$.fragment,i),x(mu.$$.fragment,i),x(hu.$$.fragment,i),x(fu.$$.fragment,i),x(rc.$$.fragment,i),x(oc.$$.fragment,i),x(lc.$$.fragment,i),x(ic.$$.fragment,i),x(dc.$$.fragment,i),x(uu.$$.fragment,i),x(_u.$$.fragment,i),x(bu.$$.fragment,i),x($u.$$.fragment,i),Y3=!0)},o(i){v(t.$$.fragment,i),v(za.$$.fragment,i),v(Jc.$$.fragment,i),v(Qc.$$.fragment,i),v(Io.$$.fragment,i),v(Xc.$$.fragment,i),v(To.$$.fragment,i),v(ep.$$.fragment,i),v(tp.$$.fragment,i),v(ap.$$.fragment,i),v(Ao.$$.fragment,i),v(sp.$$.fragment,i),v(Lo.$$.fragment,i),v(np.$$.fragment,i),v(rp.$$.fragment,i),v(op.$$.fragment,i),v(Oo.$$.fragment,i),v(lp.$$.fragment,i),v(ip.$$.fragment,i),v(So.$$.fragment,i),v(Vo.$$.fragment,i),v(dp.$$.fragment,i),v(Uo.$$.fragment,i),v(cp.$$.fragment,i),v(Mo.$$.fragment,i),v(pp.$$.fragment,i),v(Ro.$$.fragment,i),v(mp.$$.fragment,i),v(Ho.$$.fragment,i),v(fp.$$.fragment,i),v(Go.$$.fragment,i),v(gp.$$.fragment,i),v(Ko.$$.fragment,i),v(up.$$.fragment,i),v(Wo.$$.fragment,i),v(_p.$$.fragment,i),v(Yo.$$.fragment,i),v(bp.$$.fragment,i),v(Jo.$$.fragment,i),v($p.$$.fragment,i),v(Qo.$$.fragment,i),v(xp.$$.fragment,i),v(Zo.$$.fragment,i),v(vp.$$.fragment,i),v(Xo.$$.fragment,i),v(yp.$$.fragment,i),v(el.$$.fragment,i),v(jp.$$.fragment,i),v(tl.$$.fragment,i),v(wp.$$.fragment,i),v(al.$$.fragment,i),v(kp.$$.fragment,i),v(sl.$$.fragment,i),v(Ep.$$.fragment,i),v(Ip.$$.fragment,i),v(Pp.$$.fragment,i),v(Ap.$$.fragment,i),v(rl.$$.fragment,i),v(ol.$$.fragment,i),v(Lp.$$.fragment,i),v(ll.$$.fragment,i),v(Fp.$$.fragment,i),v(il.$$.fragment,i),v(Op.$$.fragment,i),v(dl.$$.fragment,i),v(Sp.$$.fragment,i),v(cl.$$.fragment,i),v(Vp.$$.fragment,i),v(Up.$$.fragment,i),v(ml.$$.fragment,i),v(Mp.$$.fragment,i),v(hl.$$.fragment,i),v(Bp.$$.fragment,i),v(fl.$$.fragment,i),v(Hp.$$.fragment,i),v(gl.$$.fragment,i),v(Gp.$$.fragment,i),v(ul.$$.fragment,i),v(Kp.$$.fragment,i),v(_l.$$.fragment,i),v(bl.$$.fragment,i),v($l.$$.fragment,i),v(Wp.$$.fragment,i),v(xl.$$.fragment,i),v(Jp.$$.fragment,i),v(vl.$$.fragment,i),v(Zp.$$.fragment,i),v(yl.$$.fragment,i),v(Xp.$$.fragment,i),v(jl.$$.fragment,i),v(em.$$.fragment,i),v(wl.$$.fragment,i),v(tm.$$.fragment,i),v(Dl.$$.fragment,i),v(am.$$.fragment,i),v(sm.$$.fragment,i),v(El.$$.fragment,i),v(nm.$$.fragment,i),v(ql.$$.fragment,i),v(om.$$.fragment,i),v(Il.$$.fragment,i),v(lm.$$.fragment,i),v(Tl.$$.fragment,i),v(im.$$.fragment,i),v(Nl.$$.fragment,i),v(dm.$$.fragment,i),v(Pl.$$.fragment,i),v(cm.$$.fragment,i),v(Al.$$.fragment,i),v(mm.$$.fragment,i),v(fm.$$.fragment,i),v(gm.$$.fragment,i),v(_m.$$.fragment,i),v(Fl.$$.fragment,i),v(bm.$$.fragment,i),v($m.$$.fragment,i),v(vm.$$.fragment,i),v(jm.$$.fragment,i),v(wm.$$.fragment,i),v(Dm.$$.fragment,i),v(km.$$.fragment,i),v(Em.$$.fragment,i),v(qm.$$.fragment,i),v(Im.$$.fragment,i),v(Tm.$$.fragment,i),v(Nm.$$.fragment,i),v(Pm.$$.fragment,i),v(Am.$$.fragment,i),v(Lm.$$.fragment,i),v(Fm.$$.fragment,i),v(Cm.$$.fragment,i),v(Om.$$.fragment,i),v(zm.$$.fragment,i),v(Sm.$$.fragment,i),v(Vm.$$.fragment,i),v(Um.$$.fragment,i),v(Mm.$$.fragment,i),v(Rm.$$.fragment,i),v(Gl.$$.fragment,i),v(Bm.$$.fragment,i),v(Kl.$$.fragment,i),v(Hm.$$.fragment,i),v(Wl.$$.fragment,i),v(Gm.$$.fragment,i),v(Yl.$$.fragment,i),v(Km.$$.fragment,i),v(Jl.$$.fragment,i),v(Ql.$$.fragment,i),v(Wm.$$.fragment,i),v(Ym.$$.fragment,i),v(Zl.$$.fragment,i),v(Qm.$$.fragment,i),v(Xl.$$.fragment,i),v(Zm.$$.fragment,i),v(ei.$$.fragment,i),v(eh.$$.fragment,i),v(th.$$.fragment,i),v(sh.$$.fragment,i),v(rh.$$.fragment,i),v(lh.$$.fragment,i),v(ih.$$.fragment,i),v(dh.$$.fragment,i),v(si.$$.fragment,i),v(ch.$$.fragment,i),v(ni.$$.fragment,i),v(ph.$$.fragment,i),v(ri.$$.fragment,i),v(mh.$$.fragment,i),v(li.$$.fragment,i),v(fh.$$.fragment,i),v(ii.$$.fragment,i),v(gh.$$.fragment,i),v(di.$$.fragment,i),v(uh.$$.fragment,i),v(ci.$$.fragment,i),v(_h.$$.fragment,i),v(pi.$$.fragment,i),v(bh.$$.fragment,i),v(mi.$$.fragment,i),v($h.$$.fragment,i),v(hi.$$.fragment,i),v(xh.$$.fragment,i),v(fi.$$.fragment,i),v(vh.$$.fragment,i),v(gi.$$.fragment,i),v(yh.$$.fragment,i),v(ui.$$.fragment,i),v(wh.$$.fragment,i),v(_i.$$.fragment,i),v(kh.$$.fragment,i),v(Eh.$$.fragment,i),v($i.$$.fragment,i),v(Ih.$$.fragment,i),v(xi.$$.fragment,i),v(Th.$$.fragment,i),v(vi.$$.fragment,i),v(Nh.$$.fragment,i),v(yi.$$.fragment,i),v(Ph.$$.fragment,i),v(ji.$$.fragment,i),v(Ah.$$.fragment,i),v(wi.$$.fragment,i),v(Lh.$$.fragment,i),v(Di.$$.fragment,i),v(Ch.$$.fragment,i),v(ki.$$.fragment,i),v(Oh.$$.fragment,i),v(Ei.$$.fragment,i),v(zh.$$.fragment,i),v(qi.$$.fragment,i),v(Vh.$$.fragment,i),v(Ii.$$.fragment,i),v(Uh.$$.fragment,i),v(Ti.$$.fragment,i),v(Mh.$$.fragment,i),v(Ni.$$.fragment,i),v(Rh.$$.fragment,i),v(Pi.$$.fragment,i),v(Hh.$$.fragment,i),v(Ai.$$.fragment,i),v(Kh.$$.fragment,i),v(Li.$$.fragment,i),v(Yh.$$.fragment,i),v(Fi.$$.fragment,i),v(Qh.$$.fragment,i),v(Zh.$$.fragment,i),v(Xh.$$.fragment,i),v(ef.$$.fragment,i),v(zi.$$.fragment,i),v(Si.$$.fragment,i),v(tf.$$.fragment,i),v(Vi.$$.fragment,i),v(af.$$.fragment,i),v(Ui.$$.fragment,i),v(sf.$$.fragment,i),v(Mi.$$.fragment,i),v(nf.$$.fragment,i),v(Ri.$$.fragment,i),v(rf.$$.fragment,i),v(of.$$.fragment,i),v(df.$$.fragment,i),v(Hi.$$.fragment,i),v(pf.$$.fragment,i),v(Gi.$$.fragment,i),v(mf.$$.fragment,i),v(Ki.$$.fragment,i),v(hf.$$.fragment,i),v(Wi.$$.fragment,i),v(gf.$$.fragment,i),v(Yi.$$.fragment,i),v(uf.$$.fragment,i),v(Ji.$$.fragment,i),v(_f.$$.fragment,i),v(bf.$$.fragment,i),v($f.$$.fragment,i),v(xf.$$.fragment,i),v(vf.$$.fragment,i),v(yf.$$.fragment,i),v(jf.$$.fragment,i),v(wf.$$.fragment,i),v(Df.$$.fragment,i),v(kf.$$.fragment,i),v(Ef.$$.fragment,i),v(qf.$$.fragment,i),v(If.$$.fragment,i),v(Tf.$$.fragment,i),v(Nf.$$.fragment,i),v(Pf.$$.fragment,i),v(Af.$$.fragment,i),v(Lf.$$.fragment,i),v(td.$$.fragment,i),v(Cf.$$.fragment,i),v(ad.$$.fragment,i),v(Of.$$.fragment,i),v(sd.$$.fragment,i),v(zf.$$.fragment,i),v(nd.$$.fragment,i),v(Sf.$$.fragment,i),v(rd.$$.fragment,i),v(Vf.$$.fragment,i),v(od.$$.fragment,i),v(Uf.$$.fragment,i),v(ld.$$.fragment,i),v(Mf.$$.fragment,i),v(id.$$.fragment,i),v(Rf.$$.fragment,i),v(dd.$$.fragment,i),v(Bf.$$.fragment,i),v(cd.$$.fragment,i),v(Hf.$$.fragment,i),v(Gf.$$.fragment,i),v(md.$$.fragment,i),v(Zf.$$.fragment,i),v(fd.$$.fragment,i),v(eg.$$.fragment,i),v(tg.$$.fragment,i),v(ag.$$.fragment,i),v(sg.$$.fragment,i),v(ng.$$.fragment,i),v(rg.$$.fragment,i),v(og.$$.fragment,i),v(vd.$$.fragment,i),v(dg.$$.fragment,i),v(pg.$$.fragment,i),v(jd.$$.fragment,i),v(hg.$$.fragment,i),v(wd.$$.fragment,i),v(gg.$$.fragment,i),v(Dd.$$.fragment,i),v(ug.$$.fragment,i),v(kd.$$.fragment,i),v(bg.$$.fragment,i),v(xg.$$.fragment,i),v(Ed.$$.fragment,i),v(yg.$$.fragment,i),v(qd.$$.fragment,i),v(jg.$$.fragment,i),v(Id.$$.fragment,i),v(Dg.$$.fragment,i),v(Td.$$.fragment,i),v(kg.$$.fragment,i),v(Eg.$$.fragment,i),v(Pd.$$.fragment,i),v(qg.$$.fragment,i),v(Ig.$$.fragment,i),v(Ld.$$.fragment,i),v(Tg.$$.fragment,i),v(Fd.$$.fragment,i),v(Ng.$$.fragment,i),v(Cd.$$.fragment,i),v(Pg.$$.fragment,i),v(Od.$$.fragment,i),v(Ag.$$.fragment,i),v(zd.$$.fragment,i),v(Sg.$$.fragment,i),v(Vg.$$.fragment,i),v(Ug.$$.fragment,i),v(Mg.$$.fragment,i),v(Rg.$$.fragment,i),v(Bg.$$.fragment,i),v(Rd.$$.fragment,i),v(Qg.$$.fragment,i),v(Zg.$$.fragment,i),v(Xg.$$.fragment,i),v(eu.$$.fragment,i),v(tu.$$.fragment,i),v(au.$$.fragment,i),v(su.$$.fragment,i),v(nu.$$.fragment,i),v(Yd.$$.fragment,i),v(ou.$$.fragment,i),v(Jd.$$.fragment,i),v(lu.$$.fragment,i),v(iu.$$.fragment,i),v(Zd.$$.fragment,i),v(du.$$.fragment,i),v(Xd.$$.fragment,i),v(cu.$$.fragment,i),v(ec.$$.fragment,i),v(pu.$$.fragment,i),v(tc.$$.fragment,i),v(mu.$$.fragment,i),v(hu.$$.fragment,i),v(fu.$$.fragment,i),v(rc.$$.fragment,i),v(oc.$$.fragment,i),v(lc.$$.fragment,i),v(ic.$$.fragment,i),v(dc.$$.fragment,i),v(uu.$$.fragment,i),v(_u.$$.fragment,i),v(bu.$$.fragment,i),v($u.$$.fragment,i),Y3=!1},d(i){a(c),i&&a(u),i&&a(f),y(t),i&&a(pe),i&&a(ge),y(za),i&&a(r3),i&&a(me),y(Jc),y(Qc),y(Io),y(Xc),y(To),i&&a(o3),i&&a(Hn),y(ep),i&&a(l3),i&&a(Po),i&&a(i3),i&&a(q),y(tp),y(ap),y(Ao),y(sp),y(Lo),y(np),y(rp),y(op),y(Oo),y(lp),y(ip),y(So),y(Vo),y(dp),y(Uo),y(cp),y(Mo),y(pp),y(Ro),y(mp),y(Ho),y(fp),y(Go),y(gp),y(Ko),y(up),y(Wo),y(_p),y(Yo),y(bp),y(Jo),y($p),y(Qo),y(xp),y(Zo),y(vp),y(Xo),y(yp),y(el),y(jp),y(tl),y(wp),y(al),y(kp),y(sl),y(Ep),y(Ip),y(Pp),y(Ap),y(rl),y(ol),y(Lp),y(ll),y(Fp),y(il),y(Op),y(dl),y(Sp),y(cl),y(Vp),y(Up),y(ml),y(Mp),y(hl),y(Bp),y(fl),y(Hp),y(gl),y(Gp),y(ul),y(Kp),y(_l),y(bl),y($l),y(Wp),y(xl),y(Jp),y(vl),y(Zp),y(yl),y(Xp),y(jl),y(em),y(wl),y(tm),y(Dl),y(am),y(sm),y(El),y(nm),y(ql),y(om),y(Il),y(lm),y(Tl),y(im),y(Nl),y(dm),y(Pl),y(cm),y(Al),y(mm),y(fm),y(gm),y(_m),y(Fl),y(bm),y($m),y(vm),y(jm),y(wm),y(Dm),y(km),y(Em),y(qm),y(Im),y(Tm),y(Nm),y(Pm),y(Am),y(Lm),y(Fm),y(Cm),y(Om),y(zm),y(Sm),y(Vm),y(Um),y(Mm),y(Rm),y(Gl),y(Bm),y(Kl),y(Hm),y(Wl),y(Gm),y(Yl),y(Km),y(Jl),y(Ql),y(Wm),y(Ym),y(Zl),i&&a(d3),i&&a(aa),y(Qm),y(Xl),i&&a(c3),i&&a(se),y(Zm),y(ei),i&&a(p3),i&&a(he),y(eh),i&&a(m3),i&&a(De),y(th),i&&a(h3),i&&a(ke),y(sh),i&&a(f3),i&&a(Ee),y(rh),i&&a(g3),i&&a(hr),y(lh),i&&a(u3),i&&a(ai),i&&a(_3),i&&a(A),y(ih),y(dh),y(si),y(ch),y(ni),y(ph),y(ri),y(mh),y(li),y(fh),y(ii),y(gh),y(di),y(uh),y(ci),y(_h),y(pi),y(bh),y(mi),y($h),y(hi),y(xh),y(fi),y(vh),y(gi),y(yh),y(ui),y(wh),y(_i),y(kh),y(Eh),y($i),y(Ih),y(xi),y(Th),y(vi),y(Nh),y(yi),y(Ph),y(ji),y(Ah),y(wi),y(Lh),y(Di),y(Ch),y(ki),y(Oh),y(Ei),y(zh),y(qi),y(Vh),y(Ii),y(Uh),y(Ti),y(Mh),y(Ni),y(Rh),y(Pi),y(Hh),y(Ai),y(Kh),y(Li),y(Yh),y(Fi),y(Qh),i&&a(b3),i&&a(vb),i&&a($3),i&&a(wr),y(Zh),i&&a(x3),i&&a(Oi),i&&a(v3),i&&a(F),y(Xh),y(ef),y(zi),y(Si),y(tf),y(Vi),y(af),y(Ui),y(sf),y(Mi),y(nf),y(Ri),y(rf),y(of),y(df),y(Hi),y(pf),y(Gi),y(mf),y(Ki),y(hf),y(Wi),y(gf),y(Yi),y(uf),y(Ji),y(_f),y(bf),y($f),y(xf),y(vf),y(yf),y(jf),y(wf),y(Df),y(kf),y(Ef),y(qf),y(If),y(Tf),y(Nf),i&&a(y3),i&&a(Pr),y(Pf),i&&a(j3),i&&a(ed),i&&a(w3),i&&a(R),y(Af),y(Lf),y(td),y(Cf),y(ad),y(Of),y(sd),y(zf),y(nd),y(Sf),y(rd),y(Vf),y(od),y(Uf),y(ld),y(Mf),y(id),y(Rf),y(dd),y(Bf),y(cd),i&&a(D3),i&&a(Cr),y(Hf),i&&a(k3),i&&a(S),y(Gf),y(md),y(Zf),y(fd),y(eg),y(tg),y(ag),y(sg),y(ng),y(rg),y(og),y(vd),y(dg),y(pg),y(jd),y(hg),y(wd),i&&a(E3),i&&a(ua),y(gg),y(Dd),i&&a(q3),i&&a(K),y(ug),y(kd),y(bg),y(xg),y(Ed),y(yg),y(qd),i&&a(I3),i&&a(it),y(jg),y(Id),i&&a(T3),i&&a(dt),y(Dg),y(Td),y(kg),i&&a(N3),i&&a(ct),y(Eg),y(Pd),y(qg),i&&a(P3),i&&a(_a),y(Ig),y(Ld),i&&a(A3),i&&a(ba),y(Tg),y(Fd),i&&a(L3),i&&a($a),y(Ng),y(Cd),i&&a(F3),i&&a(xa),y(Pg),y(Od),i&&a(C3),i&&a(H),y(Ag),y(zd),y(Sg),y(Vg),y(Ug),y(Mg),y(Rg),i&&a(O3),i&&a(G),y(Bg),y(Rd),y(Qg),y(Zg),y(Xg),y(eu),y(tu),i&&a(z3),i&&a(Kr),y(au),i&&a(S3),i&&a(fe),y(su),y(nu),y(Yd),y(ou),y(Jd),i&&a(V3),i&&a(Wr),y(lu),i&&a(U3),i&&a(hn),i&&a(M3),i&&a(re),y(iu),y(Zd),y(du),y(Xd),y(cu),y(ec),y(pu),y(tc),y(mu),i&&a(R3),i&&a(Yr),y(hu),i&&a(B3),i&&a(V),y(fu),y(rc),y(oc),y(lc),y(ic),y(dc),i&&a(H3),i&&a(Xr),y(uu),i&&a(G3),i&&a(to),y(_u),i&&a(K3),i&&a(ao),y(bu),i&&a(W3),i&&a(so),y($u)}}}const l1e={local:"main-classes",sections:[{local:"datasets.DatasetInfo",title:"DatasetInfo"},{local:"datasets.Dataset",title:"Dataset"},{local:"datasets.DatasetDict",title:"DatasetDict"},{local:"datasets.IterableDataset",title:"IterableDataset"},{local:"datasets.IterableDatasetDict",title:"IterableDatasetDict"},{local:"datasets.Features",title:"Features"},{local:"datasets.MetricInfo",title:"MetricInfo"},{local:"datasets.Metric",title:"Metric"},{local:"datasets.filesystems.S3FileSystem",title:"Filesystems"},{local:"datasets.fingerprint.Hasher",title:"Fingerprint"}],title:"Main classes"};function i1e(k){return wue(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class u1e extends xue{constructor(c){super();vue(this,c,i1e,o1e,yue,{})}}export{u1e as default,l1e as metadata};
