import{S as Bhe,i as Hhe,s as Ghe,e as s,k as m,w as _,t as o,M as Whe,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 Khe,L as N}from"../../chunks/vendor-hf-doc-builder.js";import{T as Rhe}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 Na}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as T}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{D as Yhe}from"../../chunks/Deprecated-hf-doc-builder.js";function Jhe(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 Qhe(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 Zhe(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 Xhe(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 efe(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 tfe(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 afe(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 sfe(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 nfe(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 rfe(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 ofe(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 lfe(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 ife(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 dfe(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 cfe(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 pfe(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 mfe(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 hfe(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')`,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>
})`}}),{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 ffe(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 gfe(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 ufe(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 _fe(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 bfe(k){let c,u,f,d,g,t,p,de;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(R){c=n(R,"P",{});var ce=r(c);u=l(ce,"gets updated. In this case, if you apply "),f=n(ce,"CODE",{});var he=r(f);d=l(he,"map"),he.forEach(a),g=l(ce," on a dataset to add a new column, then this column will be formatted as:"),ce.forEach(a),t=h(R),b(p.$$.fragment,R)},m(R,ce){D(R,c,ce),e(c,u),e(c,f),e(f,d),e(c,g),D(R,t,ce),$(p,R,ce),de=!0},p:N,i(R){de||(x(p.$$.fragment,R),de=!0)},o(R){v(p.$$.fragment,R),de=!1},d(R){R&&a(c),R&&a(t),y(p,R)}}}function $fe(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;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 xfe(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 vfe(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 yfe(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 jfe(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 wfe(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 Dfe(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 kfe(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 Efe(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 qfe(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]`,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-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>]`}}),{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 Ife(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 Tfe(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 Nfe(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 Pfe(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 Afe(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 Lfe(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 Ffe(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 Cfe(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 Ofe(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 zfe(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 Sfe(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 Vfe(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 Ufe(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 Mfe(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 Rfe(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 Bfe(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 Hfe(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 Gfe(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 Wfe(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 Kfe(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 Yfe(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 de=r(f);d=l(de,"con"),de.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 Jfe(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 Qfe(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 Zfe(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 Xfe(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 ege(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 tge(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 age(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 sge(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 nge(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 rge(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 oge(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 lge(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 ige(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 dge(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]`,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-meta">&gt;&gt;&gt; </span>sorted_ds = ds.sort(<span class="hljs-string">&quot;label&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sorted_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">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 cge(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 pge(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 mge(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 hge(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 fge(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 gge(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 uge(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 _ge(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 bge(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 $ge(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 xge(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 vge(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 yge(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 jge(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 wge(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 Dge(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 kge(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 Ege(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 qge(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 Ige(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 Tge(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 Nge(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 Pge(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 Age(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 Lge(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 Fge(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 Cge(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 Oge(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 zge(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 Sge(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 Vge(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 Uge(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 Mge(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 Rge(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 Bge(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 Hge(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 Gge(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 Wge(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 Kge(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 Yge(k){let c,u,f,d,g,t,p,de,R,ce,he;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"),de=o(` instead of the
`),R=s("a"),ce=o("Sequence"),he=o("."),this.h()},l(ke){c=n(ke,"P",{});var fe=r(c);u=l(fe,"A "),f=n(fe,"A",{href:!0});var Pa=r(f);d=l(Pa,"Sequence"),Pa.forEach(a),g=l(fe,` 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(fe,"CODE",{});var du=r(t);p=l(du,"list"),du.forEach(a),de=l(fe,` instead of the
`),R=n(fe,"A",{href:!0});var fo=r(R);ce=l(fo,"Sequence"),fo.forEach(a),he=l(fe,"."),fe.forEach(a),this.h()},h(){w(f,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Sequence"),w(R,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Sequence")},m(ke,fe){D(ke,c,fe),e(c,u),e(c,f),e(f,d),e(c,g),e(c,t),e(t,p),e(c,de),e(c,R),e(R,ce),e(c,he)},d(ke){ke&&a(c)}}}function Jge(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 Qge(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 Zge(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 Xge(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 eue(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 tue(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 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="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 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="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 nue(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 rue(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 oue(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 lue(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 iue(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 due(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 cue(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 pue(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 mue(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 hue(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 fue(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 gue(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 uue(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 _ue(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 bue(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 $ue(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 xue(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 vue(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 yue(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', fs=s3)
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>, fs=s3)
<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 jue(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', fs=s3)`,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>, fs=s3)`}}),{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 wue(k){let c,u,f,d,g,t,p,de,R,ce,he,ke,fe,Pa,du,fo,U3,aE,pe,Nc,M3,d1,R3,B3,cu,c1,H3,G3,W3,p1,K3,Y3,Ee,Pc,J3,Pn,Q3,pu,Z3,X3,m1,e5,t5,a5,Ac,s5,mu,n5,r5,o5,h1,l5,i5,go,d5,Aa,Lc,c5,An,p5,f1,m5,h5,g1,f5,g5,u5,uo,sE,Ln,_o,u1,Fc,_5,_1,b5,nE,bo,$5,hu,x5,v5,rE,q,Cc,y5,b1,j5,w5,gt,Oc,D5,$1,k5,E5,x1,q5,I5,$o,T5,ut,zc,N5,v1,P5,A5,y1,L5,F5,xo,C5,vo,Sc,O5,j1,z5,S5,yo,Vc,V5,w1,U5,M5,qe,Uc,R5,Ut,B5,D1,H5,G5,k1,W5,K5,fu,Y5,J5,Q5,Fn,Z5,E1,X5,e6,q1,t6,a6,s6,Mt,n6,I1,r6,o6,T1,l6,i6,N1,d6,c6,p6,jo,m6,wo,Mc,h6,Rt,f6,P1,g6,u6,A1,_6,b6,gu,$6,x6,v6,_t,Rc,y6,L1,j6,w6,Do,D6,ko,k6,La,Bc,E6,F1,q6,I6,Eo,T6,Fa,Hc,N6,C1,P6,A6,qo,L6,Ca,Gc,F6,O1,C6,O6,Io,z6,Oa,Wc,S6,Kc,V6,To,U6,z1,M6,R6,B6,H6,No,G6,za,Yc,W6,S1,K6,Y6,Po,J6,Sa,Jc,Q6,V1,Z6,X6,Ao,eq,bt,Qc,tq,U1,aq,sq,M1,nq,rq,Lo,oq,Va,Zc,lq,R1,iq,dq,Fo,cq,Ua,Xc,pq,B1,mq,hq,Co,fq,Ma,ep,gq,H1,uq,_q,Oo,bq,$t,tp,$q,G1,xq,vq,Cn,yq,uu,jq,wq,W1,Dq,kq,Eq,zo,qq,Ra,ap,Iq,K1,Tq,Nq,So,Pq,Ba,sp,Aq,Y1,Lq,Fq,Vo,Cq,Ha,np,Oq,J1,zq,Sq,Uo,Vq,Ga,rp,Uq,Q1,Mq,Rq,Mo,Bq,Wa,op,Hq,Z1,Gq,Wq,lp,Kq,_u,Yq,Jq,Qq,Ka,ip,Zq,dp,Xq,X1,e9,t9,a9,cp,s9,ex,n9,r9,o9,Ro,pp,l9,On,i9,tx,d9,c9,ax,p9,m9,h9,Ie,mp,f9,We,g9,sx,u9,_9,nx,b9,$9,rx,x9,v9,bu,y9,j9,w9,Bt,D9,$u,k9,E9,ox,q9,I9,lx,T9,N9,P9,Bo,A9,Ho,L9,Ya,hp,F9,Ke,C9,ix,O9,z9,dx,S9,V9,xu,U9,M9,vu,R9,B9,H9,Go,G9,xt,fp,W9,gp,K9,cx,Y9,J9,Q9,yu,Z9,px,X9,eI,Wo,tI,Te,up,aI,Ht,sI,mx,nI,rI,hx,oI,lI,fx,iI,dI,cI,_p,pI,ju,mI,hI,fI,Gt,gI,wu,uI,_I,gx,bI,$I,Du,xI,vI,yI,Ko,jI,Ne,bp,wI,zn,DI,ux,kI,EI,_x,qI,II,TI,Sn,NI,ku,PI,AI,Eu,LI,FI,CI,Wt,OI,qu,zI,SI,bx,VI,UI,Iu,MI,RI,BI,Yo,HI,Jo,$p,GI,$x,WI,KI,vt,xp,YI,xx,JI,QI,vx,ZI,XI,Qo,eT,Pe,vp,tT,yx,aT,sT,yp,nT,jx,rT,oT,lT,Vn,Un,iT,wx,dT,cT,Dx,pT,mT,hT,Kt,fT,kx,gT,uT,Ex,_T,bT,qx,$T,xT,vT,K,yT,Ix,jT,wT,Tx,DT,kT,Nx,ET,qT,Px,IT,TT,Ax,NT,PT,Lx,AT,LT,Fx,FT,CT,Cx,OT,zT,ST,Zo,VT,Ja,jp,UT,Ox,MT,RT,Xo,BT,Qa,wp,HT,zx,GT,WT,el,KT,yt,Dp,YT,Sx,JT,QT,Vx,ZT,XT,tl,eN,jt,kp,tN,Ux,aN,sN,Mx,nN,rN,al,oN,wt,Ep,lN,ee,iN,Tu,dN,cN,Rx,pN,mN,Bx,hN,fN,Hx,gN,uN,Gx,_N,bN,Wx,$N,xN,Kx,vN,yN,jN,qp,wN,Yx,DN,kN,EN,sl,qN,ge,Ip,IN,Mn,TN,Jx,NN,PN,Qx,AN,LN,FN,Rn,CN,Zx,ON,zN,Xx,SN,VN,UN,ue,ev,MN,RN,tv,BN,HN,av,GN,WN,sv,KN,YN,nv,JN,QN,rv,ZN,XN,eP,Tp,tP,ov,aP,sP,nP,nl,rP,Za,Np,oP,te,lP,lv,iP,dP,iv,cP,pP,dv,mP,hP,cv,fP,gP,pv,uP,_P,mv,bP,$P,hv,xP,vP,yP,rl,jP,Dt,Pp,wP,fv,DP,kP,Ye,EP,Nu,qP,IP,Pu,TP,NP,gv,PP,AP,uv,LP,FP,CP,ol,OP,Ae,Ap,zP,Bn,SP,_v,VP,UP,bv,MP,RP,BP,Hn,HP,Au,GP,WP,Lu,KP,YP,JP,$v,QP,ZP,ll,XP,Xa,Lp,eA,Yt,tA,xv,aA,sA,vv,nA,rA,yv,oA,lA,iA,il,dA,dl,Fp,cA,jv,pA,mA,es,Cp,hA,wv,fA,gA,cl,uA,ts,Op,_A,zp,bA,Dv,$A,xA,vA,pl,yA,as,Sp,jA,kv,wA,DA,ml,kA,ss,Vp,EA,Ev,qA,IA,hl,TA,ns,Up,NA,qv,PA,AA,fl,LA,rs,Mp,FA,Iv,CA,OA,gl,zA,kt,Rp,SA,Gn,VA,Tv,UA,MA,Nv,RA,BA,HA,Pv,Fu,GA,Bp,WA,KA,ul,YA,os,Hp,JA,Jt,QA,Av,ZA,XA,Lv,eL,tL,Fv,aL,sL,nL,Cv,Cu,rL,Gp,oL,lL,_l,Wp,iL,Ov,dL,cL,ls,Kp,pL,zv,mL,hL,Yp,fL,Sv,gL,uL,_L,is,Jp,bL,Vv,$L,xL,bl,vL,$l,Qp,yL,Uv,jL,wL,xl,Zp,DL,Xp,kL,Mv,EL,qL,IL,vl,em,TL,tm,NL,Rv,PL,AL,LL,yl,am,FL,Bv,CL,OL,jl,sm,zL,Hv,SL,VL,wl,nm,UL,Gv,ML,RL,Dl,rm,BL,Wv,HL,GL,kl,om,WL,Kv,KL,YL,El,lm,JL,Ou,zu,QL,ZL,XL,ql,im,eF,Su,Vu,tF,aF,sF,Uu,dm,nF,Mu,cm,rF,Ru,pm,oF,Bu,mm,lF,Hu,hm,iF,Gu,fm,dF,Wu,gm,cF,Ku,um,pF,Yu,_m,mF,Ju,bm,hF,Qu,$m,fF,Zu,xm,gF,Xu,vm,uF,ds,ym,_F,Yv,bF,$F,Il,xF,cs,jm,vF,Jv,yF,jF,Tl,wF,ps,wm,DF,Qv,kF,EF,Nl,qF,ms,Dm,IF,Zv,TF,NF,Pl,PF,Et,km,AF,Xv,LF,FF,Al,CF,Ll,OF,hs,Em,zF,Wn,SF,e_,VF,UF,t_,e0,MF,RF,BF,Kn,HF,t0,GF,WF,a0,KF,YF,JF,fs,qm,QF,Im,ZF,s0,XF,eC,tC,Fl,oE,Qt,Tm,aC,Yn,sC,a_,nC,rC,s_,oC,lC,iC,Cl,lE,ae,Nm,dC,n0,cC,pC,Jn,mC,n_,hC,fC,r_,gC,uC,_C,Pm,Qn,bC,r0,$C,xC,o0,vC,yC,jC,Zn,wC,l0,DC,kC,i0,EC,qC,IC,Xn,TC,d0,NC,PC,c0,AC,LC,FC,p0,CC,OC,Ol,iE,ye,Am,zC,m0,SC,VC,h0,UC,MC,f0,RC,BC,Je,g0,HC,GC,u0,WC,KC,_0,YC,JC,Lm,QC,o_,ZC,XC,eO,Zt,tO,l_,aO,sO,b0,nO,rO,i_,oO,lO,dE,je,Fm,iO,$0,dO,cO,x0,pO,mO,v0,hO,fO,Qe,y0,gO,uO,j0,_O,bO,w0,$O,xO,Cm,vO,d_,yO,jO,wO,Xt,DO,c_,kO,EO,D0,qO,IO,p_,TO,NO,cE,we,Om,PO,k0,AO,LO,E0,FO,CO,q0,OO,zO,Ze,I0,SO,VO,T0,UO,MO,N0,RO,BO,zm,HO,m_,GO,WO,KO,ea,YO,h_,JO,QO,P0,ZO,XO,f_,ez,tz,pE,er,zl,A0,Sm,az,L0,sz,mE,Sl,nz,F0,rz,oz,hE,A,Vm,lz,C0,iz,dz,gs,Um,cz,O0,pz,mz,Vl,hz,us,Mm,fz,z0,gz,uz,Ul,_z,_s,Rm,bz,S0,$z,xz,Ml,vz,bs,Bm,yz,Hm,jz,Rl,wz,V0,Dz,kz,Ez,qz,Bl,Iz,$s,Gm,Tz,U0,Nz,Pz,Hl,Az,xs,Wm,Lz,M0,Fz,Cz,Gl,Oz,qt,Km,zz,R0,Sz,Vz,B0,Uz,Mz,Wl,Rz,vs,Ym,Bz,H0,Hz,Gz,Kl,Wz,ys,Jm,Kz,G0,Yz,Jz,Yl,Qz,js,Qm,Zz,W0,Xz,eS,Jl,tS,It,Zm,aS,K0,sS,nS,Y0,rS,oS,Ql,lS,Le,Xm,iS,J0,dS,cS,Q0,pS,mS,Z0,hS,fS,Zl,gS,Fe,eh,uS,th,_S,X0,bS,$S,xS,Xe,vS,ey,yS,jS,ty,wS,DS,ay,kS,ES,sy,qS,IS,TS,ny,ry,NS,PS,Xl,AS,Tt,ah,LS,sh,FS,oy,CS,OS,zS,g_,SS,ly,VS,US,ei,MS,ti,nh,RS,tr,BS,iy,HS,GS,dy,WS,KS,YS,Ce,rh,JS,ta,QS,cy,ZS,XS,py,eV,tV,my,aV,sV,nV,oh,rV,u_,oV,lV,iV,et,dV,__,cV,pV,hy,mV,hV,b_,fV,gV,$_,uV,_V,bV,ai,$V,Oe,lh,xV,ar,vV,fy,yV,jV,gy,wV,DV,kV,sr,EV,x_,qV,IV,v_,TV,NV,PV,tt,AV,uy,LV,FV,_y,CV,OV,y_,zV,SV,j_,VV,UV,MV,si,RV,ws,ih,BV,by,HV,GV,ni,WV,Nt,dh,KV,$y,YV,JV,aa,QV,w_,ZV,XV,xy,eU,tU,vy,aU,sU,nU,ri,rU,Ds,ch,oU,yy,lU,iU,oi,dU,ze,ph,cU,jy,pU,mU,wy,hU,fU,nr,gU,D_,uU,_U,Dy,bU,$U,xU,li,vU,Se,mh,yU,ky,jU,wU,rr,DU,k_,kU,EU,Ey,qU,IU,TU,hh,qy,NU,PU,Iy,AU,LU,ii,FU,ks,fh,CU,Ty,OU,zU,di,SU,Es,gh,VU,uh,UU,Ny,MU,RU,BU,ci,HU,Ve,_h,GU,or,WU,E_,KU,YU,q_,JU,QU,ZU,Py,XU,eM,sa,tM,I_,aM,sM,T_,nM,rM,Ay,oM,lM,iM,pi,dM,Ue,bh,cM,lr,pM,N_,mM,hM,Ly,fM,gM,uM,ir,_M,P_,bM,$M,A_,xM,vM,yM,Fy,jM,wM,mi,DM,qs,$h,kM,na,EM,Cy,qM,IM,L_,TM,NM,Oy,PM,AM,LM,hi,FM,Is,xh,CM,vh,OM,F_,zM,SM,VM,fi,UM,Ts,yh,MM,jh,RM,C_,BM,HM,GM,gi,WM,Ns,wh,KM,Dh,YM,O_,JM,QM,ZM,ui,XM,Ps,kh,eR,Eh,tR,z_,aR,sR,nR,_i,rR,As,qh,oR,dr,lR,S_,iR,dR,V_,zy,cR,pR,mR,cr,hR,Sy,fR,gR,Vy,uR,_R,fE,U_,gE,pr,bi,Uy,Ih,bR,My,$R,uE,$i,xR,M_,vR,yR,_E,F,Th,jR,Ry,wR,DR,Pt,Nh,kR,By,ER,qR,xi,IR,vi,TR,Ls,Ph,NR,Hy,PR,AR,yi,LR,Fs,Ah,FR,Gy,CR,OR,ji,zR,Cs,Lh,SR,Wy,VR,UR,wi,MR,R_,Fh,RR,Di,Ch,BR,Oh,HR,Ky,GR,WR,KR,Me,zh,YR,Yy,JR,QR,Sh,ZR,Jy,XR,eB,tB,mr,hr,aB,Qy,sB,nB,Zy,rB,oB,lB,fr,iB,Xy,dB,cB,ej,pB,mB,hB,Y,fB,tj,gB,uB,aj,_B,bB,sj,$B,xB,nj,vB,yB,rj,jB,wB,oj,DB,kB,lj,EB,qB,ij,IB,TB,NB,ki,PB,Os,Vh,AB,dj,LB,FB,Ei,CB,zs,Uh,OB,cj,zB,SB,qi,VB,_e,Mh,UB,pj,MB,RB,Rh,BB,mj,HB,GB,WB,gr,KB,hj,YB,JB,fj,QB,ZB,XB,ur,eH,B_,tH,aH,H_,sH,nH,rH,Ii,oH,Ss,Bh,lH,_r,iH,G_,dH,cH,gj,pH,mH,hH,Ti,fH,Vs,Hh,gH,br,uH,W_,_H,bH,uj,$H,xH,vH,Ni,yH,Pi,Gh,jH,K_,Y_,wH,DH,kH,Ai,Wh,EH,J_,Q_,qH,IH,TH,Z_,Kh,NH,X_,Yh,PH,eb,Jh,AH,tb,Qh,LH,ab,Zh,FH,sb,Xh,CH,nb,ef,OH,rb,tf,zH,ob,af,SH,lb,sf,VH,ib,nf,UH,db,rf,MH,cb,of,bE,$r,Li,_j,lf,RH,bj,BH,$E,Fi,HH,$j,GH,WH,xE,B,df,KH,Re,cf,YH,xj,JH,QH,pf,ZH,vj,XH,eG,tG,xr,vr,aG,yj,sG,nG,jj,rG,oG,lG,ra,iG,wj,dG,cG,Dj,pG,mG,kj,hG,fG,gG,J,uG,Ej,_G,bG,qj,$G,xG,Ij,vG,yG,Tj,jG,wG,Nj,DG,kG,Pj,EG,qG,Aj,IG,TG,Lj,NG,PG,AG,Ci,LG,Us,mf,FG,Fj,CG,OG,Oi,zG,be,hf,SG,Cj,VG,UG,Oj,MG,RG,yr,BG,zj,HG,GG,Sj,WG,KG,YG,oa,JG,Vj,QG,ZG,pb,XG,eW,mb,tW,aW,sW,zi,nW,Ms,ff,rW,Uj,oW,lW,Si,iW,Rs,gf,dW,Mj,cW,pW,Vi,mW,Bs,uf,hW,Rj,fW,gW,Ui,uW,Hs,_f,_W,Bj,bW,$W,Mi,xW,Gs,bf,vW,Hj,yW,jW,Ri,wW,Ws,$f,DW,Gj,kW,EW,Bi,vE,jr,Hi,Wj,xf,qW,Kj,IW,yE,S,vf,TW,Yj,NW,PW,yf,AW,Jj,LW,FW,CW,hb,Qj,OW,zW,SW,se,Zj,la,VW,fb,UW,MW,Xj,RW,BW,ew,HW,GW,WW,tw,jf,KW,gb,YW,JW,QW,aw,wf,ZW,sw,XW,eK,tK,Df,at,aK,nw,sK,nK,ub,rK,oK,rw,lK,iK,_b,dK,cK,pK,Gi,mK,ow,st,hK,bb,fK,gK,$b,uK,_K,xb,bK,$K,vb,xK,vK,yK,lw,kf,jK,yb,wK,DK,kK,iw,ia,EK,jb,qK,IK,dw,TK,NK,cw,PK,AK,LK,pw,Wi,wb,FK,CK,Db,OK,zK,SK,Ks,Ef,VK,qf,UK,kb,MK,RK,BK,Ki,HK,Yi,If,GK,mw,WK,KK,Ji,Tf,YK,hw,JK,QK,Qi,Nf,ZK,fw,XK,eY,Zi,Pf,tY,gw,aY,sY,Xi,Af,nY,uw,rY,oY,At,Lf,lY,Ff,iY,_w,dY,cY,pY,Cf,mY,bw,hY,fY,gY,ed,uY,td,Of,_Y,zf,bY,Eb,$Y,xY,vY,Be,Sf,yY,Vf,jY,$w,wY,DY,kY,wr,EY,xw,qY,IY,vw,TY,NY,PY,da,AY,yw,LY,FY,jw,CY,OY,ww,zY,SY,VY,ad,UY,Lt,Uf,MY,Mf,RY,Dw,BY,HY,GY,kw,WY,KY,sd,jE,ca,Rf,YY,Ew,JY,QY,nd,wE,W,Bf,ZY,qw,XY,eJ,Hf,tJ,Iw,aJ,sJ,nJ,Dr,qb,Tw,rJ,oJ,lJ,Ib,Nw,iJ,dJ,cJ,Tb,Pw,pJ,mJ,hJ,Aw,fJ,gJ,rd,uJ,Ys,Gf,_J,kr,bJ,Lw,$J,xJ,Fw,vJ,yJ,jJ,Wf,Cw,Ow,wJ,DJ,zw,Sw,kJ,EJ,Ft,Kf,qJ,Er,IJ,Vw,TJ,NJ,Uw,PJ,AJ,LJ,Yf,FJ,Mw,CJ,OJ,zJ,od,SJ,Js,Jf,VJ,qr,UJ,Rw,MJ,RJ,Bw,BJ,HJ,GJ,ld,DE,nt,Qf,WJ,Zf,KJ,Hw,YJ,JJ,QJ,O,Gw,Ww,ZJ,XJ,Kw,Yw,eQ,tQ,Jw,Qw,aQ,sQ,Zw,Xw,nQ,rQ,e7,t7,oQ,lQ,a7,s7,iQ,dQ,n7,r7,cQ,pQ,o7,l7,mQ,hQ,i7,d7,fQ,gQ,c7,p7,uQ,_Q,m7,h7,bQ,$Q,Nb,f7,xQ,vQ,yQ,Pb,g7,jQ,wQ,DQ,u7,_7,kQ,EQ,b7,$7,qQ,IQ,x7,v7,TQ,NQ,y7,j7,PQ,AQ,w7,D7,LQ,FQ,k7,E7,CQ,OQ,q7,I7,zQ,SQ,T7,N7,VQ,UQ,P7,A7,MQ,RQ,L7,F7,BQ,HQ,C7,O7,GQ,WQ,z7,S7,KQ,YQ,V7,U7,JQ,QQ,id,kE,rt,Xf,ZQ,Ab,M7,XQ,eZ,tZ,dd,aZ,cd,eg,sZ,R7,nZ,EE,ot,tg,rZ,Lb,B7,oZ,lZ,iZ,pd,dZ,md,ag,cZ,H7,pZ,qE,pa,sg,mZ,G7,hZ,fZ,hd,IE,ma,ng,gZ,W7,uZ,_Z,fd,TE,ha,rg,bZ,K7,$Z,xZ,gd,NE,fa,og,vZ,Y7,yZ,jZ,ud,PE,H,lg,wZ,ig,DZ,J7,kZ,EZ,qZ,Q7,IZ,TZ,Ir,Z7,dg,NZ,X7,PZ,AZ,LZ,Tr,cg,FZ,eD,CZ,OZ,zZ,pg,Fb,tD,SZ,VZ,UZ,Cb,aD,MZ,RZ,BZ,sD,HZ,GZ,Nr,mg,WZ,nD,KZ,YZ,JZ,Pr,Ob,rD,QZ,ZZ,XZ,zb,oD,eX,tX,aX,Sb,lD,sX,nX,rX,iD,oX,lX,_d,iX,Qs,hg,dX,dD,cX,pX,ga,Vb,cD,mX,hX,fX,pD,mD,gX,uX,hD,fD,_X,bX,Ub,gD,$X,xX,vX,bd,fg,yX,uD,jX,wX,$d,gg,DX,_D,kX,EX,xd,ug,qX,bD,IX,TX,vd,_g,NX,$D,PX,AE,G,bg,AX,$g,LX,xD,FX,CX,OX,vD,zX,SX,ua,yD,xg,VX,jD,UX,MX,RX,Ar,vg,BX,wD,HX,GX,WX,yg,Mb,DD,KX,YX,JX,Rb,kD,QX,ZX,XX,ED,eee,tee,qD,jg,aee,ID,see,nee,ree,TD,wg,oee,ND,lee,iee,dee,yd,cee,Zs,Dg,pee,PD,mee,hee,lt,Bb,AD,fee,gee,uee,LD,FD,_ee,bee,CD,OD,$ee,xee,Hb,zD,vee,yee,jee,Gb,SD,wee,Dee,kee,jd,kg,Eee,VD,qee,Iee,wd,Eg,Tee,UD,Nee,Pee,Dd,qg,Aee,MD,Lee,Fee,kd,Ig,Cee,RD,Oee,LE,Lr,Ed,BD,Tg,zee,HD,See,FE,me,Ng,Vee,GD,Uee,Mee,Wb,WD,Ree,Bee,Hee,KD,Gee,Wee,Xs,Pg,Kee,Ag,Yee,YD,Jee,Qee,Zee,qd,Xee,en,Lg,ete,_a,tte,JD,ate,ste,QD,nte,rte,ZD,ote,lte,ite,Id,CE,Fr,Td,XD,Fg,dte,ek,cte,OE,tn,pte,tk,mte,hte,Kb,fte,gte,zE,ne,Cg,ute,ak,_te,bte,Nd,$te,an,Og,xte,sk,vte,yte,Pd,jte,sn,zg,wte,nk,Dte,kte,Ad,Ete,Ct,Sg,qte,rk,Ite,Tte,ok,Nte,Pte,Ld,Ate,Fd,Vg,Lte,lk,Fte,SE,Cr,Cd,ik,Ug,Cte,dk,Ote,VE,V,Mg,zte,Od,ck,Ste,Vte,Rg,pk,Ute,Mte,Rte,ba,Bte,mk,Hte,Gte,hk,Wte,Kte,fk,Yte,Jte,Qte,gk,Zte,Xte,uk,eae,tae,zd,aae,Or,sae,_k,nae,rae,bk,oae,lae,iae,Sd,dae,$a,cae,$k,pae,mae,xk,hae,fae,vk,gae,uae,_ae,Vd,bae,zr,$ae,yk,xae,vae,Yb,yae,jae,wae,Ud,Dae,Sr,kae,jk,Eae,qae,Jb,Iae,Tae,Nae,Md,UE,Vr,Bg,Pae,Ur,Aae,wk,Lae,Fae,Dk,Cae,Oae,ME,Mr,Hg,zae,kk,Sae,RE,Rr,Rd,Ek,Gg,Vae,qk,Uae,BE,Br,Wg,Mae,Ik,Rae,HE;return t=new Na({}),Pa=new Na({}),Nc=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.8.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.8.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.8.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.8.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.8.0/en/package_reference/builder_classes#datasets.BuilderConfig">BuilderConfig</a> and used in the <a href="/docs/datasets/v2.8.0/en/package_reference/builder_classes#datasets.DatasetBuilder">DatasetBuilder</a>.`,name:"*config_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/info.py#L93"}}),Pc=new E({props:{name:"from_directory",anchor:"datasets.DatasetInfo.from_directory",parameters:[{name:"dataset_info_dir",val:": str"},{name:"fs",val:" = 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>, defaults to <code>None</code>) &#x2014;
Instance of the remote filesystem used to download the files from.</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.5.0</p>
						
					</div>`,name:"fs"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/info.py#L280"}}),go=new T({props:{anchor:"datasets.DatasetInfo.from_directory.example",$$slots:{default:[Jhe]},$$scope:{ctx:k}}}),Lc=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:" = 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>, defaults to <code>None</code>) &#x2014;
Instance of the remote filesystem used to download the files from.</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.5.0</p>
						
					</div>`,name:"fs"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/info.py#L211"}}),uo=new T({props:{anchor:"datasets.DatasetInfo.write_to_directory.example",$$slots:{default:[Qhe]},$$scope:{ctx:k}}}),Fc=new Na({}),Cc=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.8.0/src/datasets/arrow_dataset.py#L625"}}),Oc=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.8.0/src/datasets/arrow_dataset.py#L5034",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),$o=new T({props:{anchor:"datasets.Dataset.add_column.example",$$slots:{default:[Zhe]},$$scope:{ctx:k}}}),zc=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.8.0/src/datasets/arrow_dataset.py#L5281",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),xo=new T({props:{anchor:"datasets.Dataset.add_item.example",$$slots:{default:[Xhe]},$$scope:{ctx:k}}}),Sc=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.8.0/src/datasets/arrow_dataset.py#L696",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Vc=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.8.0/src/datasets/arrow_dataset.py#L736",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Uc=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.8.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.8.0/src/datasets/arrow_dataset.py#L768",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),jo=new T({props:{anchor:"datasets.Dataset.from_pandas.example",$$slots:{default:[efe]},$$scope:{ctx:k}}}),Mc=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.8.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.8.0/src/datasets/arrow_dataset.py#L830",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Rc=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.8.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.8.0/src/datasets/arrow_dataset.py#L953",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Do=new T({props:{anchor:"datasets.Dataset.from_generator.example",$$slots:{default:[tfe]},$$scope:{ctx:k}}}),ko=new T({props:{anchor:"datasets.Dataset.from_generator.example-2",$$slots:{default:[afe]},$$scope:{ctx:k}}}),Bc=new E({props:{name:"data",anchor:"datasets.Dataset.data",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L1590"}}),Eo=new T({props:{anchor:"datasets.Dataset.data.example",$$slots:{default:[sfe]},$$scope:{ctx:k}}}),Hc=new E({props:{name:"cache_files",anchor:"datasets.Dataset.cache_files",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L1610"}}),qo=new T({props:{anchor:"datasets.Dataset.cache_files.example",$$slots:{default:[nfe]},$$scope:{ctx:k}}}),Gc=new E({props:{name:"num_columns",anchor:"datasets.Dataset.num_columns",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L1628"}}),Io=new T({props:{anchor:"datasets.Dataset.num_columns.example",$$slots:{default:[rfe]},$$scope:{ctx:k}}}),Wc=new E({props:{name:"num_rows",anchor:"datasets.Dataset.num_rows",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L1643"}}),No=new T({props:{anchor:"datasets.Dataset.num_rows.example",$$slots:{default:[ofe]},$$scope:{ctx:k}}}),Yc=new E({props:{name:"column_names",anchor:"datasets.Dataset.column_names",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L1660"}}),Po=new T({props:{anchor:"datasets.Dataset.column_names.example",$$slots:{default:[lfe]},$$scope:{ctx:k}}}),Jc=new E({props:{name:"shape",anchor:"datasets.Dataset.shape",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L1675"}}),Ao=new T({props:{anchor:"datasets.Dataset.shape.example",$$slots:{default:[ife]},$$scope:{ctx:k}}}),Qc=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 [~<code>datasets.Dataset.column_names</code>]).`,name:"column"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L1692",returnDescription:`
<p>List of unique elements in the given column.</p>
`,returnType:`
<p><code>list</code></p>
`}}),Lo=new T({props:{anchor:"datasets.Dataset.unique.example",$$slots:{default:[dfe]},$$scope:{ctx:k}}}),Zc=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.8.0/src/datasets/arrow_dataset.py#L1798",returnDescription:`
<p>A copy of the dataset with flattened columns.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Fo=new T({props:{anchor:"datasets.Dataset.flatten.example",$$slots:{default:[cfe]},$$scope:{ctx:k}}}),Xc=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:": bool = True"},{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.8.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.8.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.8.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.8.0/src/datasets/arrow_dataset.py#L1842",returnDescription:`
<p>A copy of the dataset with casted features.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Co=new T({props:{anchor:"datasets.Dataset.cast.example",$$slots:{default:[pfe]},$$scope:{ctx:k}}}),ep=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.8.0/src/datasets/arrow_dataset.py#L1925",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Oo=new T({props:{anchor:"datasets.Dataset.cast_column.example",$$slots:{default:[mfe]},$$scope:{ctx:k}}}),tp=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.8.0/src/datasets/arrow_dataset.py#L1967",returnDescription:`
<p>A copy of the dataset object without the columns to remove.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),zo=new T({props:{anchor:"datasets.Dataset.remove_columns.example",$$slots:{default:[hfe]},$$scope:{ctx:k}}}),ap=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.8.0/src/datasets/arrow_dataset.py#L2018",returnDescription:`
<p>A copy of the dataset with a renamed column.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),So=new T({props:{anchor:"datasets.Dataset.rename_column.example",$$slots:{default:[ffe]},$$scope:{ctx:k}}}),sp=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.8.0/src/datasets/arrow_dataset.py#L2085",returnDescription:`
<p>A copy of the dataset with renamed columns</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Vo=new T({props:{anchor:"datasets.Dataset.rename_columns.example",$$slots:{default:[gfe]},$$scope:{ctx:k}}}),np=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 [~<code>datasets.Dataset.column_names</code>])`,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.8.0/src/datasets/arrow_dataset.py#L1723"}}),Uo=new T({props:{anchor:"datasets.Dataset.class_encode_column.example",$$slots:{default:[ufe]},$$scope:{ctx:k}}}),rp=new E({props:{name:"__len__",anchor:"datasets.Dataset.__len__",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L2153"}}),Mo=new T({props:{anchor:"datasets.Dataset.__len__.example",$$slots:{default:[_fe]},$$scope:{ctx:k}}}),op=new E({props:{name:"__iter__",anchor:"datasets.Dataset.__iter__",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L2170"}}),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.8.0/src/datasets/arrow_dataset.py#L2199"}}),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;]</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.8.0/src/datasets/arrow_dataset.py#L2243"}}),mp=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;]</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.8.0/src/datasets/arrow_dataset.py#L2275"}}),Bo=new T({props:{anchor:"datasets.Dataset.set_format.example",$$slots:{default:[bfe]},$$scope:{ctx:k}}}),Ho=new T({props:{anchor:"datasets.Dataset.set_format.example-2",$$slots:{default:[$fe]},$$scope:{ctx:k}}}),hp=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.8.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.8.0/src/datasets/arrow_dataset.py#L2381"}}),Go=new T({props:{anchor:"datasets.Dataset.set_transform.example",$$slots:{default:[xfe]},$$scope:{ctx:k}}}),fp=new E({props:{name:"reset_format",anchor:"datasets.Dataset.reset_format",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L2352"}}),Wo=new T({props:{anchor:"datasets.Dataset.reset_format.example",$$slots:{default:[vfe]},$$scope:{ctx:k}}}),up=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;]</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.8.0/src/datasets/arrow_dataset.py#L2424"}}),Ko=new T({props:{anchor:"datasets.Dataset.with_format.example",$$slots:{default:[yfe]},$$scope:{ctx:k}}}),bp=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.8.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.8.0/src/datasets/arrow_dataset.py#L2475"}}),Yo=new T({props:{anchor:"datasets.Dataset.with_transform.example",$$slots:{default:[jfe]},$$scope:{ctx:k}}}),$p=new E({props:{name:"__getitem__",anchor:"datasets.Dataset.__getitem__",parameters:[{name:"key",val:""}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L2599"}}),xp=new E({props:{name:"cleanup_cache_files",anchor:"datasets.Dataset.cleanup_cache_files",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L2605",returnDescription:`
<p>Number of removed files.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Qo=new T({props:{anchor:"datasets.Dataset.cleanup_cache_files.example",$$slots:{default:[wfe]},$$scope:{ctx:k}}}),vp=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:": 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>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.8.0/src/datasets/arrow_dataset.py#L2652"}}),Zo=new T({props:{anchor:"datasets.Dataset.map.example",$$slots:{default:[Dfe]},$$scope:{ctx:k}}}),jp=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:": bool = True"},{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>bool</code>, defaults to <code>True</code>) &#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.8.0/src/datasets/arrow_dataset.py#L3296"}}),Xo=new T({props:{anchor:"datasets.Dataset.filter.example",$$slots:{default:[kfe]},$$scope:{ctx:k}}}),wp=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.8.0/src/datasets/arrow_dataset.py#L3495"}}),el=new T({props:{anchor:"datasets.Dataset.select.example",$$slots:{default:[Efe]},$$scope:{ctx:k}}}),Dp=new E({props:{name:"sort",anchor:"datasets.Dataset.sort",parameters:[{name:"column",val:": str"},{name:"reverse",val:": bool = False"},{name:"kind",val:": str = None"},{name:"null_placement",val:": str = 'last'"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": bool = True"},{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",description:`<strong>column</strong> (<code>str</code>) &#x2014;
Column name to sort by.`,name:"column"},{anchor:"datasets.Dataset.sort.reverse",description:`<strong>reverse</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, sort by descending order rather then ascending.`,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.`,name:"kind"},{anchor:"datasets.Dataset.sort.null_placement",description:`<strong>null_placement</strong> (<code>str</code>, defaults to <code>last</code>) &#x2014;
Put <code>None</code> values at the beginning if first; last puts <code>None</code> values at the end.</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>bool</code>, defaults to <code>True</code>) &#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.8.0/src/datasets/arrow_dataset.py#L3741"}}),tl=new T({props:{anchor:"datasets.Dataset.sort.example",$$slots:{default:[qfe]},$$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:": bool = True"},{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>bool</code>, defaults to <code>True</code>) &#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.8.0/src/datasets/arrow_dataset.py#L3843"}}),al=new T({props:{anchor:"datasets.Dataset.shuffle.example",$$slots:{default:[Ife]},$$scope:{ctx:k}}}),Ep=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:": bool = True"},{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>bool</code>, defaults to <code>True</code>) &#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.8.0/src/datasets/arrow_dataset.py#L3945"}}),sl=new T({props:{anchor:"datasets.Dataset.train_test_split.example",$$slots:{default:[Tfe]},$$scope:{ctx:k}}}),Ip=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.load_from_cache_file",description:`<strong>load_from_cache_file</strong> (<code>bool</code>, defaults to <code>True</code>) &#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.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.8.0/src/datasets/arrow_dataset.py#L4226"}}),nl=new T({props:{anchor:"datasets.Dataset.shard.example",$$slots:{default:[Nfe]},$$scope:{ctx:k}}}),Np=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"}],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"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L305",returnDescription:`
<p><code>tf.data.Dataset</code></p>
`}}),rl=new T({props:{anchor:"datasets.Dataset.to_tf_dataset.example",$$slots:{default:[Pfe]},$$scope:{ctx:k}}}),Pp=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:"shard_size",val:": typing.Optional[int] = 'deprecated'"},{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.shard_size",description:`<strong>shard_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;</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.4.0</p>
						
<p><code>shard_size</code> was renamed to <code>max_shard_size</code> in version 2.1.1 and will be removed in 2.4.0.</p>

					</div>`,name:"shard_size"},{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.8.0/en/package_reference/main_classes#datasets.Audio">Audio</a> and <a href="/docs/datasets/v2.8.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.8.0/src/datasets/arrow_dataset.py#L4859"}}),ol=new T({props:{anchor:"datasets.Dataset.push_to_hub.example",$$slots:{default:[Afe]},$$scope:{ctx:k}}}),Ap=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>.</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.8.0/src/datasets/arrow_dataset.py#L1261"}}),ll=new T({props:{anchor:"datasets.Dataset.save_to_disk.example",$$slots:{default:[Lfe]},$$scope:{ctx:k}}}),Lp=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.8.0/src/datasets/arrow_dataset.py#L1485",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.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a> or <a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),il=new T({props:{anchor:"datasets.Dataset.load_from_disk.example",$$slots:{default:[Ffe]},$$scope:{ctx:k}}}),Fp=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.8.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.8.0/src/datasets/arrow_dataset.py#L3416"}}),Cp=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 <code>pandas.DataFrame.to_csv</code>.`,name:"*to_csv_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L4394",returnDescription:`
<p>The number of characters or bytes written.</p>
`,returnType:`
<p><code>int</code></p>
`}}),cl=new T({props:{anchor:"datasets.Dataset.to_csv.example",$$slots:{default:[Cfe]},$$scope:{ctx:k}}}),Op=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.8.0/src/datasets/arrow_dataset.py#L4517",returnDescription:`
<p><code>pandas.DataFrame</code> or <code>Iterator[pandas.DataFrame]</code></p>
`}}),pl=new T({props:{anchor:"datasets.Dataset.to_pandas.example",$$slots:{default:[Ofe]},$$scope:{ctx:k}}}),Sp=new E({props:{name:"to_dict",anchor:"datasets.Dataset.to_dict",parameters:[{name:"batch_size",val:": typing.Optional[int] = None"},{name:"batched",val:": bool = False"}],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).`,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.8.0/src/datasets/arrow_dataset.py#L4431",returnDescription:`
<p><code>dict</code> or <code>Iterator[dict]</code></p>
`}}),ml=new T({props:{anchor:"datasets.Dataset.to_dict.example",$$slots:{default:[zfe]},$$scope:{ctx:k}}}),Vp=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.lines",description:`<strong>lines</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether output JSON lines format.
Only possible if <code>orient=&quot;records&quot;</code>. It will throw ValueError with <code>orient</code> different from
<code>&quot;records&quot;</code>, since the others are not list-like.`,name:"lines"},{anchor:"datasets.Dataset.to_json.orient",description:`<strong>orient</strong> (<code>str</code>, defaults to <code>&quot;records&quot;</code>) &#x2014;
Format of the JSON:</p>
<ul>
<li><code>&quot;records&quot;</code>: list like <code>[{column -&gt; value}, &#x2026; , {column -&gt; value}]</code></li>
<li><code>&quot;split&quot;</code>: dict like <code>{&quot;index&quot; -&gt; [index], &quot;columns&quot; -&gt; [columns], &quot;data&quot; -&gt; [values]}</code></li>
<li><code>&quot;index&quot;</code>: dict like <code>{index -&gt; {column -&gt; value}&#x200C;}</code></li>
<li><code>&quot;columns&quot;</code>: dict like <code>{column -&gt; {index -&gt; value}&#x200C;}</code></li>
<li><code>&quot;values&quot;</code>: just the values array</li>
<li><code>&quot;table&quot;</code>: dict like <code>{&quot;schema&quot;: {schema}, &quot;data&quot;: {data}&#x200C;}</code></li>
</ul>`,name:"orient"},{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>.`,name:"*to_json_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L4467",returnDescription:`
<p>The number of characters or bytes written.</p>
`,returnType:`
<p><code>int</code></p>
`}}),hl=new T({props:{anchor:"datasets.Dataset.to_json.example",$$slots:{default:[Sfe]},$$scope:{ctx:k}}}),Up=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.8.0/src/datasets/arrow_dataset.py#L4556",returnDescription:`
<p>The number of characters or bytes written.</p>
`,returnType:`
<p><code>int</code></p>
`}}),fl=new T({props:{anchor:"datasets.Dataset.to_parquet.example",$$slots:{default:[Vfe]},$$scope:{ctx:k}}}),Mp=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 <code>Dataframe.to_sql</code>.`,name:"*sql_writer_kwargs"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L4587",returnDescription:`
<p>The number of records written.</p>
`,returnType:`
<p><code>int</code></p>
`}}),gl=new T({props:{anchor:"datasets.Dataset.to_sql.example",$$slots:{default:[Ufe]},$$scope:{ctx:k}}}),Rp=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.8.0/en/package_reference/main_classes#datasets.Dataset.get_nearest_examples">get_nearest_examples()</a> or <a href="/docs/datasets/v2.8.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.8.0/src/datasets/arrow_dataset.py#L5074"}}),ul=new T({props:{anchor:"datasets.Dataset.add_faiss_index.example",$$slots:{default:[Mfe]},$$scope:{ctx:k}}}),Hp=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.8.0/en/package_reference/main_classes#datasets.Dataset.get_nearest_examples">get_nearest_examples()</a> or <a href="/docs/datasets/v2.8.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.8.0/src/datasets/arrow_dataset.py#L5154"}}),Wp=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]"}],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.",name:"file"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/search.py#L523"}}),Kp=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"}],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.",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"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/search.py#L536"}}),Jp=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.8.0/en/package_reference/main_classes#datasets.Dataset.get_nearest_examples">get_nearest_examples()</a> or <a href="/docs/datasets/v2.8.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.8.0/src/datasets/arrow_dataset.py#L5213"}}),bl=new T({props:{anchor:"datasets.Dataset.add_elasticsearch_index.example",$$slots:{default:[Rfe]},$$scope:{ctx:k}}}),Qp=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.8.0/src/datasets/search.py#L614"}}),Zp=new E({props:{name:"list_indexes",anchor:"datasets.Dataset.list_indexes",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/search.py#L426"}}),em=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.8.0/src/datasets/search.py#L430",returnDescription:`
<p><code>BaseIndex</code></p>
`}}),am=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.8.0/src/datasets/search.py#L661"}}),sm=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"}],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.8.0/src/datasets/search.py#L670",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>
`}}),nm=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"}],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.8.0/src/datasets/search.py#L688",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>
`}}),rm=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"}],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.8.0/src/datasets/search.py#L706",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>
`}}),om=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"}],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.8.0/src/datasets/search.py#L728",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>
`}}),lm=new E({props:{name:"info",anchor:"datasets.Dataset.info",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L137"}}),im=new E({props:{name:"split",anchor:"datasets.Dataset.split",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L142"}}),dm=new E({props:{name:"builder_name",anchor:"datasets.Dataset.builder_name",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L147"}}),cm=new E({props:{name:"citation",anchor:"datasets.Dataset.citation",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L151"}}),pm=new E({props:{name:"config_name",anchor:"datasets.Dataset.config_name",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L155"}}),mm=new E({props:{name:"dataset_size",anchor:"datasets.Dataset.dataset_size",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L159"}}),hm=new E({props:{name:"description",anchor:"datasets.Dataset.description",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L163"}}),fm=new E({props:{name:"download_checksums",anchor:"datasets.Dataset.download_checksums",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L167"}}),gm=new E({props:{name:"download_size",anchor:"datasets.Dataset.download_size",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L171"}}),um=new E({props:{name:"features",anchor:"datasets.Dataset.features",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L175"}}),_m=new E({props:{name:"homepage",anchor:"datasets.Dataset.homepage",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L179"}}),bm=new E({props:{name:"license",anchor:"datasets.Dataset.license",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L183"}}),$m=new E({props:{name:"size_in_bytes",anchor:"datasets.Dataset.size_in_bytes",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L187"}}),xm=new E({props:{name:"supervised_keys",anchor:"datasets.Dataset.supervised_keys",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L191"}}),vm=new E({props:{name:"version",anchor:"datasets.Dataset.version",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L199"}}),ym=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.8.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.8.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.8.0/src/datasets/arrow_dataset.py#L900",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Il=new T({props:{anchor:"datasets.Dataset.from_csv.example",$$slots:{default:[Bfe]},$$scope:{ctx:k}}}),jm=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.8.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.8.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.8.0/src/datasets/arrow_dataset.py#L1021",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Tl=new T({props:{anchor:"datasets.Dataset.from_json.example",$$slots:{default:[Hfe]},$$scope:{ctx:k}}}),wm=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.8.0/src/datasets/arrow_dataset.py#L1078",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Nl=new T({props:{anchor:"datasets.Dataset.from_parquet.example",$$slots:{default:[Gfe]},$$scope:{ctx:k}}}),Dm=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.8.0/src/datasets/arrow_dataset.py#L1137",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Pl=new T({props:{anchor:"datasets.Dataset.from_text.example",$$slots:{default:[Wfe]},$$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.8.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.8.0/src/datasets/arrow_dataset.py#L1190",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a></p>
`}}),Al=new T({props:{anchor:"datasets.Dataset.from_sql.example",$$slots:{default:[Kfe]},$$scope:{ctx:k}}}),Ll=new Rhe({props:{$$slots:{default:[Yfe]},$$scope:{ctx:k}}}),Em=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="./package_reference/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.8.0/src/datasets/arrow_dataset.py#L2523"}}),qm=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.8.0/src/datasets/arrow_dataset.py#L5333"}}),Fl=new T({props:{anchor:"datasets.Dataset.align_labels_with_mapping.example",$$slots:{default:[Jfe]},$$scope:{ctx:k}}}),Tm=new E({props:{name:"datasets.concatenate_datasets",anchor:"datasets.concatenate_datasets",parameters:[{name:"dsets",val:": typing.List[datasets.arrow_dataset.Dataset]"},{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.8.0/src/datasets/combine.py#L139"}}),Cl=new T({props:{anchor:"datasets.concatenate_datasets.example",$$slots:{default:[Qfe]},$$scope:{ctx:k}}}),Nm=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.8.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.8.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.8.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.8.0/en/package_reference/main_classes#datasets.Dataset"
>Dataset</a> or <a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDataset"
>IterableDataset</a></p>
`}}),Ol=new T({props:{anchor:"datasets.interleave_datasets.example",$$slots:{default:[Zfe]},$$scope:{ctx:k}}}),Am=new E({props:{name:"datasets.enable_caching",anchor:"datasets.enable_caching",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/fingerprint.py#L96"}}),Fm=new E({props:{name:"datasets.disable_caching",anchor:"datasets.disable_caching",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/fingerprint.py#L117"}}),Om=new E({props:{name:"datasets.is_caching_enabled",anchor:"datasets.is_caching_enabled",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/fingerprint.py#L162"}}),Sm=new Na({}),Vm=new E({props:{name:"class datasets.DatasetDict",anchor:"datasets.DatasetDict",parameters:"",source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L40"}}),Um=new E({props:{name:"data",anchor:"datasets.DatasetDict.data",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L70"}}),Vl=new T({props:{anchor:"datasets.DatasetDict.data.example",$$slots:{default:[Xfe]},$$scope:{ctx:k}}}),Mm=new E({props:{name:"cache_files",anchor:"datasets.DatasetDict.cache_files",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L85"}}),Ul=new T({props:{anchor:"datasets.DatasetDict.cache_files.example",$$slots:{default:[ege]},$$scope:{ctx:k}}}),Rm=new E({props:{name:"num_columns",anchor:"datasets.DatasetDict.num_columns",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L103"}}),Ml=new T({props:{anchor:"datasets.DatasetDict.num_columns.example",$$slots:{default:[tge]},$$scope:{ctx:k}}}),Bm=new E({props:{name:"num_rows",anchor:"datasets.DatasetDict.num_rows",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L119"}}),Bl=new T({props:{anchor:"datasets.DatasetDict.num_rows.example",$$slots:{default:[age]},$$scope:{ctx:k}}}),Gm=new E({props:{name:"column_names",anchor:"datasets.DatasetDict.column_names",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L135"}}),Hl=new T({props:{anchor:"datasets.DatasetDict.column_names.example",$$slots:{default:[sge]},$$scope:{ctx:k}}}),Wm=new E({props:{name:"shape",anchor:"datasets.DatasetDict.shape",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L153"}}),Gl=new T({props:{anchor:"datasets.DatasetDict.shape.example",$$slots:{default:[nge]},$$scope:{ctx:k}}}),Km=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.8.0/en/package_reference/main_classes#datasets.Dataset.column_names">column_names</a>)`,name:"column"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L201",returnDescription:`
<p>Dictionary of unique elements in the given column.</p>
`,returnType:`
<p>Dict[<code>str</code>, <code>list</code>]</p>
`}}),Wl=new T({props:{anchor:"datasets.DatasetDict.unique.example",$$slots:{default:[rge]},$$scope:{ctx:k}}}),Ym=new E({props:{name:"cleanup_cache_files",anchor:"datasets.DatasetDict.cleanup_cache_files",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L225",returnDescription:`
<p><code>Dict</code> with the number of removed files for each split</p>
`}}),Kl=new T({props:{anchor:"datasets.DatasetDict.cleanup_cache_files.example",$$slots:{default:[oge]},$$scope:{ctx:k}}}),Jm=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:": bool = True"},{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>bool</code>, defaults to <code>True</code>) &#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.8.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.8.0/src/datasets/dataset_dict.py#L712"}}),Yl=new T({props:{anchor:"datasets.DatasetDict.map.example",$$slots:{default:[lge]},$$scope:{ctx:k}}}),Qm=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:": bool = True"},{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>bool</code>, defaults to <code>True</code>) &#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.8.0/src/datasets/dataset_dict.py#L840"}}),Jl=new T({props:{anchor:"datasets.DatasetDict.filter.example",$$slots:{default:[ige]},$$scope:{ctx:k}}}),Zm=new E({props:{name:"sort",anchor:"datasets.DatasetDict.sort",parameters:[{name:"column",val:": str"},{name:"reverse",val:": bool = False"},{name:"kind",val:": str = None"},{name:"null_placement",val:": str = 'last'"},{name:"keep_in_memory",val:": bool = False"},{name:"load_from_cache_file",val:": bool = True"},{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",description:`<strong>column</strong> (<code>str</code>) &#x2014;
Column name to sort by.`,name:"column"},{anchor:"datasets.DatasetDict.sort.reverse",description:`<strong>reverse</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, sort by descending order rather then ascending.`,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.`,name:"kind"},{anchor:"datasets.DatasetDict.sort.null_placement",description:`<strong>null_placement</strong> (<code>str</code>, defaults to <code>last</code>) &#x2014;
Put <code>None</code> values at the beginning if <code>first</code>; <code>last</code> puts <code>None</code> values at the end.</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.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>bool</code>, defaults to <code>True</code>) &#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.8.0/src/datasets/dataset_dict.py#L942"}}),Ql=new T({props:{anchor:"datasets.DatasetDict.sort.example",$$slots:{default:[dge]},$$scope:{ctx:k}}}),Xm=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:": bool = True"},{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>bool</code>, defaults to <code>True</code>) &#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.8.0/src/datasets/dataset_dict.py#L1017"}}),Zl=new T({props:{anchor:"datasets.DatasetDict.shuffle.example",$$slots:{default:[cge]},$$scope:{ctx:k}}}),eh=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, numpy, torch, tensorflow, pandas, arrow]</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.8.0/src/datasets/dataset_dict.py#L504"}}),Xl=new T({props:{anchor:"datasets.DatasetDict.set_format.example",$$slots:{default:[pge]},$$scope:{ctx:k}}}),ah=new E({props:{name:"reset_format",anchor:"datasets.DatasetDict.reset_format",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L550"}}),ei=new T({props:{anchor:"datasets.DatasetDict.reset_format.example",$$slots:{default:[mge]},$$scope:{ctx:k}}}),nh=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>, optional) &#x2014;
Output type selected in <code>[None, numpy, torch, tensorflow, pandas, arrow]</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.8.0/src/datasets/dataset_dict.py#L467"}}),rh=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;
Either output type selected in <code>[None, numpy, torch, tensorflow, pandas, arrow]</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.8.0/src/datasets/dataset_dict.py#L606"}}),ai=new T({props:{anchor:"datasets.DatasetDict.with_format.example",$$slots:{default:[hge]},$$scope:{ctx:k}}}),lh=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.8.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.8.0/src/datasets/dataset_dict.py#L658"}}),si=new T({props:{anchor:"datasets.DatasetDict.with_transform.example",$$slots:{default:[fge]},$$scope:{ctx:k}}}),ih=new E({props:{name:"flatten",anchor:"datasets.DatasetDict.flatten",parameters:[{name:"max_depth",val:" = 16"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L169"}}),ni=new T({props:{anchor:"datasets.DatasetDict.flatten.example",$$slots:{default:[gge]},$$scope:{ctx:k}}}),dh=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.8.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.8.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.8.0/src/datasets/dataset_dict.py#L249"}}),ri=new T({props:{anchor:"datasets.DatasetDict.cast.example",$$slots:{default:[uge]},$$scope:{ctx:k}}}),ch=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.8.0/src/datasets/dataset_dict.py#L284",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),oi=new T({props:{anchor:"datasets.DatasetDict.cast_column.example",$$slots:{default:[_ge]},$$scope:{ctx:k}}}),ph=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.8.0/src/datasets/dataset_dict.py#L313"}}),li=new T({props:{anchor:"datasets.DatasetDict.remove_columns.example",$$slots:{default:[bge]},$$scope:{ctx:k}}}),mh=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.8.0/src/datasets/dataset_dict.py#L352"}}),ii=new T({props:{anchor:"datasets.DatasetDict.rename_column.example",$$slots:{default:[$ge]},$$scope:{ctx:k}}}),fh=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.8.0/src/datasets/dataset_dict.py#L397",returnDescription:`
<p>A copy of the dataset with renamed columns.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),di=new T({props:{anchor:"datasets.DatasetDict.rename_columns.example",$$slots:{default:[xge]},$$scope:{ctx:k}}}),gh=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.8.0/src/datasets/dataset_dict.py#L435"}}),ci=new T({props:{anchor:"datasets.DatasetDict.class_encode_column.example",$$slots:{default:[vge]},$$scope:{ctx:k}}}),_h=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:"shard_size",val:": typing.Union[str, int, NoneType] = 'deprecated'"},{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.shard_size",description:`<strong>shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>) &#x2014;</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.4.0</p>
						
<p><code>shard_size</code> was renamed to <code>max_shard_size</code> in version 2.1.1 and will be removed in 2.4.0.</p>

					</div>`,name:"shard_size"},{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.8.0/en/package_reference/main_classes#datasets.Audio">Audio</a> and <a href="/docs/datasets/v2.8.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.8.0/src/datasets/dataset_dict.py#L1455"}}),pi=new T({props:{anchor:"datasets.DatasetDict.push_to_hub.example",$$slots:{default:[yge]},$$scope:{ctx:k}}}),bh=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>.
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.8.0/src/datasets/dataset_dict.py#L1100"}}),mi=new T({props:{anchor:"datasets.DatasetDict.save_to_disk.example",$$slots:{default:[jge]},$$scope:{ctx:k}}}),$h=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.8.0/src/datasets/dataset_dict.py#L1196",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),hi=new T({props:{anchor:"datasets.DatasetDict.load_from_disk.example",$$slots:{default:[wge]},$$scope:{ctx:k}}}),xh=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.8.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.8.0/src/datasets/dataset_dict.py#L1274",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),fi=new T({props:{anchor:"datasets.DatasetDict.from_csv.example",$$slots:{default:[Dge]},$$scope:{ctx:k}}}),yh=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.8.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.8.0/src/datasets/dataset_dict.py#L1313",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),gi=new T({props:{anchor:"datasets.DatasetDict.from_json.example",$$slots:{default:[kge]},$$scope:{ctx:k}}}),wh=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.8.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.8.0/src/datasets/dataset_dict.py#L1352",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),ui=new T({props:{anchor:"datasets.DatasetDict.from_parquet.example",$$slots:{default:[Ege]},$$scope:{ctx:k}}}),kh=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.8.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.8.0/src/datasets/dataset_dict.py#L1401",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"
>DatasetDict</a></p>
`}}),_i=new T({props:{anchor:"datasets.DatasetDict.from_text.example",$$slots:{default:[qge]},$$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="./package_reference/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.8.0/src/datasets/dataset_dict.py#L1440"}}),Ih=new Na({}),Th=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:"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.8.0/src/datasets/iterable_dataset.py#L735"}}),Nh=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.8.0/src/datasets/iterable_dataset.py#L878",returnType:`
<p><code>IterableDataset</code></p>
`}}),xi=new T({props:{anchor:"datasets.IterableDataset.from_generator.example",$$slots:{default:[Ige]},$$scope:{ctx:k}}}),vi=new T({props:{anchor:"datasets.IterableDataset.from_generator.example-2",$$slots:{default:[Tge]},$$scope:{ctx:k}}}),Ph=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.8.0/src/datasets/iterable_dataset.py#L1386",returnDescription:`
<p>A copy of the dataset object without the columns to remove.</p>
`,returnType:`
<p><code>IterableDataset</code></p>
`}}),yi=new T({props:{anchor:"datasets.IterableDataset.remove_columns.example",$$slots:{default:[Nge]},$$scope:{ctx:k}}}),Ah=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.8.0/src/datasets/iterable_dataset.py#L1420",returnType:`
<p><code>IterableDataset</code></p>
`}}),ji=new T({props:{anchor:"datasets.IterableDataset.cast_column.example",$$slots:{default:[Pge]},$$scope:{ctx:k}}}),Lh=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.8.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.8.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.8.0/src/datasets/iterable_dataset.py#L1470",returnDescription:`
<p>A copy of the dataset with casted features.</p>
`,returnType:`
<p><code>IterableDataset</code></p>
`}}),wi=new T({props:{anchor:"datasets.IterableDataset.cast.example",$$slots:{default:[Age]},$$scope:{ctx:k}}}),Fh=new E({props:{name:"__iter__",anchor:"datasets.IterableDataset.__iter__",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/iterable_dataset.py#L836"}}),Ch=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.8.0/src/datasets/iterable_dataset.py#L856"}}),zh=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.8.0/src/datasets/iterable_dataset.py#L959"}}),ki=new T({props:{anchor:"datasets.IterableDataset.map.example",$$slots:{default:[Lge]},$$scope:{ctx:k}}}),Vh=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.8.0/src/datasets/iterable_dataset.py#L1298",returnDescription:`
<p>A copy of the dataset with a renamed column.</p>
`,returnType:`
<p><code>IterableDataset</code></p>
`}}),Ei=new T({props:{anchor:"datasets.IterableDataset.rename_column.example",$$slots:{default:[Fge]},$$scope:{ctx:k}}}),Uh=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.8.0/src/datasets/iterable_dataset.py#L1070"}}),qi=new T({props:{anchor:"datasets.IterableDataset.filter.example",$$slots:{default:[Cge]},$$scope:{ctx:k}}}),Mh=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.8.0/src/datasets/iterable_dataset.py#L1142"}}),Ii=new T({props:{anchor:"datasets.IterableDataset.shuffle.example",$$slots:{default:[Oge]},$$scope:{ctx:k}}}),Bh=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.8.0/src/datasets/iterable_dataset.py#L1211"}}),Ti=new T({props:{anchor:"datasets.IterableDataset.skip.example",$$slots:{default:[zge]},$$scope:{ctx:k}}}),Hh=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.8.0/src/datasets/iterable_dataset.py#L1249"}}),Ni=new T({props:{anchor:"datasets.IterableDataset.take.example",$$slots:{default:[Sge]},$$scope:{ctx:k}}}),Gh=new E({props:{name:"info",anchor:"datasets.IterableDataset.info",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L137"}}),Wh=new E({props:{name:"split",anchor:"datasets.IterableDataset.split",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L142"}}),Kh=new E({props:{name:"builder_name",anchor:"datasets.IterableDataset.builder_name",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L147"}}),Yh=new E({props:{name:"citation",anchor:"datasets.IterableDataset.citation",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L151"}}),Jh=new E({props:{name:"config_name",anchor:"datasets.IterableDataset.config_name",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L155"}}),Qh=new E({props:{name:"dataset_size",anchor:"datasets.IterableDataset.dataset_size",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L159"}}),Zh=new E({props:{name:"description",anchor:"datasets.IterableDataset.description",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L163"}}),Xh=new E({props:{name:"download_checksums",anchor:"datasets.IterableDataset.download_checksums",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L167"}}),ef=new E({props:{name:"download_size",anchor:"datasets.IterableDataset.download_size",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L171"}}),tf=new E({props:{name:"features",anchor:"datasets.IterableDataset.features",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L175"}}),af=new E({props:{name:"homepage",anchor:"datasets.IterableDataset.homepage",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L179"}}),sf=new E({props:{name:"license",anchor:"datasets.IterableDataset.license",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L183"}}),nf=new E({props:{name:"size_in_bytes",anchor:"datasets.IterableDataset.size_in_bytes",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L187"}}),rf=new E({props:{name:"supervised_keys",anchor:"datasets.IterableDataset.supervised_keys",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L191"}}),of=new E({props:{name:"version",anchor:"datasets.IterableDataset.version",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/arrow_dataset.py#L199"}}),lf=new Na({}),df=new E({props:{name:"class datasets.IterableDatasetDict",anchor:"datasets.IterableDatasetDict",parameters:"",source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/dataset_dict.py#L1609"}}),cf=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.8.0/src/datasets/dataset_dict.py#L1639"}}),Ci=new T({props:{anchor:"datasets.IterableDatasetDict.map.example",$$slots:{default:[Vge]},$$scope:{ctx:k}}}),mf=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.8.0/src/datasets/dataset_dict.py#L1724"}}),Oi=new T({props:{anchor:"datasets.IterableDatasetDict.filter.example",$$slots:{default:[Uge]},$$scope:{ctx:k}}}),hf=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.8.0/src/datasets/dataset_dict.py#L1783"}}),zi=new T({props:{anchor:"datasets.IterableDatasetDict.shuffle.example",$$slots:{default:[Mge]},$$scope:{ctx:k}}}),ff=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.8.0/src/datasets/dataset_dict.py#L1610"}}),Si=new T({props:{anchor:"datasets.IterableDatasetDict.with_format.example",$$slots:{default:[Rge]},$$scope:{ctx:k}}}),gf=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.8.0/src/datasets/dataset_dict.py#L1959",returnDescription:`
<p>A copy of the dataset with casted features.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),Vi=new T({props:{anchor:"datasets.IterableDatasetDict.cast.example",$$slots:{default:[Bge]},$$scope:{ctx:k}}}),uf=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.8.0/src/datasets/dataset_dict.py#L1928",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),Ui=new T({props:{anchor:"datasets.IterableDatasetDict.cast_column.example",$$slots:{default:[Hge]},$$scope:{ctx:k}}}),_f=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.8.0/src/datasets/dataset_dict.py#L1902",returnDescription:`
<p>A copy of the dataset object without the columns to remove.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),Mi=new T({props:{anchor:"datasets.IterableDatasetDict.remove_columns.example",$$slots:{default:[Gge]},$$scope:{ctx:k}}}),bf=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.8.0/src/datasets/dataset_dict.py#L1841",returnDescription:`
<p>A copy of the dataset with a renamed column.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),Ri=new T({props:{anchor:"datasets.IterableDatasetDict.rename_column.example",$$slots:{default:[Wge]},$$scope:{ctx:k}}}),$f=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.8.0/src/datasets/dataset_dict.py#L1874",returnDescription:`
<p>A copy of the dataset with renamed columns</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDatasetDict"
>IterableDatasetDict</a></p>
`}}),Bi=new T({props:{anchor:"datasets.IterableDatasetDict.rename_columns.example",$$slots:{default:[Kge]},$$scope:{ctx:k}}}),xf=new Na({}),vf=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.8.0/src/datasets/features/features.py#L1519"}}),Gi=new Rhe({props:{$$slots:{default:[Yge]},$$scope:{ctx:k}}}),Ef=new E({props:{name:"copy",anchor:"datasets.Features.copy",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/features/features.py#L1889",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Features"
>Features</a></p>
`}}),Ki=new T({props:{anchor:"datasets.Features.copy.example",$$slots:{default:[Jge]},$$scope:{ctx:k}}}),If=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.8.0/src/datasets/features/features.py#L1862",returnDescription:`
<p><code>dict[str, list[Any]]</code></p>
`}}),Tf=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.8.0/src/datasets/features/features.py#L1844",returnDescription:`
<p><code>list[Any]</code></p>
`}}),Nf=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.8.0/src/datasets/features/features.py#L1821",returnDescription:`
<p><code>dict[str, Any]</code></p>
`}}),Pf=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.8.0/src/datasets/features/features.py#L1802",returnDescription:`
<p><code>dict[str, list[Any]]</code></p>
`}}),Af=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.8.0/src/datasets/features/features.py#L1788",returnDescription:`
<p><code>dict[str, Any]</code></p>
`}}),Lf=new E({props:{name:"flatten",anchor:"datasets.Features.flatten",parameters:[{name:"max_depth",val:" = 16"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/features/features.py#L1976",returnDescription:`
<p>The flattened features.</p>
`,returnType:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Features"
>Features</a></p>
`}}),ed=new T({props:{anchor:"datasets.Features.flatten.example",$$slots:{default:[Qge]},$$scope:{ctx:k}}}),Of=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.8.0/src/datasets/features/features.py#L1590",returnDescription:`
<p><a
  href="/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Features"
>Features</a></p>
`}}),Sf=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.8.0/src/datasets/features/features.py#L1611",returnType:`
<p><em>Features</em></p>
`}}),ad=new T({props:{anchor:"datasets.Features.from_dict.example",$$slots:{default:[Zge]},$$scope:{ctx:k}}}),Uf=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.8.0/src/datasets/features/features.py#L1909",returnDescription:`
<p>[<em>Features</em>]</p>
`}}),sd=new T({props:{anchor:"datasets.Features.reorder_fields_as.example",$$slots:{default:[Xge]},$$scope:{ctx:k}}}),Rf=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.8.0/src/datasets/features/features.py#L1088"}}),nd=new T({props:{anchor:"datasets.Sequence.example",$$slots:{default:[eue]},$$scope:{ctx:k}}}),Bf=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.8.0/src/datasets/features/features.py#L892"}}),rd=new T({props:{anchor:"datasets.ClassLabel.example",$$slots:{default:[tue]},$$scope:{ctx:k}}}),Gf=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.8.0/src/datasets/features/features.py#L1055",returnDescription:`
<p>Array in the <code>ClassLabel</code> arrow storage type.</p>
`,returnType:`
<p><code>pa.Int64Array</code></p>
`}}),Kf=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.8.0/src/datasets/features/features.py#L1009"}}),od=new T({props:{anchor:"datasets.ClassLabel.int2str.example",$$slots:{default:[aue]},$$scope:{ctx:k}}}),Jf=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.8.0/src/datasets/features/features.py#L964"}}),ld=new T({props:{anchor:"datasets.ClassLabel.str2int.example",$$slots:{default:[sue]},$$scope:{ctx:k}}}),Qf=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.8.0/src/datasets/features/features.py#L437"}}),id=new T({props:{anchor:"datasets.Value.example",$$slots:{default:[nue]},$$scope:{ctx:k}}}),Xf=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.8.0/src/datasets/features/translation.py#L12"}}),dd=new T({props:{anchor:"datasets.Translation.example",$$slots:{default:[rue]},$$scope:{ctx:k}}}),eg=new E({props:{name:"flatten",anchor:"datasets.Translation.flatten",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/features/translation.py#L44"}}),tg=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.8.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:[oue]},$$scope:{ctx:k}}}),ag=new E({props:{name:"flatten",anchor:"datasets.TranslationVariableLanguages.flatten",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/features/translation.py#L120"}}),sg=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.8.0/src/datasets/features/features.py#L522"}}),hd=new T({props:{anchor:"datasets.Array2D.example",$$slots:{default:[lue]},$$scope:{ctx:k}}}),ng=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.8.0/src/datasets/features/features.py#L547"}}),fd=new T({props:{anchor:"datasets.Array3D.example",$$slots:{default:[iue]},$$scope:{ctx:k}}}),rg=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.8.0/src/datasets/features/features.py#L572"}}),gd=new T({props:{anchor:"datasets.Array4D.example",$$slots:{default:[due]},$$scope:{ctx:k}}}),og=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.8.0/src/datasets/features/features.py#L597"}}),ud=new T({props:{anchor:"datasets.Array5D.example",$$slots:{default:[cue]},$$scope:{ctx:k}}}),lg=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.8.0/src/datasets/features/audio.py#L25"}}),_d=new T({props:{anchor:"datasets.Audio.example",$$slots:{default:[pue]},$$scope:{ctx:k}}}),hg=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.8.0/src/datasets/features/audio.py#L180",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>
`}}),fg=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.8.0/src/datasets/features/audio.py#L128",returnType:`
<p><code>dict</code></p>
`}}),gg=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.8.0/src/datasets/features/audio.py#L214",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>
`}}),ug=new E({props:{name:"encode_example",anchor:"datasets.Audio.encode_example",parameters:[{name:"value",val:": typing.Union[str, 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.8.0/src/datasets/features/audio.py#L81",returnType:`
<p><code>dict</code></p>
`}}),_g=new E({props:{name:"flatten",anchor:"datasets.Audio.flatten",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/features/audio.py#L169"}}),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.8.0/src/datasets/features/image.py#L26"}}),yd=new T({props:{anchor:"datasets.Image.example",$$slots:{default:[mue]},$$scope:{ctx:k}}}),Dg=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.8.0/src/datasets/features/image.py#L173",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>
`}}),kg=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.8.0/src/datasets/features/image.py#L109",returnDescription:`
<p><code>PIL.Image.Image</code></p>
`}}),Eg=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.8.0/src/datasets/features/image.py#L223",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>
`}}),qg=new E({props:{name:"encode_example",anchor:"datasets.Image.encode_example",parameters:[{name:"value",val:": typing.Union[str, 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.8.0/src/datasets/features/image.py#L71",returnDescription:`
<p><code>dict</code> with \u201Cpath\u201D and \u201Cbytes\u201D fields</p>
`}}),Ig=new E({props:{name:"flatten",anchor:"datasets.Image.flatten",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/features/image.py#L160"}}),Tg=new Na({}),Ng=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.8.0/src/datasets/info.py#L445"}}),Pg=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.8.0/src/datasets/info.py#L500"}}),qd=new T({props:{anchor:"datasets.MetricInfo.from_directory.example",$$slots:{default:[hue]},$$scope:{ctx:k}}}),Lg=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.8.0/src/datasets/info.py#L480"}}),Id=new T({props:{anchor:"datasets.MetricInfo.write_to_directory.example",$$slots:{default:[fue]},$$scope:{ctx:k}}}),Fg=new Na({}),Cg=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.8.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.8.0/src/datasets/metric.py#L146"}}),Nd=new Yhe({props:{version:"2.5.0",$$slots:{default:[gue]},$$scope:{ctx:k}}}),Og=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.8.0/src/datasets/metric.py#L521"}}),Pd=new T({props:{anchor:"datasets.Metric.add.example",$$slots:{default:[uue]},$$scope:{ctx:k}}}),zg=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.8.0/src/datasets/metric.py#L474"}}),Ad=new T({props:{anchor:"datasets.Metric.add_batch.example",$$slots:{default:[_ue]},$$scope:{ctx:k}}}),Sg=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.8.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>
`}}),Ld=new T({props:{anchor:"datasets.Metric.compute.example",$$slots:{default:[bue]},$$scope:{ctx:k}}}),Vg=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.8.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.8.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.8.0/src/datasets/metric.py#L604"}}),Ug=new Na({}),Mg=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.8.0/src/datasets/filesystems/s3filesystem.py#L4"}}),zd=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example",$$slots:{default:[$ue]},$$scope:{ctx:k}}}),Sd=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example-2",$$slots:{default:[xue]},$$scope:{ctx:k}}}),Vd=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example-3",$$slots:{default:[vue]},$$scope:{ctx:k}}}),Ud=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example-4",$$slots:{default:[yue]},$$scope:{ctx:k}}}),Md=new T({props:{anchor:"datasets.filesystems.S3FileSystem.example-5",$$slots:{default:[jue]},$$scope:{ctx:k}}}),Bg=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.8.0/src/datasets/filesystems/__init__.py#L30"}}),Hg=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.8.0/en/package_reference/main_classes#datasets.filesystems.S3FileSystem">datasets.filesystems.S3FileSystem</a>.`,name:"fs"}],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/filesystems/__init__.py#L43"}}),Gg=new Na({}),Wg=new E({props:{name:"class datasets.fingerprint.Hasher",anchor:"datasets.fingerprint.Hasher",parameters:[],source:"https://github.com/huggingface/datasets/blob/2.8.0/src/datasets/fingerprint.py#L212"}}),{c(){c=s("meta"),u=m(),f=s("h1"),d=s("a"),g=s("span"),_(t.$$.fragment),p=m(),de=s("span"),R=o("Main classes"),ce=m(),he=s("h2"),ke=s("a"),fe=s("span"),_(Pa.$$.fragment),du=m(),fo=s("span"),U3=o("DatasetInfo"),aE=m(),pe=s("div"),_(Nc.$$.fragment),M3=m(),d1=s("p"),R3=o("Information about a dataset."),B3=m(),cu=s("p"),c1=s("code"),H3=o("DatasetInfo"),G3=o(` documents datasets, including its name, version, and features.
See the constructor arguments and properties for a full list.`),W3=m(),p1=s("p"),K3=o("Not all fields are known on construction and may be updated later."),Y3=m(),Ee=s("div"),_(Pc.$$.fragment),J3=m(),Pn=s("p"),Q3=o("Create "),pu=s("a"),Z3=o("DatasetInfo"),X3=o(" from the JSON file in "),m1=s("code"),e5=o("dataset_info_dir"),t5=o("."),a5=m(),Ac=s("p"),s5=o(`This function updates all the dynamically generated fields (num_examples,
hash, time of creation,\u2026) of the `),mu=s("a"),n5=o("DatasetInfo"),r5=o("."),o5=m(),h1=s("p"),l5=o("This will overwrite all previous metadata."),i5=m(),_(go.$$.fragment),d5=m(),Aa=s("div"),_(Lc.$$.fragment),c5=m(),An=s("p"),p5=o("Write "),f1=s("code"),m5=o("DatasetInfo"),h5=o(" and license (if present) as JSON files to "),g1=s("code"),f5=o("dataset_info_dir"),g5=o("."),u5=m(),_(uo.$$.fragment),sE=m(),Ln=s("h2"),_o=s("a"),u1=s("span"),_(Fc.$$.fragment),_5=m(),_1=s("span"),b5=o("Dataset"),nE=m(),bo=s("p"),$5=o("The base class "),hu=s("a"),x5=o("Dataset"),v5=o(" implements a Dataset backed by an Apache Arrow table."),rE=m(),q=s("div"),_(Cc.$$.fragment),y5=m(),b1=s("p"),j5=o("A Dataset backed by an Arrow table."),w5=m(),gt=s("div"),_(Oc.$$.fragment),D5=m(),$1=s("p"),k5=o("Add column to Dataset."),E5=m(),x1=s("p"),q5=o("<Added version=\u201C1.7\u201D/>"),I5=m(),_($o.$$.fragment),T5=m(),ut=s("div"),_(zc.$$.fragment),N5=m(),v1=s("p"),P5=o("Add item to Dataset."),A5=m(),y1=s("p"),L5=o("<Added version=\u201C1.7\u201D/>"),F5=m(),_(xo.$$.fragment),C5=m(),vo=s("div"),_(Sc.$$.fragment),O5=m(),j1=s("p"),z5=o("Instantiate a Dataset backed by an Arrow table at filename."),S5=m(),yo=s("div"),_(Vc.$$.fragment),V5=m(),w1=s("p"),U5=o("Instantiate a Dataset backed by an Arrow buffer."),M5=m(),qe=s("div"),_(Uc.$$.fragment),R5=m(),Ut=s("p"),B5=o("Convert "),D1=s("code"),H5=o("pandas.DataFrame"),G5=o(" to a "),k1=s("code"),W5=o("pyarrow.Table"),K5=o(" to create a "),fu=s("a"),Y5=o("Dataset"),J5=o("."),Q5=m(),Fn=s("p"),Z5=o("The column types in the resulting Arrow Table are inferred from the dtypes of the "),E1=s("code"),X5=o("pandas.Series"),e6=o(` in the
DataFrame. In the case of non-object Series, the NumPy dtype is translated to its Arrow equivalent. In the
case of `),q1=s("code"),t6=o("object"),a6=o(", we need to guess the datatype by looking at the Python objects in this Series."),s6=m(),Mt=s("p"),n6=o("Be aware that Series of the "),I1=s("code"),r6=o("object"),o6=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 `),T1=s("code"),l6=o("None/nan"),i6=o(" objects, the type is set to "),N1=s("code"),d6=o("null"),c6=o(`. This behavior can be avoided by constructing explicit
features and passing it to this function.`),p6=m(),_(jo.$$.fragment),m6=m(),wo=s("div"),_(Mc.$$.fragment),h6=m(),Rt=s("p"),f6=o("Convert "),P1=s("code"),g6=o("dict"),u6=o(" to a "),A1=s("code"),_6=o("pyarrow.Table"),b6=o(" to create a "),gu=s("a"),$6=o("Dataset"),x6=o("."),v6=m(),_t=s("div"),_(Rc.$$.fragment),y6=m(),L1=s("p"),j6=o("Create a Dataset from a generator."),w6=m(),_(Do.$$.fragment),D6=m(),_(ko.$$.fragment),k6=m(),La=s("div"),_(Bc.$$.fragment),E6=m(),F1=s("p"),q6=o("The Apache Arrow table backing the dataset."),I6=m(),_(Eo.$$.fragment),T6=m(),Fa=s("div"),_(Hc.$$.fragment),N6=m(),C1=s("p"),P6=o("The cache files containing the Apache Arrow table backing the dataset."),A6=m(),_(qo.$$.fragment),L6=m(),Ca=s("div"),_(Gc.$$.fragment),F6=m(),O1=s("p"),C6=o("Number of columns in the dataset."),O6=m(),_(Io.$$.fragment),z6=m(),Oa=s("div"),_(Wc.$$.fragment),S6=m(),Kc=s("p"),V6=o("Number of rows in the dataset (same as "),To=s("a"),U6=o("Dataset."),z1=s("strong"),M6=o("len"),R6=o("()"),B6=o(")."),H6=m(),_(No.$$.fragment),G6=m(),za=s("div"),_(Yc.$$.fragment),W6=m(),S1=s("p"),K6=o("Names of the columns in the dataset."),Y6=m(),_(Po.$$.fragment),J6=m(),Sa=s("div"),_(Jc.$$.fragment),Q6=m(),V1=s("p"),Z6=o("Shape of the dataset (number of columns, number of rows)."),X6=m(),_(Ao.$$.fragment),eq=m(),bt=s("div"),_(Qc.$$.fragment),tq=m(),U1=s("p"),aq=o("Return a list of the unique elements in a column."),sq=m(),M1=s("p"),nq=o("This is implemented in the low-level backend and as such, very fast."),rq=m(),_(Lo.$$.fragment),oq=m(),Va=s("div"),_(Zc.$$.fragment),lq=m(),R1=s("p"),iq=o(`Flatten the table.
Each column with a struct type is flattened into one column per struct field.
Other columns are left unchanged.`),dq=m(),_(Fo.$$.fragment),cq=m(),Ua=s("div"),_(Xc.$$.fragment),pq=m(),B1=s("p"),mq=o("Cast the dataset to a new set of features."),hq=m(),_(Co.$$.fragment),fq=m(),Ma=s("div"),_(ep.$$.fragment),gq=m(),H1=s("p"),uq=o("Cast column to feature for decoding."),_q=m(),_(Oo.$$.fragment),bq=m(),$t=s("div"),_(tp.$$.fragment),$q=m(),G1=s("p"),xq=o("Remove one or several column(s) in the dataset and the features associated to them."),vq=m(),Cn=s("p"),yq=o("You can also remove a column using "),uu=s("a"),jq=o("map()"),wq=o(" with "),W1=s("code"),Dq=o("remove_columns"),kq=o(` but the present method
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),Eq=m(),_(zo.$$.fragment),qq=m(),Ra=s("div"),_(ap.$$.fragment),Iq=m(),K1=s("p"),Tq=o(`Rename a column in the dataset, and move the features associated to the original column under the new column
name.`),Nq=m(),_(So.$$.fragment),Pq=m(),Ba=s("div"),_(sp.$$.fragment),Aq=m(),Y1=s("p"),Lq=o(`Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.`),Fq=m(),_(Vo.$$.fragment),Cq=m(),Ha=s("div"),_(np.$$.fragment),Oq=m(),J1=s("p"),zq=o("Casts the given column as [~`datasets.features.ClassLabel]` and updates the table."),Sq=m(),_(Uo.$$.fragment),Vq=m(),Ga=s("div"),_(rp.$$.fragment),Uq=m(),Q1=s("p"),Mq=o("Number of rows in the dataset."),Rq=m(),_(Mo.$$.fragment),Bq=m(),Wa=s("div"),_(op.$$.fragment),Hq=m(),Z1=s("p"),Gq=o("Iterate through the examples."),Wq=m(),lp=s("p"),Kq=o("If a formatting is set with "),_u=s("a"),Yq=o("Dataset.set_format()"),Jq=o(` rows will be returned with the
selected format.`),Qq=m(),Ka=s("div"),_(ip.$$.fragment),Zq=m(),dp=s("p"),Xq=o("Iterate through the batches of size "),X1=s("em"),e9=o("batch_size"),t9=o("."),a9=m(),cp=s("p"),s9=o("If a formatting is set with ["),ex=s("em"),n9=o("~datasets.Dataset.set_format"),r9=o(`] rows will be returned with the
selected format.`),o9=m(),Ro=s("div"),_(pp.$$.fragment),l9=m(),On=s("p"),i9=o("To be used in a "),tx=s("code"),d9=o("with"),c9=o(" statement. Set "),ax=s("code"),p9=o("__getitem__"),m9=o(" return format (type and columns)."),h9=m(),Ie=s("div"),_(mp.$$.fragment),f9=m(),We=s("p"),g9=o("Set "),sx=s("code"),u9=o("__getitem__"),_9=o(` return format (type and columns). The data formatting is applied on-the-fly.
The format `),nx=s("code"),b9=o("type"),$9=o(" (for example \u201Cnumpy\u201D) is used to format batches when using "),rx=s("code"),x9=o("__getitem__"),v9=o(`.
It\u2019s also possible to use custom transforms for formatting using `),bu=s("a"),y9=o("set_transform()"),j9=o("."),w9=m(),Bt=s("p"),D9=o("It is possible to call "),$u=s("a"),k9=o("map()"),E9=o(" after calling "),ox=s("code"),q9=o("set_format"),I9=o(". Since "),lx=s("code"),T9=o("map"),N9=o(" may add new columns, then the list of formatted columns"),P9=m(),_(Bo.$$.fragment),A9=m(),_(Ho.$$.fragment),L9=m(),Ya=s("div"),_(hp.$$.fragment),F9=m(),Ke=s("p"),C9=o("Set "),ix=s("code"),O9=o("__getitem__"),z9=o(" return format using this transform. The transform is applied on-the-fly on batches when "),dx=s("code"),S9=o("__getitem__"),V9=o(` is called.
As `),xu=s("a"),U9=o("set_format()"),M9=o(", this can be reset using "),vu=s("a"),R9=o("reset_format()"),B9=o("."),H9=m(),_(Go.$$.fragment),G9=m(),xt=s("div"),_(fp.$$.fragment),W9=m(),gp=s("p"),K9=o("Reset "),cx=s("code"),Y9=o("__getitem__"),J9=o(" return format to python objects and all columns."),Q9=m(),yu=s("p"),Z9=o("Same as "),px=s("code"),X9=o("self.set_format()"),eI=m(),_(Wo.$$.fragment),tI=m(),Te=s("div"),_(up.$$.fragment),aI=m(),Ht=s("p"),sI=o("Set "),mx=s("code"),nI=o("__getitem__"),rI=o(` return format (type and columns). The data formatting is applied on-the-fly.
The format `),hx=s("code"),oI=o("type"),lI=o(" (for example \u201Cnumpy\u201D) is used to format batches when using "),fx=s("code"),iI=o("__getitem__"),dI=o("."),cI=m(),_p=s("p"),pI=o("It\u2019s also possible to use custom transforms for formatting using "),ju=s("a"),mI=o("with_transform()"),hI=o("."),fI=m(),Gt=s("p"),gI=o("Contrary to "),wu=s("a"),uI=o("set_format()"),_I=o(", "),gx=s("code"),bI=o("with_format"),$I=o(" returns a new "),Du=s("a"),xI=o("Dataset"),vI=o(" object."),yI=m(),_(Ko.$$.fragment),jI=m(),Ne=s("div"),_(bp.$$.fragment),wI=m(),zn=s("p"),DI=o("Set "),ux=s("code"),kI=o("__getitem__"),EI=o(" return format using this transform. The transform is applied on-the-fly on batches when "),_x=s("code"),qI=o("__getitem__"),II=o(" is called."),TI=m(),Sn=s("p"),NI=o("As "),ku=s("a"),PI=o("set_format()"),AI=o(", this can be reset using "),Eu=s("a"),LI=o("reset_format()"),FI=o("."),CI=m(),Wt=s("p"),OI=o("Contrary to "),qu=s("a"),zI=o("set_transform()"),SI=o(", "),bx=s("code"),VI=o("with_transform"),UI=o(" returns a new "),Iu=s("a"),MI=o("Dataset"),RI=o(" object."),BI=m(),_(Yo.$$.fragment),HI=m(),Jo=s("div"),_($p.$$.fragment),GI=m(),$x=s("p"),WI=o("Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."),KI=m(),vt=s("div"),_(xp.$$.fragment),YI=m(),xx=s("p"),JI=o(`Clean up all cache files in the dataset cache directory, excepted the currently used cache file if there is
one.`),QI=m(),vx=s("p"),ZI=o("Be careful when running this command that no other process is currently using other cache files."),XI=m(),_(Qo.$$.fragment),eT=m(),Pe=s("div"),_(vp.$$.fragment),tT=m(),yx=s("p"),aT=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.`),sT=m(),yp=s("p"),nT=o("You can specify whether the function should be batched or not with the "),jx=s("code"),rT=o("batched"),oT=o(" parameter:"),lT=m(),Vn=s("ul"),Un=s("li"),iT=o("If batched is "),wx=s("code"),dT=o("False"),cT=o(`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),Dx=s("code"),pT=o('{"text": "Hello there !"}'),mT=o("."),hT=m(),Kt=s("li"),fT=o("If batched is "),kx=s("code"),gT=o("True"),uT=o(" and "),Ex=s("code"),_T=o("batch_size"),bT=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 `),qx=s("code"),$T=o('{"text": ["Hello there !"]}'),xT=o("."),vT=m(),K=s("li"),yT=o("If batched is "),Ix=s("code"),jT=o("True"),wT=o(" and "),Tx=s("code"),DT=o("batch_size"),kT=o(" is "),Nx=s("code"),ET=o("n > 1"),qT=o(", then the function takes a batch of "),Px=s("code"),IT=o("n"),TT=o(" examples as input and can return a batch with "),Ax=s("code"),NT=o("n"),PT=o(` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),Lx=s("code"),AT=o("n"),LT=o(` examples.
A batch is a dictionary, e.g. a batch of `),Fx=s("code"),FT=o("n"),CT=o(" examples is "),Cx=s("code"),OT=o('{"text": ["Hello there !"] * n}'),zT=o("."),ST=m(),_(Zo.$$.fragment),VT=m(),Ja=s("div"),_(jp.$$.fragment),UT=m(),Ox=s("p"),MT=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.`),RT=m(),_(Xo.$$.fragment),BT=m(),Qa=s("div"),_(wp.$$.fragment),HT=m(),zx=s("p"),GT=o("Create a new dataset with rows selected following the list/array of indices."),WT=m(),_(el.$$.fragment),KT=m(),yt=s("div"),_(Dp.$$.fragment),YT=m(),Sx=s("p"),JT=o("Create a new dataset sorted according to a column."),QT=m(),Vx=s("p"),ZT=o(`Currently sorting according to a column name uses pandas sorting algorithm under the hood.
The column should thus be a pandas compatible type (in particular not a nested type).
This also means that the column used for sorting is fully loaded in memory (which should be fine in most cases).`),XT=m(),_(tl.$$.fragment),eN=m(),jt=s("div"),_(kp.$$.fragment),tN=m(),Ux=s("p"),aN=o("Create a new Dataset where the rows are shuffled."),sN=m(),Mx=s("p"),nN=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).`),rN=m(),_(al.$$.fragment),oN=m(),wt=s("div"),_(Ep.$$.fragment),lN=m(),ee=s("p"),iN=o("Return a dictionary ("),Tu=s("a"),dN=o("datasets.DatasetDict"),cN=o(") with two random train and test subsets ("),Rx=s("code"),pN=o("train"),mN=o(" and "),Bx=s("code"),hN=o("test"),fN=m(),Hx=s("code"),gN=o("Dataset"),uN=o(` splits).
Splits are created from the dataset according to `),Gx=s("code"),_N=o("test_size"),bN=o(", "),Wx=s("code"),$N=o("train_size"),xN=o(" and "),Kx=s("code"),vN=o("shuffle"),yN=o("."),jN=m(),qp=s("p"),wN=o("This method is similar to scikit-learn "),Yx=s("code"),DN=o("train_test_split"),kN=o("."),EN=m(),_(sl.$$.fragment),qN=m(),ge=s("div"),_(Ip.$$.fragment),IN=m(),Mn=s("p"),TN=o("Return the "),Jx=s("code"),NN=o("index"),PN=o("-nth shard from dataset split into "),Qx=s("code"),AN=o("num_shards"),LN=o(" pieces."),FN=m(),Rn=s("p"),CN=o("This shards deterministically. "),Zx=s("code"),ON=o("dset.shard(n, i)"),zN=o(` will contain all elements of dset whose
index mod `),Xx=s("code"),SN=o("n = i"),VN=o("."),UN=m(),ue=s("p"),ev=s("code"),MN=o("dset.shard(n, i, contiguous=True)"),RN=o(` will instead split dset into contiguous chunks,
so it can be easily concatenated back together after processing. If `),tv=s("code"),BN=o("n % i == l"),HN=o(`, then the
first `),av=s("code"),GN=o("l"),WN=o(" shards will have length "),sv=s("code"),KN=o("(n // i) + 1"),YN=o(", and the remaining shards will have length "),nv=s("code"),JN=o("(n // i)"),QN=o(`.
`),rv=s("code"),ZN=o("datasets.concatenate([dset.shard(n, i, contiguous=True) for i in range(n)])"),XN=o(` will return
a dataset with the same order as the original.`),eP=m(),Tp=s("p"),tP=o("Be sure to shard before using any randomizing operator (such as "),ov=s("code"),aP=o("shuffle"),sP=o(`).
It is best if the shard operator is used early in the dataset pipeline.`),nP=m(),_(nl.$$.fragment),rP=m(),Za=s("div"),_(Np.$$.fragment),oP=m(),te=s("p"),lP=o("Create a "),lv=s("code"),iP=o("tf.data.Dataset"),dP=o(" from the underlying Dataset. This "),iv=s("code"),cP=o("tf.data.Dataset"),pP=o(` will load and collate batches from
the Dataset, and is suitable for passing to methods like `),dv=s("code"),mP=o("model.fit()"),hP=o(" or "),cv=s("code"),fP=o("model.predict()"),gP=o(`. The dataset will yield
`),pv=s("code"),uP=o("dicts"),_P=o(" for both inputs and labels unless the "),mv=s("code"),bP=o("dict"),$P=o(` would contain only a single key, in which case a raw
`),hv=s("code"),xP=o("tf.Tensor"),vP=o(" is yielded instead."),yP=m(),_(rl.$$.fragment),jP=m(),Dt=s("div"),_(Pp.$$.fragment),wP=m(),fv=s("p"),DP=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.`),kP=m(),Ye=s("p"),EP=o("The resulting Parquet files are self-contained by default. If your dataset contains "),Nu=s("a"),qP=o("Image"),IP=o(" or "),Pu=s("a"),TP=o("Audio"),NP=o(`
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `),gv=s("code"),PP=o("embed_external_files"),AP=o(" to "),uv=s("code"),LP=o("False"),FP=o("."),CP=m(),_(ol.$$.fragment),OP=m(),Ae=s("div"),_(Ap.$$.fragment),zP=m(),Bn=s("p"),SP=o("Saves a dataset to a dataset directory, or in a filesystem using either "),_v=s("code"),VP=o("s3fs.S3FileSystem"),UP=o(` or
any implementation of `),bv=s("code"),MP=o("fsspec.spec.AbstractFileSystem"),RP=o("."),BP=m(),Hn=s("p"),HP=o("For "),Au=s("a"),GP=o("Image"),WP=o(" and "),Lu=s("a"),KP=o("Audio"),YP=o(" data:"),JP=m(),$v=s("p"),QP=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.`),ZP=m(),_(ll.$$.fragment),XP=m(),Xa=s("div"),_(Lp.$$.fragment),eA=m(),Yt=s("p"),tA=o("Loads a dataset that was previously saved using "),xv=s("code"),aA=o("save_to_disk"),sA=o(` from a dataset directory, or from a
filesystem using either `),vv=s("code"),nA=o("s3fs.S3FileSystem"),rA=o(` or any implementation of
`),yv=s("code"),oA=o("fsspec.spec.AbstractFileSystem"),lA=o("."),iA=m(),_(il.$$.fragment),dA=m(),dl=s("div"),_(Fp.$$.fragment),cA=m(),jv=s("p"),pA=o("Create and cache a new Dataset by flattening the indices mapping."),mA=m(),es=s("div"),_(Cp.$$.fragment),hA=m(),wv=s("p"),fA=o("Exports the dataset to csv"),gA=m(),_(cl.$$.fragment),uA=m(),ts=s("div"),_(Op.$$.fragment),_A=m(),zp=s("p"),bA=o("Returns the dataset as a "),Dv=s("code"),$A=o("pandas.DataFrame"),xA=o(". Can also return a generator for large datasets."),vA=m(),_(pl.$$.fragment),yA=m(),as=s("div"),_(Sp.$$.fragment),jA=m(),kv=s("p"),wA=o("Returns the dataset as a Python dict. Can also return a generator for large datasets."),DA=m(),_(ml.$$.fragment),kA=m(),ss=s("div"),_(Vp.$$.fragment),EA=m(),Ev=s("p"),qA=o("Export the dataset to JSON Lines or JSON."),IA=m(),_(hl.$$.fragment),TA=m(),ns=s("div"),_(Up.$$.fragment),NA=m(),qv=s("p"),PA=o("Exports the dataset to parquet"),AA=m(),_(fl.$$.fragment),LA=m(),rs=s("div"),_(Mp.$$.fragment),FA=m(),Iv=s("p"),CA=o("Exports the dataset to a SQL database."),OA=m(),_(gl.$$.fragment),zA=m(),kt=s("div"),_(Rp.$$.fragment),SA=m(),Gn=s("p"),VA=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 `),Tv=s("code"),UA=o("device"),MA=o(" if you want to run it on GPU ("),Nv=s("code"),RA=o("device"),BA=o(` must be the GPU index).
You can find more information about Faiss here:`),HA=m(),Pv=s("ul"),Fu=s("li"),GA=o("For "),Bp=s("a"),WA=o("string factory"),KA=m(),_(ul.$$.fragment),YA=m(),os=s("div"),_(Hp.$$.fragment),JA=m(),Jt=s("p"),QA=o(`Add a dense index using Faiss for fast retrieval.
The index is created using the vectors of `),Av=s("code"),ZA=o("external_arrays"),XA=o(`.
You can specify `),Lv=s("code"),eL=o("device"),tL=o(" if you want to run it on GPU ("),Fv=s("code"),aL=o("device"),sL=o(` must be the GPU index).
You can find more information about Faiss here:`),nL=m(),Cv=s("ul"),Cu=s("li"),rL=o("For "),Gp=s("a"),oL=o("string factory"),lL=m(),_l=s("div"),_(Wp.$$.fragment),iL=m(),Ov=s("p"),dL=o("Save a FaissIndex on disk."),cL=m(),ls=s("div"),_(Kp.$$.fragment),pL=m(),zv=s("p"),mL=o("Load a FaissIndex from disk."),hL=m(),Yp=s("p"),fL=o(`If you want to do additional configurations, you can have access to the faiss index object by doing
`),Sv=s("code"),gL=o(".get_index(index_name).faiss_index"),uL=o(" to make it fit your needs."),_L=m(),is=s("div"),_(Jp.$$.fragment),bL=m(),Vv=s("p"),$L=o("Add a text index using ElasticSearch for fast retrieval. This is done in-place."),xL=m(),_(bl.$$.fragment),vL=m(),$l=s("div"),_(Qp.$$.fragment),yL=m(),Uv=s("p"),jL=o("Load an existing text index using ElasticSearch for fast retrieval."),wL=m(),xl=s("div"),_(Zp.$$.fragment),DL=m(),Xp=s("p"),kL=o("List the "),Mv=s("code"),EL=o("colindex_nameumns"),qL=o("/identifiers of all the attached indexes."),IL=m(),vl=s("div"),_(em.$$.fragment),TL=m(),tm=s("p"),NL=o("List the "),Rv=s("code"),PL=o("index_name"),AL=o("/identifiers of all the attached indexes."),LL=m(),yl=s("div"),_(am.$$.fragment),FL=m(),Bv=s("p"),CL=o("Drop the index with the specified column."),OL=m(),jl=s("div"),_(sm.$$.fragment),zL=m(),Hv=s("p"),SL=o("Find the nearest examples indices in the dataset to the query."),VL=m(),wl=s("div"),_(nm.$$.fragment),UL=m(),Gv=s("p"),ML=o("Find the nearest examples indices in the dataset to the query."),RL=m(),Dl=s("div"),_(rm.$$.fragment),BL=m(),Wv=s("p"),HL=o("Find the nearest examples in the dataset to the query."),GL=m(),kl=s("div"),_(om.$$.fragment),WL=m(),Kv=s("p"),KL=o("Find the nearest examples in the dataset to the query."),YL=m(),El=s("div"),_(lm.$$.fragment),JL=m(),Ou=s("p"),zu=s("a"),QL=o("DatasetInfo"),ZL=o(" object containing all the metadata in the dataset."),XL=m(),ql=s("div"),_(im.$$.fragment),eF=m(),Su=s("p"),Vu=s("a"),tF=o("NamedSplit"),aF=o(" object corresponding to a named dataset split."),sF=m(),Uu=s("div"),_(dm.$$.fragment),nF=m(),Mu=s("div"),_(cm.$$.fragment),rF=m(),Ru=s("div"),_(pm.$$.fragment),oF=m(),Bu=s("div"),_(mm.$$.fragment),lF=m(),Hu=s("div"),_(hm.$$.fragment),iF=m(),Gu=s("div"),_(fm.$$.fragment),dF=m(),Wu=s("div"),_(gm.$$.fragment),cF=m(),Ku=s("div"),_(um.$$.fragment),pF=m(),Yu=s("div"),_(_m.$$.fragment),mF=m(),Ju=s("div"),_(bm.$$.fragment),hF=m(),Qu=s("div"),_($m.$$.fragment),fF=m(),Zu=s("div"),_(xm.$$.fragment),gF=m(),Xu=s("div"),_(vm.$$.fragment),uF=m(),ds=s("div"),_(ym.$$.fragment),_F=m(),Yv=s("p"),bF=o("Create Dataset from CSV file(s)."),$F=m(),_(Il.$$.fragment),xF=m(),cs=s("div"),_(jm.$$.fragment),vF=m(),Jv=s("p"),yF=o("Create Dataset from JSON or JSON Lines file(s)."),jF=m(),_(Tl.$$.fragment),wF=m(),ps=s("div"),_(wm.$$.fragment),DF=m(),Qv=s("p"),kF=o("Create Dataset from Parquet file(s)."),EF=m(),_(Nl.$$.fragment),qF=m(),ms=s("div"),_(Dm.$$.fragment),IF=m(),Zv=s("p"),TF=o("Create Dataset from text file(s)."),NF=m(),_(Pl.$$.fragment),PF=m(),Et=s("div"),_(km.$$.fragment),AF=m(),Xv=s("p"),LF=o("Create Dataset from SQL query or database table."),FF=m(),_(Al.$$.fragment),CF=m(),_(Ll.$$.fragment),OF=m(),hs=s("div"),_(Em.$$.fragment),zF=m(),Wn=s("p"),SF=o("Prepare a dataset for the given task by casting the dataset\u2019s "),e_=s("a"),VF=o("Features"),UF=o(" to standardized column names and types as detailed in "),t_=s("a"),e0=s("code"),MF=o("datasets.tasks"),RF=o("."),BF=m(),Kn=s("p"),HF=o("Casts "),t0=s("code"),GF=o("datasets.DatasetInfo.features"),WF=o(" according to a task-specific schema. Intended for single-use only, so all task templates are removed from "),a0=s("code"),KF=o("datasets.DatasetInfo.task_templates"),YF=o(" after casting."),JF=m(),fs=s("div"),_(qm.$$.fragment),QF=m(),Im=s("p"),ZF=o("Align the dataset\u2019s label ID and label name mapping to match an input "),s0=s("code"),XF=o("label2id"),eC=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.`),tC=m(),_(Fl.$$.fragment),oE=m(),Qt=s("div"),_(Tm.$$.fragment),aC=m(),Yn=s("p"),sC=o("Converts a list of "),a_=s("a"),nC=o("Dataset"),rC=o(" with the same schema into a single "),s_=s("a"),oC=o("Dataset"),lC=o("."),iC=m(),_(Cl.$$.fragment),lE=m(),ae=s("div"),_(Nm.$$.fragment),dC=m(),n0=s("p"),cC=o(`Interleave several datasets (sources) into a single dataset.
The new dataset is constructed by alternating between the sources to get the examples.`),pC=m(),Jn=s("p"),mC=o("You can use this function on a list of "),n_=s("a"),hC=o("Dataset"),fC=o(" objects, or on a list of "),r_=s("a"),gC=o("IterableDataset"),uC=o(" objects."),_C=m(),Pm=s("ul"),Qn=s("li"),bC=o("If "),r0=s("code"),$C=o("probabilities"),xC=o(" is "),o0=s("code"),vC=o("None"),yC=o(" (default) the new dataset is constructed by cycling between each source to get the examples."),jC=m(),Zn=s("li"),wC=o("If "),l0=s("code"),DC=o("probabilities"),kC=o(" is not "),i0=s("code"),EC=o("None"),qC=o(", the new dataset is constructed by getting examples from a random source at a time according to the provided probabilities."),IC=m(),Xn=s("p"),TC=o("The resulting dataset ends when one of the source datasets runs out of examples except when "),d0=s("code"),NC=o("oversampling"),PC=o(" is "),c0=s("code"),AC=o("True"),LC=o(`,
in which case, the resulting dataset ends when all datasets have ran out of examples at least one time.`),FC=m(),p0=s("p"),CC=o("Example:"),OC=m(),_(Ol.$$.fragment),iE=m(),ye=s("div"),_(Am.$$.fragment),zC=m(),m0=s("p"),SC=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.`),VC=m(),h0=s("p"),UC=o(`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),MC=m(),f0=s("p"),RC=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:`),BC=m(),Je=s("ul"),g0=s("li"),HC=o("cache files are always recreated"),GC=m(),u0=s("li"),WC=o("cache files are written to a temporary directory that is deleted when session closes"),KC=m(),_0=s("li"),YC=o("cache files are named using a random hash instead of the dataset fingerprint"),JC=m(),Lm=s("li"),QC=o("use "),o_=s("a"),ZC=o("save_to_disk()"),XC=o(" to save a transformed dataset or it will be deleted when session closes"),eO=m(),Zt=s("li"),tO=o("caching doesn\u2019t affect "),l_=s("a"),aO=o("load_dataset()"),sO=o(`. If you want to regenerate a dataset from scratch you should use
the `),b0=s("code"),nO=o("download_mode"),rO=o(" parameter in "),i_=s("a"),oO=o("load_dataset()"),lO=o("."),dE=m(),je=s("div"),_(Fm.$$.fragment),iO=m(),$0=s("p"),dO=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.`),cO=m(),x0=s("p"),pO=o(`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),mO=m(),v0=s("p"),hO=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:`),fO=m(),Qe=s("ul"),y0=s("li"),gO=o("cache files are always recreated"),uO=m(),j0=s("li"),_O=o("cache files are written to a temporary directory that is deleted when session closes"),bO=m(),w0=s("li"),$O=o("cache files are named using a random hash instead of the dataset fingerprint"),xO=m(),Cm=s("li"),vO=o("use "),d_=s("a"),yO=o("save_to_disk()"),jO=o(" to save a transformed dataset or it will be deleted when session closes"),wO=m(),Xt=s("li"),DO=o("caching doesn\u2019t affect "),c_=s("a"),kO=o("load_dataset()"),EO=o(`. If you want to regenerate a dataset from scratch you should use
the `),D0=s("code"),qO=o("download_mode"),IO=o(" parameter in "),p_=s("a"),TO=o("load_dataset()"),NO=o("."),cE=m(),we=s("div"),_(Om.$$.fragment),PO=m(),k0=s("p"),AO=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.`),LO=m(),E0=s("p"),FO=o(`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),CO=m(),q0=s("p"),OO=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:`),zO=m(),Ze=s("ul"),I0=s("li"),SO=o("cache files are always recreated"),VO=m(),T0=s("li"),UO=o("cache files are written to a temporary directory that is deleted when session closes"),MO=m(),N0=s("li"),RO=o("cache files are named using a random hash instead of the dataset fingerprint"),BO=m(),zm=s("li"),HO=o("use "),m_=s("a"),GO=o("save_to_disk()"),WO=o("] to save a transformed dataset or it will be deleted when session closes"),KO=m(),ea=s("li"),YO=o("caching doesn\u2019t affect "),h_=s("a"),JO=o("load_dataset()"),QO=o(`. If you want to regenerate a dataset from scratch you should use
the `),P0=s("code"),ZO=o("download_mode"),XO=o(" parameter in "),f_=s("a"),ez=o("load_dataset()"),tz=o("."),pE=m(),er=s("h2"),zl=s("a"),A0=s("span"),_(Sm.$$.fragment),az=m(),L0=s("span"),sz=o("DatasetDict"),mE=m(),Sl=s("p"),nz=o("Dictionary with split names as keys (\u2018train\u2019, \u2018test\u2019 for example), and "),F0=s("code"),rz=o("Dataset"),oz=o(` objects as values.
It also has dataset transform methods like map or filter, to process all the splits at once.`),hE=m(),A=s("div"),_(Vm.$$.fragment),lz=m(),C0=s("p"),iz=o("A dictionary (dict of str: datasets.Dataset) with dataset transforms methods (map, filter, etc.)"),dz=m(),gs=s("div"),_(Um.$$.fragment),cz=m(),O0=s("p"),pz=o("The Apache Arrow tables backing each split."),mz=m(),_(Vl.$$.fragment),hz=m(),us=s("div"),_(Mm.$$.fragment),fz=m(),z0=s("p"),gz=o("The cache files containing the Apache Arrow table backing each split."),uz=m(),_(Ul.$$.fragment),_z=m(),_s=s("div"),_(Rm.$$.fragment),bz=m(),S0=s("p"),$z=o("Number of columns in each split of the dataset."),xz=m(),_(Ml.$$.fragment),vz=m(),bs=s("div"),_(Bm.$$.fragment),yz=m(),Hm=s("p"),jz=o("Number of rows in each split of the dataset (same as "),Rl=s("a"),wz=o("datasets.Dataset."),V0=s("strong"),Dz=o("len"),kz=o("()"),Ez=o(")."),qz=m(),_(Bl.$$.fragment),Iz=m(),$s=s("div"),_(Gm.$$.fragment),Tz=m(),U0=s("p"),Nz=o("Names of the columns in each split of the dataset."),Pz=m(),_(Hl.$$.fragment),Az=m(),xs=s("div"),_(Wm.$$.fragment),Lz=m(),M0=s("p"),Fz=o("Shape of each split of the dataset (number of columns, number of rows)."),Cz=m(),_(Gl.$$.fragment),Oz=m(),qt=s("div"),_(Km.$$.fragment),zz=m(),R0=s("p"),Sz=o("Return a list of the unique elements in a column for each split."),Vz=m(),B0=s("p"),Uz=o("This is implemented in the low-level backend and as such, very fast."),Mz=m(),_(Wl.$$.fragment),Rz=m(),vs=s("div"),_(Ym.$$.fragment),Bz=m(),H0=s("p"),Hz=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.`),Gz=m(),_(Kl.$$.fragment),Wz=m(),ys=s("div"),_(Jm.$$.fragment),Kz=m(),G0=s("p"),Yz=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.`),Jz=m(),_(Yl.$$.fragment),Qz=m(),js=s("div"),_(Qm.$$.fragment),Zz=m(),W0=s("p"),Xz=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.`),eS=m(),_(Jl.$$.fragment),tS=m(),It=s("div"),_(Zm.$$.fragment),aS=m(),K0=s("p"),sS=o(`Create a new dataset sorted according to a column.
The transformation is applied to all the datasets of the dataset dictionary.`),nS=m(),Y0=s("p"),rS=o(`Currently sorting according to a column name uses pandas sorting algorithm under the hood.
The column should thus be a pandas compatible type (in particular not a nested type).
This also means that the column used for sorting is fully loaded in memory (which should be fine in most cases).`),oS=m(),_(Ql.$$.fragment),lS=m(),Le=s("div"),_(Xm.$$.fragment),iS=m(),J0=s("p"),dS=o("Create a new Dataset where the rows are shuffled."),cS=m(),Q0=s("p"),pS=o("The transformation is applied to all the datasets of the dataset dictionary."),mS=m(),Z0=s("p"),hS=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).`),fS=m(),_(Zl.$$.fragment),gS=m(),Fe=s("div"),_(eh.$$.fragment),uS=m(),th=s("p"),_S=o("Set "),X0=s("code"),bS=o("__getitem__"),$S=o(` return format (type and columns).
The format is set for every dataset in the dataset dictionary.`),xS=m(),Xe=s("p"),vS=o("It is possible to call "),ey=s("code"),yS=o("map"),jS=o(" after calling "),ty=s("code"),wS=o("set_format"),DS=o(". Since "),ay=s("code"),kS=o("map"),ES=o(` may add new columns, then the list of formatted columns
gets updated. In this case, if you apply `),sy=s("code"),qS=o("map"),IS=o(" on a dataset to add a new column, then this column will be formatted:"),TS=m(),ny=s("p"),ry=s("code"),NS=o("new formatted columns = (all columns - previously unformatted columns)"),PS=m(),_(Xl.$$.fragment),AS=m(),Tt=s("div"),_(ah.$$.fragment),LS=m(),sh=s("p"),FS=o("Reset "),oy=s("code"),CS=o("__getitem__"),OS=o(` return format to python objects and all columns.
The transformation is applied to all the datasets of the dataset dictionary.`),zS=m(),g_=s("p"),SS=o("Same as "),ly=s("code"),VS=o("self.set_format()"),US=m(),_(ei.$$.fragment),MS=m(),ti=s("div"),_(nh.$$.fragment),RS=m(),tr=s("p"),BS=o("To be used in a "),iy=s("code"),HS=o("with"),GS=o(" statement. Set "),dy=s("code"),WS=o("__getitem__"),KS=o(` return format (type and columns).
The transformation is applied to all the datasets of the dataset dictionary.`),YS=m(),Ce=s("div"),_(rh.$$.fragment),JS=m(),ta=s("p"),QS=o("Set "),cy=s("code"),ZS=o("__getitem__"),XS=o(` return format (type and columns). The data formatting is applied on-the-fly.
The format `),py=s("code"),eV=o("type"),tV=o(" (for example \u201Cnumpy\u201D) is used to format batches when using "),my=s("code"),aV=o("__getitem__"),sV=o(`.
The format is set for every dataset in the dataset dictionary.`),nV=m(),oh=s("p"),rV=o("It\u2019s also possible to use custom transforms for formatting using "),u_=s("a"),oV=o("with_transform()"),lV=o("."),iV=m(),et=s("p"),dV=o("Contrary to "),__=s("a"),cV=o("set_format()"),pV=o(", "),hy=s("code"),mV=o("with_format"),hV=o(" returns a new "),b_=s("a"),fV=o("DatasetDict"),gV=o(" object with new "),$_=s("a"),uV=o("Dataset"),_V=o(" objects."),bV=m(),_(ai.$$.fragment),$V=m(),Oe=s("div"),_(lh.$$.fragment),xV=m(),ar=s("p"),vV=o("Set "),fy=s("code"),yV=o("__getitem__"),jV=o(" return format using this transform. The transform is applied on-the-fly on batches when "),gy=s("code"),wV=o("__getitem__"),DV=o(` is called.
The transform is set for every dataset in the dataset dictionary`),kV=m(),sr=s("p"),EV=o("As "),x_=s("a"),qV=o("set_format()"),IV=o(", this can be reset using "),v_=s("a"),TV=o("reset_format()"),NV=o("."),PV=m(),tt=s("p"),AV=o("Contrary to "),uy=s("code"),LV=o("set_transform()"),FV=o(", "),_y=s("code"),CV=o("with_transform"),OV=o(" returns a new "),y_=s("a"),zV=o("DatasetDict"),SV=o(" object with new "),j_=s("a"),VV=o("Dataset"),UV=o(" objects."),MV=m(),_(si.$$.fragment),RV=m(),ws=s("div"),_(ih.$$.fragment),BV=m(),by=s("p"),HV=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.`),GV=m(),_(ni.$$.fragment),WV=m(),Nt=s("div"),_(dh.$$.fragment),KV=m(),$y=s("p"),YV=o(`Cast the dataset to a new set of features.
The transformation is applied to all the datasets of the dataset dictionary.`),JV=m(),aa=s("p"),QV=o("You can also remove a column using "),w_=s("a"),ZV=o("Dataset.map()"),XV=o(" with "),xy=s("code"),eU=o("feature"),tU=o(" but "),vy=s("code"),aU=o("cast"),sU=o(`
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),nU=m(),_(ri.$$.fragment),rU=m(),Ds=s("div"),_(ch.$$.fragment),oU=m(),yy=s("p"),lU=o("Cast column to feature for decoding."),iU=m(),_(oi.$$.fragment),dU=m(),ze=s("div"),_(ph.$$.fragment),cU=m(),jy=s("p"),pU=o(`Remove one or several column(s) from each split in the dataset
and the features associated to the column(s).`),mU=m(),wy=s("p"),hU=o("The transformation is applied to all the splits of the dataset dictionary."),fU=m(),nr=s("p"),gU=o("You can also remove a column using "),D_=s("a"),uU=o("Dataset.map()"),_U=o(" with "),Dy=s("code"),bU=o("remove_columns"),$U=o(` but the present method
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),xU=m(),_(li.$$.fragment),vU=m(),Se=s("div"),_(mh.$$.fragment),yU=m(),ky=s("p"),jU=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.`),wU=m(),rr=s("p"),DU=o("You can also rename a column using "),k_=s("a"),kU=o("map()"),EU=o(" with "),Ey=s("code"),qU=o("remove_columns"),IU=o(" but the present method:"),TU=m(),hh=s("ul"),qy=s("li"),NU=o("takes care of moving the original features under the new column name."),PU=m(),Iy=s("li"),AU=o("doesn\u2019t copy the data to a new dataset and is thus much faster."),LU=m(),_(ii.$$.fragment),FU=m(),ks=s("div"),_(fh.$$.fragment),CU=m(),Ty=s("p"),OU=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.`),zU=m(),_(di.$$.fragment),SU=m(),Es=s("div"),_(gh.$$.fragment),VU=m(),uh=s("p"),UU=o("Casts the given column as "),Ny=s("code"),MU=o("datasets.features.ClassLabel"),RU=o(" and updates the tables."),BU=m(),_(ci.$$.fragment),HU=m(),Ve=s("div"),_(_h.$$.fragment),GU=m(),or=s("p"),WU=o("Pushes the "),E_=s("a"),KU=o("DatasetDict"),YU=o(` to the hub as a Parquet dataset.
The `),q_=s("a"),JU=o("DatasetDict"),QU=o(" is pushed using HTTP requests and does not need to have neither git or git-lfs installed."),ZU=m(),Py=s("p"),XU=o("Each dataset split will be pushed independently. The pushed dataset will keep the original split names."),eM=m(),sa=s("p"),tM=o("The resulting Parquet files are self-contained by default: if your dataset contains "),I_=s("a"),aM=o("Image"),sM=o(" or "),T_=s("a"),nM=o("Audio"),rM=o(`
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `),Ay=s("code"),oM=o("embed_external_files"),lM=o(" to False."),iM=m(),_(pi.$$.fragment),dM=m(),Ue=s("div"),_(bh.$$.fragment),cM=m(),lr=s("p"),pM=o("Saves a dataset dict to a filesystem using either "),N_=s("a"),mM=o("S3FileSystem"),hM=o(` or
`),Ly=s("code"),fM=o("fsspec.spec.AbstractFileSystem"),gM=o("."),uM=m(),ir=s("p"),_M=o("For "),P_=s("a"),bM=o("Image"),$M=o(" and "),A_=s("a"),xM=o("Audio"),vM=o(" data:"),yM=m(),Fy=s("p"),jM=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.`),wM=m(),_(mi.$$.fragment),DM=m(),qs=s("div"),_($h.$$.fragment),kM=m(),na=s("p"),EM=o("Load a dataset that was previously saved using "),Cy=s("code"),qM=o("save_to_disk"),IM=o(` from a filesystem using either
`),L_=s("a"),TM=o("S3FileSystem"),NM=o(" or "),Oy=s("code"),PM=o("fsspec.spec.AbstractFileSystem"),AM=o("."),LM=m(),_(hi.$$.fragment),FM=m(),Is=s("div"),_(xh.$$.fragment),CM=m(),vh=s("p"),OM=o("Create "),F_=s("a"),zM=o("DatasetDict"),SM=o(" from CSV file(s)."),VM=m(),_(fi.$$.fragment),UM=m(),Ts=s("div"),_(yh.$$.fragment),MM=m(),jh=s("p"),RM=o("Create "),C_=s("a"),BM=o("DatasetDict"),HM=o(" from JSON Lines file(s)."),GM=m(),_(gi.$$.fragment),WM=m(),Ns=s("div"),_(wh.$$.fragment),KM=m(),Dh=s("p"),YM=o("Create "),O_=s("a"),JM=o("DatasetDict"),QM=o(" from Parquet file(s)."),ZM=m(),_(ui.$$.fragment),XM=m(),Ps=s("div"),_(kh.$$.fragment),eR=m(),Eh=s("p"),tR=o("Create "),z_=s("a"),aR=o("DatasetDict"),sR=o(" from text file(s)."),nR=m(),_(_i.$$.fragment),rR=m(),As=s("div"),_(qh.$$.fragment),oR=m(),dr=s("p"),lR=o("Prepare a dataset for the given task by casting the dataset\u2019s "),S_=s("a"),iR=o("Features"),dR=o(" to standardized column names and types as detailed in "),V_=s("a"),zy=s("code"),cR=o("datasets.tasks"),pR=o("."),mR=m(),cr=s("p"),hR=o("Casts "),Sy=s("code"),fR=o("datasets.DatasetInfo.features"),gR=o(" according to a task-specific schema. Intended for single-use only, so all task templates are removed from "),Vy=s("code"),uR=o("datasets.DatasetInfo.task_templates"),_R=o(" after casting."),fE=m(),U_=s("a"),gE=m(),pr=s("h2"),bi=s("a"),Uy=s("span"),_(Ih.$$.fragment),bR=m(),My=s("span"),$R=o("IterableDataset"),uE=m(),$i=s("p"),xR=o("The base class "),M_=s("a"),vR=o("IterableDataset"),yR=o(" implements an iterable Dataset backed by python generators."),_E=m(),F=s("div"),_(Th.$$.fragment),jR=m(),Ry=s("p"),wR=o("A Dataset backed by an iterable."),DR=m(),Pt=s("div"),_(Nh.$$.fragment),kR=m(),By=s("p"),ER=o("Create an Iterable Dataset from a generator."),qR=m(),_(xi.$$.fragment),IR=m(),_(vi.$$.fragment),TR=m(),Ls=s("div"),_(Ph.$$.fragment),NR=m(),Hy=s("p"),PR=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.`),AR=m(),_(yi.$$.fragment),LR=m(),Fs=s("div"),_(Ah.$$.fragment),FR=m(),Gy=s("p"),CR=o("Cast column to feature for decoding."),OR=m(),_(ji.$$.fragment),zR=m(),Cs=s("div"),_(Lh.$$.fragment),SR=m(),Wy=s("p"),VR=o("Cast the dataset to a new set of features."),UR=m(),_(wi.$$.fragment),MR=m(),R_=s("div"),_(Fh.$$.fragment),RR=m(),Di=s("div"),_(Ch.$$.fragment),BR=m(),Oh=s("p"),HR=o("Iterate through the batches of size "),Ky=s("em"),GR=o("batch_size"),WR=o("."),KR=m(),Me=s("div"),_(zh.$$.fragment),YR=m(),Yy=s("p"),JR=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.`),QR=m(),Sh=s("p"),ZR=o("You can specify whether the function should be batched or not with the "),Jy=s("code"),XR=o("batched"),eB=o(" parameter:"),tB=m(),mr=s("ul"),hr=s("li"),aB=o("If batched is "),Qy=s("code"),sB=o("False"),nB=o(`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),Zy=s("code"),rB=o('{"text": "Hello there !"}'),oB=o("."),lB=m(),fr=s("li"),iB=o("If batched is "),Xy=s("code"),dB=o("True"),cB=o(" and "),ej=s("code"),pB=o("batch_size"),mB=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]}.`),hB=m(),Y=s("li"),fB=o("If batched is "),tj=s("code"),gB=o("True"),uB=o(" and "),aj=s("code"),_B=o("batch_size"),bB=o(" is "),sj=s("code"),$B=o("n"),xB=o(" > 1, then the function takes a batch of "),nj=s("code"),vB=o("n"),yB=o(" examples as input and can return a batch with "),rj=s("code"),jB=o("n"),wB=o(` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),oj=s("code"),DB=o("n"),kB=o(` examples.
A batch is a dictionary, e.g. a batch of `),lj=s("code"),EB=o("n"),qB=o(" examples is "),ij=s("code"),IB=o('{"text": ["Hello there !"] * n}'),TB=o("."),NB=m(),_(ki.$$.fragment),PB=m(),Os=s("div"),_(Vh.$$.fragment),AB=m(),dj=s("p"),LB=o(`Rename a column in the dataset, and move the features associated to the original column under the new column
name.`),FB=m(),_(Ei.$$.fragment),CB=m(),zs=s("div"),_(Uh.$$.fragment),OB=m(),cj=s("p"),zB=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.`),SB=m(),_(qi.$$.fragment),VB=m(),_e=s("div"),_(Mh.$$.fragment),UB=m(),pj=s("p"),MB=o("Randomly shuffles the elements of this dataset."),RB=m(),Rh=s("p"),BB=o("This dataset fills a buffer with "),mj=s("code"),HB=o("buffer_size"),GB=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.`),WB=m(),gr=s("p"),KB=o("For instance, if your dataset contains 10,000 elements but "),hj=s("code"),YB=o("buffer_size"),JB=o(" is set to 1000, then "),fj=s("code"),QB=o("shuffle"),ZB=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.`),XB=m(),ur=s("p"),eH=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 `),B_=s("a"),tH=o("skip()"),aH=o(" or "),H_=s("a"),sH=o("take()"),nH=o(`
then the order of the shards is kept unchanged.`),rH=m(),_(Ii.$$.fragment),oH=m(),Ss=s("div"),_(Bh.$$.fragment),lH=m(),_r=s("p"),iH=o("Create a new "),G_=s("a"),dH=o("IterableDataset"),cH=o(" that skips the first "),gj=s("code"),pH=o("n"),mH=o(" elements."),hH=m(),_(Ti.$$.fragment),fH=m(),Vs=s("div"),_(Hh.$$.fragment),gH=m(),br=s("p"),uH=o("Create a new "),W_=s("a"),_H=o("IterableDataset"),bH=o(" with only the first "),uj=s("code"),$H=o("n"),xH=o(" elements."),vH=m(),_(Ni.$$.fragment),yH=m(),Pi=s("div"),_(Gh.$$.fragment),jH=m(),K_=s("p"),Y_=s("a"),wH=o("DatasetInfo"),DH=o(" object containing all the metadata in the dataset."),kH=m(),Ai=s("div"),_(Wh.$$.fragment),EH=m(),J_=s("p"),Q_=s("a"),qH=o("NamedSplit"),IH=o(" object corresponding to a named dataset split."),TH=m(),Z_=s("div"),_(Kh.$$.fragment),NH=m(),X_=s("div"),_(Yh.$$.fragment),PH=m(),eb=s("div"),_(Jh.$$.fragment),AH=m(),tb=s("div"),_(Qh.$$.fragment),LH=m(),ab=s("div"),_(Zh.$$.fragment),FH=m(),sb=s("div"),_(Xh.$$.fragment),CH=m(),nb=s("div"),_(ef.$$.fragment),OH=m(),rb=s("div"),_(tf.$$.fragment),zH=m(),ob=s("div"),_(af.$$.fragment),SH=m(),lb=s("div"),_(sf.$$.fragment),VH=m(),ib=s("div"),_(nf.$$.fragment),UH=m(),db=s("div"),_(rf.$$.fragment),MH=m(),cb=s("div"),_(of.$$.fragment),bE=m(),$r=s("h2"),Li=s("a"),_j=s("span"),_(lf.$$.fragment),RH=m(),bj=s("span"),BH=o("IterableDatasetDict"),$E=m(),Fi=s("p"),HH=o("Dictionary with split names as keys (\u2018train\u2019, \u2018test\u2019 for example), and "),$j=s("code"),GH=o("IterableDataset"),WH=o(" objects as values."),xE=m(),B=s("div"),_(df.$$.fragment),KH=m(),Re=s("div"),_(cf.$$.fragment),YH=m(),xj=s("p"),JH=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.`),QH=m(),pf=s("p"),ZH=o("You can specify whether the function should be batched or not with the "),vj=s("code"),XH=o("batched"),eG=o(" parameter:"),tG=m(),xr=s("ul"),vr=s("li"),aG=o("If batched is "),yj=s("code"),sG=o("False"),nG=o(`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),jj=s("code"),rG=o('{"text": "Hello there !"}'),oG=o("."),lG=m(),ra=s("li"),iG=o("If batched is "),wj=s("code"),dG=o("True"),cG=o(" and "),Dj=s("code"),pG=o("batch_size"),mG=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 `),kj=s("code"),hG=o('{"text": ["Hello there !"]}'),fG=o("."),gG=m(),J=s("li"),uG=o("If batched is "),Ej=s("code"),_G=o("True"),bG=o(" and "),qj=s("code"),$G=o("batch_size"),xG=o(" is "),Ij=s("code"),vG=o("n"),yG=o(" > 1, then the function takes a batch of "),Tj=s("code"),jG=o("n"),wG=o(" examples as input and can return a batch with "),Nj=s("code"),DG=o("n"),kG=o(` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),Pj=s("code"),EG=o("n"),qG=o(` examples.
A batch is a dictionary, e.g. a batch of `),Aj=s("code"),IG=o("n"),TG=o(" examples is "),Lj=s("code"),NG=o('{"text": ["Hello there !"] * n}'),PG=o("."),AG=m(),_(Ci.$$.fragment),LG=m(),Us=s("div"),_(mf.$$.fragment),FG=m(),Fj=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.
The filtering is applied to all the datasets of the dataset dictionary.`),OG=m(),_(Oi.$$.fragment),zG=m(),be=s("div"),_(hf.$$.fragment),SG=m(),Cj=s("p"),VG=o(`Randomly shuffles the elements of this dataset.
The shuffling is applied to all the datasets of the dataset dictionary.`),UG=m(),Oj=s("p"),MG=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.`),RG=m(),yr=s("p"),BG=o("For instance, if your dataset contains 10,000 elements but "),zj=s("code"),HG=o("buffer_size"),GG=o(" is set to 1000, then "),Sj=s("code"),WG=o("shuffle"),KG=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.`),YG=m(),oa=s("p"),JG=o("If the dataset is made of several shards, it also does "),Vj=s("code"),QG=o("shuffle"),ZG=o(` the order of the shards.
However if the order has been fixed by using `),pb=s("a"),XG=o("skip()"),eW=o(" or "),mb=s("a"),tW=o("take()"),aW=o(`
then the order of the shards is kept unchanged.`),sW=m(),_(zi.$$.fragment),nW=m(),Ms=s("div"),_(ff.$$.fragment),rW=m(),Uj=s("p"),oW=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.`),lW=m(),_(Si.$$.fragment),iW=m(),Rs=s("div"),_(gf.$$.fragment),dW=m(),Mj=s("p"),cW=o(`Cast the dataset to a new set of features.
The type casting is applied to all the datasets of the dataset dictionary.`),pW=m(),_(Vi.$$.fragment),mW=m(),Bs=s("div"),_(uf.$$.fragment),hW=m(),Rj=s("p"),fW=o(`Cast column to feature for decoding.
The type casting is applied to all the datasets of the dataset dictionary.`),gW=m(),_(Ui.$$.fragment),uW=m(),Hs=s("div"),_(_f.$$.fragment),_W=m(),Bj=s("p"),bW=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.`),$W=m(),_(Mi.$$.fragment),xW=m(),Gs=s("div"),_(bf.$$.fragment),vW=m(),Hj=s("p"),yW=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.`),jW=m(),_(Ri.$$.fragment),wW=m(),Ws=s("div"),_($f.$$.fragment),DW=m(),Gj=s("p"),kW=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.`),EW=m(),_(Bi.$$.fragment),vE=m(),jr=s("h2"),Hi=s("a"),Wj=s("span"),_(xf.$$.fragment),qW=m(),Kj=s("span"),IW=o("Features"),yE=m(),S=s("div"),_(vf.$$.fragment),TW=m(),Yj=s("p"),NW=o("A special dictionary that defines the internal structure of a dataset."),PW=m(),yf=s("p"),AW=o("Instantiated with a dictionary of type "),Jj=s("code"),LW=o("dict[str, FieldType]"),FW=o(`, where keys are the desired column names,
and values are the type of that column.`),CW=m(),hb=s("p"),Qj=s("code"),OW=o("FieldType"),zW=o(" can be one of the following:"),SW=m(),se=s("ul"),Zj=s("li"),la=s("p"),VW=o("a "),fb=s("a"),UW=o("Value"),MW=o(" feature specifies a single typed value, e.g. "),Xj=s("code"),RW=o("int64"),BW=o(" or "),ew=s("code"),HW=o("string"),GW=o("."),WW=m(),tw=s("li"),jf=s("p"),KW=o("a "),gb=s("a"),YW=o("ClassLabel"),JW=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.`),QW=m(),aw=s("li"),wf=s("p"),ZW=o("a python "),sw=s("code"),XW=o("dict"),eK=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.`),tK=m(),Df=s("li"),at=s("p"),aK=o("a python "),nw=s("code"),sK=o("list"),nK=o(" or a "),ub=s("a"),rK=o("Sequence"),oK=o(` specifies that the field contains a list of objects. The python
`),rw=s("code"),lK=o("list"),iK=o(" or "),_b=s("a"),dK=o("Sequence"),cK=o(` should be provided with a single sub-feature as an example of the feature
type hosted in this list.`),pK=m(),_(Gi.$$.fragment),mK=m(),ow=s("li"),st=s("p"),hK=o("a "),bb=s("a"),fK=o("Array2D"),gK=o(", "),$b=s("a"),uK=o("Array3D"),_K=o(", "),xb=s("a"),bK=o("Array4D"),$K=o(" or "),vb=s("a"),xK=o("Array5D"),vK=o(" feature for multidimensional arrays."),yK=m(),lw=s("li"),kf=s("p"),jK=o("an "),yb=s("a"),wK=o("Audio"),DK=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.`),kK=m(),iw=s("li"),ia=s("p"),EK=o("an "),jb=s("a"),qK=o("Image"),IK=o(" feature to store the absolute path to an image file, an "),dw=s("code"),TK=o("np.ndarray"),NK=o(" object, a "),cw=s("code"),PK=o("PIL.Image.Image"),AK=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.`),LK=m(),pw=s("li"),Wi=s("p"),wb=s("a"),FK=o("Translation"),CK=o(" and "),Db=s("a"),OK=o("TranslationVariableLanguages"),zK=o(", the two features specific to Machine Translation."),SK=m(),Ks=s("div"),_(Ef.$$.fragment),VK=m(),qf=s("p"),UK=o("Make a deep copy of "),kb=s("a"),MK=o("Features"),RK=o("."),BK=m(),_(Ki.$$.fragment),HK=m(),Yi=s("div"),_(If.$$.fragment),GK=m(),mw=s("p"),WK=o("Decode batch with custom feature decoding."),KK=m(),Ji=s("div"),_(Tf.$$.fragment),YK=m(),hw=s("p"),JK=o("Decode column with custom feature decoding."),QK=m(),Qi=s("div"),_(Nf.$$.fragment),ZK=m(),fw=s("p"),XK=o("Decode example with custom feature decoding."),eY=m(),Zi=s("div"),_(Pf.$$.fragment),tY=m(),gw=s("p"),aY=o("Encode batch into a format for Arrow."),sY=m(),Xi=s("div"),_(Af.$$.fragment),nY=m(),uw=s("p"),rY=o("Encode example into a format for Arrow."),oY=m(),At=s("div"),_(Lf.$$.fragment),lY=m(),Ff=s("p"),iY=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: `),_w=s("code"),dY=o("<original>.<subfield>"),cY=o("."),pY=m(),Cf=s("p"),mY=o(`If a column contains nested dictionaries, then all the lower-level subfields names are
also concatenated to form new columns: `),bw=s("code"),hY=o("<original>.<subfield>.<subsubfield>"),fY=o(", etc."),gY=m(),_(ed.$$.fragment),uY=m(),td=s("div"),_(Of.$$.fragment),_Y=m(),zf=s("p"),bY=o("Construct "),Eb=s("a"),$Y=o("Features"),xY=o(` from Arrow Schema.
It also checks the schema metadata for Hugging Face Datasets features.`),vY=m(),Be=s("div"),_(Sf.$$.fragment),yY=m(),Vf=s("p"),jY=o("Construct ["),$w=s("em"),wY=o("Features"),DY=o("] from dict."),kY=m(),wr=s("p"),EY=o(`Regenerate the nested feature object from a deserialized dict.
We use the `),xw=s("em"),qY=o("_type"),IY=o(" key to infer the dataclass name of the feature "),vw=s("em"),TY=o("FieldType"),NY=o("."),PY=m(),da=s("p"),AY=o(`It allows for a convenient constructor syntax
to define features from deserialized JSON dictionaries. This function is used in particular when deserializing
a [`),yw=s("em"),LY=o("DatasetInfo"),FY=o(`] that was dumped to a JSON object. This acts as an analogue to
[`),jw=s("em"),CY=o("Features.from_arrow_schema"),OY=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 [`),ww=s("em"),zY=o("Value"),SY=o("] automatically performs."),VY=m(),_(ad.$$.fragment),UY=m(),Lt=s("div"),_(Uf.$$.fragment),MY=m(),Mf=s("p"),RY=o("Reorder Features fields to match the field order of other ["),Dw=s("em"),BY=o("Features"),HY=o("]."),GY=m(),kw=s("p"),WY=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.`),KY=m(),_(sd.$$.fragment),jE=m(),ca=s("div"),_(Rf.$$.fragment),YY=m(),Ew=s("p"),JY=o(`Construct a list of feature from a single type or a dict of types.
Mostly here for compatiblity with tfds.`),QY=m(),_(nd.$$.fragment),wE=m(),W=s("div"),_(Bf.$$.fragment),ZY=m(),qw=s("p"),XY=o("Feature type for integer class labels."),eJ=m(),Hf=s("p"),tJ=o("There are 3 ways to define a "),Iw=s("code"),aJ=o("ClassLabel"),sJ=o(", which correspond to the 3 arguments:"),nJ=m(),Dr=s("ul"),qb=s("li"),Tw=s("code"),rJ=o("num_classes"),oJ=o(": Create 0 to (num_classes-1) labels."),lJ=m(),Ib=s("li"),Nw=s("code"),iJ=o("names"),dJ=o(": List of label strings."),cJ=m(),Tb=s("li"),Pw=s("code"),pJ=o("names_file"),mJ=o(": File containing the list of labels."),hJ=m(),Aw=s("p"),fJ=o(`Under the hood the labels are stored as integers.
You can use negative integers to represent unknown/missing labels.`),gJ=m(),_(rd.$$.fragment),uJ=m(),Ys=s("div"),_(Gf.$$.fragment),_J=m(),kr=s("p"),bJ=o("Cast an Arrow array to the "),Lw=s("code"),$J=o("ClassLabel"),xJ=o(` arrow storage type.
The Arrow types that can be converted to the `),Fw=s("code"),vJ=o("ClassLabel"),yJ=o(" pyarrow storage type are:"),jJ=m(),Wf=s("ul"),Cw=s("li"),Ow=s("code"),wJ=o("pa.string()"),DJ=m(),zw=s("li"),Sw=s("code"),kJ=o("pa.int()"),EJ=m(),Ft=s("div"),_(Kf.$$.fragment),qJ=m(),Er=s("p"),IJ=o("Conversion "),Vw=s("code"),TJ=o("integer"),NJ=o(" => class name "),Uw=s("code"),PJ=o("string"),AJ=o("."),LJ=m(),Yf=s("p"),FJ=o("Regarding unknown/missing labels: passing negative integers raises "),Mw=s("code"),CJ=o("ValueError"),OJ=o("."),zJ=m(),_(od.$$.fragment),SJ=m(),Js=s("div"),_(Jf.$$.fragment),VJ=m(),qr=s("p"),UJ=o("Conversion class name "),Rw=s("code"),MJ=o("string"),RJ=o(" => "),Bw=s("code"),BJ=o("integer"),HJ=o("."),GJ=m(),_(ld.$$.fragment),DE=m(),nt=s("div"),_(Qf.$$.fragment),WJ=m(),Zf=s("p"),KJ=o("The "),Hw=s("code"),YJ=o("Value"),JJ=o(" dtypes are as follows:"),QJ=m(),O=s("ul"),Gw=s("li"),Ww=s("code"),ZJ=o("null"),XJ=m(),Kw=s("li"),Yw=s("code"),eQ=o("bool"),tQ=m(),Jw=s("li"),Qw=s("code"),aQ=o("int8"),sQ=m(),Zw=s("li"),Xw=s("code"),nQ=o("int16"),rQ=m(),e7=s("li"),t7=s("code"),oQ=o("int32"),lQ=m(),a7=s("li"),s7=s("code"),iQ=o("int64"),dQ=m(),n7=s("li"),r7=s("code"),cQ=o("uint8"),pQ=m(),o7=s("li"),l7=s("code"),mQ=o("uint16"),hQ=m(),i7=s("li"),d7=s("code"),fQ=o("uint32"),gQ=m(),c7=s("li"),p7=s("code"),uQ=o("uint64"),_Q=m(),m7=s("li"),h7=s("code"),bQ=o("float16"),$Q=m(),Nb=s("li"),f7=s("code"),xQ=o("float32"),vQ=o(" (alias float)"),yQ=m(),Pb=s("li"),g7=s("code"),jQ=o("float64"),wQ=o(" (alias double)"),DQ=m(),u7=s("li"),_7=s("code"),kQ=o("time32[(s|ms)]"),EQ=m(),b7=s("li"),$7=s("code"),qQ=o("time64[(us|ns)]"),IQ=m(),x7=s("li"),v7=s("code"),TQ=o("timestamp[(s|ms|us|ns)]"),NQ=m(),y7=s("li"),j7=s("code"),PQ=o("timestamp[(s|ms|us|ns), tz=(tzstring)]"),AQ=m(),w7=s("li"),D7=s("code"),LQ=o("date32"),FQ=m(),k7=s("li"),E7=s("code"),CQ=o("date64"),OQ=m(),q7=s("li"),I7=s("code"),zQ=o("duration[(s|ms|us|ns)]"),SQ=m(),T7=s("li"),N7=s("code"),VQ=o("decimal128(precision, scale)"),UQ=m(),P7=s("li"),A7=s("code"),MQ=o("decimal256(precision, scale)"),RQ=m(),L7=s("li"),F7=s("code"),BQ=o("binary"),HQ=m(),C7=s("li"),O7=s("code"),GQ=o("large_binary"),WQ=m(),z7=s("li"),S7=s("code"),KQ=o("string"),YQ=m(),V7=s("li"),U7=s("code"),JQ=o("large_string"),QQ=m(),_(id.$$.fragment),kE=m(),rt=s("div"),_(Xf.$$.fragment),ZQ=m(),Ab=s("p"),M7=s("code"),XQ=o("FeatureConnector"),eZ=o(` for translations with fixed languages per example.
Here for compatiblity with tfds.`),tZ=m(),_(dd.$$.fragment),aZ=m(),cd=s("div"),_(eg.$$.fragment),sZ=m(),R7=s("p"),nZ=o("Flatten the Translation feature into a dictionary."),EE=m(),ot=s("div"),_(tg.$$.fragment),rZ=m(),Lb=s("p"),B7=s("code"),oZ=o("FeatureConnector"),lZ=o(` for translations with variable languages per example.
Here for compatiblity with tfds.`),iZ=m(),_(pd.$$.fragment),dZ=m(),md=s("div"),_(ag.$$.fragment),cZ=m(),H7=s("p"),pZ=o("Flatten the TranslationVariableLanguages feature into a dictionary."),qE=m(),pa=s("div"),_(sg.$$.fragment),mZ=m(),G7=s("p"),hZ=o("Create a two-dimensional array."),fZ=m(),_(hd.$$.fragment),IE=m(),ma=s("div"),_(ng.$$.fragment),gZ=m(),W7=s("p"),uZ=o("Create a three-dimensional array."),_Z=m(),_(fd.$$.fragment),TE=m(),ha=s("div"),_(rg.$$.fragment),bZ=m(),K7=s("p"),$Z=o("Create a four-dimensional array."),xZ=m(),_(gd.$$.fragment),NE=m(),fa=s("div"),_(og.$$.fragment),vZ=m(),Y7=s("p"),yZ=o("Create a five-dimensional array."),jZ=m(),_(ud.$$.fragment),PE=m(),H=s("div"),_(lg.$$.fragment),wZ=m(),ig=s("p"),DZ=o("Audio "),J7=s("code"),kZ=o("Feature"),EZ=o(" to extract audio data from an audio file."),qZ=m(),Q7=s("p"),IZ=o("Input: The Audio feature accepts as input:"),TZ=m(),Ir=s("ul"),Z7=s("li"),dg=s("p"),NZ=o("A "),X7=s("code"),PZ=o("str"),AZ=o(": Absolute path to the audio file (i.e. random access is allowed)."),LZ=m(),Tr=s("li"),cg=s("p"),FZ=o("A "),eD=s("code"),CZ=o("dict"),OZ=o(" with the keys:"),zZ=m(),pg=s("ul"),Fb=s("li"),tD=s("code"),SZ=o("path"),VZ=o(": String with relative path of the audio file to the archive file."),UZ=m(),Cb=s("li"),aD=s("code"),MZ=o("bytes"),RZ=o(": Bytes content of the audio file."),BZ=m(),sD=s("p"),HZ=o("This is useful for archived files with sequential access."),GZ=m(),Nr=s("li"),mg=s("p"),WZ=o("A "),nD=s("code"),KZ=o("dict"),YZ=o(" with the keys:"),JZ=m(),Pr=s("ul"),Ob=s("li"),rD=s("code"),QZ=o("path"),ZZ=o(": String with relative path of the audio file to the archive file."),XZ=m(),zb=s("li"),oD=s("code"),eX=o("array"),tX=o(": Array containing the audio sample"),aX=m(),Sb=s("li"),lD=s("code"),sX=o("sampling_rate"),nX=o(": Integer corresponding to the sampling rate of the audio sample."),rX=m(),iD=s("p"),oX=o("This is useful for archived files with sequential access."),lX=m(),_(_d.$$.fragment),iX=m(),Qs=s("div"),_(hg.$$.fragment),dX=m(),dD=s("p"),cX=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:`),pX=m(),ga=s("ul"),Vb=s("li"),cD=s("code"),mX=o("pa.string()"),hX=o(" - it must contain the \u201Cpath\u201D data"),fX=m(),pD=s("li"),mD=s("code"),gX=o('pa.struct({"bytes": pa.binary()})'),uX=m(),hD=s("li"),fD=s("code"),_X=o('pa.struct({"path": pa.string()})'),bX=m(),Ub=s("li"),gD=s("code"),$X=o('pa.struct({"bytes": pa.binary(), "path": pa.string()})'),xX=o("  - order doesn\u2019t matter"),vX=m(),bd=s("div"),_(fg.$$.fragment),yX=m(),uD=s("p"),jX=o("Decode example audio file into audio data."),wX=m(),$d=s("div"),_(gg.$$.fragment),DX=m(),_D=s("p"),kX=o("Embed audio files into the Arrow array."),EX=m(),xd=s("div"),_(ug.$$.fragment),qX=m(),bD=s("p"),IX=o("Encode example into a format for Arrow."),TX=m(),vd=s("div"),_(_g.$$.fragment),NX=m(),$D=s("p"),PX=o("If in the decodable state, raise an error, otherwise flatten the feature into a dictionary."),AE=m(),G=s("div"),_(bg.$$.fragment),AX=m(),$g=s("p"),LX=o("Image "),xD=s("code"),FX=o("Feature"),CX=o(" to read image data from an image file."),OX=m(),vD=s("p"),zX=o("Input: The Image feature accepts as input:"),SX=m(),ua=s("ul"),yD=s("li"),xg=s("p"),VX=o("A "),jD=s("code"),UX=o("str"),MX=o(": Absolute path to the image file (i.e. random access is allowed)."),RX=m(),Ar=s("li"),vg=s("p"),BX=o("A "),wD=s("code"),HX=o("dict"),GX=o(" with the keys:"),WX=m(),yg=s("ul"),Mb=s("li"),DD=s("code"),KX=o("path"),YX=o(": String with relative path of the image file to the archive file."),JX=m(),Rb=s("li"),kD=s("code"),QX=o("bytes"),ZX=o(": Bytes of the image file."),XX=m(),ED=s("p"),eee=o("This is useful for archived files with sequential access."),tee=m(),qD=s("li"),jg=s("p"),aee=o("An "),ID=s("code"),see=o("np.ndarray"),nee=o(": NumPy array representing an image."),ree=m(),TD=s("li"),wg=s("p"),oee=o("A "),ND=s("code"),lee=o("PIL.Image.Image"),iee=o(": PIL image object."),dee=m(),_(yd.$$.fragment),cee=m(),Zs=s("div"),_(Dg.$$.fragment),pee=m(),PD=s("p"),mee=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:`),hee=m(),lt=s("ul"),Bb=s("li"),AD=s("code"),fee=o("pa.string()"),gee=o(" - it must contain the \u201Cpath\u201D data"),uee=m(),LD=s("li"),FD=s("code"),_ee=o('pa.struct({"bytes": pa.binary()})'),bee=m(),CD=s("li"),OD=s("code"),$ee=o('pa.struct({"path": pa.string()})'),xee=m(),Hb=s("li"),zD=s("code"),vee=o('pa.struct({"bytes": pa.binary(), "path": pa.string()})'),yee=o("  - order doesn\u2019t matter"),jee=m(),Gb=s("li"),SD=s("code"),wee=o("pa.list(*)"),Dee=o(" - it must contain the image array data"),kee=m(),jd=s("div"),_(kg.$$.fragment),Eee=m(),VD=s("p"),qee=o("Decode example image file into image data."),Iee=m(),wd=s("div"),_(Eg.$$.fragment),Tee=m(),UD=s("p"),Nee=o("Embed image files into the Arrow array."),Pee=m(),Dd=s("div"),_(qg.$$.fragment),Aee=m(),MD=s("p"),Lee=o("Encode example into a format for Arrow."),Fee=m(),kd=s("div"),_(Ig.$$.fragment),Cee=m(),RD=s("p"),Oee=o("If in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary."),LE=m(),Lr=s("h2"),Ed=s("a"),BD=s("span"),_(Tg.$$.fragment),zee=m(),HD=s("span"),See=o("MetricInfo"),FE=m(),me=s("div"),_(Ng.$$.fragment),Vee=m(),GD=s("p"),Uee=o("Information about a metric."),Mee=m(),Wb=s("p"),WD=s("code"),Ree=o("MetricInfo"),Bee=o(` documents a metric, including its name, version, and features.
See the constructor arguments and properties for a full list.`),Hee=m(),KD=s("p"),Gee=o("Note: Not all fields are known on construction and may be updated later."),Wee=m(),Xs=s("div"),_(Pg.$$.fragment),Kee=m(),Ag=s("p"),Yee=o("Create MetricInfo from the JSON file in "),YD=s("code"),Jee=o("metric_info_dir"),Qee=o("."),Zee=m(),_(qd.$$.fragment),Xee=m(),en=s("div"),_(Lg.$$.fragment),ete=m(),_a=s("p"),tte=o("Write "),JD=s("code"),ate=o("MetricInfo"),ste=o(" as JSON to "),QD=s("code"),nte=o("metric_info_dir"),rte=o(`.
Also save the license separately in LICENCE.
If `),ZD=s("code"),ote=o("pretty_print"),lte=o(" is True, the JSON will be pretty-printed with the indent level of 4."),ite=m(),_(Id.$$.fragment),CE=m(),Fr=s("h2"),Td=s("a"),XD=s("span"),_(Fg.$$.fragment),dte=m(),ek=s("span"),cte=o("Metric"),OE=m(),tn=s("p"),pte=o("The base class "),tk=s("code"),mte=o("Metric"),hte=o(" implements a Metric backed by one or several "),Kb=s("a"),fte=o("Dataset"),gte=o("."),zE=m(),ne=s("div"),_(Cg.$$.fragment),ute=m(),ak=s("p"),_te=o("A Metric is the base class and common API for all metrics."),bte=m(),_(Nd.$$.fragment),$te=m(),an=s("div"),_(Og.$$.fragment),xte=m(),sk=s("p"),vte=o("Add one prediction and reference for the metric\u2019s stack."),yte=m(),_(Pd.$$.fragment),jte=m(),sn=s("div"),_(zg.$$.fragment),wte=m(),nk=s("p"),Dte=o("Add a batch of predictions and references for the metric\u2019s stack."),kte=m(),_(Ad.$$.fragment),Ete=m(),Ct=s("div"),_(Sg.$$.fragment),qte=m(),rk=s("p"),Ite=o("Compute the metrics."),Tte=m(),ok=s("p"),Nte=o("Usage of positional arguments is not allowed to prevent mistakes."),Pte=m(),_(Ld.$$.fragment),Ate=m(),Fd=s("div"),_(Vg.$$.fragment),Lte=m(),lk=s("p"),Fte=o("Downloads and prepares dataset for reading."),SE=m(),Cr=s("h2"),Cd=s("a"),ik=s("span"),_(Ug.$$.fragment),Cte=m(),dk=s("span"),Ote=o("Filesystems"),VE=m(),V=s("div"),_(Mg.$$.fragment),zte=m(),Od=s("p"),ck=s("code"),Ste=o("datasets.filesystems.S3FileSystem"),Vte=o(" is a subclass of "),Rg=s("a"),pk=s("code"),Ute=o("s3fs.S3FileSystem"),Mte=o("."),Rte=m(),ba=s("p"),Bte=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 ("),mk=s("code"),Hte=o("key="),Gte=o(", "),hk=s("code"),Wte=o("secret="),Kte=o(") or with boto\u2019s credential methods. See botocore documentation for more information. If no credentials are available, use "),fk=s("code"),Yte=o("anon=True"),Jte=o("."),Qte=m(),gk=s("p"),Zte=o("Examples:"),Xte=m(),uk=s("p"),eae=o("Listing files from public S3 bucket."),tae=m(),_(zd.$$.fragment),aae=m(),Or=s("p"),sae=o("Listing files from private S3 bucket using "),_k=s("code"),nae=o("aws_access_key_id"),rae=o(" and "),bk=s("code"),oae=o("aws_secret_access_key"),lae=o("."),iae=m(),_(Sd.$$.fragment),dae=m(),$a=s("p"),cae=o("Using "),$k=s("code"),pae=o("S3Filesystem"),mae=o(" with "),xk=s("code"),hae=o("botocore.session.Session"),fae=o(" and custom "),vk=s("code"),gae=o("aws_profile"),uae=o("."),_ae=m(),_(Vd.$$.fragment),bae=m(),zr=s("p"),$ae=o("Loading dataset from S3 using "),yk=s("code"),xae=o("S3Filesystem"),vae=o(" and "),Yb=s("a"),yae=o("load_from_disk()"),jae=o("."),wae=m(),_(Ud.$$.fragment),Dae=m(),Sr=s("p"),kae=o("Saving dataset to S3 using "),jk=s("code"),Eae=o("S3Filesystem"),qae=o(" and "),Jb=s("a"),Iae=o("Dataset.save_to_disk()"),Tae=o("."),Nae=m(),_(Md.$$.fragment),UE=m(),Vr=s("div"),_(Bg.$$.fragment),Pae=m(),Ur=s("p"),Aae=o("Preprocesses "),wk=s("code"),Lae=o("dataset_path"),Fae=o(" and removes remote filesystem (e.g. removing "),Dk=s("code"),Cae=o("s3://"),Oae=o(")."),ME=m(),Mr=s("div"),_(Hg.$$.fragment),zae=m(),kk=s("p"),Sae=o("Validates if filesystem has remote protocol."),RE=m(),Rr=s("h2"),Rd=s("a"),Ek=s("span"),_(Gg.$$.fragment),Vae=m(),qk=s("span"),Uae=o("Fingerprint"),BE=m(),Br=s("div"),_(Wg.$$.fragment),Mae=m(),Ik=s("p"),Rae=o("Hasher that accepts python objects as inputs."),this.h()},l(i){const j=Whe('[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 Kg=r(f);d=n(Kg,"A",{id:!0,class:!0,href:!0});var Tk=r(d);g=n(Tk,"SPAN",{});var Nk=r(g);b(t.$$.fragment,Nk),Nk.forEach(a),Tk.forEach(a),p=h(Kg),de=n(Kg,"SPAN",{});var Pk=r(de);R=l(Pk,"Main classes"),Pk.forEach(a),Kg.forEach(a),ce=h(i),he=n(i,"H2",{class:!0});var Yg=r(he);ke=n(Yg,"A",{id:!0,class:!0,href:!0});var Ak=r(ke);fe=n(Ak,"SPAN",{});var Lk=r(fe);b(Pa.$$.fragment,Lk),Lk.forEach(a),Ak.forEach(a),du=h(Yg),fo=n(Yg,"SPAN",{});var Fk=r(fo);U3=l(Fk,"DatasetInfo"),Fk.forEach(a),Yg.forEach(a),aE=h(i),pe=n(i,"DIV",{class:!0});var De=r(pe);b(Nc.$$.fragment,De),M3=h(De),d1=n(De,"P",{});var Ck=r(d1);R3=l(Ck,"Information about a dataset."),Ck.forEach(a),B3=h(De),cu=n(De,"P",{});var Qb=r(cu);c1=n(Qb,"CODE",{});var Ok=r(c1);H3=l(Ok,"DatasetInfo"),Ok.forEach(a),G3=l(Qb,` documents datasets, including its name, version, and features.
See the constructor arguments and properties for a full list.`),Qb.forEach(a),W3=h(De),p1=n(De,"P",{});var zk=r(p1);K3=l(zk,"Not all fields are known on construction and may be updated later."),zk.forEach(a),Y3=h(De),Ee=n(De,"DIV",{class:!0});var it=r(Ee);b(Pc.$$.fragment,it),J3=h(it),Pn=n(it,"P",{});var Hr=r(Pn);Q3=l(Hr,"Create "),pu=n(Hr,"A",{href:!0});var Sk=r(pu);Z3=l(Sk,"DatasetInfo"),Sk.forEach(a),X3=l(Hr," from the JSON file in "),m1=n(Hr,"CODE",{});var Vk=r(m1);e5=l(Vk,"dataset_info_dir"),Vk.forEach(a),t5=l(Hr,"."),Hr.forEach(a),a5=h(it),Ac=n(it,"P",{});var Jg=r(Ac);s5=l(Jg,`This function updates all the dynamically generated fields (num_examples,
hash, time of creation,\u2026) of the `),mu=n(Jg,"A",{href:!0});var Uk=r(mu);n5=l(Uk,"DatasetInfo"),Uk.forEach(a),r5=l(Jg,"."),Jg.forEach(a),o5=h(it),h1=n(it,"P",{});var Mk=r(h1);l5=l(Mk,"This will overwrite all previous metadata."),Mk.forEach(a),i5=h(it),b(go.$$.fragment,it),it.forEach(a),d5=h(De),Aa=n(De,"DIV",{class:!0});var Gr=r(Aa);b(Lc.$$.fragment,Gr),c5=h(Gr),An=n(Gr,"P",{});var Wr=r(An);p5=l(Wr,"Write "),f1=n(Wr,"CODE",{});var Rk=r(f1);m5=l(Rk,"DatasetInfo"),Rk.forEach(a),h5=l(Wr," and license (if present) as JSON files to "),g1=n(Wr,"CODE",{});var Bk=r(g1);f5=l(Bk,"dataset_info_dir"),Bk.forEach(a),g5=l(Wr,"."),Wr.forEach(a),u5=h(Gr),b(uo.$$.fragment,Gr),Gr.forEach(a),De.forEach(a),sE=h(i),Ln=n(i,"H2",{class:!0});var Qg=r(Ln);_o=n(Qg,"A",{id:!0,class:!0,href:!0});var Hk=r(_o);u1=n(Hk,"SPAN",{});var Gk=r(u1);b(Fc.$$.fragment,Gk),Gk.forEach(a),Hk.forEach(a),_5=h(Qg),_1=n(Qg,"SPAN",{});var Wk=r(_1);b5=l(Wk,"Dataset"),Wk.forEach(a),Qg.forEach(a),nE=h(i),bo=n(i,"P",{});var Zg=r(bo);$5=l(Zg,"The base class "),hu=n(Zg,"A",{href:!0});var Kk=r(hu);x5=l(Kk,"Dataset"),Kk.forEach(a),v5=l(Zg," implements a Dataset backed by an Apache Arrow table."),Zg.forEach(a),rE=h(i),q=n(i,"DIV",{class:!0});var I=r(q);b(Cc.$$.fragment,I),y5=h(I),b1=n(I,"P",{});var Yk=r(b1);j5=l(Yk,"A Dataset backed by an Arrow table."),Yk.forEach(a),w5=h(I),gt=n(I,"DIV",{class:!0});var xa=r(gt);b(Oc.$$.fragment,xa),D5=h(xa),$1=n(xa,"P",{});var Jk=r($1);k5=l(Jk,"Add column to Dataset."),Jk.forEach(a),E5=h(xa),x1=n(xa,"P",{});var Qk=r(x1);q5=l(Qk,"<Added version=\u201C1.7\u201D/>"),Qk.forEach(a),I5=h(xa),b($o.$$.fragment,xa),xa.forEach(a),T5=h(I),ut=n(I,"DIV",{class:!0});var va=r(ut);b(zc.$$.fragment,va),N5=h(va),v1=n(va,"P",{});var Zk=r(v1);P5=l(Zk,"Add item to Dataset."),Zk.forEach(a),A5=h(va),y1=n(va,"P",{});var Xk=r(y1);L5=l(Xk,"<Added version=\u201C1.7\u201D/>"),Xk.forEach(a),F5=h(va),b(xo.$$.fragment,va),va.forEach(a),C5=h(I),vo=n(I,"DIV",{class:!0});var Xg=r(vo);b(Sc.$$.fragment,Xg),O5=h(Xg),j1=n(Xg,"P",{});var e4=r(j1);z5=l(e4,"Instantiate a Dataset backed by an Arrow table at filename."),e4.forEach(a),Xg.forEach(a),S5=h(I),yo=n(I,"DIV",{class:!0});var eu=r(yo);b(Vc.$$.fragment,eu),V5=h(eu),w1=n(eu,"P",{});var t4=r(w1);U5=l(t4,"Instantiate a Dataset backed by an Arrow buffer."),t4.forEach(a),eu.forEach(a),M5=h(I),qe=n(I,"DIV",{class:!0});var dt=r(qe);b(Uc.$$.fragment,dt),R5=h(dt),Ut=n(dt,"P",{});var ya=r(Ut);B5=l(ya,"Convert "),D1=n(ya,"CODE",{});var a4=r(D1);H5=l(a4,"pandas.DataFrame"),a4.forEach(a),G5=l(ya," to a "),k1=n(ya,"CODE",{});var s4=r(k1);W5=l(s4,"pyarrow.Table"),s4.forEach(a),K5=l(ya," to create a "),fu=n(ya,"A",{href:!0});var n4=r(fu);Y5=l(n4,"Dataset"),n4.forEach(a),J5=l(ya,"."),ya.forEach(a),Q5=h(dt),Fn=n(dt,"P",{});var Kr=r(Fn);Z5=l(Kr,"The column types in the resulting Arrow Table are inferred from the dtypes of the "),E1=n(Kr,"CODE",{});var r4=r(E1);X5=l(r4,"pandas.Series"),r4.forEach(a),e6=l(Kr,` in the
DataFrame. In the case of non-object Series, the NumPy dtype is translated to its Arrow equivalent. In the
case of `),q1=n(Kr,"CODE",{});var o4=r(q1);t6=l(o4,"object"),o4.forEach(a),a6=l(Kr,", we need to guess the datatype by looking at the Python objects in this Series."),Kr.forEach(a),s6=h(dt),Mt=n(dt,"P",{});var ja=r(Mt);n6=l(ja,"Be aware that Series of the "),I1=n(ja,"CODE",{});var l4=r(I1);r6=l(l4,"object"),l4.forEach(a),o6=l(ja,` 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 `),T1=n(ja,"CODE",{});var i4=r(T1);l6=l(i4,"None/nan"),i4.forEach(a),i6=l(ja," objects, the type is set to "),N1=n(ja,"CODE",{});var d4=r(N1);d6=l(d4,"null"),d4.forEach(a),c6=l(ja,`. This behavior can be avoided by constructing explicit
features and passing it to this function.`),ja.forEach(a),p6=h(dt),b(jo.$$.fragment,dt),dt.forEach(a),m6=h(I),wo=n(I,"DIV",{class:!0});var tu=r(wo);b(Mc.$$.fragment,tu),h6=h(tu),Rt=n(tu,"P",{});var wa=r(Rt);f6=l(wa,"Convert "),P1=n(wa,"CODE",{});var c4=r(P1);g6=l(c4,"dict"),c4.forEach(a),u6=l(wa," to a "),A1=n(wa,"CODE",{});var p4=r(A1);_6=l(p4,"pyarrow.Table"),p4.forEach(a),b6=l(wa," to create a "),gu=n(wa,"A",{href:!0});var m4=r(gu);$6=l(m4,"Dataset"),m4.forEach(a),x6=l(wa,"."),wa.forEach(a),tu.forEach(a),v6=h(I),_t=n(I,"DIV",{class:!0});var Da=r(_t);b(Rc.$$.fragment,Da),y6=h(Da),L1=n(Da,"P",{});var h4=r(L1);j6=l(h4,"Create a Dataset from a generator."),h4.forEach(a),w6=h(Da),b(Do.$$.fragment,Da),D6=h(Da),b(ko.$$.fragment,Da),Da.forEach(a),k6=h(I),La=n(I,"DIV",{class:!0});var Yr=r(La);b(Bc.$$.fragment,Yr),E6=h(Yr),F1=n(Yr,"P",{});var f4=r(F1);q6=l(f4,"The Apache Arrow table backing the dataset."),f4.forEach(a),I6=h(Yr),b(Eo.$$.fragment,Yr),Yr.forEach(a),T6=h(I),Fa=n(I,"DIV",{class:!0});var Jr=r(Fa);b(Hc.$$.fragment,Jr),N6=h(Jr),C1=n(Jr,"P",{});var g4=r(C1);P6=l(g4,"The cache files containing the Apache Arrow table backing the dataset."),g4.forEach(a),A6=h(Jr),b(qo.$$.fragment,Jr),Jr.forEach(a),L6=h(I),Ca=n(I,"DIV",{class:!0});var Qr=r(Ca);b(Gc.$$.fragment,Qr),F6=h(Qr),O1=n(Qr,"P",{});var u4=r(O1);C6=l(u4,"Number of columns in the dataset."),u4.forEach(a),O6=h(Qr),b(Io.$$.fragment,Qr),Qr.forEach(a),z6=h(I),Oa=n(I,"DIV",{class:!0});var Zr=r(Oa);b(Wc.$$.fragment,Zr),S6=h(Zr),Kc=n(Zr,"P",{});var au=r(Kc);V6=l(au,"Number of rows in the dataset (same as "),To=n(au,"A",{href:!0});var su=r(To);U6=l(su,"Dataset."),z1=n(su,"STRONG",{});var _4=r(z1);M6=l(_4,"len"),_4.forEach(a),R6=l(su,"()"),su.forEach(a),B6=l(au,")."),au.forEach(a),H6=h(Zr),b(No.$$.fragment,Zr),Zr.forEach(a),G6=h(I),za=n(I,"DIV",{class:!0});var Xr=r(za);b(Yc.$$.fragment,Xr),W6=h(Xr),S1=n(Xr,"P",{});var b4=r(S1);K6=l(b4,"Names of the columns in the dataset."),b4.forEach(a),Y6=h(Xr),b(Po.$$.fragment,Xr),Xr.forEach(a),J6=h(I),Sa=n(I,"DIV",{class:!0});var eo=r(Sa);b(Jc.$$.fragment,eo),Q6=h(eo),V1=n(eo,"P",{});var $4=r(V1);Z6=l($4,"Shape of the dataset (number of columns, number of rows)."),$4.forEach(a),X6=h(eo),b(Ao.$$.fragment,eo),eo.forEach(a),eq=h(I),bt=n(I,"DIV",{class:!0});var ka=r(bt);b(Qc.$$.fragment,ka),tq=h(ka),U1=n(ka,"P",{});var x4=r(U1);aq=l(x4,"Return a list of the unique elements in a column."),x4.forEach(a),sq=h(ka),M1=n(ka,"P",{});var v4=r(M1);nq=l(v4,"This is implemented in the low-level backend and as such, very fast."),v4.forEach(a),rq=h(ka),b(Lo.$$.fragment,ka),ka.forEach(a),oq=h(I),Va=n(I,"DIV",{class:!0});var to=r(Va);b(Zc.$$.fragment,to),lq=h(to),R1=n(to,"P",{});var y4=r(R1);iq=l(y4,`Flatten the table.
Each column with a struct type is flattened into one column per struct field.
Other columns are left unchanged.`),y4.forEach(a),dq=h(to),b(Fo.$$.fragment,to),to.forEach(a),cq=h(I),Ua=n(I,"DIV",{class:!0});var ao=r(Ua);b(Xc.$$.fragment,ao),pq=h(ao),B1=n(ao,"P",{});var j4=r(B1);mq=l(j4,"Cast the dataset to a new set of features."),j4.forEach(a),hq=h(ao),b(Co.$$.fragment,ao),ao.forEach(a),fq=h(I),Ma=n(I,"DIV",{class:!0});var so=r(Ma);b(ep.$$.fragment,so),gq=h(so),H1=n(so,"P",{});var w4=r(H1);uq=l(w4,"Cast column to feature for decoding."),w4.forEach(a),_q=h(so),b(Oo.$$.fragment,so),so.forEach(a),bq=h(I),$t=n(I,"DIV",{class:!0});var Ea=r($t);b(tp.$$.fragment,Ea),$q=h(Ea),G1=n(Ea,"P",{});var D4=r(G1);xq=l(D4,"Remove one or several column(s) in the dataset and the features associated to them."),D4.forEach(a),vq=h(Ea),Cn=n(Ea,"P",{});var no=r(Cn);yq=l(no,"You can also remove a column using "),uu=n(no,"A",{href:!0});var k4=r(uu);jq=l(k4,"map()"),k4.forEach(a),wq=l(no," with "),W1=n(no,"CODE",{});var E4=r(W1);Dq=l(E4,"remove_columns"),E4.forEach(a),kq=l(no,` but the present method
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),no.forEach(a),Eq=h(Ea),b(zo.$$.fragment,Ea),Ea.forEach(a),qq=h(I),Ra=n(I,"DIV",{class:!0});var ro=r(Ra);b(ap.$$.fragment,ro),Iq=h(ro),K1=n(ro,"P",{});var q4=r(K1);Tq=l(q4,`Rename a column in the dataset, and move the features associated to the original column under the new column
name.`),q4.forEach(a),Nq=h(ro),b(So.$$.fragment,ro),ro.forEach(a),Pq=h(I),Ba=n(I,"DIV",{class:!0});var oo=r(Ba);b(sp.$$.fragment,oo),Aq=h(oo),Y1=n(oo,"P",{});var I4=r(Y1);Lq=l(I4,`Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.`),I4.forEach(a),Fq=h(oo),b(Vo.$$.fragment,oo),oo.forEach(a),Cq=h(I),Ha=n(I,"DIV",{class:!0});var lo=r(Ha);b(np.$$.fragment,lo),Oq=h(lo),J1=n(lo,"P",{});var T4=r(J1);zq=l(T4,"Casts the given column as [~`datasets.features.ClassLabel]` and updates the table."),T4.forEach(a),Sq=h(lo),b(Uo.$$.fragment,lo),lo.forEach(a),Vq=h(I),Ga=n(I,"DIV",{class:!0});var io=r(Ga);b(rp.$$.fragment,io),Uq=h(io),Q1=n(io,"P",{});var N4=r(Q1);Mq=l(N4,"Number of rows in the dataset."),N4.forEach(a),Rq=h(io),b(Mo.$$.fragment,io),io.forEach(a),Bq=h(I),Wa=n(I,"DIV",{class:!0});var co=r(Wa);b(op.$$.fragment,co),Hq=h(co),Z1=n(co,"P",{});var P4=r(Z1);Gq=l(P4,"Iterate through the examples."),P4.forEach(a),Wq=h(co),lp=n(co,"P",{});var nu=r(lp);Kq=l(nu,"If a formatting is set with "),_u=n(nu,"A",{href:!0});var A4=r(_u);Yq=l(A4,"Dataset.set_format()"),A4.forEach(a),Jq=l(nu,` rows will be returned with the
selected format.`),nu.forEach(a),co.forEach(a),Qq=h(I),Ka=n(I,"DIV",{class:!0});var po=r(Ka);b(ip.$$.fragment,po),Zq=h(po),dp=n(po,"P",{});var ru=r(dp);Xq=l(ru,"Iterate through the batches of size "),X1=n(ru,"EM",{});var L4=r(X1);e9=l(L4,"batch_size"),L4.forEach(a),t9=l(ru,"."),ru.forEach(a),a9=h(po),cp=n(po,"P",{});var ou=r(cp);s9=l(ou,"If a formatting is set with ["),ex=n(ou,"EM",{});var F4=r(ex);n9=l(F4,"~datasets.Dataset.set_format"),F4.forEach(a),r9=l(ou,`] rows will be returned with the
selected format.`),ou.forEach(a),po.forEach(a),o9=h(I),Ro=n(I,"DIV",{class:!0});var lu=r(Ro);b(pp.$$.fragment,lu),l9=h(lu),On=n(lu,"P",{});var mo=r(On);i9=l(mo,"To be used in a "),tx=n(mo,"CODE",{});var C4=r(tx);d9=l(C4,"with"),C4.forEach(a),c9=l(mo," statement. Set "),ax=n(mo,"CODE",{});var O4=r(ax);p9=l(O4,"__getitem__"),O4.forEach(a),m9=l(mo," return format (type and columns)."),mo.forEach(a),lu.forEach(a),h9=h(I),Ie=n(I,"DIV",{class:!0});var ct=r(Ie);b(mp.$$.fragment,ct),f9=h(ct),We=n(ct,"P",{});var pt=r(We);g9=l(pt,"Set "),sx=n(pt,"CODE",{});var z4=r(sx);u9=l(z4,"__getitem__"),z4.forEach(a),_9=l(pt,` return format (type and columns). The data formatting is applied on-the-fly.
The format `),nx=n(pt,"CODE",{});var S4=r(nx);b9=l(S4,"type"),S4.forEach(a),$9=l(pt," (for example \u201Cnumpy\u201D) is used to format batches when using "),rx=n(pt,"CODE",{});var V4=r(rx);x9=l(V4,"__getitem__"),V4.forEach(a),v9=l(pt,`.
It\u2019s also possible to use custom transforms for formatting using `),bu=n(pt,"A",{href:!0});var U4=r(bu);y9=l(U4,"set_transform()"),U4.forEach(a),j9=l(pt,"."),pt.forEach(a),w9=h(ct),Bt=n(ct,"P",{});var qa=r(Bt);D9=l(qa,"It is possible to call "),$u=n(qa,"A",{href:!0});var M4=r($u);k9=l(M4,"map()"),M4.forEach(a),E9=l(qa," after calling "),ox=n(qa,"CODE",{});var R4=r(ox);q9=l(R4,"set_format"),R4.forEach(a),I9=l(qa,". Since "),lx=n(qa,"CODE",{});var B4=r(lx);T9=l(B4,"map"),B4.forEach(a),N9=l(qa," may add new columns, then the list of formatted columns"),qa.forEach(a),P9=h(ct),b(Bo.$$.fragment,ct),A9=h(ct),b(Ho.$$.fragment,ct),ct.forEach(a),L9=h(I),Ya=n(I,"DIV",{class:!0});var ho=r(Ya);b(hp.$$.fragment,ho),F9=h(ho),Ke=n(ho,"P",{});var mt=r(Ke);C9=l(mt,"Set "),ix=n(mt,"CODE",{});var H4=r(ix);O9=l(H4,"__getitem__"),H4.forEach(a),z9=l(mt," return format using this transform. The transform is applied on-the-fly on batches when "),dx=n(mt,"CODE",{});var G4=r(dx);S9=l(G4,"__getitem__"),G4.forEach(a),V9=l(mt,` is called.
As `),xu=n(mt,"A",{href:!0});var W4=r(xu);U9=l(W4,"set_format()"),W4.forEach(a),M9=l(mt,", this can be reset using "),vu=n(mt,"A",{href:!0});var K4=r(vu);R9=l(K4,"reset_format()"),K4.forEach(a),B9=l(mt,"."),mt.forEach(a),H9=h(ho),b(Go.$$.fragment,ho),ho.forEach(a),G9=h(I),xt=n(I,"DIV",{class:!0});var Ia=r(xt);b(fp.$$.fragment,Ia),W9=h(Ia),gp=n(Ia,"P",{});var iu=r(gp);K9=l(iu,"Reset "),cx=n(iu,"CODE",{});var Y4=r(cx);Y9=l(Y4,"__getitem__"),Y4.forEach(a),J9=l(iu," return format to python objects and all columns."),iu.forEach(a),Q9=h(Ia),yu=n(Ia,"P",{});var Zb=r(yu);Z9=l(Zb,"Same as "),px=n(Zb,"CODE",{});var J4=r(px);X9=l(J4,"self.set_format()"),J4.forEach(a),Zb.forEach(a),eI=h(Ia),b(Wo.$$.fragment,Ia),Ia.forEach(a),tI=h(I),Te=n(I,"DIV",{class:!0});var ht=r(Te);b(up.$$.fragment,ht),aI=h(ht),Ht=n(ht,"P",{});var Ta=r(Ht);sI=l(Ta,"Set "),mx=n(Ta,"CODE",{});var Q4=r(mx);nI=l(Q4,"__getitem__"),Q4.forEach(a),rI=l(Ta,` return format (type and columns). The data formatting is applied on-the-fly.
The format `),hx=n(Ta,"CODE",{});var Z4=r(hx);oI=l(Z4,"type"),Z4.forEach(a),lI=l(Ta," (for example \u201Cnumpy\u201D) is used to format batches when using "),fx=n(Ta,"CODE",{});var X4=r(fx);iI=l(X4,"__getitem__"),X4.forEach(a),dI=l(Ta,"."),Ta.forEach(a),cI=h(ht),_p=n(ht,"P",{});var GE=r(_p);pI=l(GE,"It\u2019s also possible to use custom transforms for formatting using "),ju=n(GE,"A",{href:!0});var bse=r(ju);mI=l(bse,"with_transform()"),bse.forEach(a),hI=l(GE,"."),GE.forEach(a),fI=h(ht),Gt=n(ht,"P",{});var Bd=r(Gt);gI=l(Bd,"Contrary to "),wu=n(Bd,"A",{href:!0});var $se=r(wu);uI=l($se,"set_format()"),$se.forEach(a),_I=l(Bd,", "),gx=n(Bd,"CODE",{});var xse=r(gx);bI=l(xse,"with_format"),xse.forEach(a),$I=l(Bd," returns a new "),Du=n(Bd,"A",{href:!0});var vse=r(Du);xI=l(vse,"Dataset"),vse.forEach(a),vI=l(Bd," object."),Bd.forEach(a),yI=h(ht),b(Ko.$$.fragment,ht),ht.forEach(a),jI=h(I),Ne=n(I,"DIV",{class:!0});var nn=r(Ne);b(bp.$$.fragment,nn),wI=h(nn),zn=n(nn,"P",{});var Xb=r(zn);DI=l(Xb,"Set "),ux=n(Xb,"CODE",{});var yse=r(ux);kI=l(yse,"__getitem__"),yse.forEach(a),EI=l(Xb," return format using this transform. The transform is applied on-the-fly on batches when "),_x=n(Xb,"CODE",{});var jse=r(_x);qI=l(jse,"__getitem__"),jse.forEach(a),II=l(Xb," is called."),Xb.forEach(a),TI=h(nn),Sn=n(nn,"P",{});var e2=r(Sn);NI=l(e2,"As "),ku=n(e2,"A",{href:!0});var wse=r(ku);PI=l(wse,"set_format()"),wse.forEach(a),AI=l(e2,", this can be reset using "),Eu=n(e2,"A",{href:!0});var Dse=r(Eu);LI=l(Dse,"reset_format()"),Dse.forEach(a),FI=l(e2,"."),e2.forEach(a),CI=h(nn),Wt=n(nn,"P",{});var Hd=r(Wt);OI=l(Hd,"Contrary to "),qu=n(Hd,"A",{href:!0});var kse=r(qu);zI=l(kse,"set_transform()"),kse.forEach(a),SI=l(Hd,", "),bx=n(Hd,"CODE",{});var Ese=r(bx);VI=l(Ese,"with_transform"),Ese.forEach(a),UI=l(Hd," returns a new "),Iu=n(Hd,"A",{href:!0});var qse=r(Iu);MI=l(qse,"Dataset"),qse.forEach(a),RI=l(Hd," object."),Hd.forEach(a),BI=h(nn),b(Yo.$$.fragment,nn),nn.forEach(a),HI=h(I),Jo=n(I,"DIV",{class:!0});var WE=r(Jo);b($p.$$.fragment,WE),GI=h(WE),$x=n(WE,"P",{});var Ise=r($x);WI=l(Ise,"Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."),Ise.forEach(a),WE.forEach(a),KI=h(I),vt=n(I,"DIV",{class:!0});var Gd=r(vt);b(xp.$$.fragment,Gd),YI=h(Gd),xx=n(Gd,"P",{});var Tse=r(xx);JI=l(Tse,`Clean up all cache files in the dataset cache directory, excepted the currently used cache file if there is
one.`),Tse.forEach(a),QI=h(Gd),vx=n(Gd,"P",{});var Nse=r(vx);ZI=l(Nse,"Be careful when running this command that no other process is currently using other cache files."),Nse.forEach(a),XI=h(Gd),b(Qo.$$.fragment,Gd),Gd.forEach(a),eT=h(I),Pe=n(I,"DIV",{class:!0});var rn=r(Pe);b(vp.$$.fragment,rn),tT=h(rn),yx=n(rn,"P",{});var Pse=r(yx);aT=l(Pse,`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.`),Pse.forEach(a),sT=h(rn),yp=n(rn,"P",{});var KE=r(yp);nT=l(KE,"You can specify whether the function should be batched or not with the "),jx=n(KE,"CODE",{});var Ase=r(jx);rT=l(Ase,"batched"),Ase.forEach(a),oT=l(KE," parameter:"),KE.forEach(a),lT=h(rn),Vn=n(rn,"UL",{});var t2=r(Vn);Un=n(t2,"LI",{});var a2=r(Un);iT=l(a2,"If batched is "),wx=n(a2,"CODE",{});var Lse=r(wx);dT=l(Lse,"False"),Lse.forEach(a),cT=l(a2,`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),Dx=n(a2,"CODE",{});var Fse=r(Dx);pT=l(Fse,'{"text": "Hello there !"}'),Fse.forEach(a),mT=l(a2,"."),a2.forEach(a),hT=h(t2),Kt=n(t2,"LI",{});var Wd=r(Kt);fT=l(Wd,"If batched is "),kx=n(Wd,"CODE",{});var Cse=r(kx);gT=l(Cse,"True"),Cse.forEach(a),uT=l(Wd," and "),Ex=n(Wd,"CODE",{});var Ose=r(Ex);_T=l(Ose,"batch_size"),Ose.forEach(a),bT=l(Wd,` 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 `),qx=n(Wd,"CODE",{});var zse=r(qx);$T=l(zse,'{"text": ["Hello there !"]}'),zse.forEach(a),xT=l(Wd,"."),Wd.forEach(a),vT=h(t2),K=n(t2,"LI",{});var re=r(K);yT=l(re,"If batched is "),Ix=n(re,"CODE",{});var Sse=r(Ix);jT=l(Sse,"True"),Sse.forEach(a),wT=l(re," and "),Tx=n(re,"CODE",{});var Vse=r(Tx);DT=l(Vse,"batch_size"),Vse.forEach(a),kT=l(re," is "),Nx=n(re,"CODE",{});var Use=r(Nx);ET=l(Use,"n > 1"),Use.forEach(a),qT=l(re,", then the function takes a batch of "),Px=n(re,"CODE",{});var Mse=r(Px);IT=l(Mse,"n"),Mse.forEach(a),TT=l(re," examples as input and can return a batch with "),Ax=n(re,"CODE",{});var Rse=r(Ax);NT=l(Rse,"n"),Rse.forEach(a),PT=l(re,` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),Lx=n(re,"CODE",{});var Bse=r(Lx);AT=l(Bse,"n"),Bse.forEach(a),LT=l(re,` examples.
A batch is a dictionary, e.g. a batch of `),Fx=n(re,"CODE",{});var Hse=r(Fx);FT=l(Hse,"n"),Hse.forEach(a),CT=l(re," examples is "),Cx=n(re,"CODE",{});var Gse=r(Cx);OT=l(Gse,'{"text": ["Hello there !"] * n}'),Gse.forEach(a),zT=l(re,"."),re.forEach(a),t2.forEach(a),ST=h(rn),b(Zo.$$.fragment,rn),rn.forEach(a),VT=h(I),Ja=n(I,"DIV",{class:!0});var s2=r(Ja);b(jp.$$.fragment,s2),UT=h(s2),Ox=n(s2,"P",{});var Wse=r(Ox);MT=l(Wse,`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.`),Wse.forEach(a),RT=h(s2),b(Xo.$$.fragment,s2),s2.forEach(a),BT=h(I),Qa=n(I,"DIV",{class:!0});var n2=r(Qa);b(wp.$$.fragment,n2),HT=h(n2),zx=n(n2,"P",{});var Kse=r(zx);GT=l(Kse,"Create a new dataset with rows selected following the list/array of indices."),Kse.forEach(a),WT=h(n2),b(el.$$.fragment,n2),n2.forEach(a),KT=h(I),yt=n(I,"DIV",{class:!0});var Kd=r(yt);b(Dp.$$.fragment,Kd),YT=h(Kd),Sx=n(Kd,"P",{});var Yse=r(Sx);JT=l(Yse,"Create a new dataset sorted according to a column."),Yse.forEach(a),QT=h(Kd),Vx=n(Kd,"P",{});var Jse=r(Vx);ZT=l(Jse,`Currently sorting according to a column name uses pandas sorting algorithm under the hood.
The column should thus be a pandas compatible type (in particular not a nested type).
This also means that the column used for sorting is fully loaded in memory (which should be fine in most cases).`),Jse.forEach(a),XT=h(Kd),b(tl.$$.fragment,Kd),Kd.forEach(a),eN=h(I),jt=n(I,"DIV",{class:!0});var Yd=r(jt);b(kp.$$.fragment,Yd),tN=h(Yd),Ux=n(Yd,"P",{});var Qse=r(Ux);aN=l(Qse,"Create a new Dataset where the rows are shuffled."),Qse.forEach(a),sN=h(Yd),Mx=n(Yd,"P",{});var Zse=r(Mx);nN=l(Zse,`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).`),Zse.forEach(a),rN=h(Yd),b(al.$$.fragment,Yd),Yd.forEach(a),oN=h(I),wt=n(I,"DIV",{class:!0});var Jd=r(wt);b(Ep.$$.fragment,Jd),lN=h(Jd),ee=n(Jd,"P",{});var $e=r(ee);iN=l($e,"Return a dictionary ("),Tu=n($e,"A",{href:!0});var Xse=r(Tu);dN=l(Xse,"datasets.DatasetDict"),Xse.forEach(a),cN=l($e,") with two random train and test subsets ("),Rx=n($e,"CODE",{});var ene=r(Rx);pN=l(ene,"train"),ene.forEach(a),mN=l($e," and "),Bx=n($e,"CODE",{});var tne=r(Bx);hN=l(tne,"test"),tne.forEach(a),fN=h($e),Hx=n($e,"CODE",{});var ane=r(Hx);gN=l(ane,"Dataset"),ane.forEach(a),uN=l($e,` splits).
Splits are created from the dataset according to `),Gx=n($e,"CODE",{});var sne=r(Gx);_N=l(sne,"test_size"),sne.forEach(a),bN=l($e,", "),Wx=n($e,"CODE",{});var nne=r(Wx);$N=l(nne,"train_size"),nne.forEach(a),xN=l($e," and "),Kx=n($e,"CODE",{});var rne=r(Kx);vN=l(rne,"shuffle"),rne.forEach(a),yN=l($e,"."),$e.forEach(a),jN=h(Jd),qp=n(Jd,"P",{});var YE=r(qp);wN=l(YE,"This method is similar to scikit-learn "),Yx=n(YE,"CODE",{});var one=r(Yx);DN=l(one,"train_test_split"),one.forEach(a),kN=l(YE,"."),YE.forEach(a),EN=h(Jd),b(sl.$$.fragment,Jd),Jd.forEach(a),qN=h(I),ge=n(I,"DIV",{class:!0});var Ot=r(ge);b(Ip.$$.fragment,Ot),IN=h(Ot),Mn=n(Ot,"P",{});var r2=r(Mn);TN=l(r2,"Return the "),Jx=n(r2,"CODE",{});var lne=r(Jx);NN=l(lne,"index"),lne.forEach(a),PN=l(r2,"-nth shard from dataset split into "),Qx=n(r2,"CODE",{});var ine=r(Qx);AN=l(ine,"num_shards"),ine.forEach(a),LN=l(r2," pieces."),r2.forEach(a),FN=h(Ot),Rn=n(Ot,"P",{});var o2=r(Rn);CN=l(o2,"This shards deterministically. "),Zx=n(o2,"CODE",{});var dne=r(Zx);ON=l(dne,"dset.shard(n, i)"),dne.forEach(a),zN=l(o2,` will contain all elements of dset whose
index mod `),Xx=n(o2,"CODE",{});var cne=r(Xx);SN=l(cne,"n = i"),cne.forEach(a),VN=l(o2,"."),o2.forEach(a),UN=h(Ot),ue=n(Ot,"P",{});var ft=r(ue);ev=n(ft,"CODE",{});var pne=r(ev);MN=l(pne,"dset.shard(n, i, contiguous=True)"),pne.forEach(a),RN=l(ft,` will instead split dset into contiguous chunks,
so it can be easily concatenated back together after processing. If `),tv=n(ft,"CODE",{});var mne=r(tv);BN=l(mne,"n % i == l"),mne.forEach(a),HN=l(ft,`, then the
first `),av=n(ft,"CODE",{});var hne=r(av);GN=l(hne,"l"),hne.forEach(a),WN=l(ft," shards will have length "),sv=n(ft,"CODE",{});var fne=r(sv);KN=l(fne,"(n // i) + 1"),fne.forEach(a),YN=l(ft,", and the remaining shards will have length "),nv=n(ft,"CODE",{});var gne=r(nv);JN=l(gne,"(n // i)"),gne.forEach(a),QN=l(ft,`.
`),rv=n(ft,"CODE",{});var une=r(rv);ZN=l(une,"datasets.concatenate([dset.shard(n, i, contiguous=True) for i in range(n)])"),une.forEach(a),XN=l(ft,` will return
a dataset with the same order as the original.`),ft.forEach(a),eP=h(Ot),Tp=n(Ot,"P",{});var JE=r(Tp);tP=l(JE,"Be sure to shard before using any randomizing operator (such as "),ov=n(JE,"CODE",{});var _ne=r(ov);aP=l(_ne,"shuffle"),_ne.forEach(a),sP=l(JE,`).
It is best if the shard operator is used early in the dataset pipeline.`),JE.forEach(a),nP=h(Ot),b(nl.$$.fragment,Ot),Ot.forEach(a),rP=h(I),Za=n(I,"DIV",{class:!0});var l2=r(Za);b(Np.$$.fragment,l2),oP=h(l2),te=n(l2,"P",{});var xe=r(te);lP=l(xe,"Create a "),lv=n(xe,"CODE",{});var bne=r(lv);iP=l(bne,"tf.data.Dataset"),bne.forEach(a),dP=l(xe," from the underlying Dataset. This "),iv=n(xe,"CODE",{});var $ne=r(iv);cP=l($ne,"tf.data.Dataset"),$ne.forEach(a),pP=l(xe,` will load and collate batches from
the Dataset, and is suitable for passing to methods like `),dv=n(xe,"CODE",{});var xne=r(dv);mP=l(xne,"model.fit()"),xne.forEach(a),hP=l(xe," or "),cv=n(xe,"CODE",{});var vne=r(cv);fP=l(vne,"model.predict()"),vne.forEach(a),gP=l(xe,`. The dataset will yield
`),pv=n(xe,"CODE",{});var yne=r(pv);uP=l(yne,"dicts"),yne.forEach(a),_P=l(xe," for both inputs and labels unless the "),mv=n(xe,"CODE",{});var jne=r(mv);bP=l(jne,"dict"),jne.forEach(a),$P=l(xe,` would contain only a single key, in which case a raw
`),hv=n(xe,"CODE",{});var wne=r(hv);xP=l(wne,"tf.Tensor"),wne.forEach(a),vP=l(xe," is yielded instead."),xe.forEach(a),yP=h(l2),b(rl.$$.fragment,l2),l2.forEach(a),jP=h(I),Dt=n(I,"DIV",{class:!0});var Qd=r(Dt);b(Pp.$$.fragment,Qd),wP=h(Qd),fv=n(Qd,"P",{});var Dne=r(fv);DP=l(Dne,`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.`),Dne.forEach(a),kP=h(Qd),Ye=n(Qd,"P",{});var on=r(Ye);EP=l(on,"The resulting Parquet files are self-contained by default. If your dataset contains "),Nu=n(on,"A",{href:!0});var kne=r(Nu);qP=l(kne,"Image"),kne.forEach(a),IP=l(on," or "),Pu=n(on,"A",{href:!0});var Ene=r(Pu);TP=l(Ene,"Audio"),Ene.forEach(a),NP=l(on,`
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `),gv=n(on,"CODE",{});var qne=r(gv);PP=l(qne,"embed_external_files"),qne.forEach(a),AP=l(on," to "),uv=n(on,"CODE",{});var Ine=r(uv);LP=l(Ine,"False"),Ine.forEach(a),FP=l(on,"."),on.forEach(a),CP=h(Qd),b(ol.$$.fragment,Qd),Qd.forEach(a),OP=h(I),Ae=n(I,"DIV",{class:!0});var ln=r(Ae);b(Ap.$$.fragment,ln),zP=h(ln),Bn=n(ln,"P",{});var i2=r(Bn);SP=l(i2,"Saves a dataset to a dataset directory, or in a filesystem using either "),_v=n(i2,"CODE",{});var Tne=r(_v);VP=l(Tne,"s3fs.S3FileSystem"),Tne.forEach(a),UP=l(i2,` or
any implementation of `),bv=n(i2,"CODE",{});var Nne=r(bv);MP=l(Nne,"fsspec.spec.AbstractFileSystem"),Nne.forEach(a),RP=l(i2,"."),i2.forEach(a),BP=h(ln),Hn=n(ln,"P",{});var d2=r(Hn);HP=l(d2,"For "),Au=n(d2,"A",{href:!0});var Pne=r(Au);GP=l(Pne,"Image"),Pne.forEach(a),WP=l(d2," and "),Lu=n(d2,"A",{href:!0});var Ane=r(Lu);KP=l(Ane,"Audio"),Ane.forEach(a),YP=l(d2," data:"),d2.forEach(a),JP=h(ln),$v=n(ln,"P",{});var Lne=r($v);QP=l(Lne,`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.`),Lne.forEach(a),ZP=h(ln),b(ll.$$.fragment,ln),ln.forEach(a),XP=h(I),Xa=n(I,"DIV",{class:!0});var c2=r(Xa);b(Lp.$$.fragment,c2),eA=h(c2),Yt=n(c2,"P",{});var Zd=r(Yt);tA=l(Zd,"Loads a dataset that was previously saved using "),xv=n(Zd,"CODE",{});var Fne=r(xv);aA=l(Fne,"save_to_disk"),Fne.forEach(a),sA=l(Zd,` from a dataset directory, or from a
filesystem using either `),vv=n(Zd,"CODE",{});var Cne=r(vv);nA=l(Cne,"s3fs.S3FileSystem"),Cne.forEach(a),rA=l(Zd,` or any implementation of
`),yv=n(Zd,"CODE",{});var One=r(yv);oA=l(One,"fsspec.spec.AbstractFileSystem"),One.forEach(a),lA=l(Zd,"."),Zd.forEach(a),iA=h(c2),b(il.$$.fragment,c2),c2.forEach(a),dA=h(I),dl=n(I,"DIV",{class:!0});var QE=r(dl);b(Fp.$$.fragment,QE),cA=h(QE),jv=n(QE,"P",{});var zne=r(jv);pA=l(zne,"Create and cache a new Dataset by flattening the indices mapping."),zne.forEach(a),QE.forEach(a),mA=h(I),es=n(I,"DIV",{class:!0});var p2=r(es);b(Cp.$$.fragment,p2),hA=h(p2),wv=n(p2,"P",{});var Sne=r(wv);fA=l(Sne,"Exports the dataset to csv"),Sne.forEach(a),gA=h(p2),b(cl.$$.fragment,p2),p2.forEach(a),uA=h(I),ts=n(I,"DIV",{class:!0});var m2=r(ts);b(Op.$$.fragment,m2),_A=h(m2),zp=n(m2,"P",{});var ZE=r(zp);bA=l(ZE,"Returns the dataset as a "),Dv=n(ZE,"CODE",{});var Vne=r(Dv);$A=l(Vne,"pandas.DataFrame"),Vne.forEach(a),xA=l(ZE,". Can also return a generator for large datasets."),ZE.forEach(a),vA=h(m2),b(pl.$$.fragment,m2),m2.forEach(a),yA=h(I),as=n(I,"DIV",{class:!0});var h2=r(as);b(Sp.$$.fragment,h2),jA=h(h2),kv=n(h2,"P",{});var Une=r(kv);wA=l(Une,"Returns the dataset as a Python dict. Can also return a generator for large datasets."),Une.forEach(a),DA=h(h2),b(ml.$$.fragment,h2),h2.forEach(a),kA=h(I),ss=n(I,"DIV",{class:!0});var f2=r(ss);b(Vp.$$.fragment,f2),EA=h(f2),Ev=n(f2,"P",{});var Mne=r(Ev);qA=l(Mne,"Export the dataset to JSON Lines or JSON."),Mne.forEach(a),IA=h(f2),b(hl.$$.fragment,f2),f2.forEach(a),TA=h(I),ns=n(I,"DIV",{class:!0});var g2=r(ns);b(Up.$$.fragment,g2),NA=h(g2),qv=n(g2,"P",{});var Rne=r(qv);PA=l(Rne,"Exports the dataset to parquet"),Rne.forEach(a),AA=h(g2),b(fl.$$.fragment,g2),g2.forEach(a),LA=h(I),rs=n(I,"DIV",{class:!0});var u2=r(rs);b(Mp.$$.fragment,u2),FA=h(u2),Iv=n(u2,"P",{});var Bne=r(Iv);CA=l(Bne,"Exports the dataset to a SQL database."),Bne.forEach(a),OA=h(u2),b(gl.$$.fragment,u2),u2.forEach(a),zA=h(I),kt=n(I,"DIV",{class:!0});var Xd=r(kt);b(Rp.$$.fragment,Xd),SA=h(Xd),Gn=n(Xd,"P",{});var _2=r(Gn);VA=l(_2,`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 `),Tv=n(_2,"CODE",{});var Hne=r(Tv);UA=l(Hne,"device"),Hne.forEach(a),MA=l(_2," if you want to run it on GPU ("),Nv=n(_2,"CODE",{});var Gne=r(Nv);RA=l(Gne,"device"),Gne.forEach(a),BA=l(_2,` must be the GPU index).
You can find more information about Faiss here:`),_2.forEach(a),HA=h(Xd),Pv=n(Xd,"UL",{});var Wne=r(Pv);Fu=n(Wne,"LI",{});var Bae=r(Fu);GA=l(Bae,"For "),Bp=n(Bae,"A",{href:!0,rel:!0});var Kne=r(Bp);WA=l(Kne,"string factory"),Kne.forEach(a),Bae.forEach(a),Wne.forEach(a),KA=h(Xd),b(ul.$$.fragment,Xd),Xd.forEach(a),YA=h(I),os=n(I,"DIV",{class:!0});var b2=r(os);b(Hp.$$.fragment,b2),JA=h(b2),Jt=n(b2,"P",{});var ec=r(Jt);QA=l(ec,`Add a dense index using Faiss for fast retrieval.
The index is created using the vectors of `),Av=n(ec,"CODE",{});var Yne=r(Av);ZA=l(Yne,"external_arrays"),Yne.forEach(a),XA=l(ec,`.
You can specify `),Lv=n(ec,"CODE",{});var Jne=r(Lv);eL=l(Jne,"device"),Jne.forEach(a),tL=l(ec," if you want to run it on GPU ("),Fv=n(ec,"CODE",{});var Qne=r(Fv);aL=l(Qne,"device"),Qne.forEach(a),sL=l(ec,` must be the GPU index).
You can find more information about Faiss here:`),ec.forEach(a),nL=h(b2),Cv=n(b2,"UL",{});var Zne=r(Cv);Cu=n(Zne,"LI",{});var Hae=r(Cu);rL=l(Hae,"For "),Gp=n(Hae,"A",{href:!0,rel:!0});var Xne=r(Gp);oL=l(Xne,"string factory"),Xne.forEach(a),Hae.forEach(a),Zne.forEach(a),b2.forEach(a),lL=h(I),_l=n(I,"DIV",{class:!0});var XE=r(_l);b(Wp.$$.fragment,XE),iL=h(XE),Ov=n(XE,"P",{});var ere=r(Ov);dL=l(ere,"Save a FaissIndex on disk."),ere.forEach(a),XE.forEach(a),cL=h(I),ls=n(I,"DIV",{class:!0});var $2=r(ls);b(Kp.$$.fragment,$2),pL=h($2),zv=n($2,"P",{});var tre=r(zv);mL=l(tre,"Load a FaissIndex from disk."),tre.forEach(a),hL=h($2),Yp=n($2,"P",{});var e8=r(Yp);fL=l(e8,`If you want to do additional configurations, you can have access to the faiss index object by doing
`),Sv=n(e8,"CODE",{});var are=r(Sv);gL=l(are,".get_index(index_name).faiss_index"),are.forEach(a),uL=l(e8," to make it fit your needs."),e8.forEach(a),$2.forEach(a),_L=h(I),is=n(I,"DIV",{class:!0});var x2=r(is);b(Jp.$$.fragment,x2),bL=h(x2),Vv=n(x2,"P",{});var sre=r(Vv);$L=l(sre,"Add a text index using ElasticSearch for fast retrieval. This is done in-place."),sre.forEach(a),xL=h(x2),b(bl.$$.fragment,x2),x2.forEach(a),vL=h(I),$l=n(I,"DIV",{class:!0});var t8=r($l);b(Qp.$$.fragment,t8),yL=h(t8),Uv=n(t8,"P",{});var nre=r(Uv);jL=l(nre,"Load an existing text index using ElasticSearch for fast retrieval."),nre.forEach(a),t8.forEach(a),wL=h(I),xl=n(I,"DIV",{class:!0});var a8=r(xl);b(Zp.$$.fragment,a8),DL=h(a8),Xp=n(a8,"P",{});var s8=r(Xp);kL=l(s8,"List the "),Mv=n(s8,"CODE",{});var rre=r(Mv);EL=l(rre,"colindex_nameumns"),rre.forEach(a),qL=l(s8,"/identifiers of all the attached indexes."),s8.forEach(a),a8.forEach(a),IL=h(I),vl=n(I,"DIV",{class:!0});var n8=r(vl);b(em.$$.fragment,n8),TL=h(n8),tm=n(n8,"P",{});var r8=r(tm);NL=l(r8,"List the "),Rv=n(r8,"CODE",{});var ore=r(Rv);PL=l(ore,"index_name"),ore.forEach(a),AL=l(r8,"/identifiers of all the attached indexes."),r8.forEach(a),n8.forEach(a),LL=h(I),yl=n(I,"DIV",{class:!0});var o8=r(yl);b(am.$$.fragment,o8),FL=h(o8),Bv=n(o8,"P",{});var lre=r(Bv);CL=l(lre,"Drop the index with the specified column."),lre.forEach(a),o8.forEach(a),OL=h(I),jl=n(I,"DIV",{class:!0});var l8=r(jl);b(sm.$$.fragment,l8),zL=h(l8),Hv=n(l8,"P",{});var ire=r(Hv);SL=l(ire,"Find the nearest examples indices in the dataset to the query."),ire.forEach(a),l8.forEach(a),VL=h(I),wl=n(I,"DIV",{class:!0});var i8=r(wl);b(nm.$$.fragment,i8),UL=h(i8),Gv=n(i8,"P",{});var dre=r(Gv);ML=l(dre,"Find the nearest examples indices in the dataset to the query."),dre.forEach(a),i8.forEach(a),RL=h(I),Dl=n(I,"DIV",{class:!0});var d8=r(Dl);b(rm.$$.fragment,d8),BL=h(d8),Wv=n(d8,"P",{});var cre=r(Wv);HL=l(cre,"Find the nearest examples in the dataset to the query."),cre.forEach(a),d8.forEach(a),GL=h(I),kl=n(I,"DIV",{class:!0});var c8=r(kl);b(om.$$.fragment,c8),WL=h(c8),Kv=n(c8,"P",{});var pre=r(Kv);KL=l(pre,"Find the nearest examples in the dataset to the query."),pre.forEach(a),c8.forEach(a),YL=h(I),El=n(I,"DIV",{class:!0});var p8=r(El);b(lm.$$.fragment,p8),JL=h(p8),Ou=n(p8,"P",{});var Gae=r(Ou);zu=n(Gae,"A",{href:!0});var mre=r(zu);QL=l(mre,"DatasetInfo"),mre.forEach(a),ZL=l(Gae," object containing all the metadata in the dataset."),Gae.forEach(a),p8.forEach(a),XL=h(I),ql=n(I,"DIV",{class:!0});var m8=r(ql);b(im.$$.fragment,m8),eF=h(m8),Su=n(m8,"P",{});var Wae=r(Su);Vu=n(Wae,"A",{href:!0});var hre=r(Vu);tF=l(hre,"NamedSplit"),hre.forEach(a),aF=l(Wae," object corresponding to a named dataset split."),Wae.forEach(a),m8.forEach(a),sF=h(I),Uu=n(I,"DIV",{class:!0});var fre=r(Uu);b(dm.$$.fragment,fre),fre.forEach(a),nF=h(I),Mu=n(I,"DIV",{class:!0});var gre=r(Mu);b(cm.$$.fragment,gre),gre.forEach(a),rF=h(I),Ru=n(I,"DIV",{class:!0});var ure=r(Ru);b(pm.$$.fragment,ure),ure.forEach(a),oF=h(I),Bu=n(I,"DIV",{class:!0});var _re=r(Bu);b(mm.$$.fragment,_re),_re.forEach(a),lF=h(I),Hu=n(I,"DIV",{class:!0});var bre=r(Hu);b(hm.$$.fragment,bre),bre.forEach(a),iF=h(I),Gu=n(I,"DIV",{class:!0});var $re=r(Gu);b(fm.$$.fragment,$re),$re.forEach(a),dF=h(I),Wu=n(I,"DIV",{class:!0});var xre=r(Wu);b(gm.$$.fragment,xre),xre.forEach(a),cF=h(I),Ku=n(I,"DIV",{class:!0});var vre=r(Ku);b(um.$$.fragment,vre),vre.forEach(a),pF=h(I),Yu=n(I,"DIV",{class:!0});var yre=r(Yu);b(_m.$$.fragment,yre),yre.forEach(a),mF=h(I),Ju=n(I,"DIV",{class:!0});var jre=r(Ju);b(bm.$$.fragment,jre),jre.forEach(a),hF=h(I),Qu=n(I,"DIV",{class:!0});var wre=r(Qu);b($m.$$.fragment,wre),wre.forEach(a),fF=h(I),Zu=n(I,"DIV",{class:!0});var Dre=r(Zu);b(xm.$$.fragment,Dre),Dre.forEach(a),gF=h(I),Xu=n(I,"DIV",{class:!0});var kre=r(Xu);b(vm.$$.fragment,kre),kre.forEach(a),uF=h(I),ds=n(I,"DIV",{class:!0});var v2=r(ds);b(ym.$$.fragment,v2),_F=h(v2),Yv=n(v2,"P",{});var Ere=r(Yv);bF=l(Ere,"Create Dataset from CSV file(s)."),Ere.forEach(a),$F=h(v2),b(Il.$$.fragment,v2),v2.forEach(a),xF=h(I),cs=n(I,"DIV",{class:!0});var y2=r(cs);b(jm.$$.fragment,y2),vF=h(y2),Jv=n(y2,"P",{});var qre=r(Jv);yF=l(qre,"Create Dataset from JSON or JSON Lines file(s)."),qre.forEach(a),jF=h(y2),b(Tl.$$.fragment,y2),y2.forEach(a),wF=h(I),ps=n(I,"DIV",{class:!0});var j2=r(ps);b(wm.$$.fragment,j2),DF=h(j2),Qv=n(j2,"P",{});var Ire=r(Qv);kF=l(Ire,"Create Dataset from Parquet file(s)."),Ire.forEach(a),EF=h(j2),b(Nl.$$.fragment,j2),j2.forEach(a),qF=h(I),ms=n(I,"DIV",{class:!0});var w2=r(ms);b(Dm.$$.fragment,w2),IF=h(w2),Zv=n(w2,"P",{});var Tre=r(Zv);TF=l(Tre,"Create Dataset from text file(s)."),Tre.forEach(a),NF=h(w2),b(Pl.$$.fragment,w2),w2.forEach(a),PF=h(I),Et=n(I,"DIV",{class:!0});var tc=r(Et);b(km.$$.fragment,tc),AF=h(tc),Xv=n(tc,"P",{});var Nre=r(Xv);LF=l(Nre,"Create Dataset from SQL query or database table."),Nre.forEach(a),FF=h(tc),b(Al.$$.fragment,tc),CF=h(tc),b(Ll.$$.fragment,tc),tc.forEach(a),OF=h(I),hs=n(I,"DIV",{class:!0});var D2=r(hs);b(Em.$$.fragment,D2),zF=h(D2),Wn=n(D2,"P",{});var k2=r(Wn);SF=l(k2,"Prepare a dataset for the given task by casting the dataset\u2019s "),e_=n(k2,"A",{href:!0});var Pre=r(e_);VF=l(Pre,"Features"),Pre.forEach(a),UF=l(k2," to standardized column names and types as detailed in "),t_=n(k2,"A",{href:!0});var Are=r(t_);e0=n(Are,"CODE",{});var Lre=r(e0);MF=l(Lre,"datasets.tasks"),Lre.forEach(a),Are.forEach(a),RF=l(k2,"."),k2.forEach(a),BF=h(D2),Kn=n(D2,"P",{});var E2=r(Kn);HF=l(E2,"Casts "),t0=n(E2,"CODE",{});var Fre=r(t0);GF=l(Fre,"datasets.DatasetInfo.features"),Fre.forEach(a),WF=l(E2," according to a task-specific schema. Intended for single-use only, so all task templates are removed from "),a0=n(E2,"CODE",{});var Cre=r(a0);KF=l(Cre,"datasets.DatasetInfo.task_templates"),Cre.forEach(a),YF=l(E2," after casting."),E2.forEach(a),D2.forEach(a),JF=h(I),fs=n(I,"DIV",{class:!0});var q2=r(fs);b(qm.$$.fragment,q2),QF=h(q2),Im=n(q2,"P",{});var h8=r(Im);ZF=l(h8,"Align the dataset\u2019s label ID and label name mapping to match an input "),s0=n(h8,"CODE",{});var Ore=r(s0);XF=l(Ore,"label2id"),Ore.forEach(a),eC=l(h8,` 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.`),h8.forEach(a),tC=h(q2),b(Fl.$$.fragment,q2),q2.forEach(a),I.forEach(a),oE=h(i),Qt=n(i,"DIV",{class:!0});var I2=r(Qt);b(Tm.$$.fragment,I2),aC=h(I2),Yn=n(I2,"P",{});var T2=r(Yn);sC=l(T2,"Converts a list of "),a_=n(T2,"A",{href:!0});var zre=r(a_);nC=l(zre,"Dataset"),zre.forEach(a),rC=l(T2," with the same schema into a single "),s_=n(T2,"A",{href:!0});var Sre=r(s_);oC=l(Sre,"Dataset"),Sre.forEach(a),lC=l(T2,"."),T2.forEach(a),iC=h(I2),b(Cl.$$.fragment,I2),I2.forEach(a),lE=h(i),ae=n(i,"DIV",{class:!0});var He=r(ae);b(Nm.$$.fragment,He),dC=h(He),n0=n(He,"P",{});var Vre=r(n0);cC=l(Vre,`Interleave several datasets (sources) into a single dataset.
The new dataset is constructed by alternating between the sources to get the examples.`),Vre.forEach(a),pC=h(He),Jn=n(He,"P",{});var N2=r(Jn);mC=l(N2,"You can use this function on a list of "),n_=n(N2,"A",{href:!0});var Ure=r(n_);hC=l(Ure,"Dataset"),Ure.forEach(a),fC=l(N2," objects, or on a list of "),r_=n(N2,"A",{href:!0});var Mre=r(r_);gC=l(Mre,"IterableDataset"),Mre.forEach(a),uC=l(N2," objects."),N2.forEach(a),_C=h(He),Pm=n(He,"UL",{});var f8=r(Pm);Qn=n(f8,"LI",{});var P2=r(Qn);bC=l(P2,"If "),r0=n(P2,"CODE",{});var Rre=r(r0);$C=l(Rre,"probabilities"),Rre.forEach(a),xC=l(P2," is "),o0=n(P2,"CODE",{});var Bre=r(o0);vC=l(Bre,"None"),Bre.forEach(a),yC=l(P2," (default) the new dataset is constructed by cycling between each source to get the examples."),P2.forEach(a),jC=h(f8),Zn=n(f8,"LI",{});var A2=r(Zn);wC=l(A2,"If "),l0=n(A2,"CODE",{});var Hre=r(l0);DC=l(Hre,"probabilities"),Hre.forEach(a),kC=l(A2," is not "),i0=n(A2,"CODE",{});var Gre=r(i0);EC=l(Gre,"None"),Gre.forEach(a),qC=l(A2,", the new dataset is constructed by getting examples from a random source at a time according to the provided probabilities."),A2.forEach(a),f8.forEach(a),IC=h(He),Xn=n(He,"P",{});var L2=r(Xn);TC=l(L2,"The resulting dataset ends when one of the source datasets runs out of examples except when "),d0=n(L2,"CODE",{});var Wre=r(d0);NC=l(Wre,"oversampling"),Wre.forEach(a),PC=l(L2," is "),c0=n(L2,"CODE",{});var Kre=r(c0);AC=l(Kre,"True"),Kre.forEach(a),LC=l(L2,`,
in which case, the resulting dataset ends when all datasets have ran out of examples at least one time.`),L2.forEach(a),FC=h(He),p0=n(He,"P",{});var Yre=r(p0);CC=l(Yre,"Example:"),Yre.forEach(a),OC=h(He),b(Ol.$$.fragment,He),He.forEach(a),iE=h(i),ye=n(i,"DIV",{class:!0});var dn=r(ye);b(Am.$$.fragment,dn),zC=h(dn),m0=n(dn,"P",{});var Jre=r(m0);SC=l(Jre,`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.`),Jre.forEach(a),VC=h(dn),h0=n(dn,"P",{});var Qre=r(h0);UC=l(Qre,`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),Qre.forEach(a),MC=h(dn),f0=n(dn,"P",{});var Zre=r(f0);RC=l(Zre,`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),Zre.forEach(a),BC=h(dn),Je=n(dn,"UL",{});var cn=r(Je);g0=n(cn,"LI",{});var Xre=r(g0);HC=l(Xre,"cache files are always recreated"),Xre.forEach(a),GC=h(cn),u0=n(cn,"LI",{});var eoe=r(u0);WC=l(eoe,"cache files are written to a temporary directory that is deleted when session closes"),eoe.forEach(a),KC=h(cn),_0=n(cn,"LI",{});var toe=r(_0);YC=l(toe,"cache files are named using a random hash instead of the dataset fingerprint"),toe.forEach(a),JC=h(cn),Lm=n(cn,"LI",{});var g8=r(Lm);QC=l(g8,"use "),o_=n(g8,"A",{href:!0});var aoe=r(o_);ZC=l(aoe,"save_to_disk()"),aoe.forEach(a),XC=l(g8," to save a transformed dataset or it will be deleted when session closes"),g8.forEach(a),eO=h(cn),Zt=n(cn,"LI",{});var ac=r(Zt);tO=l(ac,"caching doesn\u2019t affect "),l_=n(ac,"A",{href:!0});var soe=r(l_);aO=l(soe,"load_dataset()"),soe.forEach(a),sO=l(ac,`. If you want to regenerate a dataset from scratch you should use
the `),b0=n(ac,"CODE",{});var noe=r(b0);nO=l(noe,"download_mode"),noe.forEach(a),rO=l(ac," parameter in "),i_=n(ac,"A",{href:!0});var roe=r(i_);oO=l(roe,"load_dataset()"),roe.forEach(a),lO=l(ac,"."),ac.forEach(a),cn.forEach(a),dn.forEach(a),dE=h(i),je=n(i,"DIV",{class:!0});var pn=r(je);b(Fm.$$.fragment,pn),iO=h(pn),$0=n(pn,"P",{});var ooe=r($0);dO=l(ooe,`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.`),ooe.forEach(a),cO=h(pn),x0=n(pn,"P",{});var loe=r(x0);pO=l(loe,`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),loe.forEach(a),mO=h(pn),v0=n(pn,"P",{});var ioe=r(v0);hO=l(ioe,`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),ioe.forEach(a),fO=h(pn),Qe=n(pn,"UL",{});var mn=r(Qe);y0=n(mn,"LI",{});var doe=r(y0);gO=l(doe,"cache files are always recreated"),doe.forEach(a),uO=h(mn),j0=n(mn,"LI",{});var coe=r(j0);_O=l(coe,"cache files are written to a temporary directory that is deleted when session closes"),coe.forEach(a),bO=h(mn),w0=n(mn,"LI",{});var poe=r(w0);$O=l(poe,"cache files are named using a random hash instead of the dataset fingerprint"),poe.forEach(a),xO=h(mn),Cm=n(mn,"LI",{});var u8=r(Cm);vO=l(u8,"use "),d_=n(u8,"A",{href:!0});var moe=r(d_);yO=l(moe,"save_to_disk()"),moe.forEach(a),jO=l(u8," to save a transformed dataset or it will be deleted when session closes"),u8.forEach(a),wO=h(mn),Xt=n(mn,"LI",{});var sc=r(Xt);DO=l(sc,"caching doesn\u2019t affect "),c_=n(sc,"A",{href:!0});var hoe=r(c_);kO=l(hoe,"load_dataset()"),hoe.forEach(a),EO=l(sc,`. If you want to regenerate a dataset from scratch you should use
the `),D0=n(sc,"CODE",{});var foe=r(D0);qO=l(foe,"download_mode"),foe.forEach(a),IO=l(sc," parameter in "),p_=n(sc,"A",{href:!0});var goe=r(p_);TO=l(goe,"load_dataset()"),goe.forEach(a),NO=l(sc,"."),sc.forEach(a),mn.forEach(a),pn.forEach(a),cE=h(i),we=n(i,"DIV",{class:!0});var hn=r(we);b(Om.$$.fragment,hn),PO=h(hn),k0=n(hn,"P",{});var uoe=r(k0);AO=l(uoe,`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.`),uoe.forEach(a),LO=h(hn),E0=n(hn,"P",{});var _oe=r(E0);FO=l(_oe,`Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.`),_oe.forEach(a),CO=h(hn),q0=n(hn,"P",{});var boe=r(q0);OO=l(boe,`If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:`),boe.forEach(a),zO=h(hn),Ze=n(hn,"UL",{});var fn=r(Ze);I0=n(fn,"LI",{});var $oe=r(I0);SO=l($oe,"cache files are always recreated"),$oe.forEach(a),VO=h(fn),T0=n(fn,"LI",{});var xoe=r(T0);UO=l(xoe,"cache files are written to a temporary directory that is deleted when session closes"),xoe.forEach(a),MO=h(fn),N0=n(fn,"LI",{});var voe=r(N0);RO=l(voe,"cache files are named using a random hash instead of the dataset fingerprint"),voe.forEach(a),BO=h(fn),zm=n(fn,"LI",{});var _8=r(zm);HO=l(_8,"use "),m_=n(_8,"A",{href:!0});var yoe=r(m_);GO=l(yoe,"save_to_disk()"),yoe.forEach(a),WO=l(_8,"] to save a transformed dataset or it will be deleted when session closes"),_8.forEach(a),KO=h(fn),ea=n(fn,"LI",{});var nc=r(ea);YO=l(nc,"caching doesn\u2019t affect "),h_=n(nc,"A",{href:!0});var joe=r(h_);JO=l(joe,"load_dataset()"),joe.forEach(a),QO=l(nc,`. If you want to regenerate a dataset from scratch you should use
the `),P0=n(nc,"CODE",{});var woe=r(P0);ZO=l(woe,"download_mode"),woe.forEach(a),XO=l(nc," parameter in "),f_=n(nc,"A",{href:!0});var Doe=r(f_);ez=l(Doe,"load_dataset()"),Doe.forEach(a),tz=l(nc,"."),nc.forEach(a),fn.forEach(a),hn.forEach(a),pE=h(i),er=n(i,"H2",{class:!0});var b8=r(er);zl=n(b8,"A",{id:!0,class:!0,href:!0});var koe=r(zl);A0=n(koe,"SPAN",{});var Eoe=r(A0);b(Sm.$$.fragment,Eoe),Eoe.forEach(a),koe.forEach(a),az=h(b8),L0=n(b8,"SPAN",{});var qoe=r(L0);sz=l(qoe,"DatasetDict"),qoe.forEach(a),b8.forEach(a),mE=h(i),Sl=n(i,"P",{});var $8=r(Sl);nz=l($8,"Dictionary with split names as keys (\u2018train\u2019, \u2018test\u2019 for example), and "),F0=n($8,"CODE",{});var Ioe=r(F0);rz=l(Ioe,"Dataset"),Ioe.forEach(a),oz=l($8,` objects as values.
It also has dataset transform methods like map or filter, to process all the splits at once.`),$8.forEach(a),hE=h(i),A=n(i,"DIV",{class:!0});var L=r(A);b(Vm.$$.fragment,L),lz=h(L),C0=n(L,"P",{});var Toe=r(C0);iz=l(Toe,"A dictionary (dict of str: datasets.Dataset) with dataset transforms methods (map, filter, etc.)"),Toe.forEach(a),dz=h(L),gs=n(L,"DIV",{class:!0});var F2=r(gs);b(Um.$$.fragment,F2),cz=h(F2),O0=n(F2,"P",{});var Noe=r(O0);pz=l(Noe,"The Apache Arrow tables backing each split."),Noe.forEach(a),mz=h(F2),b(Vl.$$.fragment,F2),F2.forEach(a),hz=h(L),us=n(L,"DIV",{class:!0});var C2=r(us);b(Mm.$$.fragment,C2),fz=h(C2),z0=n(C2,"P",{});var Poe=r(z0);gz=l(Poe,"The cache files containing the Apache Arrow table backing each split."),Poe.forEach(a),uz=h(C2),b(Ul.$$.fragment,C2),C2.forEach(a),_z=h(L),_s=n(L,"DIV",{class:!0});var O2=r(_s);b(Rm.$$.fragment,O2),bz=h(O2),S0=n(O2,"P",{});var Aoe=r(S0);$z=l(Aoe,"Number of columns in each split of the dataset."),Aoe.forEach(a),xz=h(O2),b(Ml.$$.fragment,O2),O2.forEach(a),vz=h(L),bs=n(L,"DIV",{class:!0});var z2=r(bs);b(Bm.$$.fragment,z2),yz=h(z2),Hm=n(z2,"P",{});var x8=r(Hm);jz=l(x8,"Number of rows in each split of the dataset (same as "),Rl=n(x8,"A",{href:!0});var v8=r(Rl);wz=l(v8,"datasets.Dataset."),V0=n(v8,"STRONG",{});var Loe=r(V0);Dz=l(Loe,"len"),Loe.forEach(a),kz=l(v8,"()"),v8.forEach(a),Ez=l(x8,")."),x8.forEach(a),qz=h(z2),b(Bl.$$.fragment,z2),z2.forEach(a),Iz=h(L),$s=n(L,"DIV",{class:!0});var S2=r($s);b(Gm.$$.fragment,S2),Tz=h(S2),U0=n(S2,"P",{});var Foe=r(U0);Nz=l(Foe,"Names of the columns in each split of the dataset."),Foe.forEach(a),Pz=h(S2),b(Hl.$$.fragment,S2),S2.forEach(a),Az=h(L),xs=n(L,"DIV",{class:!0});var V2=r(xs);b(Wm.$$.fragment,V2),Lz=h(V2),M0=n(V2,"P",{});var Coe=r(M0);Fz=l(Coe,"Shape of each split of the dataset (number of columns, number of rows)."),Coe.forEach(a),Cz=h(V2),b(Gl.$$.fragment,V2),V2.forEach(a),Oz=h(L),qt=n(L,"DIV",{class:!0});var rc=r(qt);b(Km.$$.fragment,rc),zz=h(rc),R0=n(rc,"P",{});var Ooe=r(R0);Sz=l(Ooe,"Return a list of the unique elements in a column for each split."),Ooe.forEach(a),Vz=h(rc),B0=n(rc,"P",{});var zoe=r(B0);Uz=l(zoe,"This is implemented in the low-level backend and as such, very fast."),zoe.forEach(a),Mz=h(rc),b(Wl.$$.fragment,rc),rc.forEach(a),Rz=h(L),vs=n(L,"DIV",{class:!0});var U2=r(vs);b(Ym.$$.fragment,U2),Bz=h(U2),H0=n(U2,"P",{});var Soe=r(H0);Hz=l(Soe,`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.`),Soe.forEach(a),Gz=h(U2),b(Kl.$$.fragment,U2),U2.forEach(a),Wz=h(L),ys=n(L,"DIV",{class:!0});var M2=r(ys);b(Jm.$$.fragment,M2),Kz=h(M2),G0=n(M2,"P",{});var Voe=r(G0);Yz=l(Voe,`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.`),Voe.forEach(a),Jz=h(M2),b(Yl.$$.fragment,M2),M2.forEach(a),Qz=h(L),js=n(L,"DIV",{class:!0});var R2=r(js);b(Qm.$$.fragment,R2),Zz=h(R2),W0=n(R2,"P",{});var Uoe=r(W0);Xz=l(Uoe,`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.`),Uoe.forEach(a),eS=h(R2),b(Jl.$$.fragment,R2),R2.forEach(a),tS=h(L),It=n(L,"DIV",{class:!0});var oc=r(It);b(Zm.$$.fragment,oc),aS=h(oc),K0=n(oc,"P",{});var Moe=r(K0);sS=l(Moe,`Create a new dataset sorted according to a column.
The transformation is applied to all the datasets of the dataset dictionary.`),Moe.forEach(a),nS=h(oc),Y0=n(oc,"P",{});var Roe=r(Y0);rS=l(Roe,`Currently sorting according to a column name uses pandas sorting algorithm under the hood.
The column should thus be a pandas compatible type (in particular not a nested type).
This also means that the column used for sorting is fully loaded in memory (which should be fine in most cases).`),Roe.forEach(a),oS=h(oc),b(Ql.$$.fragment,oc),oc.forEach(a),lS=h(L),Le=n(L,"DIV",{class:!0});var gn=r(Le);b(Xm.$$.fragment,gn),iS=h(gn),J0=n(gn,"P",{});var Boe=r(J0);dS=l(Boe,"Create a new Dataset where the rows are shuffled."),Boe.forEach(a),cS=h(gn),Q0=n(gn,"P",{});var Hoe=r(Q0);pS=l(Hoe,"The transformation is applied to all the datasets of the dataset dictionary."),Hoe.forEach(a),mS=h(gn),Z0=n(gn,"P",{});var Goe=r(Z0);hS=l(Goe,`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).`),Goe.forEach(a),fS=h(gn),b(Zl.$$.fragment,gn),gn.forEach(a),gS=h(L),Fe=n(L,"DIV",{class:!0});var un=r(Fe);b(eh.$$.fragment,un),uS=h(un),th=n(un,"P",{});var y8=r(th);_S=l(y8,"Set "),X0=n(y8,"CODE",{});var Woe=r(X0);bS=l(Woe,"__getitem__"),Woe.forEach(a),$S=l(y8,` return format (type and columns).
The format is set for every dataset in the dataset dictionary.`),y8.forEach(a),xS=h(un),Xe=n(un,"P",{});var _n=r(Xe);vS=l(_n,"It is possible to call "),ey=n(_n,"CODE",{});var Koe=r(ey);yS=l(Koe,"map"),Koe.forEach(a),jS=l(_n," after calling "),ty=n(_n,"CODE",{});var Yoe=r(ty);wS=l(Yoe,"set_format"),Yoe.forEach(a),DS=l(_n,". Since "),ay=n(_n,"CODE",{});var Joe=r(ay);kS=l(Joe,"map"),Joe.forEach(a),ES=l(_n,` may add new columns, then the list of formatted columns
gets updated. In this case, if you apply `),sy=n(_n,"CODE",{});var Qoe=r(sy);qS=l(Qoe,"map"),Qoe.forEach(a),IS=l(_n," on a dataset to add a new column, then this column will be formatted:"),_n.forEach(a),TS=h(un),ny=n(un,"P",{});var Zoe=r(ny);ry=n(Zoe,"CODE",{});var Xoe=r(ry);NS=l(Xoe,"new formatted columns = (all columns - previously unformatted columns)"),Xoe.forEach(a),Zoe.forEach(a),PS=h(un),b(Xl.$$.fragment,un),un.forEach(a),AS=h(L),Tt=n(L,"DIV",{class:!0});var lc=r(Tt);b(ah.$$.fragment,lc),LS=h(lc),sh=n(lc,"P",{});var j8=r(sh);FS=l(j8,"Reset "),oy=n(j8,"CODE",{});var ele=r(oy);CS=l(ele,"__getitem__"),ele.forEach(a),OS=l(j8,` return format to python objects and all columns.
The transformation is applied to all the datasets of the dataset dictionary.`),j8.forEach(a),zS=h(lc),g_=n(lc,"P",{});var Kae=r(g_);SS=l(Kae,"Same as "),ly=n(Kae,"CODE",{});var tle=r(ly);VS=l(tle,"self.set_format()"),tle.forEach(a),Kae.forEach(a),US=h(lc),b(ei.$$.fragment,lc),lc.forEach(a),MS=h(L),ti=n(L,"DIV",{class:!0});var w8=r(ti);b(nh.$$.fragment,w8),RS=h(w8),tr=n(w8,"P",{});var B2=r(tr);BS=l(B2,"To be used in a "),iy=n(B2,"CODE",{});var ale=r(iy);HS=l(ale,"with"),ale.forEach(a),GS=l(B2," statement. Set "),dy=n(B2,"CODE",{});var sle=r(dy);WS=l(sle,"__getitem__"),sle.forEach(a),KS=l(B2,` return format (type and columns).
The transformation is applied to all the datasets of the dataset dictionary.`),B2.forEach(a),w8.forEach(a),YS=h(L),Ce=n(L,"DIV",{class:!0});var bn=r(Ce);b(rh.$$.fragment,bn),JS=h(bn),ta=n(bn,"P",{});var ic=r(ta);QS=l(ic,"Set "),cy=n(ic,"CODE",{});var nle=r(cy);ZS=l(nle,"__getitem__"),nle.forEach(a),XS=l(ic,` return format (type and columns). The data formatting is applied on-the-fly.
The format `),py=n(ic,"CODE",{});var rle=r(py);eV=l(rle,"type"),rle.forEach(a),tV=l(ic," (for example \u201Cnumpy\u201D) is used to format batches when using "),my=n(ic,"CODE",{});var ole=r(my);aV=l(ole,"__getitem__"),ole.forEach(a),sV=l(ic,`.
The format is set for every dataset in the dataset dictionary.`),ic.forEach(a),nV=h(bn),oh=n(bn,"P",{});var D8=r(oh);rV=l(D8,"It\u2019s also possible to use custom transforms for formatting using "),u_=n(D8,"A",{href:!0});var lle=r(u_);oV=l(lle,"with_transform()"),lle.forEach(a),lV=l(D8,"."),D8.forEach(a),iV=h(bn),et=n(bn,"P",{});var $n=r(et);dV=l($n,"Contrary to "),__=n($n,"A",{href:!0});var ile=r(__);cV=l(ile,"set_format()"),ile.forEach(a),pV=l($n,", "),hy=n($n,"CODE",{});var dle=r(hy);mV=l(dle,"with_format"),dle.forEach(a),hV=l($n," returns a new "),b_=n($n,"A",{href:!0});var cle=r(b_);fV=l(cle,"DatasetDict"),cle.forEach(a),gV=l($n," object with new "),$_=n($n,"A",{href:!0});var ple=r($_);uV=l(ple,"Dataset"),ple.forEach(a),_V=l($n," objects."),$n.forEach(a),bV=h(bn),b(ai.$$.fragment,bn),bn.forEach(a),$V=h(L),Oe=n(L,"DIV",{class:!0});var xn=r(Oe);b(lh.$$.fragment,xn),xV=h(xn),ar=n(xn,"P",{});var H2=r(ar);vV=l(H2,"Set "),fy=n(H2,"CODE",{});var mle=r(fy);yV=l(mle,"__getitem__"),mle.forEach(a),jV=l(H2," return format using this transform. The transform is applied on-the-fly on batches when "),gy=n(H2,"CODE",{});var hle=r(gy);wV=l(hle,"__getitem__"),hle.forEach(a),DV=l(H2,` is called.
The transform is set for every dataset in the dataset dictionary`),H2.forEach(a),kV=h(xn),sr=n(xn,"P",{});var G2=r(sr);EV=l(G2,"As "),x_=n(G2,"A",{href:!0});var fle=r(x_);qV=l(fle,"set_format()"),fle.forEach(a),IV=l(G2,", this can be reset using "),v_=n(G2,"A",{href:!0});var gle=r(v_);TV=l(gle,"reset_format()"),gle.forEach(a),NV=l(G2,"."),G2.forEach(a),PV=h(xn),tt=n(xn,"P",{});var vn=r(tt);AV=l(vn,"Contrary to "),uy=n(vn,"CODE",{});var ule=r(uy);LV=l(ule,"set_transform()"),ule.forEach(a),FV=l(vn,", "),_y=n(vn,"CODE",{});var _le=r(_y);CV=l(_le,"with_transform"),_le.forEach(a),OV=l(vn," returns a new "),y_=n(vn,"A",{href:!0});var ble=r(y_);zV=l(ble,"DatasetDict"),ble.forEach(a),SV=l(vn," object with new "),j_=n(vn,"A",{href:!0});var $le=r(j_);VV=l($le,"Dataset"),$le.forEach(a),UV=l(vn," objects."),vn.forEach(a),MV=h(xn),b(si.$$.fragment,xn),xn.forEach(a),RV=h(L),ws=n(L,"DIV",{class:!0});var W2=r(ws);b(ih.$$.fragment,W2),BV=h(W2),by=n(W2,"P",{});var xle=r(by);HV=l(xle,`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.`),xle.forEach(a),GV=h(W2),b(ni.$$.fragment,W2),W2.forEach(a),WV=h(L),Nt=n(L,"DIV",{class:!0});var dc=r(Nt);b(dh.$$.fragment,dc),KV=h(dc),$y=n(dc,"P",{});var vle=r($y);YV=l(vle,`Cast the dataset to a new set of features.
The transformation is applied to all the datasets of the dataset dictionary.`),vle.forEach(a),JV=h(dc),aa=n(dc,"P",{});var cc=r(aa);QV=l(cc,"You can also remove a column using "),w_=n(cc,"A",{href:!0});var yle=r(w_);ZV=l(yle,"Dataset.map()"),yle.forEach(a),XV=l(cc," with "),xy=n(cc,"CODE",{});var jle=r(xy);eU=l(jle,"feature"),jle.forEach(a),tU=l(cc," but "),vy=n(cc,"CODE",{});var wle=r(vy);aU=l(wle,"cast"),wle.forEach(a),sU=l(cc,`
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),cc.forEach(a),nU=h(dc),b(ri.$$.fragment,dc),dc.forEach(a),rU=h(L),Ds=n(L,"DIV",{class:!0});var K2=r(Ds);b(ch.$$.fragment,K2),oU=h(K2),yy=n(K2,"P",{});var Dle=r(yy);lU=l(Dle,"Cast column to feature for decoding."),Dle.forEach(a),iU=h(K2),b(oi.$$.fragment,K2),K2.forEach(a),dU=h(L),ze=n(L,"DIV",{class:!0});var yn=r(ze);b(ph.$$.fragment,yn),cU=h(yn),jy=n(yn,"P",{});var kle=r(jy);pU=l(kle,`Remove one or several column(s) from each split in the dataset
and the features associated to the column(s).`),kle.forEach(a),mU=h(yn),wy=n(yn,"P",{});var Ele=r(wy);hU=l(Ele,"The transformation is applied to all the splits of the dataset dictionary."),Ele.forEach(a),fU=h(yn),nr=n(yn,"P",{});var Y2=r(nr);gU=l(Y2,"You can also remove a column using "),D_=n(Y2,"A",{href:!0});var qle=r(D_);uU=l(qle,"Dataset.map()"),qle.forEach(a),_U=l(Y2," with "),Dy=n(Y2,"CODE",{});var Ile=r(Dy);bU=l(Ile,"remove_columns"),Ile.forEach(a),$U=l(Y2,` but the present method
is in-place (doesn\u2019t copy the data to a new dataset) and is thus faster.`),Y2.forEach(a),xU=h(yn),b(li.$$.fragment,yn),yn.forEach(a),vU=h(L),Se=n(L,"DIV",{class:!0});var jn=r(Se);b(mh.$$.fragment,jn),yU=h(jn),ky=n(jn,"P",{});var Tle=r(ky);jU=l(Tle,`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.`),Tle.forEach(a),wU=h(jn),rr=n(jn,"P",{});var J2=r(rr);DU=l(J2,"You can also rename a column using "),k_=n(J2,"A",{href:!0});var Nle=r(k_);kU=l(Nle,"map()"),Nle.forEach(a),EU=l(J2," with "),Ey=n(J2,"CODE",{});var Ple=r(Ey);qU=l(Ple,"remove_columns"),Ple.forEach(a),IU=l(J2," but the present method:"),J2.forEach(a),TU=h(jn),hh=n(jn,"UL",{});var k8=r(hh);qy=n(k8,"LI",{});var Ale=r(qy);NU=l(Ale,"takes care of moving the original features under the new column name."),Ale.forEach(a),PU=h(k8),Iy=n(k8,"LI",{});var Lle=r(Iy);AU=l(Lle,"doesn\u2019t copy the data to a new dataset and is thus much faster."),Lle.forEach(a),k8.forEach(a),LU=h(jn),b(ii.$$.fragment,jn),jn.forEach(a),FU=h(L),ks=n(L,"DIV",{class:!0});var Q2=r(ks);b(fh.$$.fragment,Q2),CU=h(Q2),Ty=n(Q2,"P",{});var Fle=r(Ty);OU=l(Fle,`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.`),Fle.forEach(a),zU=h(Q2),b(di.$$.fragment,Q2),Q2.forEach(a),SU=h(L),Es=n(L,"DIV",{class:!0});var Z2=r(Es);b(gh.$$.fragment,Z2),VU=h(Z2),uh=n(Z2,"P",{});var E8=r(uh);UU=l(E8,"Casts the given column as "),Ny=n(E8,"CODE",{});var Cle=r(Ny);MU=l(Cle,"datasets.features.ClassLabel"),Cle.forEach(a),RU=l(E8," and updates the tables."),E8.forEach(a),BU=h(Z2),b(ci.$$.fragment,Z2),Z2.forEach(a),HU=h(L),Ve=n(L,"DIV",{class:!0});var wn=r(Ve);b(_h.$$.fragment,wn),GU=h(wn),or=n(wn,"P",{});var X2=r(or);WU=l(X2,"Pushes the "),E_=n(X2,"A",{href:!0});var Ole=r(E_);KU=l(Ole,"DatasetDict"),Ole.forEach(a),YU=l(X2,` to the hub as a Parquet dataset.
The `),q_=n(X2,"A",{href:!0});var zle=r(q_);JU=l(zle,"DatasetDict"),zle.forEach(a),QU=l(X2," is pushed using HTTP requests and does not need to have neither git or git-lfs installed."),X2.forEach(a),ZU=h(wn),Py=n(wn,"P",{});var Sle=r(Py);XU=l(Sle,"Each dataset split will be pushed independently. The pushed dataset will keep the original split names."),Sle.forEach(a),eM=h(wn),sa=n(wn,"P",{});var pc=r(sa);tM=l(pc,"The resulting Parquet files are self-contained by default: if your dataset contains "),I_=n(pc,"A",{href:!0});var Vle=r(I_);aM=l(Vle,"Image"),Vle.forEach(a),sM=l(pc," or "),T_=n(pc,"A",{href:!0});var Ule=r(T_);nM=l(Ule,"Audio"),Ule.forEach(a),rM=l(pc,`
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `),Ay=n(pc,"CODE",{});var Mle=r(Ay);oM=l(Mle,"embed_external_files"),Mle.forEach(a),lM=l(pc," to False."),pc.forEach(a),iM=h(wn),b(pi.$$.fragment,wn),wn.forEach(a),dM=h(L),Ue=n(L,"DIV",{class:!0});var Dn=r(Ue);b(bh.$$.fragment,Dn),cM=h(Dn),lr=n(Dn,"P",{});var e$=r(lr);pM=l(e$,"Saves a dataset dict to a filesystem using either "),N_=n(e$,"A",{href:!0});var Rle=r(N_);mM=l(Rle,"S3FileSystem"),Rle.forEach(a),hM=l(e$,` or
`),Ly=n(e$,"CODE",{});var Ble=r(Ly);fM=l(Ble,"fsspec.spec.AbstractFileSystem"),Ble.forEach(a),gM=l(e$,"."),e$.forEach(a),uM=h(Dn),ir=n(Dn,"P",{});var t$=r(ir);_M=l(t$,"For "),P_=n(t$,"A",{href:!0});var Hle=r(P_);bM=l(Hle,"Image"),Hle.forEach(a),$M=l(t$," and "),A_=n(t$,"A",{href:!0});var Gle=r(A_);xM=l(Gle,"Audio"),Gle.forEach(a),vM=l(t$," data:"),t$.forEach(a),yM=h(Dn),Fy=n(Dn,"P",{});var Wle=r(Fy);jM=l(Wle,`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.`),Wle.forEach(a),wM=h(Dn),b(mi.$$.fragment,Dn),Dn.forEach(a),DM=h(L),qs=n(L,"DIV",{class:!0});var a$=r(qs);b($h.$$.fragment,a$),kM=h(a$),na=n(a$,"P",{});var mc=r(na);EM=l(mc,"Load a dataset that was previously saved using "),Cy=n(mc,"CODE",{});var Kle=r(Cy);qM=l(Kle,"save_to_disk"),Kle.forEach(a),IM=l(mc,` from a filesystem using either
`),L_=n(mc,"A",{href:!0});var Yle=r(L_);TM=l(Yle,"S3FileSystem"),Yle.forEach(a),NM=l(mc," or "),Oy=n(mc,"CODE",{});var Jle=r(Oy);PM=l(Jle,"fsspec.spec.AbstractFileSystem"),Jle.forEach(a),AM=l(mc,"."),mc.forEach(a),LM=h(a$),b(hi.$$.fragment,a$),a$.forEach(a),FM=h(L),Is=n(L,"DIV",{class:!0});var s$=r(Is);b(xh.$$.fragment,s$),CM=h(s$),vh=n(s$,"P",{});var q8=r(vh);OM=l(q8,"Create "),F_=n(q8,"A",{href:!0});var Qle=r(F_);zM=l(Qle,"DatasetDict"),Qle.forEach(a),SM=l(q8," from CSV file(s)."),q8.forEach(a),VM=h(s$),b(fi.$$.fragment,s$),s$.forEach(a),UM=h(L),Ts=n(L,"DIV",{class:!0});var n$=r(Ts);b(yh.$$.fragment,n$),MM=h(n$),jh=n(n$,"P",{});var I8=r(jh);RM=l(I8,"Create "),C_=n(I8,"A",{href:!0});var Zle=r(C_);BM=l(Zle,"DatasetDict"),Zle.forEach(a),HM=l(I8," from JSON Lines file(s)."),I8.forEach(a),GM=h(n$),b(gi.$$.fragment,n$),n$.forEach(a),WM=h(L),Ns=n(L,"DIV",{class:!0});var r$=r(Ns);b(wh.$$.fragment,r$),KM=h(r$),Dh=n(r$,"P",{});var T8=r(Dh);YM=l(T8,"Create "),O_=n(T8,"A",{href:!0});var Xle=r(O_);JM=l(Xle,"DatasetDict"),Xle.forEach(a),QM=l(T8," from Parquet file(s)."),T8.forEach(a),ZM=h(r$),b(ui.$$.fragment,r$),r$.forEach(a),XM=h(L),Ps=n(L,"DIV",{class:!0});var o$=r(Ps);b(kh.$$.fragment,o$),eR=h(o$),Eh=n(o$,"P",{});var N8=r(Eh);tR=l(N8,"Create "),z_=n(N8,"A",{href:!0});var eie=r(z_);aR=l(eie,"DatasetDict"),eie.forEach(a),sR=l(N8," from text file(s)."),N8.forEach(a),nR=h(o$),b(_i.$$.fragment,o$),o$.forEach(a),rR=h(L),As=n(L,"DIV",{class:!0});var l$=r(As);b(qh.$$.fragment,l$),oR=h(l$),dr=n(l$,"P",{});var i$=r(dr);lR=l(i$,"Prepare a dataset for the given task by casting the dataset\u2019s "),S_=n(i$,"A",{href:!0});var tie=r(S_);iR=l(tie,"Features"),tie.forEach(a),dR=l(i$," to standardized column names and types as detailed in "),V_=n(i$,"A",{href:!0});var aie=r(V_);zy=n(aie,"CODE",{});var sie=r(zy);cR=l(sie,"datasets.tasks"),sie.forEach(a),aie.forEach(a),pR=l(i$,"."),i$.forEach(a),mR=h(l$),cr=n(l$,"P",{});var d$=r(cr);hR=l(d$,"Casts "),Sy=n(d$,"CODE",{});var nie=r(Sy);fR=l(nie,"datasets.DatasetInfo.features"),nie.forEach(a),gR=l(d$," according to a task-specific schema. Intended for single-use only, so all task templates are removed from "),Vy=n(d$,"CODE",{});var rie=r(Vy);uR=l(rie,"datasets.DatasetInfo.task_templates"),rie.forEach(a),_R=l(d$," after casting."),d$.forEach(a),l$.forEach(a),L.forEach(a),fE=h(i),U_=n(i,"A",{id:!0}),r(U_).forEach(a),gE=h(i),pr=n(i,"H2",{class:!0});var P8=r(pr);bi=n(P8,"A",{id:!0,class:!0,href:!0});var oie=r(bi);Uy=n(oie,"SPAN",{});var lie=r(Uy);b(Ih.$$.fragment,lie),lie.forEach(a),oie.forEach(a),bR=h(P8),My=n(P8,"SPAN",{});var iie=r(My);$R=l(iie,"IterableDataset"),iie.forEach(a),P8.forEach(a),uE=h(i),$i=n(i,"P",{});var A8=r($i);xR=l(A8,"The base class "),M_=n(A8,"A",{href:!0});var die=r(M_);vR=l(die,"IterableDataset"),die.forEach(a),yR=l(A8," implements an iterable Dataset backed by python generators."),A8.forEach(a),_E=h(i),F=n(i,"DIV",{class:!0});var C=r(F);b(Th.$$.fragment,C),jR=h(C),Ry=n(C,"P",{});var cie=r(Ry);wR=l(cie,"A Dataset backed by an iterable."),cie.forEach(a),DR=h(C),Pt=n(C,"DIV",{class:!0});var hc=r(Pt);b(Nh.$$.fragment,hc),kR=h(hc),By=n(hc,"P",{});var pie=r(By);ER=l(pie,"Create an Iterable Dataset from a generator."),pie.forEach(a),qR=h(hc),b(xi.$$.fragment,hc),IR=h(hc),b(vi.$$.fragment,hc),hc.forEach(a),TR=h(C),Ls=n(C,"DIV",{class:!0});var c$=r(Ls);b(Ph.$$.fragment,c$),NR=h(c$),Hy=n(c$,"P",{});var mie=r(Hy);PR=l(mie,`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.`),mie.forEach(a),AR=h(c$),b(yi.$$.fragment,c$),c$.forEach(a),LR=h(C),Fs=n(C,"DIV",{class:!0});var p$=r(Fs);b(Ah.$$.fragment,p$),FR=h(p$),Gy=n(p$,"P",{});var hie=r(Gy);CR=l(hie,"Cast column to feature for decoding."),hie.forEach(a),OR=h(p$),b(ji.$$.fragment,p$),p$.forEach(a),zR=h(C),Cs=n(C,"DIV",{class:!0});var m$=r(Cs);b(Lh.$$.fragment,m$),SR=h(m$),Wy=n(m$,"P",{});var fie=r(Wy);VR=l(fie,"Cast the dataset to a new set of features."),fie.forEach(a),UR=h(m$),b(wi.$$.fragment,m$),m$.forEach(a),MR=h(C),R_=n(C,"DIV",{class:!0});var gie=r(R_);b(Fh.$$.fragment,gie),gie.forEach(a),RR=h(C),Di=n(C,"DIV",{class:!0});var L8=r(Di);b(Ch.$$.fragment,L8),BR=h(L8),Oh=n(L8,"P",{});var F8=r(Oh);HR=l(F8,"Iterate through the batches of size "),Ky=n(F8,"EM",{});var uie=r(Ky);GR=l(uie,"batch_size"),uie.forEach(a),WR=l(F8,"."),F8.forEach(a),L8.forEach(a),KR=h(C),Me=n(C,"DIV",{class:!0});var kn=r(Me);b(zh.$$.fragment,kn),YR=h(kn),Yy=n(kn,"P",{});var _ie=r(Yy);JR=l(_ie,`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.`),_ie.forEach(a),QR=h(kn),Sh=n(kn,"P",{});var C8=r(Sh);ZR=l(C8,"You can specify whether the function should be batched or not with the "),Jy=n(C8,"CODE",{});var bie=r(Jy);XR=l(bie,"batched"),bie.forEach(a),eB=l(C8," parameter:"),C8.forEach(a),tB=h(kn),mr=n(kn,"UL",{});var h$=r(mr);hr=n(h$,"LI",{});var f$=r(hr);aB=l(f$,"If batched is "),Qy=n(f$,"CODE",{});var $ie=r(Qy);sB=l($ie,"False"),$ie.forEach(a),nB=l(f$,`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),Zy=n(f$,"CODE",{});var xie=r(Zy);rB=l(xie,'{"text": "Hello there !"}'),xie.forEach(a),oB=l(f$,"."),f$.forEach(a),lB=h(h$),fr=n(h$,"LI",{});var g$=r(fr);iB=l(g$,"If batched is "),Xy=n(g$,"CODE",{});var vie=r(Xy);dB=l(vie,"True"),vie.forEach(a),cB=l(g$," and "),ej=n(g$,"CODE",{});var yie=r(ej);pB=l(yie,"batch_size"),yie.forEach(a),mB=l(g$,` 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]}.`),g$.forEach(a),hB=h(h$),Y=n(h$,"LI",{});var oe=r(Y);fB=l(oe,"If batched is "),tj=n(oe,"CODE",{});var jie=r(tj);gB=l(jie,"True"),jie.forEach(a),uB=l(oe," and "),aj=n(oe,"CODE",{});var wie=r(aj);_B=l(wie,"batch_size"),wie.forEach(a),bB=l(oe," is "),sj=n(oe,"CODE",{});var Die=r(sj);$B=l(Die,"n"),Die.forEach(a),xB=l(oe," > 1, then the function takes a batch of "),nj=n(oe,"CODE",{});var kie=r(nj);vB=l(kie,"n"),kie.forEach(a),yB=l(oe," examples as input and can return a batch with "),rj=n(oe,"CODE",{});var Eie=r(rj);jB=l(Eie,"n"),Eie.forEach(a),wB=l(oe,` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),oj=n(oe,"CODE",{});var qie=r(oj);DB=l(qie,"n"),qie.forEach(a),kB=l(oe,` examples.
A batch is a dictionary, e.g. a batch of `),lj=n(oe,"CODE",{});var Iie=r(lj);EB=l(Iie,"n"),Iie.forEach(a),qB=l(oe," examples is "),ij=n(oe,"CODE",{});var Tie=r(ij);IB=l(Tie,'{"text": ["Hello there !"] * n}'),Tie.forEach(a),TB=l(oe,"."),oe.forEach(a),h$.forEach(a),NB=h(kn),b(ki.$$.fragment,kn),kn.forEach(a),PB=h(C),Os=n(C,"DIV",{class:!0});var u$=r(Os);b(Vh.$$.fragment,u$),AB=h(u$),dj=n(u$,"P",{});var Nie=r(dj);LB=l(Nie,`Rename a column in the dataset, and move the features associated to the original column under the new column
name.`),Nie.forEach(a),FB=h(u$),b(Ei.$$.fragment,u$),u$.forEach(a),CB=h(C),zs=n(C,"DIV",{class:!0});var _$=r(zs);b(Uh.$$.fragment,_$),OB=h(_$),cj=n(_$,"P",{});var Pie=r(cj);zB=l(Pie,`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.`),Pie.forEach(a),SB=h(_$),b(qi.$$.fragment,_$),_$.forEach(a),VB=h(C),_e=n(C,"DIV",{class:!0});var zt=r(_e);b(Mh.$$.fragment,zt),UB=h(zt),pj=n(zt,"P",{});var Aie=r(pj);MB=l(Aie,"Randomly shuffles the elements of this dataset."),Aie.forEach(a),RB=h(zt),Rh=n(zt,"P",{});var O8=r(Rh);BB=l(O8,"This dataset fills a buffer with "),mj=n(O8,"CODE",{});var Lie=r(mj);HB=l(Lie,"buffer_size"),Lie.forEach(a),GB=l(O8,` 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.`),O8.forEach(a),WB=h(zt),gr=n(zt,"P",{});var b$=r(gr);KB=l(b$,"For instance, if your dataset contains 10,000 elements but "),hj=n(b$,"CODE",{});var Fie=r(hj);YB=l(Fie,"buffer_size"),Fie.forEach(a),JB=l(b$," is set to 1000, then "),fj=n(b$,"CODE",{});var Cie=r(fj);QB=l(Cie,"shuffle"),Cie.forEach(a),ZB=l(b$,` 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.`),b$.forEach(a),XB=h(zt),ur=n(zt,"P",{});var $$=r(ur);eH=l($$,`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 `),B_=n($$,"A",{href:!0});var Oie=r(B_);tH=l(Oie,"skip()"),Oie.forEach(a),aH=l($$," or "),H_=n($$,"A",{href:!0});var zie=r(H_);sH=l(zie,"take()"),zie.forEach(a),nH=l($$,`
then the order of the shards is kept unchanged.`),$$.forEach(a),rH=h(zt),b(Ii.$$.fragment,zt),zt.forEach(a),oH=h(C),Ss=n(C,"DIV",{class:!0});var x$=r(Ss);b(Bh.$$.fragment,x$),lH=h(x$),_r=n(x$,"P",{});var v$=r(_r);iH=l(v$,"Create a new "),G_=n(v$,"A",{href:!0});var Sie=r(G_);dH=l(Sie,"IterableDataset"),Sie.forEach(a),cH=l(v$," that skips the first "),gj=n(v$,"CODE",{});var Vie=r(gj);pH=l(Vie,"n"),Vie.forEach(a),mH=l(v$," elements."),v$.forEach(a),hH=h(x$),b(Ti.$$.fragment,x$),x$.forEach(a),fH=h(C),Vs=n(C,"DIV",{class:!0});var y$=r(Vs);b(Hh.$$.fragment,y$),gH=h(y$),br=n(y$,"P",{});var j$=r(br);uH=l(j$,"Create a new "),W_=n(j$,"A",{href:!0});var Uie=r(W_);_H=l(Uie,"IterableDataset"),Uie.forEach(a),bH=l(j$," with only the first "),uj=n(j$,"CODE",{});var Mie=r(uj);$H=l(Mie,"n"),Mie.forEach(a),xH=l(j$," elements."),j$.forEach(a),vH=h(y$),b(Ni.$$.fragment,y$),y$.forEach(a),yH=h(C),Pi=n(C,"DIV",{class:!0});var z8=r(Pi);b(Gh.$$.fragment,z8),jH=h(z8),K_=n(z8,"P",{});var Yae=r(K_);Y_=n(Yae,"A",{href:!0});var Rie=r(Y_);wH=l(Rie,"DatasetInfo"),Rie.forEach(a),DH=l(Yae," object containing all the metadata in the dataset."),Yae.forEach(a),z8.forEach(a),kH=h(C),Ai=n(C,"DIV",{class:!0});var S8=r(Ai);b(Wh.$$.fragment,S8),EH=h(S8),J_=n(S8,"P",{});var Jae=r(J_);Q_=n(Jae,"A",{href:!0});var Bie=r(Q_);qH=l(Bie,"NamedSplit"),Bie.forEach(a),IH=l(Jae," object corresponding to a named dataset split."),Jae.forEach(a),S8.forEach(a),TH=h(C),Z_=n(C,"DIV",{class:!0});var Hie=r(Z_);b(Kh.$$.fragment,Hie),Hie.forEach(a),NH=h(C),X_=n(C,"DIV",{class:!0});var Gie=r(X_);b(Yh.$$.fragment,Gie),Gie.forEach(a),PH=h(C),eb=n(C,"DIV",{class:!0});var Wie=r(eb);b(Jh.$$.fragment,Wie),Wie.forEach(a),AH=h(C),tb=n(C,"DIV",{class:!0});var Kie=r(tb);b(Qh.$$.fragment,Kie),Kie.forEach(a),LH=h(C),ab=n(C,"DIV",{class:!0});var Yie=r(ab);b(Zh.$$.fragment,Yie),Yie.forEach(a),FH=h(C),sb=n(C,"DIV",{class:!0});var Jie=r(sb);b(Xh.$$.fragment,Jie),Jie.forEach(a),CH=h(C),nb=n(C,"DIV",{class:!0});var Qie=r(nb);b(ef.$$.fragment,Qie),Qie.forEach(a),OH=h(C),rb=n(C,"DIV",{class:!0});var Zie=r(rb);b(tf.$$.fragment,Zie),Zie.forEach(a),zH=h(C),ob=n(C,"DIV",{class:!0});var Xie=r(ob);b(af.$$.fragment,Xie),Xie.forEach(a),SH=h(C),lb=n(C,"DIV",{class:!0});var ede=r(lb);b(sf.$$.fragment,ede),ede.forEach(a),VH=h(C),ib=n(C,"DIV",{class:!0});var tde=r(ib);b(nf.$$.fragment,tde),tde.forEach(a),UH=h(C),db=n(C,"DIV",{class:!0});var ade=r(db);b(rf.$$.fragment,ade),ade.forEach(a),MH=h(C),cb=n(C,"DIV",{class:!0});var sde=r(cb);b(of.$$.fragment,sde),sde.forEach(a),C.forEach(a),bE=h(i),$r=n(i,"H2",{class:!0});var V8=r($r);Li=n(V8,"A",{id:!0,class:!0,href:!0});var nde=r(Li);_j=n(nde,"SPAN",{});var rde=r(_j);b(lf.$$.fragment,rde),rde.forEach(a),nde.forEach(a),RH=h(V8),bj=n(V8,"SPAN",{});var ode=r(bj);BH=l(ode,"IterableDatasetDict"),ode.forEach(a),V8.forEach(a),$E=h(i),Fi=n(i,"P",{});var U8=r(Fi);HH=l(U8,"Dictionary with split names as keys (\u2018train\u2019, \u2018test\u2019 for example), and "),$j=n(U8,"CODE",{});var lde=r($j);GH=l(lde,"IterableDataset"),lde.forEach(a),WH=l(U8," objects as values."),U8.forEach(a),xE=h(i),B=n(i,"DIV",{class:!0});var Q=r(B);b(df.$$.fragment,Q),KH=h(Q),Re=n(Q,"DIV",{class:!0});var En=r(Re);b(cf.$$.fragment,En),YH=h(En),xj=n(En,"P",{});var ide=r(xj);JH=l(ide,`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.`),ide.forEach(a),QH=h(En),pf=n(En,"P",{});var M8=r(pf);ZH=l(M8,"You can specify whether the function should be batched or not with the "),vj=n(M8,"CODE",{});var dde=r(vj);XH=l(dde,"batched"),dde.forEach(a),eG=l(M8," parameter:"),M8.forEach(a),tG=h(En),xr=n(En,"UL",{});var w$=r(xr);vr=n(w$,"LI",{});var D$=r(vr);aG=l(D$,"If batched is "),yj=n(D$,"CODE",{});var cde=r(yj);sG=l(cde,"False"),cde.forEach(a),nG=l(D$,`, then the function takes 1 example in and should return 1 example.
An example is a dictionary, e.g. `),jj=n(D$,"CODE",{});var pde=r(jj);rG=l(pde,'{"text": "Hello there !"}'),pde.forEach(a),oG=l(D$,"."),D$.forEach(a),lG=h(w$),ra=n(w$,"LI",{});var fc=r(ra);iG=l(fc,"If batched is "),wj=n(fc,"CODE",{});var mde=r(wj);dG=l(mde,"True"),mde.forEach(a),cG=l(fc," and "),Dj=n(fc,"CODE",{});var hde=r(Dj);pG=l(hde,"batch_size"),hde.forEach(a),mG=l(fc,` 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 `),kj=n(fc,"CODE",{});var fde=r(kj);hG=l(fde,'{"text": ["Hello there !"]}'),fde.forEach(a),fG=l(fc,"."),fc.forEach(a),gG=h(w$),J=n(w$,"LI",{});var le=r(J);uG=l(le,"If batched is "),Ej=n(le,"CODE",{});var gde=r(Ej);_G=l(gde,"True"),gde.forEach(a),bG=l(le," and "),qj=n(le,"CODE",{});var ude=r(qj);$G=l(ude,"batch_size"),ude.forEach(a),xG=l(le," is "),Ij=n(le,"CODE",{});var _de=r(Ij);vG=l(_de,"n"),_de.forEach(a),yG=l(le," > 1, then the function takes a batch of "),Tj=n(le,"CODE",{});var bde=r(Tj);jG=l(bde,"n"),bde.forEach(a),wG=l(le," examples as input and can return a batch with "),Nj=n(le,"CODE",{});var $de=r(Nj);DG=l($de,"n"),$de.forEach(a),kG=l(le,` examples, or with an arbitrary number of examples.
Note that the last batch may have less than `),Pj=n(le,"CODE",{});var xde=r(Pj);EG=l(xde,"n"),xde.forEach(a),qG=l(le,` examples.
A batch is a dictionary, e.g. a batch of `),Aj=n(le,"CODE",{});var vde=r(Aj);IG=l(vde,"n"),vde.forEach(a),TG=l(le," examples is "),Lj=n(le,"CODE",{});var yde=r(Lj);NG=l(yde,'{"text": ["Hello there !"] * n}'),yde.forEach(a),PG=l(le,"."),le.forEach(a),w$.forEach(a),AG=h(En),b(Ci.$$.fragment,En),En.forEach(a),LG=h(Q),Us=n(Q,"DIV",{class:!0});var k$=r(Us);b(mf.$$.fragment,k$),FG=h(k$),Fj=n(k$,"P",{});var jde=r(Fj);CG=l(jde,`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.`),jde.forEach(a),OG=h(k$),b(Oi.$$.fragment,k$),k$.forEach(a),zG=h(Q),be=n(Q,"DIV",{class:!0});var St=r(be);b(hf.$$.fragment,St),SG=h(St),Cj=n(St,"P",{});var wde=r(Cj);VG=l(wde,`Randomly shuffles the elements of this dataset.
The shuffling is applied to all the datasets of the dataset dictionary.`),wde.forEach(a),UG=h(St),Oj=n(St,"P",{});var Dde=r(Oj);MG=l(Dde,`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.`),Dde.forEach(a),RG=h(St),yr=n(St,"P",{});var E$=r(yr);BG=l(E$,"For instance, if your dataset contains 10,000 elements but "),zj=n(E$,"CODE",{});var kde=r(zj);HG=l(kde,"buffer_size"),kde.forEach(a),GG=l(E$," is set to 1000, then "),Sj=n(E$,"CODE",{});var Ede=r(Sj);WG=l(Ede,"shuffle"),Ede.forEach(a),KG=l(E$,` 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.`),E$.forEach(a),YG=h(St),oa=n(St,"P",{});var gc=r(oa);JG=l(gc,"If the dataset is made of several shards, it also does "),Vj=n(gc,"CODE",{});var qde=r(Vj);QG=l(qde,"shuffle"),qde.forEach(a),ZG=l(gc,` the order of the shards.
However if the order has been fixed by using `),pb=n(gc,"A",{href:!0});var Ide=r(pb);XG=l(Ide,"skip()"),Ide.forEach(a),eW=l(gc," or "),mb=n(gc,"A",{href:!0});var Tde=r(mb);tW=l(Tde,"take()"),Tde.forEach(a),aW=l(gc,`
then the order of the shards is kept unchanged.`),gc.forEach(a),sW=h(St),b(zi.$$.fragment,St),St.forEach(a),nW=h(Q),Ms=n(Q,"DIV",{class:!0});var q$=r(Ms);b(ff.$$.fragment,q$),rW=h(q$),Uj=n(q$,"P",{});var Nde=r(Uj);oW=l(Nde,`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.`),Nde.forEach(a),lW=h(q$),b(Si.$$.fragment,q$),q$.forEach(a),iW=h(Q),Rs=n(Q,"DIV",{class:!0});var I$=r(Rs);b(gf.$$.fragment,I$),dW=h(I$),Mj=n(I$,"P",{});var Pde=r(Mj);cW=l(Pde,`Cast the dataset to a new set of features.
The type casting is applied to all the datasets of the dataset dictionary.`),Pde.forEach(a),pW=h(I$),b(Vi.$$.fragment,I$),I$.forEach(a),mW=h(Q),Bs=n(Q,"DIV",{class:!0});var T$=r(Bs);b(uf.$$.fragment,T$),hW=h(T$),Rj=n(T$,"P",{});var Ade=r(Rj);fW=l(Ade,`Cast column to feature for decoding.
The type casting is applied to all the datasets of the dataset dictionary.`),Ade.forEach(a),gW=h(T$),b(Ui.$$.fragment,T$),T$.forEach(a),uW=h(Q),Hs=n(Q,"DIV",{class:!0});var N$=r(Hs);b(_f.$$.fragment,N$),_W=h(N$),Bj=n(N$,"P",{});var Lde=r(Bj);bW=l(Lde,`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.`),Lde.forEach(a),$W=h(N$),b(Mi.$$.fragment,N$),N$.forEach(a),xW=h(Q),Gs=n(Q,"DIV",{class:!0});var P$=r(Gs);b(bf.$$.fragment,P$),vW=h(P$),Hj=n(P$,"P",{});var Fde=r(Hj);yW=l(Fde,`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.`),Fde.forEach(a),jW=h(P$),b(Ri.$$.fragment,P$),P$.forEach(a),wW=h(Q),Ws=n(Q,"DIV",{class:!0});var A$=r(Ws);b($f.$$.fragment,A$),DW=h(A$),Gj=n(A$,"P",{});var Cde=r(Gj);kW=l(Cde,`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.`),Cde.forEach(a),EW=h(A$),b(Bi.$$.fragment,A$),A$.forEach(a),Q.forEach(a),vE=h(i),jr=n(i,"H2",{class:!0});var R8=r(jr);Hi=n(R8,"A",{id:!0,class:!0,href:!0});var Ode=r(Hi);Wj=n(Ode,"SPAN",{});var zde=r(Wj);b(xf.$$.fragment,zde),zde.forEach(a),Ode.forEach(a),qW=h(R8),Kj=n(R8,"SPAN",{});var Sde=r(Kj);IW=l(Sde,"Features"),Sde.forEach(a),R8.forEach(a),yE=h(i),S=n(i,"DIV",{class:!0});var U=r(S);b(vf.$$.fragment,U),TW=h(U),Yj=n(U,"P",{});var Vde=r(Yj);NW=l(Vde,"A special dictionary that defines the internal structure of a dataset."),Vde.forEach(a),PW=h(U),yf=n(U,"P",{});var B8=r(yf);AW=l(B8,"Instantiated with a dictionary of type "),Jj=n(B8,"CODE",{});var Ude=r(Jj);LW=l(Ude,"dict[str, FieldType]"),Ude.forEach(a),FW=l(B8,`, where keys are the desired column names,
and values are the type of that column.`),B8.forEach(a),CW=h(U),hb=n(U,"P",{});var Qae=r(hb);Qj=n(Qae,"CODE",{});var Mde=r(Qj);OW=l(Mde,"FieldType"),Mde.forEach(a),zW=l(Qae," can be one of the following:"),Qae.forEach(a),SW=h(U),se=n(U,"UL",{});var ve=r(se);Zj=n(ve,"LI",{});var Rde=r(Zj);la=n(Rde,"P",{});var uc=r(la);VW=l(uc,"a "),fb=n(uc,"A",{href:!0});var Bde=r(fb);UW=l(Bde,"Value"),Bde.forEach(a),MW=l(uc," feature specifies a single typed value, e.g. "),Xj=n(uc,"CODE",{});var Hde=r(Xj);RW=l(Hde,"int64"),Hde.forEach(a),BW=l(uc," or "),ew=n(uc,"CODE",{});var Gde=r(ew);HW=l(Gde,"string"),Gde.forEach(a),GW=l(uc,"."),uc.forEach(a),Rde.forEach(a),WW=h(ve),tw=n(ve,"LI",{});var Wde=r(tw);jf=n(Wde,"P",{});var H8=r(jf);KW=l(H8,"a "),gb=n(H8,"A",{href:!0});var Kde=r(gb);YW=l(Kde,"ClassLabel"),Kde.forEach(a),JW=l(H8,` 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.`),H8.forEach(a),Wde.forEach(a),QW=h(ve),aw=n(ve,"LI",{});var Yde=r(aw);wf=n(Yde,"P",{});var G8=r(wf);ZW=l(G8,"a python "),sw=n(G8,"CODE",{});var Jde=r(sw);XW=l(Jde,"dict"),Jde.forEach(a),eK=l(G8,` 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.`),G8.forEach(a),Yde.forEach(a),tK=h(ve),Df=n(ve,"LI",{});var W8=r(Df);at=n(W8,"P",{});var qn=r(at);aK=l(qn,"a python "),nw=n(qn,"CODE",{});var Qde=r(nw);sK=l(Qde,"list"),Qde.forEach(a),nK=l(qn," or a "),ub=n(qn,"A",{href:!0});var Zde=r(ub);rK=l(Zde,"Sequence"),Zde.forEach(a),oK=l(qn,` specifies that the field contains a list of objects. The python
`),rw=n(qn,"CODE",{});var Xde=r(rw);lK=l(Xde,"list"),Xde.forEach(a),iK=l(qn," or "),_b=n(qn,"A",{href:!0});var ece=r(_b);dK=l(ece,"Sequence"),ece.forEach(a),cK=l(qn,` should be provided with a single sub-feature as an example of the feature
type hosted in this list.`),qn.forEach(a),pK=h(W8),b(Gi.$$.fragment,W8),W8.forEach(a),mK=h(ve),ow=n(ve,"LI",{});var tce=r(ow);st=n(tce,"P",{});var In=r(st);hK=l(In,"a "),bb=n(In,"A",{href:!0});var ace=r(bb);fK=l(ace,"Array2D"),ace.forEach(a),gK=l(In,", "),$b=n(In,"A",{href:!0});var sce=r($b);uK=l(sce,"Array3D"),sce.forEach(a),_K=l(In,", "),xb=n(In,"A",{href:!0});var nce=r(xb);bK=l(nce,"Array4D"),nce.forEach(a),$K=l(In," or "),vb=n(In,"A",{href:!0});var rce=r(vb);xK=l(rce,"Array5D"),rce.forEach(a),vK=l(In," feature for multidimensional arrays."),In.forEach(a),tce.forEach(a),yK=h(ve),lw=n(ve,"LI",{});var oce=r(lw);kf=n(oce,"P",{});var K8=r(kf);jK=l(K8,"an "),yb=n(K8,"A",{href:!0});var lce=r(yb);wK=l(lce,"Audio"),lce.forEach(a),DK=l(K8,` 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.`),K8.forEach(a),oce.forEach(a),kK=h(ve),iw=n(ve,"LI",{});var ice=r(iw);ia=n(ice,"P",{});var _c=r(ia);EK=l(_c,"an "),jb=n(_c,"A",{href:!0});var dce=r(jb);qK=l(dce,"Image"),dce.forEach(a),IK=l(_c," feature to store the absolute path to an image file, an "),dw=n(_c,"CODE",{});var cce=r(dw);TK=l(cce,"np.ndarray"),cce.forEach(a),NK=l(_c," object, a "),cw=n(_c,"CODE",{});var pce=r(cw);PK=l(pce,"PIL.Image.Image"),pce.forEach(a),AK=l(_c,` 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.`),_c.forEach(a),ice.forEach(a),LK=h(ve),pw=n(ve,"LI",{});var mce=r(pw);Wi=n(mce,"P",{});var eE=r(Wi);wb=n(eE,"A",{href:!0});var hce=r(wb);FK=l(hce,"Translation"),hce.forEach(a),CK=l(eE," and "),Db=n(eE,"A",{href:!0});var fce=r(Db);OK=l(fce,"TranslationVariableLanguages"),fce.forEach(a),zK=l(eE,", the two features specific to Machine Translation."),eE.forEach(a),mce.forEach(a),ve.forEach(a),SK=h(U),Ks=n(U,"DIV",{class:!0});var L$=r(Ks);b(Ef.$$.fragment,L$),VK=h(L$),qf=n(L$,"P",{});var Y8=r(qf);UK=l(Y8,"Make a deep copy of "),kb=n(Y8,"A",{href:!0});var gce=r(kb);MK=l(gce,"Features"),gce.forEach(a),RK=l(Y8,"."),Y8.forEach(a),BK=h(L$),b(Ki.$$.fragment,L$),L$.forEach(a),HK=h(U),Yi=n(U,"DIV",{class:!0});var J8=r(Yi);b(If.$$.fragment,J8),GK=h(J8),mw=n(J8,"P",{});var uce=r(mw);WK=l(uce,"Decode batch with custom feature decoding."),uce.forEach(a),J8.forEach(a),KK=h(U),Ji=n(U,"DIV",{class:!0});var Q8=r(Ji);b(Tf.$$.fragment,Q8),YK=h(Q8),hw=n(Q8,"P",{});var _ce=r(hw);JK=l(_ce,"Decode column with custom feature decoding."),_ce.forEach(a),Q8.forEach(a),QK=h(U),Qi=n(U,"DIV",{class:!0});var Z8=r(Qi);b(Nf.$$.fragment,Z8),ZK=h(Z8),fw=n(Z8,"P",{});var bce=r(fw);XK=l(bce,"Decode example with custom feature decoding."),bce.forEach(a),Z8.forEach(a),eY=h(U),Zi=n(U,"DIV",{class:!0});var X8=r(Zi);b(Pf.$$.fragment,X8),tY=h(X8),gw=n(X8,"P",{});var $ce=r(gw);aY=l($ce,"Encode batch into a format for Arrow."),$ce.forEach(a),X8.forEach(a),sY=h(U),Xi=n(U,"DIV",{class:!0});var e3=r(Xi);b(Af.$$.fragment,e3),nY=h(e3),uw=n(e3,"P",{});var xce=r(uw);rY=l(xce,"Encode example into a format for Arrow."),xce.forEach(a),e3.forEach(a),oY=h(U),At=n(U,"DIV",{class:!0});var bc=r(At);b(Lf.$$.fragment,bc),lY=h(bc),Ff=n(bc,"P",{});var t3=r(Ff);iY=l(t3,`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: `),_w=n(t3,"CODE",{});var vce=r(_w);dY=l(vce,"<original>.<subfield>"),vce.forEach(a),cY=l(t3,"."),t3.forEach(a),pY=h(bc),Cf=n(bc,"P",{});var a3=r(Cf);mY=l(a3,`If a column contains nested dictionaries, then all the lower-level subfields names are
also concatenated to form new columns: `),bw=n(a3,"CODE",{});var yce=r(bw);hY=l(yce,"<original>.<subfield>.<subsubfield>"),yce.forEach(a),fY=l(a3,", etc."),a3.forEach(a),gY=h(bc),b(ed.$$.fragment,bc),bc.forEach(a),uY=h(U),td=n(U,"DIV",{class:!0});var s3=r(td);b(Of.$$.fragment,s3),_Y=h(s3),zf=n(s3,"P",{});var n3=r(zf);bY=l(n3,"Construct "),Eb=n(n3,"A",{href:!0});var jce=r(Eb);$Y=l(jce,"Features"),jce.forEach(a),xY=l(n3,` from Arrow Schema.
It also checks the schema metadata for Hugging Face Datasets features.`),n3.forEach(a),s3.forEach(a),vY=h(U),Be=n(U,"DIV",{class:!0});var Tn=r(Be);b(Sf.$$.fragment,Tn),yY=h(Tn),Vf=n(Tn,"P",{});var r3=r(Vf);jY=l(r3,"Construct ["),$w=n(r3,"EM",{});var wce=r($w);wY=l(wce,"Features"),wce.forEach(a),DY=l(r3,"] from dict."),r3.forEach(a),kY=h(Tn),wr=n(Tn,"P",{});var F$=r(wr);EY=l(F$,`Regenerate the nested feature object from a deserialized dict.
We use the `),xw=n(F$,"EM",{});var Dce=r(xw);qY=l(Dce,"_type"),Dce.forEach(a),IY=l(F$," key to infer the dataclass name of the feature "),vw=n(F$,"EM",{});var kce=r(vw);TY=l(kce,"FieldType"),kce.forEach(a),NY=l(F$,"."),F$.forEach(a),PY=h(Tn),da=n(Tn,"P",{});var $c=r(da);AY=l($c,`It allows for a convenient constructor syntax
to define features from deserialized JSON dictionaries. This function is used in particular when deserializing
a [`),yw=n($c,"EM",{});var Ece=r(yw);LY=l(Ece,"DatasetInfo"),Ece.forEach(a),FY=l($c,`] that was dumped to a JSON object. This acts as an analogue to
[`),jw=n($c,"EM",{});var qce=r(jw);CY=l(qce,"Features.from_arrow_schema"),qce.forEach(a),OY=l($c,`] 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 [`),ww=n($c,"EM",{});var Ice=r(ww);zY=l(Ice,"Value"),Ice.forEach(a),SY=l($c,"] automatically performs."),$c.forEach(a),VY=h(Tn),b(ad.$$.fragment,Tn),Tn.forEach(a),UY=h(U),Lt=n(U,"DIV",{class:!0});var xc=r(Lt);b(Uf.$$.fragment,xc),MY=h(xc),Mf=n(xc,"P",{});var o3=r(Mf);RY=l(o3,"Reorder Features fields to match the field order of other ["),Dw=n(o3,"EM",{});var Tce=r(Dw);BY=l(Tce,"Features"),Tce.forEach(a),HY=l(o3,"]."),o3.forEach(a),GY=h(xc),kw=n(xc,"P",{});var Nce=r(kw);WY=l(Nce,`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.`),Nce.forEach(a),KY=h(xc),b(sd.$$.fragment,xc),xc.forEach(a),U.forEach(a),jE=h(i),ca=n(i,"DIV",{class:!0});var C$=r(ca);b(Rf.$$.fragment,C$),YY=h(C$),Ew=n(C$,"P",{});var Pce=r(Ew);JY=l(Pce,`Construct a list of feature from a single type or a dict of types.
Mostly here for compatiblity with tfds.`),Pce.forEach(a),QY=h(C$),b(nd.$$.fragment,C$),C$.forEach(a),wE=h(i),W=n(i,"DIV",{class:!0});var ie=r(W);b(Bf.$$.fragment,ie),ZY=h(ie),qw=n(ie,"P",{});var Ace=r(qw);XY=l(Ace,"Feature type for integer class labels."),Ace.forEach(a),eJ=h(ie),Hf=n(ie,"P",{});var l3=r(Hf);tJ=l(l3,"There are 3 ways to define a "),Iw=n(l3,"CODE",{});var Lce=r(Iw);aJ=l(Lce,"ClassLabel"),Lce.forEach(a),sJ=l(l3,", which correspond to the 3 arguments:"),l3.forEach(a),nJ=h(ie),Dr=n(ie,"UL",{});var O$=r(Dr);qb=n(O$,"LI",{});var Zae=r(qb);Tw=n(Zae,"CODE",{});var Fce=r(Tw);rJ=l(Fce,"num_classes"),Fce.forEach(a),oJ=l(Zae,": Create 0 to (num_classes-1) labels."),Zae.forEach(a),lJ=h(O$),Ib=n(O$,"LI",{});var Xae=r(Ib);Nw=n(Xae,"CODE",{});var Cce=r(Nw);iJ=l(Cce,"names"),Cce.forEach(a),dJ=l(Xae,": List of label strings."),Xae.forEach(a),cJ=h(O$),Tb=n(O$,"LI",{});var ese=r(Tb);Pw=n(ese,"CODE",{});var Oce=r(Pw);pJ=l(Oce,"names_file"),Oce.forEach(a),mJ=l(ese,": File containing the list of labels."),ese.forEach(a),O$.forEach(a),hJ=h(ie),Aw=n(ie,"P",{});var zce=r(Aw);fJ=l(zce,`Under the hood the labels are stored as integers.
You can use negative integers to represent unknown/missing labels.`),zce.forEach(a),gJ=h(ie),b(rd.$$.fragment,ie),uJ=h(ie),Ys=n(ie,"DIV",{class:!0});var z$=r(Ys);b(Gf.$$.fragment,z$),_J=h(z$),kr=n(z$,"P",{});var S$=r(kr);bJ=l(S$,"Cast an Arrow array to the "),Lw=n(S$,"CODE",{});var Sce=r(Lw);$J=l(Sce,"ClassLabel"),Sce.forEach(a),xJ=l(S$,` arrow storage type.
The Arrow types that can be converted to the `),Fw=n(S$,"CODE",{});var Vce=r(Fw);vJ=l(Vce,"ClassLabel"),Vce.forEach(a),yJ=l(S$," pyarrow storage type are:"),S$.forEach(a),jJ=h(z$),Wf=n(z$,"UL",{});var i3=r(Wf);Cw=n(i3,"LI",{});var Uce=r(Cw);Ow=n(Uce,"CODE",{});var Mce=r(Ow);wJ=l(Mce,"pa.string()"),Mce.forEach(a),Uce.forEach(a),DJ=h(i3),zw=n(i3,"LI",{});var Rce=r(zw);Sw=n(Rce,"CODE",{});var Bce=r(Sw);kJ=l(Bce,"pa.int()"),Bce.forEach(a),Rce.forEach(a),i3.forEach(a),z$.forEach(a),EJ=h(ie),Ft=n(ie,"DIV",{class:!0});var vc=r(Ft);b(Kf.$$.fragment,vc),qJ=h(vc),Er=n(vc,"P",{});var V$=r(Er);IJ=l(V$,"Conversion "),Vw=n(V$,"CODE",{});var Hce=r(Vw);TJ=l(Hce,"integer"),Hce.forEach(a),NJ=l(V$," => class name "),Uw=n(V$,"CODE",{});var Gce=r(Uw);PJ=l(Gce,"string"),Gce.forEach(a),AJ=l(V$,"."),V$.forEach(a),LJ=h(vc),Yf=n(vc,"P",{});var d3=r(Yf);FJ=l(d3,"Regarding unknown/missing labels: passing negative integers raises "),Mw=n(d3,"CODE",{});var Wce=r(Mw);CJ=l(Wce,"ValueError"),Wce.forEach(a),OJ=l(d3,"."),d3.forEach(a),zJ=h(vc),b(od.$$.fragment,vc),vc.forEach(a),SJ=h(ie),Js=n(ie,"DIV",{class:!0});var U$=r(Js);b(Jf.$$.fragment,U$),VJ=h(U$),qr=n(U$,"P",{});var M$=r(qr);UJ=l(M$,"Conversion class name "),Rw=n(M$,"CODE",{});var Kce=r(Rw);MJ=l(Kce,"string"),Kce.forEach(a),RJ=l(M$," => "),Bw=n(M$,"CODE",{});var Yce=r(Bw);BJ=l(Yce,"integer"),Yce.forEach(a),HJ=l(M$,"."),M$.forEach(a),GJ=h(U$),b(ld.$$.fragment,U$),U$.forEach(a),ie.forEach(a),DE=h(i),nt=n(i,"DIV",{class:!0});var yc=r(nt);b(Qf.$$.fragment,yc),WJ=h(yc),Zf=n(yc,"P",{});var c3=r(Zf);KJ=l(c3,"The "),Hw=n(c3,"CODE",{});var Jce=r(Hw);YJ=l(Jce,"Value"),Jce.forEach(a),JJ=l(c3," dtypes are as follows:"),c3.forEach(a),QJ=h(yc),O=n(yc,"UL",{});var z=r(O);Gw=n(z,"LI",{});var Qce=r(Gw);Ww=n(Qce,"CODE",{});var Zce=r(Ww);ZJ=l(Zce,"null"),Zce.forEach(a),Qce.forEach(a),XJ=h(z),Kw=n(z,"LI",{});var Xce=r(Kw);Yw=n(Xce,"CODE",{});var epe=r(Yw);eQ=l(epe,"bool"),epe.forEach(a),Xce.forEach(a),tQ=h(z),Jw=n(z,"LI",{});var tpe=r(Jw);Qw=n(tpe,"CODE",{});var ape=r(Qw);aQ=l(ape,"int8"),ape.forEach(a),tpe.forEach(a),sQ=h(z),Zw=n(z,"LI",{});var spe=r(Zw);Xw=n(spe,"CODE",{});var npe=r(Xw);nQ=l(npe,"int16"),npe.forEach(a),spe.forEach(a),rQ=h(z),e7=n(z,"LI",{});var rpe=r(e7);t7=n(rpe,"CODE",{});var ope=r(t7);oQ=l(ope,"int32"),ope.forEach(a),rpe.forEach(a),lQ=h(z),a7=n(z,"LI",{});var lpe=r(a7);s7=n(lpe,"CODE",{});var ipe=r(s7);iQ=l(ipe,"int64"),ipe.forEach(a),lpe.forEach(a),dQ=h(z),n7=n(z,"LI",{});var dpe=r(n7);r7=n(dpe,"CODE",{});var cpe=r(r7);cQ=l(cpe,"uint8"),cpe.forEach(a),dpe.forEach(a),pQ=h(z),o7=n(z,"LI",{});var ppe=r(o7);l7=n(ppe,"CODE",{});var mpe=r(l7);mQ=l(mpe,"uint16"),mpe.forEach(a),ppe.forEach(a),hQ=h(z),i7=n(z,"LI",{});var hpe=r(i7);d7=n(hpe,"CODE",{});var fpe=r(d7);fQ=l(fpe,"uint32"),fpe.forEach(a),hpe.forEach(a),gQ=h(z),c7=n(z,"LI",{});var gpe=r(c7);p7=n(gpe,"CODE",{});var upe=r(p7);uQ=l(upe,"uint64"),upe.forEach(a),gpe.forEach(a),_Q=h(z),m7=n(z,"LI",{});var _pe=r(m7);h7=n(_pe,"CODE",{});var bpe=r(h7);bQ=l(bpe,"float16"),bpe.forEach(a),_pe.forEach(a),$Q=h(z),Nb=n(z,"LI",{});var tse=r(Nb);f7=n(tse,"CODE",{});var $pe=r(f7);xQ=l($pe,"float32"),$pe.forEach(a),vQ=l(tse," (alias float)"),tse.forEach(a),yQ=h(z),Pb=n(z,"LI",{});var ase=r(Pb);g7=n(ase,"CODE",{});var xpe=r(g7);jQ=l(xpe,"float64"),xpe.forEach(a),wQ=l(ase," (alias double)"),ase.forEach(a),DQ=h(z),u7=n(z,"LI",{});var vpe=r(u7);_7=n(vpe,"CODE",{});var ype=r(_7);kQ=l(ype,"time32[(s|ms)]"),ype.forEach(a),vpe.forEach(a),EQ=h(z),b7=n(z,"LI",{});var jpe=r(b7);$7=n(jpe,"CODE",{});var wpe=r($7);qQ=l(wpe,"time64[(us|ns)]"),wpe.forEach(a),jpe.forEach(a),IQ=h(z),x7=n(z,"LI",{});var Dpe=r(x7);v7=n(Dpe,"CODE",{});var kpe=r(v7);TQ=l(kpe,"timestamp[(s|ms|us|ns)]"),kpe.forEach(a),Dpe.forEach(a),NQ=h(z),y7=n(z,"LI",{});var Epe=r(y7);j7=n(Epe,"CODE",{});var qpe=r(j7);PQ=l(qpe,"timestamp[(s|ms|us|ns), tz=(tzstring)]"),qpe.forEach(a),Epe.forEach(a),AQ=h(z),w7=n(z,"LI",{});var Ipe=r(w7);D7=n(Ipe,"CODE",{});var Tpe=r(D7);LQ=l(Tpe,"date32"),Tpe.forEach(a),Ipe.forEach(a),FQ=h(z),k7=n(z,"LI",{});var Npe=r(k7);E7=n(Npe,"CODE",{});var Ppe=r(E7);CQ=l(Ppe,"date64"),Ppe.forEach(a),Npe.forEach(a),OQ=h(z),q7=n(z,"LI",{});var Ape=r(q7);I7=n(Ape,"CODE",{});var Lpe=r(I7);zQ=l(Lpe,"duration[(s|ms|us|ns)]"),Lpe.forEach(a),Ape.forEach(a),SQ=h(z),T7=n(z,"LI",{});var Fpe=r(T7);N7=n(Fpe,"CODE",{});var Cpe=r(N7);VQ=l(Cpe,"decimal128(precision, scale)"),Cpe.forEach(a),Fpe.forEach(a),UQ=h(z),P7=n(z,"LI",{});var Ope=r(P7);A7=n(Ope,"CODE",{});var zpe=r(A7);MQ=l(zpe,"decimal256(precision, scale)"),zpe.forEach(a),Ope.forEach(a),RQ=h(z),L7=n(z,"LI",{});var Spe=r(L7);F7=n(Spe,"CODE",{});var Vpe=r(F7);BQ=l(Vpe,"binary"),Vpe.forEach(a),Spe.forEach(a),HQ=h(z),C7=n(z,"LI",{});var Upe=r(C7);O7=n(Upe,"CODE",{});var Mpe=r(O7);GQ=l(Mpe,"large_binary"),Mpe.forEach(a),Upe.forEach(a),WQ=h(z),z7=n(z,"LI",{});var Rpe=r(z7);S7=n(Rpe,"CODE",{});var Bpe=r(S7);KQ=l(Bpe,"string"),Bpe.forEach(a),Rpe.forEach(a),YQ=h(z),V7=n(z,"LI",{});var Hpe=r(V7);U7=n(Hpe,"CODE",{});var Gpe=r(U7);JQ=l(Gpe,"large_string"),Gpe.forEach(a),Hpe.forEach(a),z.forEach(a),QQ=h(yc),b(id.$$.fragment,yc),yc.forEach(a),kE=h(i),rt=n(i,"DIV",{class:!0});var jc=r(rt);b(Xf.$$.fragment,jc),ZQ=h(jc),Ab=n(jc,"P",{});var sse=r(Ab);M7=n(sse,"CODE",{});var Wpe=r(M7);XQ=l(Wpe,"FeatureConnector"),Wpe.forEach(a),eZ=l(sse,` for translations with fixed languages per example.
Here for compatiblity with tfds.`),sse.forEach(a),tZ=h(jc),b(dd.$$.fragment,jc),aZ=h(jc),cd=n(jc,"DIV",{class:!0});var p3=r(cd);b(eg.$$.fragment,p3),sZ=h(p3),R7=n(p3,"P",{});var Kpe=r(R7);nZ=l(Kpe,"Flatten the Translation feature into a dictionary."),Kpe.forEach(a),p3.forEach(a),jc.forEach(a),EE=h(i),ot=n(i,"DIV",{class:!0});var wc=r(ot);b(tg.$$.fragment,wc),rZ=h(wc),Lb=n(wc,"P",{});var nse=r(Lb);B7=n(nse,"CODE",{});var Ype=r(B7);oZ=l(Ype,"FeatureConnector"),Ype.forEach(a),lZ=l(nse,` for translations with variable languages per example.
Here for compatiblity with tfds.`),nse.forEach(a),iZ=h(wc),b(pd.$$.fragment,wc),dZ=h(wc),md=n(wc,"DIV",{class:!0});var m3=r(md);b(ag.$$.fragment,m3),cZ=h(m3),H7=n(m3,"P",{});var Jpe=r(H7);pZ=l(Jpe,"Flatten the TranslationVariableLanguages feature into a dictionary."),Jpe.forEach(a),m3.forEach(a),wc.forEach(a),qE=h(i),pa=n(i,"DIV",{class:!0});var R$=r(pa);b(sg.$$.fragment,R$),mZ=h(R$),G7=n(R$,"P",{});var Qpe=r(G7);hZ=l(Qpe,"Create a two-dimensional array."),Qpe.forEach(a),fZ=h(R$),b(hd.$$.fragment,R$),R$.forEach(a),IE=h(i),ma=n(i,"DIV",{class:!0});var B$=r(ma);b(ng.$$.fragment,B$),gZ=h(B$),W7=n(B$,"P",{});var Zpe=r(W7);uZ=l(Zpe,"Create a three-dimensional array."),Zpe.forEach(a),_Z=h(B$),b(fd.$$.fragment,B$),B$.forEach(a),TE=h(i),ha=n(i,"DIV",{class:!0});var H$=r(ha);b(rg.$$.fragment,H$),bZ=h(H$),K7=n(H$,"P",{});var Xpe=r(K7);$Z=l(Xpe,"Create a four-dimensional array."),Xpe.forEach(a),xZ=h(H$),b(gd.$$.fragment,H$),H$.forEach(a),NE=h(i),fa=n(i,"DIV",{class:!0});var G$=r(fa);b(og.$$.fragment,G$),vZ=h(G$),Y7=n(G$,"P",{});var eme=r(Y7);yZ=l(eme,"Create a five-dimensional array."),eme.forEach(a),jZ=h(G$),b(ud.$$.fragment,G$),G$.forEach(a),PE=h(i),H=n(i,"DIV",{class:!0});var Z=r(H);b(lg.$$.fragment,Z),wZ=h(Z),ig=n(Z,"P",{});var h3=r(ig);DZ=l(h3,"Audio "),J7=n(h3,"CODE",{});var tme=r(J7);kZ=l(tme,"Feature"),tme.forEach(a),EZ=l(h3," to extract audio data from an audio file."),h3.forEach(a),qZ=h(Z),Q7=n(Z,"P",{});var ame=r(Q7);IZ=l(ame,"Input: The Audio feature accepts as input:"),ame.forEach(a),TZ=h(Z),Ir=n(Z,"UL",{});var W$=r(Ir);Z7=n(W$,"LI",{});var sme=r(Z7);dg=n(sme,"P",{});var f3=r(dg);NZ=l(f3,"A "),X7=n(f3,"CODE",{});var nme=r(X7);PZ=l(nme,"str"),nme.forEach(a),AZ=l(f3,": Absolute path to the audio file (i.e. random access is allowed)."),f3.forEach(a),sme.forEach(a),LZ=h(W$),Tr=n(W$,"LI",{});var K$=r(Tr);cg=n(K$,"P",{});var g3=r(cg);FZ=l(g3,"A "),eD=n(g3,"CODE",{});var rme=r(eD);CZ=l(rme,"dict"),rme.forEach(a),OZ=l(g3," with the keys:"),g3.forEach(a),zZ=h(K$),pg=n(K$,"UL",{});var u3=r(pg);Fb=n(u3,"LI",{});var rse=r(Fb);tD=n(rse,"CODE",{});var ome=r(tD);SZ=l(ome,"path"),ome.forEach(a),VZ=l(rse,": String with relative path of the audio file to the archive file."),rse.forEach(a),UZ=h(u3),Cb=n(u3,"LI",{});var ose=r(Cb);aD=n(ose,"CODE",{});var lme=r(aD);MZ=l(lme,"bytes"),lme.forEach(a),RZ=l(ose,": Bytes content of the audio file."),ose.forEach(a),u3.forEach(a),BZ=h(K$),sD=n(K$,"P",{});var ime=r(sD);HZ=l(ime,"This is useful for archived files with sequential access."),ime.forEach(a),K$.forEach(a),GZ=h(W$),Nr=n(W$,"LI",{});var Y$=r(Nr);mg=n(Y$,"P",{});var _3=r(mg);WZ=l(_3,"A "),nD=n(_3,"CODE",{});var dme=r(nD);KZ=l(dme,"dict"),dme.forEach(a),YZ=l(_3," with the keys:"),_3.forEach(a),JZ=h(Y$),Pr=n(Y$,"UL",{});var J$=r(Pr);Ob=n(J$,"LI",{});var lse=r(Ob);rD=n(lse,"CODE",{});var cme=r(rD);QZ=l(cme,"path"),cme.forEach(a),ZZ=l(lse,": String with relative path of the audio file to the archive file."),lse.forEach(a),XZ=h(J$),zb=n(J$,"LI",{});var ise=r(zb);oD=n(ise,"CODE",{});var pme=r(oD);eX=l(pme,"array"),pme.forEach(a),tX=l(ise,": Array containing the audio sample"),ise.forEach(a),aX=h(J$),Sb=n(J$,"LI",{});var dse=r(Sb);lD=n(dse,"CODE",{});var mme=r(lD);sX=l(mme,"sampling_rate"),mme.forEach(a),nX=l(dse,": Integer corresponding to the sampling rate of the audio sample."),dse.forEach(a),J$.forEach(a),rX=h(Y$),iD=n(Y$,"P",{});var hme=r(iD);oX=l(hme,"This is useful for archived files with sequential access."),hme.forEach(a),Y$.forEach(a),W$.forEach(a),lX=h(Z),b(_d.$$.fragment,Z),iX=h(Z),Qs=n(Z,"DIV",{class:!0});var Q$=r(Qs);b(hg.$$.fragment,Q$),dX=h(Q$),dD=n(Q$,"P",{});var fme=r(dD);cX=l(fme,`Cast an Arrow array to the Audio arrow storage type.
The Arrow types that can be converted to the Audio pyarrow storage type are:`),fme.forEach(a),pX=h(Q$),ga=n(Q$,"UL",{});var Dc=r(ga);Vb=n(Dc,"LI",{});var cse=r(Vb);cD=n(cse,"CODE",{});var gme=r(cD);mX=l(gme,"pa.string()"),gme.forEach(a),hX=l(cse," - it must contain the \u201Cpath\u201D data"),cse.forEach(a),fX=h(Dc),pD=n(Dc,"LI",{});var ume=r(pD);mD=n(ume,"CODE",{});var _me=r(mD);gX=l(_me,'pa.struct({"bytes": pa.binary()})'),_me.forEach(a),ume.forEach(a),uX=h(Dc),hD=n(Dc,"LI",{});var bme=r(hD);fD=n(bme,"CODE",{});var $me=r(fD);_X=l($me,'pa.struct({"path": pa.string()})'),$me.forEach(a),bme.forEach(a),bX=h(Dc),Ub=n(Dc,"LI",{});var pse=r(Ub);gD=n(pse,"CODE",{});var xme=r(gD);$X=l(xme,'pa.struct({"bytes": pa.binary(), "path": pa.string()})'),xme.forEach(a),xX=l(pse,"  - order doesn\u2019t matter"),pse.forEach(a),Dc.forEach(a),Q$.forEach(a),vX=h(Z),bd=n(Z,"DIV",{class:!0});var b3=r(bd);b(fg.$$.fragment,b3),yX=h(b3),uD=n(b3,"P",{});var vme=r(uD);jX=l(vme,"Decode example audio file into audio data."),vme.forEach(a),b3.forEach(a),wX=h(Z),$d=n(Z,"DIV",{class:!0});var $3=r($d);b(gg.$$.fragment,$3),DX=h($3),_D=n($3,"P",{});var yme=r(_D);kX=l(yme,"Embed audio files into the Arrow array."),yme.forEach(a),$3.forEach(a),EX=h(Z),xd=n(Z,"DIV",{class:!0});var x3=r(xd);b(ug.$$.fragment,x3),qX=h(x3),bD=n(x3,"P",{});var jme=r(bD);IX=l(jme,"Encode example into a format for Arrow."),jme.forEach(a),x3.forEach(a),TX=h(Z),vd=n(Z,"DIV",{class:!0});var v3=r(vd);b(_g.$$.fragment,v3),NX=h(v3),$D=n(v3,"P",{});var wme=r($D);PX=l(wme,"If in the decodable state, raise an error, otherwise flatten the feature into a dictionary."),wme.forEach(a),v3.forEach(a),Z.forEach(a),AE=h(i),G=n(i,"DIV",{class:!0});var X=r(G);b(bg.$$.fragment,X),AX=h(X),$g=n(X,"P",{});var y3=r($g);LX=l(y3,"Image "),xD=n(y3,"CODE",{});var Dme=r(xD);FX=l(Dme,"Feature"),Dme.forEach(a),CX=l(y3," to read image data from an image file."),y3.forEach(a),OX=h(X),vD=n(X,"P",{});var kme=r(vD);zX=l(kme,"Input: The Image feature accepts as input:"),kme.forEach(a),SX=h(X),ua=n(X,"UL",{});var kc=r(ua);yD=n(kc,"LI",{});var Eme=r(yD);xg=n(Eme,"P",{});var j3=r(xg);VX=l(j3,"A "),jD=n(j3,"CODE",{});var qme=r(jD);UX=l(qme,"str"),qme.forEach(a),MX=l(j3,": Absolute path to the image file (i.e. random access is allowed)."),j3.forEach(a),Eme.forEach(a),RX=h(kc),Ar=n(kc,"LI",{});var Z$=r(Ar);vg=n(Z$,"P",{});var w3=r(vg);BX=l(w3,"A "),wD=n(w3,"CODE",{});var Ime=r(wD);HX=l(Ime,"dict"),Ime.forEach(a),GX=l(w3," with the keys:"),w3.forEach(a),WX=h(Z$),yg=n(Z$,"UL",{});var D3=r(yg);Mb=n(D3,"LI",{});var mse=r(Mb);DD=n(mse,"CODE",{});var Tme=r(DD);KX=l(Tme,"path"),Tme.forEach(a),YX=l(mse,": String with relative path of the image file to the archive file."),mse.forEach(a),JX=h(D3),Rb=n(D3,"LI",{});var hse=r(Rb);kD=n(hse,"CODE",{});var Nme=r(kD);QX=l(Nme,"bytes"),Nme.forEach(a),ZX=l(hse,": Bytes of the image file."),hse.forEach(a),D3.forEach(a),XX=h(Z$),ED=n(Z$,"P",{});var Pme=r(ED);eee=l(Pme,"This is useful for archived files with sequential access."),Pme.forEach(a),Z$.forEach(a),tee=h(kc),qD=n(kc,"LI",{});var Ame=r(qD);jg=n(Ame,"P",{});var k3=r(jg);aee=l(k3,"An "),ID=n(k3,"CODE",{});var Lme=r(ID);see=l(Lme,"np.ndarray"),Lme.forEach(a),nee=l(k3,": NumPy array representing an image."),k3.forEach(a),Ame.forEach(a),ree=h(kc),TD=n(kc,"LI",{});var Fme=r(TD);wg=n(Fme,"P",{});var E3=r(wg);oee=l(E3,"A "),ND=n(E3,"CODE",{});var Cme=r(ND);lee=l(Cme,"PIL.Image.Image"),Cme.forEach(a),iee=l(E3,": PIL image object."),E3.forEach(a),Fme.forEach(a),kc.forEach(a),dee=h(X),b(yd.$$.fragment,X),cee=h(X),Zs=n(X,"DIV",{class:!0});var X$=r(Zs);b(Dg.$$.fragment,X$),pee=h(X$),PD=n(X$,"P",{});var Ome=r(PD);mee=l(Ome,`Cast an Arrow array to the Image arrow storage type.
The Arrow types that can be converted to the Image pyarrow storage type are:`),Ome.forEach(a),hee=h(X$),lt=n(X$,"UL",{});var Nn=r(lt);Bb=n(Nn,"LI",{});var fse=r(Bb);AD=n(fse,"CODE",{});var zme=r(AD);fee=l(zme,"pa.string()"),zme.forEach(a),gee=l(fse," - it must contain the \u201Cpath\u201D data"),fse.forEach(a),uee=h(Nn),LD=n(Nn,"LI",{});var Sme=r(LD);FD=n(Sme,"CODE",{});var Vme=r(FD);_ee=l(Vme,'pa.struct({"bytes": pa.binary()})'),Vme.forEach(a),Sme.forEach(a),bee=h(Nn),CD=n(Nn,"LI",{});var Ume=r(CD);OD=n(Ume,"CODE",{});var Mme=r(OD);$ee=l(Mme,'pa.struct({"path": pa.string()})'),Mme.forEach(a),Ume.forEach(a),xee=h(Nn),Hb=n(Nn,"LI",{});var gse=r(Hb);zD=n(gse,"CODE",{});var Rme=r(zD);vee=l(Rme,'pa.struct({"bytes": pa.binary(), "path": pa.string()})'),Rme.forEach(a),yee=l(gse,"  - order doesn\u2019t matter"),gse.forEach(a),jee=h(Nn),Gb=n(Nn,"LI",{});var use=r(Gb);SD=n(use,"CODE",{});var Bme=r(SD);wee=l(Bme,"pa.list(*)"),Bme.forEach(a),Dee=l(use," - it must contain the image array data"),use.forEach(a),Nn.forEach(a),X$.forEach(a),kee=h(X),jd=n(X,"DIV",{class:!0});var q3=r(jd);b(kg.$$.fragment,q3),Eee=h(q3),VD=n(q3,"P",{});var Hme=r(VD);qee=l(Hme,"Decode example image file into image data."),Hme.forEach(a),q3.forEach(a),Iee=h(X),wd=n(X,"DIV",{class:!0});var I3=r(wd);b(Eg.$$.fragment,I3),Tee=h(I3),UD=n(I3,"P",{});var Gme=r(UD);Nee=l(Gme,"Embed image files into the Arrow array."),Gme.forEach(a),I3.forEach(a),Pee=h(X),Dd=n(X,"DIV",{class:!0});var T3=r(Dd);b(qg.$$.fragment,T3),Aee=h(T3),MD=n(T3,"P",{});var Wme=r(MD);Lee=l(Wme,"Encode example into a format for Arrow."),Wme.forEach(a),T3.forEach(a),Fee=h(X),kd=n(X,"DIV",{class:!0});var N3=r(kd);b(Ig.$$.fragment,N3),Cee=h(N3),RD=n(N3,"P",{});var Kme=r(RD);Oee=l(Kme,"If in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary."),Kme.forEach(a),N3.forEach(a),X.forEach(a),LE=h(i),Lr=n(i,"H2",{class:!0});var P3=r(Lr);Ed=n(P3,"A",{id:!0,class:!0,href:!0});var Yme=r(Ed);BD=n(Yme,"SPAN",{});var Jme=r(BD);b(Tg.$$.fragment,Jme),Jme.forEach(a),Yme.forEach(a),zee=h(P3),HD=n(P3,"SPAN",{});var Qme=r(HD);See=l(Qme,"MetricInfo"),Qme.forEach(a),P3.forEach(a),FE=h(i),me=n(i,"DIV",{class:!0});var Vt=r(me);b(Ng.$$.fragment,Vt),Vee=h(Vt),GD=n(Vt,"P",{});var Zme=r(GD);Uee=l(Zme,"Information about a metric."),Zme.forEach(a),Mee=h(Vt),Wb=n(Vt,"P",{});var _se=r(Wb);WD=n(_se,"CODE",{});var Xme=r(WD);Ree=l(Xme,"MetricInfo"),Xme.forEach(a),Bee=l(_se,` documents a metric, including its name, version, and features.
See the constructor arguments and properties for a full list.`),_se.forEach(a),Hee=h(Vt),KD=n(Vt,"P",{});var ehe=r(KD);Gee=l(ehe,"Note: Not all fields are known on construction and may be updated later."),ehe.forEach(a),Wee=h(Vt),Xs=n(Vt,"DIV",{class:!0});var e1=r(Xs);b(Pg.$$.fragment,e1),Kee=h(e1),Ag=n(e1,"P",{});var A3=r(Ag);Yee=l(A3,"Create MetricInfo from the JSON file in "),YD=n(A3,"CODE",{});var the=r(YD);Jee=l(the,"metric_info_dir"),the.forEach(a),Qee=l(A3,"."),A3.forEach(a),Zee=h(e1),b(qd.$$.fragment,e1),e1.forEach(a),Xee=h(Vt),en=n(Vt,"DIV",{class:!0});var t1=r(en);b(Lg.$$.fragment,t1),ete=h(t1),_a=n(t1,"P",{});var Ec=r(_a);tte=l(Ec,"Write "),JD=n(Ec,"CODE",{});var ahe=r(JD);ate=l(ahe,"MetricInfo"),ahe.forEach(a),ste=l(Ec," as JSON to "),QD=n(Ec,"CODE",{});var she=r(QD);nte=l(she,"metric_info_dir"),she.forEach(a),rte=l(Ec,`.
Also save the license separately in LICENCE.
If `),ZD=n(Ec,"CODE",{});var nhe=r(ZD);ote=l(nhe,"pretty_print"),nhe.forEach(a),lte=l(Ec," is True, the JSON will be pretty-printed with the indent level of 4."),Ec.forEach(a),ite=h(t1),b(Id.$$.fragment,t1),t1.forEach(a),Vt.forEach(a),CE=h(i),Fr=n(i,"H2",{class:!0});var L3=r(Fr);Td=n(L3,"A",{id:!0,class:!0,href:!0});var rhe=r(Td);XD=n(rhe,"SPAN",{});var ohe=r(XD);b(Fg.$$.fragment,ohe),ohe.forEach(a),rhe.forEach(a),dte=h(L3),ek=n(L3,"SPAN",{});var lhe=r(ek);cte=l(lhe,"Metric"),lhe.forEach(a),L3.forEach(a),OE=h(i),tn=n(i,"P",{});var a1=r(tn);pte=l(a1,"The base class "),tk=n(a1,"CODE",{});var ihe=r(tk);mte=l(ihe,"Metric"),ihe.forEach(a),hte=l(a1," implements a Metric backed by one or several "),Kb=n(a1,"A",{href:!0});var dhe=r(Kb);fte=l(dhe,"Dataset"),dhe.forEach(a),gte=l(a1,"."),a1.forEach(a),zE=h(i),ne=n(i,"DIV",{class:!0});var Ge=r(ne);b(Cg.$$.fragment,Ge),ute=h(Ge),ak=n(Ge,"P",{});var che=r(ak);_te=l(che,"A Metric is the base class and common API for all metrics."),che.forEach(a),bte=h(Ge),b(Nd.$$.fragment,Ge),$te=h(Ge),an=n(Ge,"DIV",{class:!0});var s1=r(an);b(Og.$$.fragment,s1),xte=h(s1),sk=n(s1,"P",{});var phe=r(sk);vte=l(phe,"Add one prediction and reference for the metric\u2019s stack."),phe.forEach(a),yte=h(s1),b(Pd.$$.fragment,s1),s1.forEach(a),jte=h(Ge),sn=n(Ge,"DIV",{class:!0});var n1=r(sn);b(zg.$$.fragment,n1),wte=h(n1),nk=n(n1,"P",{});var mhe=r(nk);Dte=l(mhe,"Add a batch of predictions and references for the metric\u2019s stack."),mhe.forEach(a),kte=h(n1),b(Ad.$$.fragment,n1),n1.forEach(a),Ete=h(Ge),Ct=n(Ge,"DIV",{class:!0});var qc=r(Ct);b(Sg.$$.fragment,qc),qte=h(qc),rk=n(qc,"P",{});var hhe=r(rk);Ite=l(hhe,"Compute the metrics."),hhe.forEach(a),Tte=h(qc),ok=n(qc,"P",{});var fhe=r(ok);Nte=l(fhe,"Usage of positional arguments is not allowed to prevent mistakes."),fhe.forEach(a),Pte=h(qc),b(Ld.$$.fragment,qc),qc.forEach(a),Ate=h(Ge),Fd=n(Ge,"DIV",{class:!0});var F3=r(Fd);b(Vg.$$.fragment,F3),Lte=h(F3),lk=n(F3,"P",{});var ghe=r(lk);Fte=l(ghe,"Downloads and prepares dataset for reading."),ghe.forEach(a),F3.forEach(a),Ge.forEach(a),SE=h(i),Cr=n(i,"H2",{class:!0});var C3=r(Cr);Cd=n(C3,"A",{id:!0,class:!0,href:!0});var uhe=r(Cd);ik=n(uhe,"SPAN",{});var _he=r(ik);b(Ug.$$.fragment,_he),_he.forEach(a),uhe.forEach(a),Cte=h(C3),dk=n(C3,"SPAN",{});var bhe=r(dk);Ote=l(bhe,"Filesystems"),bhe.forEach(a),C3.forEach(a),VE=h(i),V=n(i,"DIV",{class:!0});var M=r(V);b(Mg.$$.fragment,M),zte=h(M),Od=n(M,"P",{});var tE=r(Od);ck=n(tE,"CODE",{});var $he=r(ck);Ste=l($he,"datasets.filesystems.S3FileSystem"),$he.forEach(a),Vte=l(tE," is a subclass of "),Rg=n(tE,"A",{href:!0,rel:!0});var xhe=r(Rg);pk=n(xhe,"CODE",{});var vhe=r(pk);Ute=l(vhe,"s3fs.S3FileSystem"),vhe.forEach(a),xhe.forEach(a),Mte=l(tE,"."),tE.forEach(a),Rte=h(M),ba=n(M,"P",{});var Ic=r(ba);Bte=l(Ic,"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 ("),mk=n(Ic,"CODE",{});var yhe=r(mk);Hte=l(yhe,"key="),yhe.forEach(a),Gte=l(Ic,", "),hk=n(Ic,"CODE",{});var jhe=r(hk);Wte=l(jhe,"secret="),jhe.forEach(a),Kte=l(Ic,") or with boto\u2019s credential methods. See botocore documentation for more information. If no credentials are available, use "),fk=n(Ic,"CODE",{});var whe=r(fk);Yte=l(whe,"anon=True"),whe.forEach(a),Jte=l(Ic,"."),Ic.forEach(a),Qte=h(M),gk=n(M,"P",{});var Dhe=r(gk);Zte=l(Dhe,"Examples:"),Dhe.forEach(a),Xte=h(M),uk=n(M,"P",{});var khe=r(uk);eae=l(khe,"Listing files from public S3 bucket."),khe.forEach(a),tae=h(M),b(zd.$$.fragment,M),aae=h(M),Or=n(M,"P",{});var r1=r(Or);sae=l(r1,"Listing files from private S3 bucket using "),_k=n(r1,"CODE",{});var Ehe=r(_k);nae=l(Ehe,"aws_access_key_id"),Ehe.forEach(a),rae=l(r1," and "),bk=n(r1,"CODE",{});var qhe=r(bk);oae=l(qhe,"aws_secret_access_key"),qhe.forEach(a),lae=l(r1,"."),r1.forEach(a),iae=h(M),b(Sd.$$.fragment,M),dae=h(M),$a=n(M,"P",{});var Tc=r($a);cae=l(Tc,"Using "),$k=n(Tc,"CODE",{});var Ihe=r($k);pae=l(Ihe,"S3Filesystem"),Ihe.forEach(a),mae=l(Tc," with "),xk=n(Tc,"CODE",{});var The=r(xk);hae=l(The,"botocore.session.Session"),The.forEach(a),fae=l(Tc," and custom "),vk=n(Tc,"CODE",{});var Nhe=r(vk);gae=l(Nhe,"aws_profile"),Nhe.forEach(a),uae=l(Tc,"."),Tc.forEach(a),_ae=h(M),b(Vd.$$.fragment,M),bae=h(M),zr=n(M,"P",{});var o1=r(zr);$ae=l(o1,"Loading dataset from S3 using "),yk=n(o1,"CODE",{});var Phe=r(yk);xae=l(Phe,"S3Filesystem"),Phe.forEach(a),vae=l(o1," and "),Yb=n(o1,"A",{href:!0});var Ahe=r(Yb);yae=l(Ahe,"load_from_disk()"),Ahe.forEach(a),jae=l(o1,"."),o1.forEach(a),wae=h(M),b(Ud.$$.fragment,M),Dae=h(M),Sr=n(M,"P",{});var l1=r(Sr);kae=l(l1,"Saving dataset to S3 using "),jk=n(l1,"CODE",{});var Lhe=r(jk);Eae=l(Lhe,"S3Filesystem"),Lhe.forEach(a),qae=l(l1," and "),Jb=n(l1,"A",{href:!0});var Fhe=r(Jb);Iae=l(Fhe,"Dataset.save_to_disk()"),Fhe.forEach(a),Tae=l(l1,"."),l1.forEach(a),Nae=h(M),b(Md.$$.fragment,M),M.forEach(a),UE=h(i),Vr=n(i,"DIV",{class:!0});var O3=r(Vr);b(Bg.$$.fragment,O3),Pae=h(O3),Ur=n(O3,"P",{});var i1=r(Ur);Aae=l(i1,"Preprocesses "),wk=n(i1,"CODE",{});var Che=r(wk);Lae=l(Che,"dataset_path"),Che.forEach(a),Fae=l(i1," and removes remote filesystem (e.g. removing "),Dk=n(i1,"CODE",{});var Ohe=r(Dk);Cae=l(Ohe,"s3://"),Ohe.forEach(a),Oae=l(i1,")."),i1.forEach(a),O3.forEach(a),ME=h(i),Mr=n(i,"DIV",{class:!0});var z3=r(Mr);b(Hg.$$.fragment,z3),zae=h(z3),kk=n(z3,"P",{});var zhe=r(kk);Sae=l(zhe,"Validates if filesystem has remote protocol."),zhe.forEach(a),z3.forEach(a),RE=h(i),Rr=n(i,"H2",{class:!0});var S3=r(Rr);Rd=n(S3,"A",{id:!0,class:!0,href:!0});var She=r(Rd);Ek=n(She,"SPAN",{});var Vhe=r(Ek);b(Gg.$$.fragment,Vhe),Vhe.forEach(a),She.forEach(a),Vae=h(S3),qk=n(S3,"SPAN",{});var Uhe=r(qk);Uae=l(Uhe,"Fingerprint"),Uhe.forEach(a),S3.forEach(a),BE=h(i),Br=n(i,"DIV",{class:!0});var V3=r(Br);b(Wg.$$.fragment,V3),Mae=h(V3),Ik=n(V3,"P",{});var Mhe=r(Ik);Rae=l(Mhe,"Hasher that accepts python objects as inputs."),Mhe.forEach(a),V3.forEach(a),this.h()},h(){w(c,"name","hf:doc:metadata"),w(c,"content",JSON.stringify(Due)),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(ke,"id","datasets.DatasetInfo"),w(ke,"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(ke,"href","#datasets.DatasetInfo"),w(he,"class","relative group"),w(pu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetInfo"),w(mu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetInfo"),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(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(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(_o,"id","datasets.Dataset"),w(_o,"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(_o,"href","#datasets.Dataset"),w(Ln,"class","relative group"),w(hu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),w(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(fu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),w(qe,"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.8.0/en/package_reference/main_classes#datasets.Dataset"),w(wo,"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(La,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Fa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ca,"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,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.__len__"),w(Oa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(bt,"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(uu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.map"),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(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(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(_u,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.set_format"),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(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(Ro,"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.8.0/en/package_reference/main_classes#datasets.Dataset.set_transform"),w($u,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.map"),w(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(xu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(vu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.reset_format"),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(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(ju,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.with_transform"),w(wu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(Du,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),w(Te,"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.8.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(Eu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.reset_format"),w(qu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.set_transform"),w(Iu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),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(Jo,"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(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(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(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(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(Tu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),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(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(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(Nu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Image"),w(Pu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Audio"),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(Au,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Image"),w(Lu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Audio"),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(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(dl,"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(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(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(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(Bp,"href","https://github.com/facebookresearch/faiss/wiki/The-index-factory"),w(Bp,"rel","nofollow"),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(Gp,"href","https://github.com/facebookresearch/faiss/wiki/The-index-factory"),w(Gp,"rel","nofollow"),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(_l,"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(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($l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(xl,"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(yl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(jl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(wl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Dl,"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(zu,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetInfo"),w(El,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Vu,"href","/docs/datasets/v2.8.0/en/package_reference/builder_classes#datasets.NamedSplit"),w(ql,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Uu,"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,"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,"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,"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,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Wu,"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,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ju,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Qu,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Xu,"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(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(e_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Features"),w(t_,"href","./package_reference/task_templates"),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(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(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(a_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),w(s_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),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(n_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),w(r_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDataset"),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(o_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk"),w(l_,"href","/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset"),w(i_,"href","/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset"),w(ye,"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.8.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk"),w(c_,"href","/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset"),w(p_,"href","/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset"),w(je,"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.8.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk"),w(h_,"href","/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset"),w(f_,"href","/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset"),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(zl,"id","datasets.DatasetDict"),w(zl,"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(zl,"href","#datasets.DatasetDict"),w(er,"class","relative group"),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(_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(Rl,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.__len__"),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(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(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(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(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(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(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(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(ti,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(u_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.with_transform"),w(__,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict.set_format"),w(b_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),w($_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),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(x_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.set_format"),w(v_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.reset_format"),w(y_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),w(j_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),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(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(w_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.map"),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(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(D_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.map"),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(k_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset.map"),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(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(E_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),w(q_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),w(I_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Image"),w(T_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Audio"),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(N_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.filesystems.S3FileSystem"),w(P_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Image"),w(A_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Audio"),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(L_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.filesystems.S3FileSystem"),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(F_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),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(C_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),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(O_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),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(z_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetDict"),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(S_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Features"),w(V_,"href","./package_reference/task_templates"),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(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(U_,"id","package_reference_features"),w(bi,"id","datasets.IterableDataset"),w(bi,"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(bi,"href","#datasets.IterableDataset"),w(pr,"class","relative group"),w(M_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDataset"),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(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(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(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(Di,"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(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(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(B_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDataset.skip"),w(H_,"href","/docs/datasets/v2.8.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(G_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDataset"),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(W_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDataset"),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(Y_,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.DatasetInfo"),w(Pi,"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_,"href","/docs/datasets/v2.8.0/en/package_reference/builder_classes#datasets.NamedSplit"),w(Ai,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(eb,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(tb,"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(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(nb,"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(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(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(ib,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(db,"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(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(Li,"id","datasets.IterableDatasetDict"),w(Li,"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(Li,"href","#datasets.IterableDatasetDict"),w($r,"class","relative group"),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(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(pb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDataset.skip"),w(mb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.IterableDataset.take"),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(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(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(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(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Hi,"id","datasets.Features"),w(Hi,"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(Hi,"href","#datasets.Features"),w(jr,"class","relative group"),w(fb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Value"),w(gb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.ClassLabel"),w(ub,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Sequence"),w(_b,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Sequence"),w(bb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Array2D"),w($b,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Array3D"),w(xb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Array4D"),w(vb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Array5D"),w(yb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Audio"),w(jb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Image"),w(wb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Translation"),w(Db,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.TranslationVariableLanguages"),w(kb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Features"),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(Yi,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Ji,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(Xi,"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(Eb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Features"),w(td,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(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(ca,"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(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(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(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(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(cd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(rt,"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(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(pa,"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(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(fa,"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(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(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(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(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(jd,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Dd,"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(Ed,"id","datasets.MetricInfo"),w(Ed,"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(Ed,"href","#datasets.MetricInfo"),w(Lr,"class","relative group"),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(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(Td,"id","datasets.Metric"),w(Td,"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(Td,"href","#datasets.Metric"),w(Fr,"class","relative group"),w(Kb,"href","/docs/datasets/v2.8.0/en/package_reference/main_classes#datasets.Dataset"),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(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(Fd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(Cd,"id","datasets.filesystems.S3FileSystem"),w(Cd,"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(Cd,"href","#datasets.filesystems.S3FileSystem"),w(Cr,"class","relative group"),w(Rg,"href","https://s3fs.readthedocs.io/en/latest/api.html"),w(Rg,"rel","nofollow"),w(Yb,"href","/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_from_disk"),w(Jb,"href","/docs/datasets/v2.8.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(Vr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Mr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Rd,"id","datasets.fingerprint.Hasher"),w(Rd,"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(Rd,"href","#datasets.fingerprint.Hasher"),w(Rr,"class","relative group"),w(Br,"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,de),e(de,R),D(i,ce,j),D(i,he,j),e(he,ke),e(ke,fe),$(Pa,fe,null),e(he,du),e(he,fo),e(fo,U3),D(i,aE,j),D(i,pe,j),$(Nc,pe,null),e(pe,M3),e(pe,d1),e(d1,R3),e(pe,B3),e(pe,cu),e(cu,c1),e(c1,H3),e(cu,G3),e(pe,W3),e(pe,p1),e(p1,K3),e(pe,Y3),e(pe,Ee),$(Pc,Ee,null),e(Ee,J3),e(Ee,Pn),e(Pn,Q3),e(Pn,pu),e(pu,Z3),e(Pn,X3),e(Pn,m1),e(m1,e5),e(Pn,t5),e(Ee,a5),e(Ee,Ac),e(Ac,s5),e(Ac,mu),e(mu,n5),e(Ac,r5),e(Ee,o5),e(Ee,h1),e(h1,l5),e(Ee,i5),$(go,Ee,null),e(pe,d5),e(pe,Aa),$(Lc,Aa,null),e(Aa,c5),e(Aa,An),e(An,p5),e(An,f1),e(f1,m5),e(An,h5),e(An,g1),e(g1,f5),e(An,g5),e(Aa,u5),$(uo,Aa,null),D(i,sE,j),D(i,Ln,j),e(Ln,_o),e(_o,u1),$(Fc,u1,null),e(Ln,_5),e(Ln,_1),e(_1,b5),D(i,nE,j),D(i,bo,j),e(bo,$5),e(bo,hu),e(hu,x5),e(bo,v5),D(i,rE,j),D(i,q,j),$(Cc,q,null),e(q,y5),e(q,b1),e(b1,j5),e(q,w5),e(q,gt),$(Oc,gt,null),e(gt,D5),e(gt,$1),e($1,k5),e(gt,E5),e(gt,x1),e(x1,q5),e(gt,I5),$($o,gt,null),e(q,T5),e(q,ut),$(zc,ut,null),e(ut,N5),e(ut,v1),e(v1,P5),e(ut,A5),e(ut,y1),e(y1,L5),e(ut,F5),$(xo,ut,null),e(q,C5),e(q,vo),$(Sc,vo,null),e(vo,O5),e(vo,j1),e(j1,z5),e(q,S5),e(q,yo),$(Vc,yo,null),e(yo,V5),e(yo,w1),e(w1,U5),e(q,M5),e(q,qe),$(Uc,qe,null),e(qe,R5),e(qe,Ut),e(Ut,B5),e(Ut,D1),e(D1,H5),e(Ut,G5),e(Ut,k1),e(k1,W5),e(Ut,K5),e(Ut,fu),e(fu,Y5),e(Ut,J5),e(qe,Q5),e(qe,Fn),e(Fn,Z5),e(Fn,E1),e(E1,X5),e(Fn,e6),e(Fn,q1),e(q1,t6),e(Fn,a6),e(qe,s6),e(qe,Mt),e(Mt,n6),e(Mt,I1),e(I1,r6),e(Mt,o6),e(Mt,T1),e(T1,l6),e(Mt,i6),e(Mt,N1),e(N1,d6),e(Mt,c6),e(qe,p6),$(jo,qe,null),e(q,m6),e(q,wo),$(Mc,wo,null),e(wo,h6),e(wo,Rt),e(Rt,f6),e(Rt,P1),e(P1,g6),e(Rt,u6),e(Rt,A1),e(A1,_6),e(Rt,b6),e(Rt,gu),e(gu,$6),e(Rt,x6),e(q,v6),e(q,_t),$(Rc,_t,null),e(_t,y6),e(_t,L1),e(L1,j6),e(_t,w6),$(Do,_t,null),e(_t,D6),$(ko,_t,null),e(q,k6),e(q,La),$(Bc,La,null),e(La,E6),e(La,F1),e(F1,q6),e(La,I6),$(Eo,La,null),e(q,T6),e(q,Fa),$(Hc,Fa,null),e(Fa,N6),e(Fa,C1),e(C1,P6),e(Fa,A6),$(qo,Fa,null),e(q,L6),e(q,Ca),$(Gc,Ca,null),e(Ca,F6),e(Ca,O1),e(O1,C6),e(Ca,O6),$(Io,Ca,null),e(q,z6),e(q,Oa),$(Wc,Oa,null),e(Oa,S6),e(Oa,Kc),e(Kc,V6),e(Kc,To),e(To,U6),e(To,z1),e(z1,M6),e(To,R6),e(Kc,B6),e(Oa,H6),$(No,Oa,null),e(q,G6),e(q,za),$(Yc,za,null),e(za,W6),e(za,S1),e(S1,K6),e(za,Y6),$(Po,za,null),e(q,J6),e(q,Sa),$(Jc,Sa,null),e(Sa,Q6),e(Sa,V1),e(V1,Z6),e(Sa,X6),$(Ao,Sa,null),e(q,eq),e(q,bt),$(Qc,bt,null),e(bt,tq),e(bt,U1),e(U1,aq),e(bt,sq),e(bt,M1),e(M1,nq),e(bt,rq),$(Lo,bt,null),e(q,oq),e(q,Va),$(Zc,Va,null),e(Va,lq),e(Va,R1),e(R1,iq),e(Va,dq),$(Fo,Va,null),e(q,cq),e(q,Ua),$(Xc,Ua,null),e(Ua,pq),e(Ua,B1),e(B1,mq),e(Ua,hq),$(Co,Ua,null),e(q,fq),e(q,Ma),$(ep,Ma,null),e(Ma,gq),e(Ma,H1),e(H1,uq),e(Ma,_q),$(Oo,Ma,null),e(q,bq),e(q,$t),$(tp,$t,null),e($t,$q),e($t,G1),e(G1,xq),e($t,vq),e($t,Cn),e(Cn,yq),e(Cn,uu),e(uu,jq),e(Cn,wq),e(Cn,W1),e(W1,Dq),e(Cn,kq),e($t,Eq),$(zo,$t,null),e(q,qq),e(q,Ra),$(ap,Ra,null),e(Ra,Iq),e(Ra,K1),e(K1,Tq),e(Ra,Nq),$(So,Ra,null),e(q,Pq),e(q,Ba),$(sp,Ba,null),e(Ba,Aq),e(Ba,Y1),e(Y1,Lq),e(Ba,Fq),$(Vo,Ba,null),e(q,Cq),e(q,Ha),$(np,Ha,null),e(Ha,Oq),e(Ha,J1),e(J1,zq),e(Ha,Sq),$(Uo,Ha,null),e(q,Vq),e(q,Ga),$(rp,Ga,null),e(Ga,Uq),e(Ga,Q1),e(Q1,Mq),e(Ga,Rq),$(Mo,Ga,null),e(q,Bq),e(q,Wa),$(op,Wa,null),e(Wa,Hq),e(Wa,Z1),e(Z1,Gq),e(Wa,Wq),e(Wa,lp),e(lp,Kq),e(lp,_u),e(_u,Yq),e(lp,Jq),e(q,Qq),e(q,Ka),$(ip,Ka,null),e(Ka,Zq),e(Ka,dp),e(dp,Xq),e(dp,X1),e(X1,e9),e(dp,t9),e(Ka,a9),e(Ka,cp),e(cp,s9),e(cp,ex),e(ex,n9),e(cp,r9),e(q,o9),e(q,Ro),$(pp,Ro,null),e(Ro,l9),e(Ro,On),e(On,i9),e(On,tx),e(tx,d9),e(On,c9),e(On,ax),e(ax,p9),e(On,m9),e(q,h9),e(q,Ie),$(mp,Ie,null),e(Ie,f9),e(Ie,We),e(We,g9),e(We,sx),e(sx,u9),e(We,_9),e(We,nx),e(nx,b9),e(We,$9),e(We,rx),e(rx,x9),e(We,v9),e(We,bu),e(bu,y9),e(We,j9),e(Ie,w9),e(Ie,Bt),e(Bt,D9),e(Bt,$u),e($u,k9),e(Bt,E9),e(Bt,ox),e(ox,q9),e(Bt,I9),e(Bt,lx),e(lx,T9),e(Bt,N9),e(Ie,P9),$(Bo,Ie,null),e(Ie,A9),$(Ho,Ie,null),e(q,L9),e(q,Ya),$(hp,Ya,null),e(Ya,F9),e(Ya,Ke),e(Ke,C9),e(Ke,ix),e(ix,O9),e(Ke,z9),e(Ke,dx),e(dx,S9),e(Ke,V9),e(Ke,xu),e(xu,U9),e(Ke,M9),e(Ke,vu),e(vu,R9),e(Ke,B9),e(Ya,H9),$(Go,Ya,null),e(q,G9),e(q,xt),$(fp,xt,null),e(xt,W9),e(xt,gp),e(gp,K9),e(gp,cx),e(cx,Y9),e(gp,J9),e(xt,Q9),e(xt,yu),e(yu,Z9),e(yu,px),e(px,X9),e(xt,eI),$(Wo,xt,null),e(q,tI),e(q,Te),$(up,Te,null),e(Te,aI),e(Te,Ht),e(Ht,sI),e(Ht,mx),e(mx,nI),e(Ht,rI),e(Ht,hx),e(hx,oI),e(Ht,lI),e(Ht,fx),e(fx,iI),e(Ht,dI),e(Te,cI),e(Te,_p),e(_p,pI),e(_p,ju),e(ju,mI),e(_p,hI),e(Te,fI),e(Te,Gt),e(Gt,gI),e(Gt,wu),e(wu,uI),e(Gt,_I),e(Gt,gx),e(gx,bI),e(Gt,$I),e(Gt,Du),e(Du,xI),e(Gt,vI),e(Te,yI),$(Ko,Te,null),e(q,jI),e(q,Ne),$(bp,Ne,null),e(Ne,wI),e(Ne,zn),e(zn,DI),e(zn,ux),e(ux,kI),e(zn,EI),e(zn,_x),e(_x,qI),e(zn,II),e(Ne,TI),e(Ne,Sn),e(Sn,NI),e(Sn,ku),e(ku,PI),e(Sn,AI),e(Sn,Eu),e(Eu,LI),e(Sn,FI),e(Ne,CI),e(Ne,Wt),e(Wt,OI),e(Wt,qu),e(qu,zI),e(Wt,SI),e(Wt,bx),e(bx,VI),e(Wt,UI),e(Wt,Iu),e(Iu,MI),e(Wt,RI),e(Ne,BI),$(Yo,Ne,null),e(q,HI),e(q,Jo),$($p,Jo,null),e(Jo,GI),e(Jo,$x),e($x,WI),e(q,KI),e(q,vt),$(xp,vt,null),e(vt,YI),e(vt,xx),e(xx,JI),e(vt,QI),e(vt,vx),e(vx,ZI),e(vt,XI),$(Qo,vt,null),e(q,eT),e(q,Pe),$(vp,Pe,null),e(Pe,tT),e(Pe,yx),e(yx,aT),e(Pe,sT),e(Pe,yp),e(yp,nT),e(yp,jx),e(jx,rT),e(yp,oT),e(Pe,lT),e(Pe,Vn),e(Vn,Un),e(Un,iT),e(Un,wx),e(wx,dT),e(Un,cT),e(Un,Dx),e(Dx,pT),e(Un,mT),e(Vn,hT),e(Vn,Kt),e(Kt,fT),e(Kt,kx),e(kx,gT),e(Kt,uT),e(Kt,Ex),e(Ex,_T),e(Kt,bT),e(Kt,qx),e(qx,$T),e(Kt,xT),e(Vn,vT),e(Vn,K),e(K,yT),e(K,Ix),e(Ix,jT),e(K,wT),e(K,Tx),e(Tx,DT),e(K,kT),e(K,Nx),e(Nx,ET),e(K,qT),e(K,Px),e(Px,IT),e(K,TT),e(K,Ax),e(Ax,NT),e(K,PT),e(K,Lx),e(Lx,AT),e(K,LT),e(K,Fx),e(Fx,FT),e(K,CT),e(K,Cx),e(Cx,OT),e(K,zT),e(Pe,ST),$(Zo,Pe,null),e(q,VT),e(q,Ja),$(jp,Ja,null),e(Ja,UT),e(Ja,Ox),e(Ox,MT),e(Ja,RT),$(Xo,Ja,null),e(q,BT),e(q,Qa),$(wp,Qa,null),e(Qa,HT),e(Qa,zx),e(zx,GT),e(Qa,WT),$(el,Qa,null),e(q,KT),e(q,yt),$(Dp,yt,null),e(yt,YT),e(yt,Sx),e(Sx,JT),e(yt,QT),e(yt,Vx),e(Vx,ZT),e(yt,XT),$(tl,yt,null),e(q,eN),e(q,jt),$(kp,jt,null),e(jt,tN),e(jt,Ux),e(Ux,aN),e(jt,sN),e(jt,Mx),e(Mx,nN),e(jt,rN),$(al,jt,null),e(q,oN),e(q,wt),$(Ep,wt,null),e(wt,lN),e(wt,ee),e(ee,iN),e(ee,Tu),e(Tu,dN),e(ee,cN),e(ee,Rx),e(Rx,pN),e(ee,mN),e(ee,Bx),e(Bx,hN),e(ee,fN),e(ee,Hx),e(Hx,gN),e(ee,uN),e(ee,Gx),e(Gx,_N),e(ee,bN),e(ee,Wx),e(Wx,$N),e(ee,xN),e(ee,Kx),e(Kx,vN),e(ee,yN),e(wt,jN),e(wt,qp),e(qp,wN),e(qp,Yx),e(Yx,DN),e(qp,kN),e(wt,EN),$(sl,wt,null),e(q,qN),e(q,ge),$(Ip,ge,null),e(ge,IN),e(ge,Mn),e(Mn,TN),e(Mn,Jx),e(Jx,NN),e(Mn,PN),e(Mn,Qx),e(Qx,AN),e(Mn,LN),e(ge,FN),e(ge,Rn),e(Rn,CN),e(Rn,Zx),e(Zx,ON),e(Rn,zN),e(Rn,Xx),e(Xx,SN),e(Rn,VN),e(ge,UN),e(ge,ue),e(ue,ev),e(ev,MN),e(ue,RN),e(ue,tv),e(tv,BN),e(ue,HN),e(ue,av),e(av,GN),e(ue,WN),e(ue,sv),e(sv,KN),e(ue,YN),e(ue,nv),e(nv,JN),e(ue,QN),e(ue,rv),e(rv,ZN),e(ue,XN),e(ge,eP),e(ge,Tp),e(Tp,tP),e(Tp,ov),e(ov,aP),e(Tp,sP),e(ge,nP),$(nl,ge,null),e(q,rP),e(q,Za),$(Np,Za,null),e(Za,oP),e(Za,te),e(te,lP),e(te,lv),e(lv,iP),e(te,dP),e(te,iv),e(iv,cP),e(te,pP),e(te,dv),e(dv,mP),e(te,hP),e(te,cv),e(cv,fP),e(te,gP),e(te,pv),e(pv,uP),e(te,_P),e(te,mv),e(mv,bP),e(te,$P),e(te,hv),e(hv,xP),e(te,vP),e(Za,yP),$(rl,Za,null),e(q,jP),e(q,Dt),$(Pp,Dt,null),e(Dt,wP),e(Dt,fv),e(fv,DP),e(Dt,kP),e(Dt,Ye),e(Ye,EP),e(Ye,Nu),e(Nu,qP),e(Ye,IP),e(Ye,Pu),e(Pu,TP),e(Ye,NP),e(Ye,gv),e(gv,PP),e(Ye,AP),e(Ye,uv),e(uv,LP),e(Ye,FP),e(Dt,CP),$(ol,Dt,null),e(q,OP),e(q,Ae),$(Ap,Ae,null),e(Ae,zP),e(Ae,Bn),e(Bn,SP),e(Bn,_v),e(_v,VP),e(Bn,UP),e(Bn,bv),e(bv,MP),e(Bn,RP),e(Ae,BP),e(Ae,Hn),e(Hn,HP),e(Hn,Au),e(Au,GP),e(Hn,WP),e(Hn,Lu),e(Lu,KP),e(Hn,YP),e(Ae,JP),e(Ae,$v),e($v,QP),e(Ae,ZP),$(ll,Ae,null),e(q,XP),e(q,Xa),$(Lp,Xa,null),e(Xa,eA),e(Xa,Yt),e(Yt,tA),e(Yt,xv),e(xv,aA),e(Yt,sA),e(Yt,vv),e(vv,nA),e(Yt,rA),e(Yt,yv),e(yv,oA),e(Yt,lA),e(Xa,iA),$(il,Xa,null),e(q,dA),e(q,dl),$(Fp,dl,null),e(dl,cA),e(dl,jv),e(jv,pA),e(q,mA),e(q,es),$(Cp,es,null),e(es,hA),e(es,wv),e(wv,fA),e(es,gA),$(cl,es,null),e(q,uA),e(q,ts),$(Op,ts,null),e(ts,_A),e(ts,zp),e(zp,bA),e(zp,Dv),e(Dv,$A),e(zp,xA),e(ts,vA),$(pl,ts,null),e(q,yA),e(q,as),$(Sp,as,null),e(as,jA),e(as,kv),e(kv,wA),e(as,DA),$(ml,as,null),e(q,kA),e(q,ss),$(Vp,ss,null),e(ss,EA),e(ss,Ev),e(Ev,qA),e(ss,IA),$(hl,ss,null),e(q,TA),e(q,ns),$(Up,ns,null),e(ns,NA),e(ns,qv),e(qv,PA),e(ns,AA),$(fl,ns,null),e(q,LA),e(q,rs),$(Mp,rs,null),e(rs,FA),e(rs,Iv),e(Iv,CA),e(rs,OA),$(gl,rs,null),e(q,zA),e(q,kt),$(Rp,kt,null),e(kt,SA),e(kt,Gn),e(Gn,VA),e(Gn,Tv),e(Tv,UA),e(Gn,MA),e(Gn,Nv),e(Nv,RA),e(Gn,BA),e(kt,HA),e(kt,Pv),e(Pv,Fu),e(Fu,GA),e(Fu,Bp),e(Bp,WA),e(kt,KA),$(ul,kt,null),e(q,YA),e(q,os),$(Hp,os,null),e(os,JA),e(os,Jt),e(Jt,QA),e(Jt,Av),e(Av,ZA),e(Jt,XA),e(Jt,Lv),e(Lv,eL),e(Jt,tL),e(Jt,Fv),e(Fv,aL),e(Jt,sL),e(os,nL),e(os,Cv),e(Cv,Cu),e(Cu,rL),e(Cu,Gp),e(Gp,oL),e(q,lL),e(q,_l),$(Wp,_l,null),e(_l,iL),e(_l,Ov),e(Ov,dL),e(q,cL),e(q,ls),$(Kp,ls,null),e(ls,pL),e(ls,zv),e(zv,mL),e(ls,hL),e(ls,Yp),e(Yp,fL),e(Yp,Sv),e(Sv,gL),e(Yp,uL),e(q,_L),e(q,is),$(Jp,is,null),e(is,bL),e(is,Vv),e(Vv,$L),e(is,xL),$(bl,is,null),e(q,vL),e(q,$l),$(Qp,$l,null),e($l,yL),e($l,Uv),e(Uv,jL),e(q,wL),e(q,xl),$(Zp,xl,null),e(xl,DL),e(xl,Xp),e(Xp,kL),e(Xp,Mv),e(Mv,EL),e(Xp,qL),e(q,IL),e(q,vl),$(em,vl,null),e(vl,TL),e(vl,tm),e(tm,NL),e(tm,Rv),e(Rv,PL),e(tm,AL),e(q,LL),e(q,yl),$(am,yl,null),e(yl,FL),e(yl,Bv),e(Bv,CL),e(q,OL),e(q,jl),$(sm,jl,null),e(jl,zL),e(jl,Hv),e(Hv,SL),e(q,VL),e(q,wl),$(nm,wl,null),e(wl,UL),e(wl,Gv),e(Gv,ML),e(q,RL),e(q,Dl),$(rm,Dl,null),e(Dl,BL),e(Dl,Wv),e(Wv,HL),e(q,GL),e(q,kl),$(om,kl,null),e(kl,WL),e(kl,Kv),e(Kv,KL),e(q,YL),e(q,El),$(lm,El,null),e(El,JL),e(El,Ou),e(Ou,zu),e(zu,QL),e(Ou,ZL),e(q,XL),e(q,ql),$(im,ql,null),e(ql,eF),e(ql,Su),e(Su,Vu),e(Vu,tF),e(Su,aF),e(q,sF),e(q,Uu),$(dm,Uu,null),e(q,nF),e(q,Mu),$(cm,Mu,null),e(q,rF),e(q,Ru),$(pm,Ru,null),e(q,oF),e(q,Bu),$(mm,Bu,null),e(q,lF),e(q,Hu),$(hm,Hu,null),e(q,iF),e(q,Gu),$(fm,Gu,null),e(q,dF),e(q,Wu),$(gm,Wu,null),e(q,cF),e(q,Ku),$(um,Ku,null),e(q,pF),e(q,Yu),$(_m,Yu,null),e(q,mF),e(q,Ju),$(bm,Ju,null),e(q,hF),e(q,Qu),$($m,Qu,null),e(q,fF),e(q,Zu),$(xm,Zu,null),e(q,gF),e(q,Xu),$(vm,Xu,null),e(q,uF),e(q,ds),$(ym,ds,null),e(ds,_F),e(ds,Yv),e(Yv,bF),e(ds,$F),$(Il,ds,null),e(q,xF),e(q,cs),$(jm,cs,null),e(cs,vF),e(cs,Jv),e(Jv,yF),e(cs,jF),$(Tl,cs,null),e(q,wF),e(q,ps),$(wm,ps,null),e(ps,DF),e(ps,Qv),e(Qv,kF),e(ps,EF),$(Nl,ps,null),e(q,qF),e(q,ms),$(Dm,ms,null),e(ms,IF),e(ms,Zv),e(Zv,TF),e(ms,NF),$(Pl,ms,null),e(q,PF),e(q,Et),$(km,Et,null),e(Et,AF),e(Et,Xv),e(Xv,LF),e(Et,FF),$(Al,Et,null),e(Et,CF),$(Ll,Et,null),e(q,OF),e(q,hs),$(Em,hs,null),e(hs,zF),e(hs,Wn),e(Wn,SF),e(Wn,e_),e(e_,VF),e(Wn,UF),e(Wn,t_),e(t_,e0),e(e0,MF),e(Wn,RF),e(hs,BF),e(hs,Kn),e(Kn,HF),e(Kn,t0),e(t0,GF),e(Kn,WF),e(Kn,a0),e(a0,KF),e(Kn,YF),e(q,JF),e(q,fs),$(qm,fs,null),e(fs,QF),e(fs,Im),e(Im,ZF),e(Im,s0),e(s0,XF),e(Im,eC),e(fs,tC),$(Fl,fs,null),D(i,oE,j),D(i,Qt,j),$(Tm,Qt,null),e(Qt,aC),e(Qt,Yn),e(Yn,sC),e(Yn,a_),e(a_,nC),e(Yn,rC),e(Yn,s_),e(s_,oC),e(Yn,lC),e(Qt,iC),$(Cl,Qt,null),D(i,lE,j),D(i,ae,j),$(Nm,ae,null),e(ae,dC),e(ae,n0),e(n0,cC),e(ae,pC),e(ae,Jn),e(Jn,mC),e(Jn,n_),e(n_,hC),e(Jn,fC),e(Jn,r_),e(r_,gC),e(Jn,uC),e(ae,_C),e(ae,Pm),e(Pm,Qn),e(Qn,bC),e(Qn,r0),e(r0,$C),e(Qn,xC),e(Qn,o0),e(o0,vC),e(Qn,yC),e(Pm,jC),e(Pm,Zn),e(Zn,wC),e(Zn,l0),e(l0,DC),e(Zn,kC),e(Zn,i0),e(i0,EC),e(Zn,qC),e(ae,IC),e(ae,Xn),e(Xn,TC),e(Xn,d0),e(d0,NC),e(Xn,PC),e(Xn,c0),e(c0,AC),e(Xn,LC),e(ae,FC),e(ae,p0),e(p0,CC),e(ae,OC),$(Ol,ae,null),D(i,iE,j),D(i,ye,j),$(Am,ye,null),e(ye,zC),e(ye,m0),e(m0,SC),e(ye,VC),e(ye,h0),e(h0,UC),e(ye,MC),e(ye,f0),e(f0,RC),e(ye,BC),e(ye,Je),e(Je,g0),e(g0,HC),e(Je,GC),e(Je,u0),e(u0,WC),e(Je,KC),e(Je,_0),e(_0,YC),e(Je,JC),e(Je,Lm),e(Lm,QC),e(Lm,o_),e(o_,ZC),e(Lm,XC),e(Je,eO),e(Je,Zt),e(Zt,tO),e(Zt,l_),e(l_,aO),e(Zt,sO),e(Zt,b0),e(b0,nO),e(Zt,rO),e(Zt,i_),e(i_,oO),e(Zt,lO),D(i,dE,j),D(i,je,j),$(Fm,je,null),e(je,iO),e(je,$0),e($0,dO),e(je,cO),e(je,x0),e(x0,pO),e(je,mO),e(je,v0),e(v0,hO),e(je,fO),e(je,Qe),e(Qe,y0),e(y0,gO),e(Qe,uO),e(Qe,j0),e(j0,_O),e(Qe,bO),e(Qe,w0),e(w0,$O),e(Qe,xO),e(Qe,Cm),e(Cm,vO),e(Cm,d_),e(d_,yO),e(Cm,jO),e(Qe,wO),e(Qe,Xt),e(Xt,DO),e(Xt,c_),e(c_,kO),e(Xt,EO),e(Xt,D0),e(D0,qO),e(Xt,IO),e(Xt,p_),e(p_,TO),e(Xt,NO),D(i,cE,j),D(i,we,j),$(Om,we,null),e(we,PO),e(we,k0),e(k0,AO),e(we,LO),e(we,E0),e(E0,FO),e(we,CO),e(we,q0),e(q0,OO),e(we,zO),e(we,Ze),e(Ze,I0),e(I0,SO),e(Ze,VO),e(Ze,T0),e(T0,UO),e(Ze,MO),e(Ze,N0),e(N0,RO),e(Ze,BO),e(Ze,zm),e(zm,HO),e(zm,m_),e(m_,GO),e(zm,WO),e(Ze,KO),e(Ze,ea),e(ea,YO),e(ea,h_),e(h_,JO),e(ea,QO),e(ea,P0),e(P0,ZO),e(ea,XO),e(ea,f_),e(f_,ez),e(ea,tz),D(i,pE,j),D(i,er,j),e(er,zl),e(zl,A0),$(Sm,A0,null),e(er,az),e(er,L0),e(L0,sz),D(i,mE,j),D(i,Sl,j),e(Sl,nz),e(Sl,F0),e(F0,rz),e(Sl,oz),D(i,hE,j),D(i,A,j),$(Vm,A,null),e(A,lz),e(A,C0),e(C0,iz),e(A,dz),e(A,gs),$(Um,gs,null),e(gs,cz),e(gs,O0),e(O0,pz),e(gs,mz),$(Vl,gs,null),e(A,hz),e(A,us),$(Mm,us,null),e(us,fz),e(us,z0),e(z0,gz),e(us,uz),$(Ul,us,null),e(A,_z),e(A,_s),$(Rm,_s,null),e(_s,bz),e(_s,S0),e(S0,$z),e(_s,xz),$(Ml,_s,null),e(A,vz),e(A,bs),$(Bm,bs,null),e(bs,yz),e(bs,Hm),e(Hm,jz),e(Hm,Rl),e(Rl,wz),e(Rl,V0),e(V0,Dz),e(Rl,kz),e(Hm,Ez),e(bs,qz),$(Bl,bs,null),e(A,Iz),e(A,$s),$(Gm,$s,null),e($s,Tz),e($s,U0),e(U0,Nz),e($s,Pz),$(Hl,$s,null),e(A,Az),e(A,xs),$(Wm,xs,null),e(xs,Lz),e(xs,M0),e(M0,Fz),e(xs,Cz),$(Gl,xs,null),e(A,Oz),e(A,qt),$(Km,qt,null),e(qt,zz),e(qt,R0),e(R0,Sz),e(qt,Vz),e(qt,B0),e(B0,Uz),e(qt,Mz),$(Wl,qt,null),e(A,Rz),e(A,vs),$(Ym,vs,null),e(vs,Bz),e(vs,H0),e(H0,Hz),e(vs,Gz),$(Kl,vs,null),e(A,Wz),e(A,ys),$(Jm,ys,null),e(ys,Kz),e(ys,G0),e(G0,Yz),e(ys,Jz),$(Yl,ys,null),e(A,Qz),e(A,js),$(Qm,js,null),e(js,Zz),e(js,W0),e(W0,Xz),e(js,eS),$(Jl,js,null),e(A,tS),e(A,It),$(Zm,It,null),e(It,aS),e(It,K0),e(K0,sS),e(It,nS),e(It,Y0),e(Y0,rS),e(It,oS),$(Ql,It,null),e(A,lS),e(A,Le),$(Xm,Le,null),e(Le,iS),e(Le,J0),e(J0,dS),e(Le,cS),e(Le,Q0),e(Q0,pS),e(Le,mS),e(Le,Z0),e(Z0,hS),e(Le,fS),$(Zl,Le,null),e(A,gS),e(A,Fe),$(eh,Fe,null),e(Fe,uS),e(Fe,th),e(th,_S),e(th,X0),e(X0,bS),e(th,$S),e(Fe,xS),e(Fe,Xe),e(Xe,vS),e(Xe,ey),e(ey,yS),e(Xe,jS),e(Xe,ty),e(ty,wS),e(Xe,DS),e(Xe,ay),e(ay,kS),e(Xe,ES),e(Xe,sy),e(sy,qS),e(Xe,IS),e(Fe,TS),e(Fe,ny),e(ny,ry),e(ry,NS),e(Fe,PS),$(Xl,Fe,null),e(A,AS),e(A,Tt),$(ah,Tt,null),e(Tt,LS),e(Tt,sh),e(sh,FS),e(sh,oy),e(oy,CS),e(sh,OS),e(Tt,zS),e(Tt,g_),e(g_,SS),e(g_,ly),e(ly,VS),e(Tt,US),$(ei,Tt,null),e(A,MS),e(A,ti),$(nh,ti,null),e(ti,RS),e(ti,tr),e(tr,BS),e(tr,iy),e(iy,HS),e(tr,GS),e(tr,dy),e(dy,WS),e(tr,KS),e(A,YS),e(A,Ce),$(rh,Ce,null),e(Ce,JS),e(Ce,ta),e(ta,QS),e(ta,cy),e(cy,ZS),e(ta,XS),e(ta,py),e(py,eV),e(ta,tV),e(ta,my),e(my,aV),e(ta,sV),e(Ce,nV),e(Ce,oh),e(oh,rV),e(oh,u_),e(u_,oV),e(oh,lV),e(Ce,iV),e(Ce,et),e(et,dV),e(et,__),e(__,cV),e(et,pV),e(et,hy),e(hy,mV),e(et,hV),e(et,b_),e(b_,fV),e(et,gV),e(et,$_),e($_,uV),e(et,_V),e(Ce,bV),$(ai,Ce,null),e(A,$V),e(A,Oe),$(lh,Oe,null),e(Oe,xV),e(Oe,ar),e(ar,vV),e(ar,fy),e(fy,yV),e(ar,jV),e(ar,gy),e(gy,wV),e(ar,DV),e(Oe,kV),e(Oe,sr),e(sr,EV),e(sr,x_),e(x_,qV),e(sr,IV),e(sr,v_),e(v_,TV),e(sr,NV),e(Oe,PV),e(Oe,tt),e(tt,AV),e(tt,uy),e(uy,LV),e(tt,FV),e(tt,_y),e(_y,CV),e(tt,OV),e(tt,y_),e(y_,zV),e(tt,SV),e(tt,j_),e(j_,VV),e(tt,UV),e(Oe,MV),$(si,Oe,null),e(A,RV),e(A,ws),$(ih,ws,null),e(ws,BV),e(ws,by),e(by,HV),e(ws,GV),$(ni,ws,null),e(A,WV),e(A,Nt),$(dh,Nt,null),e(Nt,KV),e(Nt,$y),e($y,YV),e(Nt,JV),e(Nt,aa),e(aa,QV),e(aa,w_),e(w_,ZV),e(aa,XV),e(aa,xy),e(xy,eU),e(aa,tU),e(aa,vy),e(vy,aU),e(aa,sU),e(Nt,nU),$(ri,Nt,null),e(A,rU),e(A,Ds),$(ch,Ds,null),e(Ds,oU),e(Ds,yy),e(yy,lU),e(Ds,iU),$(oi,Ds,null),e(A,dU),e(A,ze),$(ph,ze,null),e(ze,cU),e(ze,jy),e(jy,pU),e(ze,mU),e(ze,wy),e(wy,hU),e(ze,fU),e(ze,nr),e(nr,gU),e(nr,D_),e(D_,uU),e(nr,_U),e(nr,Dy),e(Dy,bU),e(nr,$U),e(ze,xU),$(li,ze,null),e(A,vU),e(A,Se),$(mh,Se,null),e(Se,yU),e(Se,ky),e(ky,jU),e(Se,wU),e(Se,rr),e(rr,DU),e(rr,k_),e(k_,kU),e(rr,EU),e(rr,Ey),e(Ey,qU),e(rr,IU),e(Se,TU),e(Se,hh),e(hh,qy),e(qy,NU),e(hh,PU),e(hh,Iy),e(Iy,AU),e(Se,LU),$(ii,Se,null),e(A,FU),e(A,ks),$(fh,ks,null),e(ks,CU),e(ks,Ty),e(Ty,OU),e(ks,zU),$(di,ks,null),e(A,SU),e(A,Es),$(gh,Es,null),e(Es,VU),e(Es,uh),e(uh,UU),e(uh,Ny),e(Ny,MU),e(uh,RU),e(Es,BU),$(ci,Es,null),e(A,HU),e(A,Ve),$(_h,Ve,null),e(Ve,GU),e(Ve,or),e(or,WU),e(or,E_),e(E_,KU),e(or,YU),e(or,q_),e(q_,JU),e(or,QU),e(Ve,ZU),e(Ve,Py),e(Py,XU),e(Ve,eM),e(Ve,sa),e(sa,tM),e(sa,I_),e(I_,aM),e(sa,sM),e(sa,T_),e(T_,nM),e(sa,rM),e(sa,Ay),e(Ay,oM),e(sa,lM),e(Ve,iM),$(pi,Ve,null),e(A,dM),e(A,Ue),$(bh,Ue,null),e(Ue,cM),e(Ue,lr),e(lr,pM),e(lr,N_),e(N_,mM),e(lr,hM),e(lr,Ly),e(Ly,fM),e(lr,gM),e(Ue,uM),e(Ue,ir),e(ir,_M),e(ir,P_),e(P_,bM),e(ir,$M),e(ir,A_),e(A_,xM),e(ir,vM),e(Ue,yM),e(Ue,Fy),e(Fy,jM),e(Ue,wM),$(mi,Ue,null),e(A,DM),e(A,qs),$($h,qs,null),e(qs,kM),e(qs,na),e(na,EM),e(na,Cy),e(Cy,qM),e(na,IM),e(na,L_),e(L_,TM),e(na,NM),e(na,Oy),e(Oy,PM),e(na,AM),e(qs,LM),$(hi,qs,null),e(A,FM),e(A,Is),$(xh,Is,null),e(Is,CM),e(Is,vh),e(vh,OM),e(vh,F_),e(F_,zM),e(vh,SM),e(Is,VM),$(fi,Is,null),e(A,UM),e(A,Ts),$(yh,Ts,null),e(Ts,MM),e(Ts,jh),e(jh,RM),e(jh,C_),e(C_,BM),e(jh,HM),e(Ts,GM),$(gi,Ts,null),e(A,WM),e(A,Ns),$(wh,Ns,null),e(Ns,KM),e(Ns,Dh),e(Dh,YM),e(Dh,O_),e(O_,JM),e(Dh,QM),e(Ns,ZM),$(ui,Ns,null),e(A,XM),e(A,Ps),$(kh,Ps,null),e(Ps,eR),e(Ps,Eh),e(Eh,tR),e(Eh,z_),e(z_,aR),e(Eh,sR),e(Ps,nR),$(_i,Ps,null),e(A,rR),e(A,As),$(qh,As,null),e(As,oR),e(As,dr),e(dr,lR),e(dr,S_),e(S_,iR),e(dr,dR),e(dr,V_),e(V_,zy),e(zy,cR),e(dr,pR),e(As,mR),e(As,cr),e(cr,hR),e(cr,Sy),e(Sy,fR),e(cr,gR),e(cr,Vy),e(Vy,uR),e(cr,_R),D(i,fE,j),D(i,U_,j),D(i,gE,j),D(i,pr,j),e(pr,bi),e(bi,Uy),$(Ih,Uy,null),e(pr,bR),e(pr,My),e(My,$R),D(i,uE,j),D(i,$i,j),e($i,xR),e($i,M_),e(M_,vR),e($i,yR),D(i,_E,j),D(i,F,j),$(Th,F,null),e(F,jR),e(F,Ry),e(Ry,wR),e(F,DR),e(F,Pt),$(Nh,Pt,null),e(Pt,kR),e(Pt,By),e(By,ER),e(Pt,qR),$(xi,Pt,null),e(Pt,IR),$(vi,Pt,null),e(F,TR),e(F,Ls),$(Ph,Ls,null),e(Ls,NR),e(Ls,Hy),e(Hy,PR),e(Ls,AR),$(yi,Ls,null),e(F,LR),e(F,Fs),$(Ah,Fs,null),e(Fs,FR),e(Fs,Gy),e(Gy,CR),e(Fs,OR),$(ji,Fs,null),e(F,zR),e(F,Cs),$(Lh,Cs,null),e(Cs,SR),e(Cs,Wy),e(Wy,VR),e(Cs,UR),$(wi,Cs,null),e(F,MR),e(F,R_),$(Fh,R_,null),e(F,RR),e(F,Di),$(Ch,Di,null),e(Di,BR),e(Di,Oh),e(Oh,HR),e(Oh,Ky),e(Ky,GR),e(Oh,WR),e(F,KR),e(F,Me),$(zh,Me,null),e(Me,YR),e(Me,Yy),e(Yy,JR),e(Me,QR),e(Me,Sh),e(Sh,ZR),e(Sh,Jy),e(Jy,XR),e(Sh,eB),e(Me,tB),e(Me,mr),e(mr,hr),e(hr,aB),e(hr,Qy),e(Qy,sB),e(hr,nB),e(hr,Zy),e(Zy,rB),e(hr,oB),e(mr,lB),e(mr,fr),e(fr,iB),e(fr,Xy),e(Xy,dB),e(fr,cB),e(fr,ej),e(ej,pB),e(fr,mB),e(mr,hB),e(mr,Y),e(Y,fB),e(Y,tj),e(tj,gB),e(Y,uB),e(Y,aj),e(aj,_B),e(Y,bB),e(Y,sj),e(sj,$B),e(Y,xB),e(Y,nj),e(nj,vB),e(Y,yB),e(Y,rj),e(rj,jB),e(Y,wB),e(Y,oj),e(oj,DB),e(Y,kB),e(Y,lj),e(lj,EB),e(Y,qB),e(Y,ij),e(ij,IB),e(Y,TB),e(Me,NB),$(ki,Me,null),e(F,PB),e(F,Os),$(Vh,Os,null),e(Os,AB),e(Os,dj),e(dj,LB),e(Os,FB),$(Ei,Os,null),e(F,CB),e(F,zs),$(Uh,zs,null),e(zs,OB),e(zs,cj),e(cj,zB),e(zs,SB),$(qi,zs,null),e(F,VB),e(F,_e),$(Mh,_e,null),e(_e,UB),e(_e,pj),e(pj,MB),e(_e,RB),e(_e,Rh),e(Rh,BB),e(Rh,mj),e(mj,HB),e(Rh,GB),e(_e,WB),e(_e,gr),e(gr,KB),e(gr,hj),e(hj,YB),e(gr,JB),e(gr,fj),e(fj,QB),e(gr,ZB),e(_e,XB),e(_e,ur),e(ur,eH),e(ur,B_),e(B_,tH),e(ur,aH),e(ur,H_),e(H_,sH),e(ur,nH),e(_e,rH),$(Ii,_e,null),e(F,oH),e(F,Ss),$(Bh,Ss,null),e(Ss,lH),e(Ss,_r),e(_r,iH),e(_r,G_),e(G_,dH),e(_r,cH),e(_r,gj),e(gj,pH),e(_r,mH),e(Ss,hH),$(Ti,Ss,null),e(F,fH),e(F,Vs),$(Hh,Vs,null),e(Vs,gH),e(Vs,br),e(br,uH),e(br,W_),e(W_,_H),e(br,bH),e(br,uj),e(uj,$H),e(br,xH),e(Vs,vH),$(Ni,Vs,null),e(F,yH),e(F,Pi),$(Gh,Pi,null),e(Pi,jH),e(Pi,K_),e(K_,Y_),e(Y_,wH),e(K_,DH),e(F,kH),e(F,Ai),$(Wh,Ai,null),e(Ai,EH),e(Ai,J_),e(J_,Q_),e(Q_,qH),e(J_,IH),e(F,TH),e(F,Z_),$(Kh,Z_,null),e(F,NH),e(F,X_),$(Yh,X_,null),e(F,PH),e(F,eb),$(Jh,eb,null),e(F,AH),e(F,tb),$(Qh,tb,null),e(F,LH),e(F,ab),$(Zh,ab,null),e(F,FH),e(F,sb),$(Xh,sb,null),e(F,CH),e(F,nb),$(ef,nb,null),e(F,OH),e(F,rb),$(tf,rb,null),e(F,zH),e(F,ob),$(af,ob,null),e(F,SH),e(F,lb),$(sf,lb,null),e(F,VH),e(F,ib),$(nf,ib,null),e(F,UH),e(F,db),$(rf,db,null),e(F,MH),e(F,cb),$(of,cb,null),D(i,bE,j),D(i,$r,j),e($r,Li),e(Li,_j),$(lf,_j,null),e($r,RH),e($r,bj),e(bj,BH),D(i,$E,j),D(i,Fi,j),e(Fi,HH),e(Fi,$j),e($j,GH),e(Fi,WH),D(i,xE,j),D(i,B,j),$(df,B,null),e(B,KH),e(B,Re),$(cf,Re,null),e(Re,YH),e(Re,xj),e(xj,JH),e(Re,QH),e(Re,pf),e(pf,ZH),e(pf,vj),e(vj,XH),e(pf,eG),e(Re,tG),e(Re,xr),e(xr,vr),e(vr,aG),e(vr,yj),e(yj,sG),e(vr,nG),e(vr,jj),e(jj,rG),e(vr,oG),e(xr,lG),e(xr,ra),e(ra,iG),e(ra,wj),e(wj,dG),e(ra,cG),e(ra,Dj),e(Dj,pG),e(ra,mG),e(ra,kj),e(kj,hG),e(ra,fG),e(xr,gG),e(xr,J),e(J,uG),e(J,Ej),e(Ej,_G),e(J,bG),e(J,qj),e(qj,$G),e(J,xG),e(J,Ij),e(Ij,vG),e(J,yG),e(J,Tj),e(Tj,jG),e(J,wG),e(J,Nj),e(Nj,DG),e(J,kG),e(J,Pj),e(Pj,EG),e(J,qG),e(J,Aj),e(Aj,IG),e(J,TG),e(J,Lj),e(Lj,NG),e(J,PG),e(Re,AG),$(Ci,Re,null),e(B,LG),e(B,Us),$(mf,Us,null),e(Us,FG),e(Us,Fj),e(Fj,CG),e(Us,OG),$(Oi,Us,null),e(B,zG),e(B,be),$(hf,be,null),e(be,SG),e(be,Cj),e(Cj,VG),e(be,UG),e(be,Oj),e(Oj,MG),e(be,RG),e(be,yr),e(yr,BG),e(yr,zj),e(zj,HG),e(yr,GG),e(yr,Sj),e(Sj,WG),e(yr,KG),e(be,YG),e(be,oa),e(oa,JG),e(oa,Vj),e(Vj,QG),e(oa,ZG),e(oa,pb),e(pb,XG),e(oa,eW),e(oa,mb),e(mb,tW),e(oa,aW),e(be,sW),$(zi,be,null),e(B,nW),e(B,Ms),$(ff,Ms,null),e(Ms,rW),e(Ms,Uj),e(Uj,oW),e(Ms,lW),$(Si,Ms,null),e(B,iW),e(B,Rs),$(gf,Rs,null),e(Rs,dW),e(Rs,Mj),e(Mj,cW),e(Rs,pW),$(Vi,Rs,null),e(B,mW),e(B,Bs),$(uf,Bs,null),e(Bs,hW),e(Bs,Rj),e(Rj,fW),e(Bs,gW),$(Ui,Bs,null),e(B,uW),e(B,Hs),$(_f,Hs,null),e(Hs,_W),e(Hs,Bj),e(Bj,bW),e(Hs,$W),$(Mi,Hs,null),e(B,xW),e(B,Gs),$(bf,Gs,null),e(Gs,vW),e(Gs,Hj),e(Hj,yW),e(Gs,jW),$(Ri,Gs,null),e(B,wW),e(B,Ws),$($f,Ws,null),e(Ws,DW),e(Ws,Gj),e(Gj,kW),e(Ws,EW),$(Bi,Ws,null),D(i,vE,j),D(i,jr,j),e(jr,Hi),e(Hi,Wj),$(xf,Wj,null),e(jr,qW),e(jr,Kj),e(Kj,IW),D(i,yE,j),D(i,S,j),$(vf,S,null),e(S,TW),e(S,Yj),e(Yj,NW),e(S,PW),e(S,yf),e(yf,AW),e(yf,Jj),e(Jj,LW),e(yf,FW),e(S,CW),e(S,hb),e(hb,Qj),e(Qj,OW),e(hb,zW),e(S,SW),e(S,se),e(se,Zj),e(Zj,la),e(la,VW),e(la,fb),e(fb,UW),e(la,MW),e(la,Xj),e(Xj,RW),e(la,BW),e(la,ew),e(ew,HW),e(la,GW),e(se,WW),e(se,tw),e(tw,jf),e(jf,KW),e(jf,gb),e(gb,YW),e(jf,JW),e(se,QW),e(se,aw),e(aw,wf),e(wf,ZW),e(wf,sw),e(sw,XW),e(wf,eK),e(se,tK),e(se,Df),e(Df,at),e(at,aK),e(at,nw),e(nw,sK),e(at,nK),e(at,ub),e(ub,rK),e(at,oK),e(at,rw),e(rw,lK),e(at,iK),e(at,_b),e(_b,dK),e(at,cK),e(Df,pK),$(Gi,Df,null),e(se,mK),e(se,ow),e(ow,st),e(st,hK),e(st,bb),e(bb,fK),e(st,gK),e(st,$b),e($b,uK),e(st,_K),e(st,xb),e(xb,bK),e(st,$K),e(st,vb),e(vb,xK),e(st,vK),e(se,yK),e(se,lw),e(lw,kf),e(kf,jK),e(kf,yb),e(yb,wK),e(kf,DK),e(se,kK),e(se,iw),e(iw,ia),e(ia,EK),e(ia,jb),e(jb,qK),e(ia,IK),e(ia,dw),e(dw,TK),e(ia,NK),e(ia,cw),e(cw,PK),e(ia,AK),e(se,LK),e(se,pw),e(pw,Wi),e(Wi,wb),e(wb,FK),e(Wi,CK),e(Wi,Db),e(Db,OK),e(Wi,zK),e(S,SK),e(S,Ks),$(Ef,Ks,null),e(Ks,VK),e(Ks,qf),e(qf,UK),e(qf,kb),e(kb,MK),e(qf,RK),e(Ks,BK),$(Ki,Ks,null),e(S,HK),e(S,Yi),$(If,Yi,null),e(Yi,GK),e(Yi,mw),e(mw,WK),e(S,KK),e(S,Ji),$(Tf,Ji,null),e(Ji,YK),e(Ji,hw),e(hw,JK),e(S,QK),e(S,Qi),$(Nf,Qi,null),e(Qi,ZK),e(Qi,fw),e(fw,XK),e(S,eY),e(S,Zi),$(Pf,Zi,null),e(Zi,tY),e(Zi,gw),e(gw,aY),e(S,sY),e(S,Xi),$(Af,Xi,null),e(Xi,nY),e(Xi,uw),e(uw,rY),e(S,oY),e(S,At),$(Lf,At,null),e(At,lY),e(At,Ff),e(Ff,iY),e(Ff,_w),e(_w,dY),e(Ff,cY),e(At,pY),e(At,Cf),e(Cf,mY),e(Cf,bw),e(bw,hY),e(Cf,fY),e(At,gY),$(ed,At,null),e(S,uY),e(S,td),$(Of,td,null),e(td,_Y),e(td,zf),e(zf,bY),e(zf,Eb),e(Eb,$Y),e(zf,xY),e(S,vY),e(S,Be),$(Sf,Be,null),e(Be,yY),e(Be,Vf),e(Vf,jY),e(Vf,$w),e($w,wY),e(Vf,DY),e(Be,kY),e(Be,wr),e(wr,EY),e(wr,xw),e(xw,qY),e(wr,IY),e(wr,vw),e(vw,TY),e(wr,NY),e(Be,PY),e(Be,da),e(da,AY),e(da,yw),e(yw,LY),e(da,FY),e(da,jw),e(jw,CY),e(da,OY),e(da,ww),e(ww,zY),e(da,SY),e(Be,VY),$(ad,Be,null),e(S,UY),e(S,Lt),$(Uf,Lt,null),e(Lt,MY),e(Lt,Mf),e(Mf,RY),e(Mf,Dw),e(Dw,BY),e(Mf,HY),e(Lt,GY),e(Lt,kw),e(kw,WY),e(Lt,KY),$(sd,Lt,null),D(i,jE,j),D(i,ca,j),$(Rf,ca,null),e(ca,YY),e(ca,Ew),e(Ew,JY),e(ca,QY),$(nd,ca,null),D(i,wE,j),D(i,W,j),$(Bf,W,null),e(W,ZY),e(W,qw),e(qw,XY),e(W,eJ),e(W,Hf),e(Hf,tJ),e(Hf,Iw),e(Iw,aJ),e(Hf,sJ),e(W,nJ),e(W,Dr),e(Dr,qb),e(qb,Tw),e(Tw,rJ),e(qb,oJ),e(Dr,lJ),e(Dr,Ib),e(Ib,Nw),e(Nw,iJ),e(Ib,dJ),e(Dr,cJ),e(Dr,Tb),e(Tb,Pw),e(Pw,pJ),e(Tb,mJ),e(W,hJ),e(W,Aw),e(Aw,fJ),e(W,gJ),$(rd,W,null),e(W,uJ),e(W,Ys),$(Gf,Ys,null),e(Ys,_J),e(Ys,kr),e(kr,bJ),e(kr,Lw),e(Lw,$J),e(kr,xJ),e(kr,Fw),e(Fw,vJ),e(kr,yJ),e(Ys,jJ),e(Ys,Wf),e(Wf,Cw),e(Cw,Ow),e(Ow,wJ),e(Wf,DJ),e(Wf,zw),e(zw,Sw),e(Sw,kJ),e(W,EJ),e(W,Ft),$(Kf,Ft,null),e(Ft,qJ),e(Ft,Er),e(Er,IJ),e(Er,Vw),e(Vw,TJ),e(Er,NJ),e(Er,Uw),e(Uw,PJ),e(Er,AJ),e(Ft,LJ),e(Ft,Yf),e(Yf,FJ),e(Yf,Mw),e(Mw,CJ),e(Yf,OJ),e(Ft,zJ),$(od,Ft,null),e(W,SJ),e(W,Js),$(Jf,Js,null),e(Js,VJ),e(Js,qr),e(qr,UJ),e(qr,Rw),e(Rw,MJ),e(qr,RJ),e(qr,Bw),e(Bw,BJ),e(qr,HJ),e(Js,GJ),$(ld,Js,null),D(i,DE,j),D(i,nt,j),$(Qf,nt,null),e(nt,WJ),e(nt,Zf),e(Zf,KJ),e(Zf,Hw),e(Hw,YJ),e(Zf,JJ),e(nt,QJ),e(nt,O),e(O,Gw),e(Gw,Ww),e(Ww,ZJ),e(O,XJ),e(O,Kw),e(Kw,Yw),e(Yw,eQ),e(O,tQ),e(O,Jw),e(Jw,Qw),e(Qw,aQ),e(O,sQ),e(O,Zw),e(Zw,Xw),e(Xw,nQ),e(O,rQ),e(O,e7),e(e7,t7),e(t7,oQ),e(O,lQ),e(O,a7),e(a7,s7),e(s7,iQ),e(O,dQ),e(O,n7),e(n7,r7),e(r7,cQ),e(O,pQ),e(O,o7),e(o7,l7),e(l7,mQ),e(O,hQ),e(O,i7),e(i7,d7),e(d7,fQ),e(O,gQ),e(O,c7),e(c7,p7),e(p7,uQ),e(O,_Q),e(O,m7),e(m7,h7),e(h7,bQ),e(O,$Q),e(O,Nb),e(Nb,f7),e(f7,xQ),e(Nb,vQ),e(O,yQ),e(O,Pb),e(Pb,g7),e(g7,jQ),e(Pb,wQ),e(O,DQ),e(O,u7),e(u7,_7),e(_7,kQ),e(O,EQ),e(O,b7),e(b7,$7),e($7,qQ),e(O,IQ),e(O,x7),e(x7,v7),e(v7,TQ),e(O,NQ),e(O,y7),e(y7,j7),e(j7,PQ),e(O,AQ),e(O,w7),e(w7,D7),e(D7,LQ),e(O,FQ),e(O,k7),e(k7,E7),e(E7,CQ),e(O,OQ),e(O,q7),e(q7,I7),e(I7,zQ),e(O,SQ),e(O,T7),e(T7,N7),e(N7,VQ),e(O,UQ),e(O,P7),e(P7,A7),e(A7,MQ),e(O,RQ),e(O,L7),e(L7,F7),e(F7,BQ),e(O,HQ),e(O,C7),e(C7,O7),e(O7,GQ),e(O,WQ),e(O,z7),e(z7,S7),e(S7,KQ),e(O,YQ),e(O,V7),e(V7,U7),e(U7,JQ),e(nt,QQ),$(id,nt,null),D(i,kE,j),D(i,rt,j),$(Xf,rt,null),e(rt,ZQ),e(rt,Ab),e(Ab,M7),e(M7,XQ),e(Ab,eZ),e(rt,tZ),$(dd,rt,null),e(rt,aZ),e(rt,cd),$(eg,cd,null),e(cd,sZ),e(cd,R7),e(R7,nZ),D(i,EE,j),D(i,ot,j),$(tg,ot,null),e(ot,rZ),e(ot,Lb),e(Lb,B7),e(B7,oZ),e(Lb,lZ),e(ot,iZ),$(pd,ot,null),e(ot,dZ),e(ot,md),$(ag,md,null),e(md,cZ),e(md,H7),e(H7,pZ),D(i,qE,j),D(i,pa,j),$(sg,pa,null),e(pa,mZ),e(pa,G7),e(G7,hZ),e(pa,fZ),$(hd,pa,null),D(i,IE,j),D(i,ma,j),$(ng,ma,null),e(ma,gZ),e(ma,W7),e(W7,uZ),e(ma,_Z),$(fd,ma,null),D(i,TE,j),D(i,ha,j),$(rg,ha,null),e(ha,bZ),e(ha,K7),e(K7,$Z),e(ha,xZ),$(gd,ha,null),D(i,NE,j),D(i,fa,j),$(og,fa,null),e(fa,vZ),e(fa,Y7),e(Y7,yZ),e(fa,jZ),$(ud,fa,null),D(i,PE,j),D(i,H,j),$(lg,H,null),e(H,wZ),e(H,ig),e(ig,DZ),e(ig,J7),e(J7,kZ),e(ig,EZ),e(H,qZ),e(H,Q7),e(Q7,IZ),e(H,TZ),e(H,Ir),e(Ir,Z7),e(Z7,dg),e(dg,NZ),e(dg,X7),e(X7,PZ),e(dg,AZ),e(Ir,LZ),e(Ir,Tr),e(Tr,cg),e(cg,FZ),e(cg,eD),e(eD,CZ),e(cg,OZ),e(Tr,zZ),e(Tr,pg),e(pg,Fb),e(Fb,tD),e(tD,SZ),e(Fb,VZ),e(pg,UZ),e(pg,Cb),e(Cb,aD),e(aD,MZ),e(Cb,RZ),e(Tr,BZ),e(Tr,sD),e(sD,HZ),e(Ir,GZ),e(Ir,Nr),e(Nr,mg),e(mg,WZ),e(mg,nD),e(nD,KZ),e(mg,YZ),e(Nr,JZ),e(Nr,Pr),e(Pr,Ob),e(Ob,rD),e(rD,QZ),e(Ob,ZZ),e(Pr,XZ),e(Pr,zb),e(zb,oD),e(oD,eX),e(zb,tX),e(Pr,aX),e(Pr,Sb),e(Sb,lD),e(lD,sX),e(Sb,nX),e(Nr,rX),e(Nr,iD),e(iD,oX),e(H,lX),$(_d,H,null),e(H,iX),e(H,Qs),$(hg,Qs,null),e(Qs,dX),e(Qs,dD),e(dD,cX),e(Qs,pX),e(Qs,ga),e(ga,Vb),e(Vb,cD),e(cD,mX),e(Vb,hX),e(ga,fX),e(ga,pD),e(pD,mD),e(mD,gX),e(ga,uX),e(ga,hD),e(hD,fD),e(fD,_X),e(ga,bX),e(ga,Ub),e(Ub,gD),e(gD,$X),e(Ub,xX),e(H,vX),e(H,bd),$(fg,bd,null),e(bd,yX),e(bd,uD),e(uD,jX),e(H,wX),e(H,$d),$(gg,$d,null),e($d,DX),e($d,_D),e(_D,kX),e(H,EX),e(H,xd),$(ug,xd,null),e(xd,qX),e(xd,bD),e(bD,IX),e(H,TX),e(H,vd),$(_g,vd,null),e(vd,NX),e(vd,$D),e($D,PX),D(i,AE,j),D(i,G,j),$(bg,G,null),e(G,AX),e(G,$g),e($g,LX),e($g,xD),e(xD,FX),e($g,CX),e(G,OX),e(G,vD),e(vD,zX),e(G,SX),e(G,ua),e(ua,yD),e(yD,xg),e(xg,VX),e(xg,jD),e(jD,UX),e(xg,MX),e(ua,RX),e(ua,Ar),e(Ar,vg),e(vg,BX),e(vg,wD),e(wD,HX),e(vg,GX),e(Ar,WX),e(Ar,yg),e(yg,Mb),e(Mb,DD),e(DD,KX),e(Mb,YX),e(yg,JX),e(yg,Rb),e(Rb,kD),e(kD,QX),e(Rb,ZX),e(Ar,XX),e(Ar,ED),e(ED,eee),e(ua,tee),e(ua,qD),e(qD,jg),e(jg,aee),e(jg,ID),e(ID,see),e(jg,nee),e(ua,ree),e(ua,TD),e(TD,wg),e(wg,oee),e(wg,ND),e(ND,lee),e(wg,iee),e(G,dee),$(yd,G,null),e(G,cee),e(G,Zs),$(Dg,Zs,null),e(Zs,pee),e(Zs,PD),e(PD,mee),e(Zs,hee),e(Zs,lt),e(lt,Bb),e(Bb,AD),e(AD,fee),e(Bb,gee),e(lt,uee),e(lt,LD),e(LD,FD),e(FD,_ee),e(lt,bee),e(lt,CD),e(CD,OD),e(OD,$ee),e(lt,xee),e(lt,Hb),e(Hb,zD),e(zD,vee),e(Hb,yee),e(lt,jee),e(lt,Gb),e(Gb,SD),e(SD,wee),e(Gb,Dee),e(G,kee),e(G,jd),$(kg,jd,null),e(jd,Eee),e(jd,VD),e(VD,qee),e(G,Iee),e(G,wd),$(Eg,wd,null),e(wd,Tee),e(wd,UD),e(UD,Nee),e(G,Pee),e(G,Dd),$(qg,Dd,null),e(Dd,Aee),e(Dd,MD),e(MD,Lee),e(G,Fee),e(G,kd),$(Ig,kd,null),e(kd,Cee),e(kd,RD),e(RD,Oee),D(i,LE,j),D(i,Lr,j),e(Lr,Ed),e(Ed,BD),$(Tg,BD,null),e(Lr,zee),e(Lr,HD),e(HD,See),D(i,FE,j),D(i,me,j),$(Ng,me,null),e(me,Vee),e(me,GD),e(GD,Uee),e(me,Mee),e(me,Wb),e(Wb,WD),e(WD,Ree),e(Wb,Bee),e(me,Hee),e(me,KD),e(KD,Gee),e(me,Wee),e(me,Xs),$(Pg,Xs,null),e(Xs,Kee),e(Xs,Ag),e(Ag,Yee),e(Ag,YD),e(YD,Jee),e(Ag,Qee),e(Xs,Zee),$(qd,Xs,null),e(me,Xee),e(me,en),$(Lg,en,null),e(en,ete),e(en,_a),e(_a,tte),e(_a,JD),e(JD,ate),e(_a,ste),e(_a,QD),e(QD,nte),e(_a,rte),e(_a,ZD),e(ZD,ote),e(_a,lte),e(en,ite),$(Id,en,null),D(i,CE,j),D(i,Fr,j),e(Fr,Td),e(Td,XD),$(Fg,XD,null),e(Fr,dte),e(Fr,ek),e(ek,cte),D(i,OE,j),D(i,tn,j),e(tn,pte),e(tn,tk),e(tk,mte),e(tn,hte),e(tn,Kb),e(Kb,fte),e(tn,gte),D(i,zE,j),D(i,ne,j),$(Cg,ne,null),e(ne,ute),e(ne,ak),e(ak,_te),e(ne,bte),$(Nd,ne,null),e(ne,$te),e(ne,an),$(Og,an,null),e(an,xte),e(an,sk),e(sk,vte),e(an,yte),$(Pd,an,null),e(ne,jte),e(ne,sn),$(zg,sn,null),e(sn,wte),e(sn,nk),e(nk,Dte),e(sn,kte),$(Ad,sn,null),e(ne,Ete),e(ne,Ct),$(Sg,Ct,null),e(Ct,qte),e(Ct,rk),e(rk,Ite),e(Ct,Tte),e(Ct,ok),e(ok,Nte),e(Ct,Pte),$(Ld,Ct,null),e(ne,Ate),e(ne,Fd),$(Vg,Fd,null),e(Fd,Lte),e(Fd,lk),e(lk,Fte),D(i,SE,j),D(i,Cr,j),e(Cr,Cd),e(Cd,ik),$(Ug,ik,null),e(Cr,Cte),e(Cr,dk),e(dk,Ote),D(i,VE,j),D(i,V,j),$(Mg,V,null),e(V,zte),e(V,Od),e(Od,ck),e(ck,Ste),e(Od,Vte),e(Od,Rg),e(Rg,pk),e(pk,Ute),e(Od,Mte),e(V,Rte),e(V,ba),e(ba,Bte),e(ba,mk),e(mk,Hte),e(ba,Gte),e(ba,hk),e(hk,Wte),e(ba,Kte),e(ba,fk),e(fk,Yte),e(ba,Jte),e(V,Qte),e(V,gk),e(gk,Zte),e(V,Xte),e(V,uk),e(uk,eae),e(V,tae),$(zd,V,null),e(V,aae),e(V,Or),e(Or,sae),e(Or,_k),e(_k,nae),e(Or,rae),e(Or,bk),e(bk,oae),e(Or,lae),e(V,iae),$(Sd,V,null),e(V,dae),e(V,$a),e($a,cae),e($a,$k),e($k,pae),e($a,mae),e($a,xk),e(xk,hae),e($a,fae),e($a,vk),e(vk,gae),e($a,uae),e(V,_ae),$(Vd,V,null),e(V,bae),e(V,zr),e(zr,$ae),e(zr,yk),e(yk,xae),e(zr,vae),e(zr,Yb),e(Yb,yae),e(zr,jae),e(V,wae),$(Ud,V,null),e(V,Dae),e(V,Sr),e(Sr,kae),e(Sr,jk),e(jk,Eae),e(Sr,qae),e(Sr,Jb),e(Jb,Iae),e(Sr,Tae),e(V,Nae),$(Md,V,null),D(i,UE,j),D(i,Vr,j),$(Bg,Vr,null),e(Vr,Pae),e(Vr,Ur),e(Ur,Aae),e(Ur,wk),e(wk,Lae),e(Ur,Fae),e(Ur,Dk),e(Dk,Cae),e(Ur,Oae),D(i,ME,j),D(i,Mr,j),$(Hg,Mr,null),e(Mr,zae),e(Mr,kk),e(kk,Sae),D(i,RE,j),D(i,Rr,j),e(Rr,Rd),e(Rd,Ek),$(Gg,Ek,null),e(Rr,Vae),e(Rr,qk),e(qk,Uae),D(i,BE,j),D(i,Br,j),$(Wg,Br,null),e(Br,Mae),e(Br,Ik),e(Ik,Rae),HE=!0},p(i,[j]){const Kg={};j&2&&(Kg.$$scope={dirty:j,ctx:i}),go.$set(Kg);const Tk={};j&2&&(Tk.$$scope={dirty:j,ctx:i}),uo.$set(Tk);const Nk={};j&2&&(Nk.$$scope={dirty:j,ctx:i}),$o.$set(Nk);const Pk={};j&2&&(Pk.$$scope={dirty:j,ctx:i}),xo.$set(Pk);const Yg={};j&2&&(Yg.$$scope={dirty:j,ctx:i}),jo.$set(Yg);const Ak={};j&2&&(Ak.$$scope={dirty:j,ctx:i}),Do.$set(Ak);const Lk={};j&2&&(Lk.$$scope={dirty:j,ctx:i}),ko.$set(Lk);const Fk={};j&2&&(Fk.$$scope={dirty:j,ctx:i}),Eo.$set(Fk);const De={};j&2&&(De.$$scope={dirty:j,ctx:i}),qo.$set(De);const Ck={};j&2&&(Ck.$$scope={dirty:j,ctx:i}),Io.$set(Ck);const Qb={};j&2&&(Qb.$$scope={dirty:j,ctx:i}),No.$set(Qb);const Ok={};j&2&&(Ok.$$scope={dirty:j,ctx:i}),Po.$set(Ok);const zk={};j&2&&(zk.$$scope={dirty:j,ctx:i}),Ao.$set(zk);const it={};j&2&&(it.$$scope={dirty:j,ctx:i}),Lo.$set(it);const Hr={};j&2&&(Hr.$$scope={dirty:j,ctx:i}),Fo.$set(Hr);const Sk={};j&2&&(Sk.$$scope={dirty:j,ctx:i}),Co.$set(Sk);const Vk={};j&2&&(Vk.$$scope={dirty:j,ctx:i}),Oo.$set(Vk);const Jg={};j&2&&(Jg.$$scope={dirty:j,ctx:i}),zo.$set(Jg);const Uk={};j&2&&(Uk.$$scope={dirty:j,ctx:i}),So.$set(Uk);const Mk={};j&2&&(Mk.$$scope={dirty:j,ctx:i}),Vo.$set(Mk);const Gr={};j&2&&(Gr.$$scope={dirty:j,ctx:i}),Uo.$set(Gr);const Wr={};j&2&&(Wr.$$scope={dirty:j,ctx:i}),Mo.$set(Wr);const Rk={};j&2&&(Rk.$$scope={dirty:j,ctx:i}),Bo.$set(Rk);const Bk={};j&2&&(Bk.$$scope={dirty:j,ctx:i}),Ho.$set(Bk);const Qg={};j&2&&(Qg.$$scope={dirty:j,ctx:i}),Go.$set(Qg);const Hk={};j&2&&(Hk.$$scope={dirty:j,ctx:i}),Wo.$set(Hk);const Gk={};j&2&&(Gk.$$scope={dirty:j,ctx:i}),Ko.$set(Gk);const Wk={};j&2&&(Wk.$$scope={dirty:j,ctx:i}),Yo.$set(Wk);const Zg={};j&2&&(Zg.$$scope={dirty:j,ctx:i}),Qo.$set(Zg);const Kk={};j&2&&(Kk.$$scope={dirty:j,ctx:i}),Zo.$set(Kk);const I={};j&2&&(I.$$scope={dirty:j,ctx:i}),Xo.$set(I);const Yk={};j&2&&(Yk.$$scope={dirty:j,ctx:i}),el.$set(Yk);const xa={};j&2&&(xa.$$scope={dirty:j,ctx:i}),tl.$set(xa);const Jk={};j&2&&(Jk.$$scope={dirty:j,ctx:i}),al.$set(Jk);const Qk={};j&2&&(Qk.$$scope={dirty:j,ctx:i}),sl.$set(Qk);const va={};j&2&&(va.$$scope={dirty:j,ctx:i}),nl.$set(va);const Zk={};j&2&&(Zk.$$scope={dirty:j,ctx:i}),rl.$set(Zk);const Xk={};j&2&&(Xk.$$scope={dirty:j,ctx:i}),ol.$set(Xk);const Xg={};j&2&&(Xg.$$scope={dirty:j,ctx:i}),ll.$set(Xg);const e4={};j&2&&(e4.$$scope={dirty:j,ctx:i}),il.$set(e4);const eu={};j&2&&(eu.$$scope={dirty:j,ctx:i}),cl.$set(eu);const t4={};j&2&&(t4.$$scope={dirty:j,ctx:i}),pl.$set(t4);const dt={};j&2&&(dt.$$scope={dirty:j,ctx:i}),ml.$set(dt);const ya={};j&2&&(ya.$$scope={dirty:j,ctx:i}),hl.$set(ya);const a4={};j&2&&(a4.$$scope={dirty:j,ctx:i}),fl.$set(a4);const s4={};j&2&&(s4.$$scope={dirty:j,ctx:i}),gl.$set(s4);const n4={};j&2&&(n4.$$scope={dirty:j,ctx:i}),ul.$set(n4);const Kr={};j&2&&(Kr.$$scope={dirty:j,ctx:i}),bl.$set(Kr);const r4={};j&2&&(r4.$$scope={dirty:j,ctx:i}),Il.$set(r4);const o4={};j&2&&(o4.$$scope={dirty:j,ctx:i}),Tl.$set(o4);const ja={};j&2&&(ja.$$scope={dirty:j,ctx:i}),Nl.$set(ja);const l4={};j&2&&(l4.$$scope={dirty:j,ctx:i}),Pl.$set(l4);const i4={};j&2&&(i4.$$scope={dirty:j,ctx:i}),Al.$set(i4);const d4={};j&2&&(d4.$$scope={dirty:j,ctx:i}),Ll.$set(d4);const tu={};j&2&&(tu.$$scope={dirty:j,ctx:i}),Fl.$set(tu);const wa={};j&2&&(wa.$$scope={dirty:j,ctx:i}),Cl.$set(wa);const c4={};j&2&&(c4.$$scope={dirty:j,ctx:i}),Ol.$set(c4);const p4={};j&2&&(p4.$$scope={dirty:j,ctx:i}),Vl.$set(p4);const m4={};j&2&&(m4.$$scope={dirty:j,ctx:i}),Ul.$set(m4);const Da={};j&2&&(Da.$$scope={dirty:j,ctx:i}),Ml.$set(Da);const h4={};j&2&&(h4.$$scope={dirty:j,ctx:i}),Bl.$set(h4);const Yr={};j&2&&(Yr.$$scope={dirty:j,ctx:i}),Hl.$set(Yr);const f4={};j&2&&(f4.$$scope={dirty:j,ctx:i}),Gl.$set(f4);const Jr={};j&2&&(Jr.$$scope={dirty:j,ctx:i}),Wl.$set(Jr);const g4={};j&2&&(g4.$$scope={dirty:j,ctx:i}),Kl.$set(g4);const Qr={};j&2&&(Qr.$$scope={dirty:j,ctx:i}),Yl.$set(Qr);const u4={};j&2&&(u4.$$scope={dirty:j,ctx:i}),Jl.$set(u4);const Zr={};j&2&&(Zr.$$scope={dirty:j,ctx:i}),Ql.$set(Zr);const au={};j&2&&(au.$$scope={dirty:j,ctx:i}),Zl.$set(au);const su={};j&2&&(su.$$scope={dirty:j,ctx:i}),Xl.$set(su);const _4={};j&2&&(_4.$$scope={dirty:j,ctx:i}),ei.$set(_4);const Xr={};j&2&&(Xr.$$scope={dirty:j,ctx:i}),ai.$set(Xr);const b4={};j&2&&(b4.$$scope={dirty:j,ctx:i}),si.$set(b4);const eo={};j&2&&(eo.$$scope={dirty:j,ctx:i}),ni.$set(eo);const $4={};j&2&&($4.$$scope={dirty:j,ctx:i}),ri.$set($4);const ka={};j&2&&(ka.$$scope={dirty:j,ctx:i}),oi.$set(ka);const x4={};j&2&&(x4.$$scope={dirty:j,ctx:i}),li.$set(x4);const v4={};j&2&&(v4.$$scope={dirty:j,ctx:i}),ii.$set(v4);const to={};j&2&&(to.$$scope={dirty:j,ctx:i}),di.$set(to);const y4={};j&2&&(y4.$$scope={dirty:j,ctx:i}),ci.$set(y4);const ao={};j&2&&(ao.$$scope={dirty:j,ctx:i}),pi.$set(ao);const j4={};j&2&&(j4.$$scope={dirty:j,ctx:i}),mi.$set(j4);const so={};j&2&&(so.$$scope={dirty:j,ctx:i}),hi.$set(so);const w4={};j&2&&(w4.$$scope={dirty:j,ctx:i}),fi.$set(w4);const Ea={};j&2&&(Ea.$$scope={dirty:j,ctx:i}),gi.$set(Ea);const D4={};j&2&&(D4.$$scope={dirty:j,ctx:i}),ui.$set(D4);const no={};j&2&&(no.$$scope={dirty:j,ctx:i}),_i.$set(no);const k4={};j&2&&(k4.$$scope={dirty:j,ctx:i}),xi.$set(k4);const E4={};j&2&&(E4.$$scope={dirty:j,ctx:i}),vi.$set(E4);const ro={};j&2&&(ro.$$scope={dirty:j,ctx:i}),yi.$set(ro);const q4={};j&2&&(q4.$$scope={dirty:j,ctx:i}),ji.$set(q4);const oo={};j&2&&(oo.$$scope={dirty:j,ctx:i}),wi.$set(oo);const I4={};j&2&&(I4.$$scope={dirty:j,ctx:i}),ki.$set(I4);const lo={};j&2&&(lo.$$scope={dirty:j,ctx:i}),Ei.$set(lo);const T4={};j&2&&(T4.$$scope={dirty:j,ctx:i}),qi.$set(T4);const io={};j&2&&(io.$$scope={dirty:j,ctx:i}),Ii.$set(io);const N4={};j&2&&(N4.$$scope={dirty:j,ctx:i}),Ti.$set(N4);const co={};j&2&&(co.$$scope={dirty:j,ctx:i}),Ni.$set(co);const P4={};j&2&&(P4.$$scope={dirty:j,ctx:i}),Ci.$set(P4);const nu={};j&2&&(nu.$$scope={dirty:j,ctx:i}),Oi.$set(nu);const A4={};j&2&&(A4.$$scope={dirty:j,ctx:i}),zi.$set(A4);const po={};j&2&&(po.$$scope={dirty:j,ctx:i}),Si.$set(po);const ru={};j&2&&(ru.$$scope={dirty:j,ctx:i}),Vi.$set(ru);const L4={};j&2&&(L4.$$scope={dirty:j,ctx:i}),Ui.$set(L4);const ou={};j&2&&(ou.$$scope={dirty:j,ctx:i}),Mi.$set(ou);const F4={};j&2&&(F4.$$scope={dirty:j,ctx:i}),Ri.$set(F4);const lu={};j&2&&(lu.$$scope={dirty:j,ctx:i}),Bi.$set(lu);const mo={};j&2&&(mo.$$scope={dirty:j,ctx:i}),Gi.$set(mo);const C4={};j&2&&(C4.$$scope={dirty:j,ctx:i}),Ki.$set(C4);const O4={};j&2&&(O4.$$scope={dirty:j,ctx:i}),ed.$set(O4);const ct={};j&2&&(ct.$$scope={dirty:j,ctx:i}),ad.$set(ct);const pt={};j&2&&(pt.$$scope={dirty:j,ctx:i}),sd.$set(pt);const z4={};j&2&&(z4.$$scope={dirty:j,ctx:i}),nd.$set(z4);const S4={};j&2&&(S4.$$scope={dirty:j,ctx:i}),rd.$set(S4);const V4={};j&2&&(V4.$$scope={dirty:j,ctx:i}),od.$set(V4);const U4={};j&2&&(U4.$$scope={dirty:j,ctx:i}),ld.$set(U4);const qa={};j&2&&(qa.$$scope={dirty:j,ctx:i}),id.$set(qa);const M4={};j&2&&(M4.$$scope={dirty:j,ctx:i}),dd.$set(M4);const R4={};j&2&&(R4.$$scope={dirty:j,ctx:i}),pd.$set(R4);const B4={};j&2&&(B4.$$scope={dirty:j,ctx:i}),hd.$set(B4);const ho={};j&2&&(ho.$$scope={dirty:j,ctx:i}),fd.$set(ho);const mt={};j&2&&(mt.$$scope={dirty:j,ctx:i}),gd.$set(mt);const H4={};j&2&&(H4.$$scope={dirty:j,ctx:i}),ud.$set(H4);const G4={};j&2&&(G4.$$scope={dirty:j,ctx:i}),_d.$set(G4);const W4={};j&2&&(W4.$$scope={dirty:j,ctx:i}),yd.$set(W4);const K4={};j&2&&(K4.$$scope={dirty:j,ctx:i}),qd.$set(K4);const Ia={};j&2&&(Ia.$$scope={dirty:j,ctx:i}),Id.$set(Ia);const iu={};j&2&&(iu.$$scope={dirty:j,ctx:i}),Nd.$set(iu);const Y4={};j&2&&(Y4.$$scope={dirty:j,ctx:i}),Pd.$set(Y4);const Zb={};j&2&&(Zb.$$scope={dirty:j,ctx:i}),Ad.$set(Zb);const J4={};j&2&&(J4.$$scope={dirty:j,ctx:i}),Ld.$set(J4);const ht={};j&2&&(ht.$$scope={dirty:j,ctx:i}),zd.$set(ht);const Ta={};j&2&&(Ta.$$scope={dirty:j,ctx:i}),Sd.$set(Ta);const Q4={};j&2&&(Q4.$$scope={dirty:j,ctx:i}),Vd.$set(Q4);const Z4={};j&2&&(Z4.$$scope={dirty:j,ctx:i}),Ud.$set(Z4);const X4={};j&2&&(X4.$$scope={dirty:j,ctx:i}),Md.$set(X4)},i(i){HE||(x(t.$$.fragment,i),x(Pa.$$.fragment,i),x(Nc.$$.fragment,i),x(Pc.$$.fragment,i),x(go.$$.fragment,i),x(Lc.$$.fragment,i),x(uo.$$.fragment,i),x(Fc.$$.fragment,i),x(Cc.$$.fragment,i),x(Oc.$$.fragment,i),x($o.$$.fragment,i),x(zc.$$.fragment,i),x(xo.$$.fragment,i),x(Sc.$$.fragment,i),x(Vc.$$.fragment,i),x(Uc.$$.fragment,i),x(jo.$$.fragment,i),x(Mc.$$.fragment,i),x(Rc.$$.fragment,i),x(Do.$$.fragment,i),x(ko.$$.fragment,i),x(Bc.$$.fragment,i),x(Eo.$$.fragment,i),x(Hc.$$.fragment,i),x(qo.$$.fragment,i),x(Gc.$$.fragment,i),x(Io.$$.fragment,i),x(Wc.$$.fragment,i),x(No.$$.fragment,i),x(Yc.$$.fragment,i),x(Po.$$.fragment,i),x(Jc.$$.fragment,i),x(Ao.$$.fragment,i),x(Qc.$$.fragment,i),x(Lo.$$.fragment,i),x(Zc.$$.fragment,i),x(Fo.$$.fragment,i),x(Xc.$$.fragment,i),x(Co.$$.fragment,i),x(ep.$$.fragment,i),x(Oo.$$.fragment,i),x(tp.$$.fragment,i),x(zo.$$.fragment,i),x(ap.$$.fragment,i),x(So.$$.fragment,i),x(sp.$$.fragment,i),x(Vo.$$.fragment,i),x(np.$$.fragment,i),x(Uo.$$.fragment,i),x(rp.$$.fragment,i),x(Mo.$$.fragment,i),x(op.$$.fragment,i),x(ip.$$.fragment,i),x(pp.$$.fragment,i),x(mp.$$.fragment,i),x(Bo.$$.fragment,i),x(Ho.$$.fragment,i),x(hp.$$.fragment,i),x(Go.$$.fragment,i),x(fp.$$.fragment,i),x(Wo.$$.fragment,i),x(up.$$.fragment,i),x(Ko.$$.fragment,i),x(bp.$$.fragment,i),x(Yo.$$.fragment,i),x($p.$$.fragment,i),x(xp.$$.fragment,i),x(Qo.$$.fragment,i),x(vp.$$.fragment,i),x(Zo.$$.fragment,i),x(jp.$$.fragment,i),x(Xo.$$.fragment,i),x(wp.$$.fragment,i),x(el.$$.fragment,i),x(Dp.$$.fragment,i),x(tl.$$.fragment,i),x(kp.$$.fragment,i),x(al.$$.fragment,i),x(Ep.$$.fragment,i),x(sl.$$.fragment,i),x(Ip.$$.fragment,i),x(nl.$$.fragment,i),x(Np.$$.fragment,i),x(rl.$$.fragment,i),x(Pp.$$.fragment,i),x(ol.$$.fragment,i),x(Ap.$$.fragment,i),x(ll.$$.fragment,i),x(Lp.$$.fragment,i),x(il.$$.fragment,i),x(Fp.$$.fragment,i),x(Cp.$$.fragment,i),x(cl.$$.fragment,i),x(Op.$$.fragment,i),x(pl.$$.fragment,i),x(Sp.$$.fragment,i),x(ml.$$.fragment,i),x(Vp.$$.fragment,i),x(hl.$$.fragment,i),x(Up.$$.fragment,i),x(fl.$$.fragment,i),x(Mp.$$.fragment,i),x(gl.$$.fragment,i),x(Rp.$$.fragment,i),x(ul.$$.fragment,i),x(Hp.$$.fragment,i),x(Wp.$$.fragment,i),x(Kp.$$.fragment,i),x(Jp.$$.fragment,i),x(bl.$$.fragment,i),x(Qp.$$.fragment,i),x(Zp.$$.fragment,i),x(em.$$.fragment,i),x(am.$$.fragment,i),x(sm.$$.fragment,i),x(nm.$$.fragment,i),x(rm.$$.fragment,i),x(om.$$.fragment,i),x(lm.$$.fragment,i),x(im.$$.fragment,i),x(dm.$$.fragment,i),x(cm.$$.fragment,i),x(pm.$$.fragment,i),x(mm.$$.fragment,i),x(hm.$$.fragment,i),x(fm.$$.fragment,i),x(gm.$$.fragment,i),x(um.$$.fragment,i),x(_m.$$.fragment,i),x(bm.$$.fragment,i),x($m.$$.fragment,i),x(xm.$$.fragment,i),x(vm.$$.fragment,i),x(ym.$$.fragment,i),x(Il.$$.fragment,i),x(jm.$$.fragment,i),x(Tl.$$.fragment,i),x(wm.$$.fragment,i),x(Nl.$$.fragment,i),x(Dm.$$.fragment,i),x(Pl.$$.fragment,i),x(km.$$.fragment,i),x(Al.$$.fragment,i),x(Ll.$$.fragment,i),x(Em.$$.fragment,i),x(qm.$$.fragment,i),x(Fl.$$.fragment,i),x(Tm.$$.fragment,i),x(Cl.$$.fragment,i),x(Nm.$$.fragment,i),x(Ol.$$.fragment,i),x(Am.$$.fragment,i),x(Fm.$$.fragment,i),x(Om.$$.fragment,i),x(Sm.$$.fragment,i),x(Vm.$$.fragment,i),x(Um.$$.fragment,i),x(Vl.$$.fragment,i),x(Mm.$$.fragment,i),x(Ul.$$.fragment,i),x(Rm.$$.fragment,i),x(Ml.$$.fragment,i),x(Bm.$$.fragment,i),x(Bl.$$.fragment,i),x(Gm.$$.fragment,i),x(Hl.$$.fragment,i),x(Wm.$$.fragment,i),x(Gl.$$.fragment,i),x(Km.$$.fragment,i),x(Wl.$$.fragment,i),x(Ym.$$.fragment,i),x(Kl.$$.fragment,i),x(Jm.$$.fragment,i),x(Yl.$$.fragment,i),x(Qm.$$.fragment,i),x(Jl.$$.fragment,i),x(Zm.$$.fragment,i),x(Ql.$$.fragment,i),x(Xm.$$.fragment,i),x(Zl.$$.fragment,i),x(eh.$$.fragment,i),x(Xl.$$.fragment,i),x(ah.$$.fragment,i),x(ei.$$.fragment,i),x(nh.$$.fragment,i),x(rh.$$.fragment,i),x(ai.$$.fragment,i),x(lh.$$.fragment,i),x(si.$$.fragment,i),x(ih.$$.fragment,i),x(ni.$$.fragment,i),x(dh.$$.fragment,i),x(ri.$$.fragment,i),x(ch.$$.fragment,i),x(oi.$$.fragment,i),x(ph.$$.fragment,i),x(li.$$.fragment,i),x(mh.$$.fragment,i),x(ii.$$.fragment,i),x(fh.$$.fragment,i),x(di.$$.fragment,i),x(gh.$$.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(yh.$$.fragment,i),x(gi.$$.fragment,i),x(wh.$$.fragment,i),x(ui.$$.fragment,i),x(kh.$$.fragment,i),x(_i.$$.fragment,i),x(qh.$$.fragment,i),x(Ih.$$.fragment,i),x(Th.$$.fragment,i),x(Nh.$$.fragment,i),x(xi.$$.fragment,i),x(vi.$$.fragment,i),x(Ph.$$.fragment,i),x(yi.$$.fragment,i),x(Ah.$$.fragment,i),x(ji.$$.fragment,i),x(Lh.$$.fragment,i),x(wi.$$.fragment,i),x(Fh.$$.fragment,i),x(Ch.$$.fragment,i),x(zh.$$.fragment,i),x(ki.$$.fragment,i),x(Vh.$$.fragment,i),x(Ei.$$.fragment,i),x(Uh.$$.fragment,i),x(qi.$$.fragment,i),x(Mh.$$.fragment,i),x(Ii.$$.fragment,i),x(Bh.$$.fragment,i),x(Ti.$$.fragment,i),x(Hh.$$.fragment,i),x(Ni.$$.fragment,i),x(Gh.$$.fragment,i),x(Wh.$$.fragment,i),x(Kh.$$.fragment,i),x(Yh.$$.fragment,i),x(Jh.$$.fragment,i),x(Qh.$$.fragment,i),x(Zh.$$.fragment,i),x(Xh.$$.fragment,i),x(ef.$$.fragment,i),x(tf.$$.fragment,i),x(af.$$.fragment,i),x(sf.$$.fragment,i),x(nf.$$.fragment,i),x(rf.$$.fragment,i),x(of.$$.fragment,i),x(lf.$$.fragment,i),x(df.$$.fragment,i),x(cf.$$.fragment,i),x(Ci.$$.fragment,i),x(mf.$$.fragment,i),x(Oi.$$.fragment,i),x(hf.$$.fragment,i),x(zi.$$.fragment,i),x(ff.$$.fragment,i),x(Si.$$.fragment,i),x(gf.$$.fragment,i),x(Vi.$$.fragment,i),x(uf.$$.fragment,i),x(Ui.$$.fragment,i),x(_f.$$.fragment,i),x(Mi.$$.fragment,i),x(bf.$$.fragment,i),x(Ri.$$.fragment,i),x($f.$$.fragment,i),x(Bi.$$.fragment,i),x(xf.$$.fragment,i),x(vf.$$.fragment,i),x(Gi.$$.fragment,i),x(Ef.$$.fragment,i),x(Ki.$$.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(ed.$$.fragment,i),x(Of.$$.fragment,i),x(Sf.$$.fragment,i),x(ad.$$.fragment,i),x(Uf.$$.fragment,i),x(sd.$$.fragment,i),x(Rf.$$.fragment,i),x(nd.$$.fragment,i),x(Bf.$$.fragment,i),x(rd.$$.fragment,i),x(Gf.$$.fragment,i),x(Kf.$$.fragment,i),x(od.$$.fragment,i),x(Jf.$$.fragment,i),x(ld.$$.fragment,i),x(Qf.$$.fragment,i),x(id.$$.fragment,i),x(Xf.$$.fragment,i),x(dd.$$.fragment,i),x(eg.$$.fragment,i),x(tg.$$.fragment,i),x(pd.$$.fragment,i),x(ag.$$.fragment,i),x(sg.$$.fragment,i),x(hd.$$.fragment,i),x(ng.$$.fragment,i),x(fd.$$.fragment,i),x(rg.$$.fragment,i),x(gd.$$.fragment,i),x(og.$$.fragment,i),x(ud.$$.fragment,i),x(lg.$$.fragment,i),x(_d.$$.fragment,i),x(hg.$$.fragment,i),x(fg.$$.fragment,i),x(gg.$$.fragment,i),x(ug.$$.fragment,i),x(_g.$$.fragment,i),x(bg.$$.fragment,i),x(yd.$$.fragment,i),x(Dg.$$.fragment,i),x(kg.$$.fragment,i),x(Eg.$$.fragment,i),x(qg.$$.fragment,i),x(Ig.$$.fragment,i),x(Tg.$$.fragment,i),x(Ng.$$.fragment,i),x(Pg.$$.fragment,i),x(qd.$$.fragment,i),x(Lg.$$.fragment,i),x(Id.$$.fragment,i),x(Fg.$$.fragment,i),x(Cg.$$.fragment,i),x(Nd.$$.fragment,i),x(Og.$$.fragment,i),x(Pd.$$.fragment,i),x(zg.$$.fragment,i),x(Ad.$$.fragment,i),x(Sg.$$.fragment,i),x(Ld.$$.fragment,i),x(Vg.$$.fragment,i),x(Ug.$$.fragment,i),x(Mg.$$.fragment,i),x(zd.$$.fragment,i),x(Sd.$$.fragment,i),x(Vd.$$.fragment,i),x(Ud.$$.fragment,i),x(Md.$$.fragment,i),x(Bg.$$.fragment,i),x(Hg.$$.fragment,i),x(Gg.$$.fragment,i),x(Wg.$$.fragment,i),HE=!0)},o(i){v(t.$$.fragment,i),v(Pa.$$.fragment,i),v(Nc.$$.fragment,i),v(Pc.$$.fragment,i),v(go.$$.fragment,i),v(Lc.$$.fragment,i),v(uo.$$.fragment,i),v(Fc.$$.fragment,i),v(Cc.$$.fragment,i),v(Oc.$$.fragment,i),v($o.$$.fragment,i),v(zc.$$.fragment,i),v(xo.$$.fragment,i),v(Sc.$$.fragment,i),v(Vc.$$.fragment,i),v(Uc.$$.fragment,i),v(jo.$$.fragment,i),v(Mc.$$.fragment,i),v(Rc.$$.fragment,i),v(Do.$$.fragment,i),v(ko.$$.fragment,i),v(Bc.$$.fragment,i),v(Eo.$$.fragment,i),v(Hc.$$.fragment,i),v(qo.$$.fragment,i),v(Gc.$$.fragment,i),v(Io.$$.fragment,i),v(Wc.$$.fragment,i),v(No.$$.fragment,i),v(Yc.$$.fragment,i),v(Po.$$.fragment,i),v(Jc.$$.fragment,i),v(Ao.$$.fragment,i),v(Qc.$$.fragment,i),v(Lo.$$.fragment,i),v(Zc.$$.fragment,i),v(Fo.$$.fragment,i),v(Xc.$$.fragment,i),v(Co.$$.fragment,i),v(ep.$$.fragment,i),v(Oo.$$.fragment,i),v(tp.$$.fragment,i),v(zo.$$.fragment,i),v(ap.$$.fragment,i),v(So.$$.fragment,i),v(sp.$$.fragment,i),v(Vo.$$.fragment,i),v(np.$$.fragment,i),v(Uo.$$.fragment,i),v(rp.$$.fragment,i),v(Mo.$$.fragment,i),v(op.$$.fragment,i),v(ip.$$.fragment,i),v(pp.$$.fragment,i),v(mp.$$.fragment,i),v(Bo.$$.fragment,i),v(Ho.$$.fragment,i),v(hp.$$.fragment,i),v(Go.$$.fragment,i),v(fp.$$.fragment,i),v(Wo.$$.fragment,i),v(up.$$.fragment,i),v(Ko.$$.fragment,i),v(bp.$$.fragment,i),v(Yo.$$.fragment,i),v($p.$$.fragment,i),v(xp.$$.fragment,i),v(Qo.$$.fragment,i),v(vp.$$.fragment,i),v(Zo.$$.fragment,i),v(jp.$$.fragment,i),v(Xo.$$.fragment,i),v(wp.$$.fragment,i),v(el.$$.fragment,i),v(Dp.$$.fragment,i),v(tl.$$.fragment,i),v(kp.$$.fragment,i),v(al.$$.fragment,i),v(Ep.$$.fragment,i),v(sl.$$.fragment,i),v(Ip.$$.fragment,i),v(nl.$$.fragment,i),v(Np.$$.fragment,i),v(rl.$$.fragment,i),v(Pp.$$.fragment,i),v(ol.$$.fragment,i),v(Ap.$$.fragment,i),v(ll.$$.fragment,i),v(Lp.$$.fragment,i),v(il.$$.fragment,i),v(Fp.$$.fragment,i),v(Cp.$$.fragment,i),v(cl.$$.fragment,i),v(Op.$$.fragment,i),v(pl.$$.fragment,i),v(Sp.$$.fragment,i),v(ml.$$.fragment,i),v(Vp.$$.fragment,i),v(hl.$$.fragment,i),v(Up.$$.fragment,i),v(fl.$$.fragment,i),v(Mp.$$.fragment,i),v(gl.$$.fragment,i),v(Rp.$$.fragment,i),v(ul.$$.fragment,i),v(Hp.$$.fragment,i),v(Wp.$$.fragment,i),v(Kp.$$.fragment,i),v(Jp.$$.fragment,i),v(bl.$$.fragment,i),v(Qp.$$.fragment,i),v(Zp.$$.fragment,i),v(em.$$.fragment,i),v(am.$$.fragment,i),v(sm.$$.fragment,i),v(nm.$$.fragment,i),v(rm.$$.fragment,i),v(om.$$.fragment,i),v(lm.$$.fragment,i),v(im.$$.fragment,i),v(dm.$$.fragment,i),v(cm.$$.fragment,i),v(pm.$$.fragment,i),v(mm.$$.fragment,i),v(hm.$$.fragment,i),v(fm.$$.fragment,i),v(gm.$$.fragment,i),v(um.$$.fragment,i),v(_m.$$.fragment,i),v(bm.$$.fragment,i),v($m.$$.fragment,i),v(xm.$$.fragment,i),v(vm.$$.fragment,i),v(ym.$$.fragment,i),v(Il.$$.fragment,i),v(jm.$$.fragment,i),v(Tl.$$.fragment,i),v(wm.$$.fragment,i),v(Nl.$$.fragment,i),v(Dm.$$.fragment,i),v(Pl.$$.fragment,i),v(km.$$.fragment,i),v(Al.$$.fragment,i),v(Ll.$$.fragment,i),v(Em.$$.fragment,i),v(qm.$$.fragment,i),v(Fl.$$.fragment,i),v(Tm.$$.fragment,i),v(Cl.$$.fragment,i),v(Nm.$$.fragment,i),v(Ol.$$.fragment,i),v(Am.$$.fragment,i),v(Fm.$$.fragment,i),v(Om.$$.fragment,i),v(Sm.$$.fragment,i),v(Vm.$$.fragment,i),v(Um.$$.fragment,i),v(Vl.$$.fragment,i),v(Mm.$$.fragment,i),v(Ul.$$.fragment,i),v(Rm.$$.fragment,i),v(Ml.$$.fragment,i),v(Bm.$$.fragment,i),v(Bl.$$.fragment,i),v(Gm.$$.fragment,i),v(Hl.$$.fragment,i),v(Wm.$$.fragment,i),v(Gl.$$.fragment,i),v(Km.$$.fragment,i),v(Wl.$$.fragment,i),v(Ym.$$.fragment,i),v(Kl.$$.fragment,i),v(Jm.$$.fragment,i),v(Yl.$$.fragment,i),v(Qm.$$.fragment,i),v(Jl.$$.fragment,i),v(Zm.$$.fragment,i),v(Ql.$$.fragment,i),v(Xm.$$.fragment,i),v(Zl.$$.fragment,i),v(eh.$$.fragment,i),v(Xl.$$.fragment,i),v(ah.$$.fragment,i),v(ei.$$.fragment,i),v(nh.$$.fragment,i),v(rh.$$.fragment,i),v(ai.$$.fragment,i),v(lh.$$.fragment,i),v(si.$$.fragment,i),v(ih.$$.fragment,i),v(ni.$$.fragment,i),v(dh.$$.fragment,i),v(ri.$$.fragment,i),v(ch.$$.fragment,i),v(oi.$$.fragment,i),v(ph.$$.fragment,i),v(li.$$.fragment,i),v(mh.$$.fragment,i),v(ii.$$.fragment,i),v(fh.$$.fragment,i),v(di.$$.fragment,i),v(gh.$$.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(yh.$$.fragment,i),v(gi.$$.fragment,i),v(wh.$$.fragment,i),v(ui.$$.fragment,i),v(kh.$$.fragment,i),v(_i.$$.fragment,i),v(qh.$$.fragment,i),v(Ih.$$.fragment,i),v(Th.$$.fragment,i),v(Nh.$$.fragment,i),v(xi.$$.fragment,i),v(vi.$$.fragment,i),v(Ph.$$.fragment,i),v(yi.$$.fragment,i),v(Ah.$$.fragment,i),v(ji.$$.fragment,i),v(Lh.$$.fragment,i),v(wi.$$.fragment,i),v(Fh.$$.fragment,i),v(Ch.$$.fragment,i),v(zh.$$.fragment,i),v(ki.$$.fragment,i),v(Vh.$$.fragment,i),v(Ei.$$.fragment,i),v(Uh.$$.fragment,i),v(qi.$$.fragment,i),v(Mh.$$.fragment,i),v(Ii.$$.fragment,i),v(Bh.$$.fragment,i),v(Ti.$$.fragment,i),v(Hh.$$.fragment,i),v(Ni.$$.fragment,i),v(Gh.$$.fragment,i),v(Wh.$$.fragment,i),v(Kh.$$.fragment,i),v(Yh.$$.fragment,i),v(Jh.$$.fragment,i),v(Qh.$$.fragment,i),v(Zh.$$.fragment,i),v(Xh.$$.fragment,i),v(ef.$$.fragment,i),v(tf.$$.fragment,i),v(af.$$.fragment,i),v(sf.$$.fragment,i),v(nf.$$.fragment,i),v(rf.$$.fragment,i),v(of.$$.fragment,i),v(lf.$$.fragment,i),v(df.$$.fragment,i),v(cf.$$.fragment,i),v(Ci.$$.fragment,i),v(mf.$$.fragment,i),v(Oi.$$.fragment,i),v(hf.$$.fragment,i),v(zi.$$.fragment,i),v(ff.$$.fragment,i),v(Si.$$.fragment,i),v(gf.$$.fragment,i),v(Vi.$$.fragment,i),v(uf.$$.fragment,i),v(Ui.$$.fragment,i),v(_f.$$.fragment,i),v(Mi.$$.fragment,i),v(bf.$$.fragment,i),v(Ri.$$.fragment,i),v($f.$$.fragment,i),v(Bi.$$.fragment,i),v(xf.$$.fragment,i),v(vf.$$.fragment,i),v(Gi.$$.fragment,i),v(Ef.$$.fragment,i),v(Ki.$$.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(ed.$$.fragment,i),v(Of.$$.fragment,i),v(Sf.$$.fragment,i),v(ad.$$.fragment,i),v(Uf.$$.fragment,i),v(sd.$$.fragment,i),v(Rf.$$.fragment,i),v(nd.$$.fragment,i),v(Bf.$$.fragment,i),v(rd.$$.fragment,i),v(Gf.$$.fragment,i),v(Kf.$$.fragment,i),v(od.$$.fragment,i),v(Jf.$$.fragment,i),v(ld.$$.fragment,i),v(Qf.$$.fragment,i),v(id.$$.fragment,i),v(Xf.$$.fragment,i),v(dd.$$.fragment,i),v(eg.$$.fragment,i),v(tg.$$.fragment,i),v(pd.$$.fragment,i),v(ag.$$.fragment,i),v(sg.$$.fragment,i),v(hd.$$.fragment,i),v(ng.$$.fragment,i),v(fd.$$.fragment,i),v(rg.$$.fragment,i),v(gd.$$.fragment,i),v(og.$$.fragment,i),v(ud.$$.fragment,i),v(lg.$$.fragment,i),v(_d.$$.fragment,i),v(hg.$$.fragment,i),v(fg.$$.fragment,i),v(gg.$$.fragment,i),v(ug.$$.fragment,i),v(_g.$$.fragment,i),v(bg.$$.fragment,i),v(yd.$$.fragment,i),v(Dg.$$.fragment,i),v(kg.$$.fragment,i),v(Eg.$$.fragment,i),v(qg.$$.fragment,i),v(Ig.$$.fragment,i),v(Tg.$$.fragment,i),v(Ng.$$.fragment,i),v(Pg.$$.fragment,i),v(qd.$$.fragment,i),v(Lg.$$.fragment,i),v(Id.$$.fragment,i),v(Fg.$$.fragment,i),v(Cg.$$.fragment,i),v(Nd.$$.fragment,i),v(Og.$$.fragment,i),v(Pd.$$.fragment,i),v(zg.$$.fragment,i),v(Ad.$$.fragment,i),v(Sg.$$.fragment,i),v(Ld.$$.fragment,i),v(Vg.$$.fragment,i),v(Ug.$$.fragment,i),v(Mg.$$.fragment,i),v(zd.$$.fragment,i),v(Sd.$$.fragment,i),v(Vd.$$.fragment,i),v(Ud.$$.fragment,i),v(Md.$$.fragment,i),v(Bg.$$.fragment,i),v(Hg.$$.fragment,i),v(Gg.$$.fragment,i),v(Wg.$$.fragment,i),HE=!1},d(i){a(c),i&&a(u),i&&a(f),y(t),i&&a(ce),i&&a(he),y(Pa),i&&a(aE),i&&a(pe),y(Nc),y(Pc),y(go),y(Lc),y(uo),i&&a(sE),i&&a(Ln),y(Fc),i&&a(nE),i&&a(bo),i&&a(rE),i&&a(q),y(Cc),y(Oc),y($o),y(zc),y(xo),y(Sc),y(Vc),y(Uc),y(jo),y(Mc),y(Rc),y(Do),y(ko),y(Bc),y(Eo),y(Hc),y(qo),y(Gc),y(Io),y(Wc),y(No),y(Yc),y(Po),y(Jc),y(Ao),y(Qc),y(Lo),y(Zc),y(Fo),y(Xc),y(Co),y(ep),y(Oo),y(tp),y(zo),y(ap),y(So),y(sp),y(Vo),y(np),y(Uo),y(rp),y(Mo),y(op),y(ip),y(pp),y(mp),y(Bo),y(Ho),y(hp),y(Go),y(fp),y(Wo),y(up),y(Ko),y(bp),y(Yo),y($p),y(xp),y(Qo),y(vp),y(Zo),y(jp),y(Xo),y(wp),y(el),y(Dp),y(tl),y(kp),y(al),y(Ep),y(sl),y(Ip),y(nl),y(Np),y(rl),y(Pp),y(ol),y(Ap),y(ll),y(Lp),y(il),y(Fp),y(Cp),y(cl),y(Op),y(pl),y(Sp),y(ml),y(Vp),y(hl),y(Up),y(fl),y(Mp),y(gl),y(Rp),y(ul),y(Hp),y(Wp),y(Kp),y(Jp),y(bl),y(Qp),y(Zp),y(em),y(am),y(sm),y(nm),y(rm),y(om),y(lm),y(im),y(dm),y(cm),y(pm),y(mm),y(hm),y(fm),y(gm),y(um),y(_m),y(bm),y($m),y(xm),y(vm),y(ym),y(Il),y(jm),y(Tl),y(wm),y(Nl),y(Dm),y(Pl),y(km),y(Al),y(Ll),y(Em),y(qm),y(Fl),i&&a(oE),i&&a(Qt),y(Tm),y(Cl),i&&a(lE),i&&a(ae),y(Nm),y(Ol),i&&a(iE),i&&a(ye),y(Am),i&&a(dE),i&&a(je),y(Fm),i&&a(cE),i&&a(we),y(Om),i&&a(pE),i&&a(er),y(Sm),i&&a(mE),i&&a(Sl),i&&a(hE),i&&a(A),y(Vm),y(Um),y(Vl),y(Mm),y(Ul),y(Rm),y(Ml),y(Bm),y(Bl),y(Gm),y(Hl),y(Wm),y(Gl),y(Km),y(Wl),y(Ym),y(Kl),y(Jm),y(Yl),y(Qm),y(Jl),y(Zm),y(Ql),y(Xm),y(Zl),y(eh),y(Xl),y(ah),y(ei),y(nh),y(rh),y(ai),y(lh),y(si),y(ih),y(ni),y(dh),y(ri),y(ch),y(oi),y(ph),y(li),y(mh),y(ii),y(fh),y(di),y(gh),y(ci),y(_h),y(pi),y(bh),y(mi),y($h),y(hi),y(xh),y(fi),y(yh),y(gi),y(wh),y(ui),y(kh),y(_i),y(qh),i&&a(fE),i&&a(U_),i&&a(gE),i&&a(pr),y(Ih),i&&a(uE),i&&a($i),i&&a(_E),i&&a(F),y(Th),y(Nh),y(xi),y(vi),y(Ph),y(yi),y(Ah),y(ji),y(Lh),y(wi),y(Fh),y(Ch),y(zh),y(ki),y(Vh),y(Ei),y(Uh),y(qi),y(Mh),y(Ii),y(Bh),y(Ti),y(Hh),y(Ni),y(Gh),y(Wh),y(Kh),y(Yh),y(Jh),y(Qh),y(Zh),y(Xh),y(ef),y(tf),y(af),y(sf),y(nf),y(rf),y(of),i&&a(bE),i&&a($r),y(lf),i&&a($E),i&&a(Fi),i&&a(xE),i&&a(B),y(df),y(cf),y(Ci),y(mf),y(Oi),y(hf),y(zi),y(ff),y(Si),y(gf),y(Vi),y(uf),y(Ui),y(_f),y(Mi),y(bf),y(Ri),y($f),y(Bi),i&&a(vE),i&&a(jr),y(xf),i&&a(yE),i&&a(S),y(vf),y(Gi),y(Ef),y(Ki),y(If),y(Tf),y(Nf),y(Pf),y(Af),y(Lf),y(ed),y(Of),y(Sf),y(ad),y(Uf),y(sd),i&&a(jE),i&&a(ca),y(Rf),y(nd),i&&a(wE),i&&a(W),y(Bf),y(rd),y(Gf),y(Kf),y(od),y(Jf),y(ld),i&&a(DE),i&&a(nt),y(Qf),y(id),i&&a(kE),i&&a(rt),y(Xf),y(dd),y(eg),i&&a(EE),i&&a(ot),y(tg),y(pd),y(ag),i&&a(qE),i&&a(pa),y(sg),y(hd),i&&a(IE),i&&a(ma),y(ng),y(fd),i&&a(TE),i&&a(ha),y(rg),y(gd),i&&a(NE),i&&a(fa),y(og),y(ud),i&&a(PE),i&&a(H),y(lg),y(_d),y(hg),y(fg),y(gg),y(ug),y(_g),i&&a(AE),i&&a(G),y(bg),y(yd),y(Dg),y(kg),y(Eg),y(qg),y(Ig),i&&a(LE),i&&a(Lr),y(Tg),i&&a(FE),i&&a(me),y(Ng),y(Pg),y(qd),y(Lg),y(Id),i&&a(CE),i&&a(Fr),y(Fg),i&&a(OE),i&&a(tn),i&&a(zE),i&&a(ne),y(Cg),y(Nd),y(Og),y(Pd),y(zg),y(Ad),y(Sg),y(Ld),y(Vg),i&&a(SE),i&&a(Cr),y(Ug),i&&a(VE),i&&a(V),y(Mg),y(zd),y(Sd),y(Vd),y(Ud),y(Md),i&&a(UE),i&&a(Vr),y(Bg),i&&a(ME),i&&a(Mr),y(Hg),i&&a(RE),i&&a(Rr),y(Gg),i&&a(BE),i&&a(Br),y(Wg)}}}const Due={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 kue(k){return Khe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Lue extends Bhe{constructor(c){super();Hhe(this,c,kue,wue,Ghe,{})}}export{Lue as default,Due as metadata};
