Skip to content

Commit

Permalink
Deployed fe81659 to v0.14.0 with MkDocs 1.6.1 and mike 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed Nov 15, 2024
1 parent 31cc2e6 commit 864c4cb
Show file tree
Hide file tree
Showing 492 changed files with 602 additions and 602 deletions.
14 changes: 7 additions & 7 deletions latest/assets/stylesheets/giscus_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,21 @@
margin-inline-end: 0;
}

.gsc-reactions-popover.open.left:before {
inset-inline-end: 9px;
inset-inline-start: unset;
}

.gsc-comment-box-textarea-extras {
display: none;
}

.gsc-reactions-popover.top {
.gsc-timeline .gsc-reactions-popover.open.left:before {
inset-inline-end: 9px;
inset-inline-start: unset;
}

.gsc-timeline .gsc-reactions-popover.top {
inset-inline-end: -.375rem;
inset-inline-start: unset;
}

.gsc-reactions-popover.open.left:after {
.gsc-timeline .gsc-reactions-popover.open.left:after {
inset-inline-end: 10px;
inset-inline-start: unset;
}
Expand Down
16 changes: 8 additions & 8 deletions latest/assets/stylesheets/giscus_light.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,21 @@
margin-inline-end: 0;
}

.gsc-reactions-popover.open.left:before {
inset-inline-end: 9px;
inset-inline-start: unset;
}

.gsc-comment-box-textarea-extras {
display: none;
}

.gsc-reactions-popover.top {
.gsc-timeline .gsc-reactions-popover.open.left:before {
inset-inline-end: 9px;
inset-inline-start: unset;
}

.gsc-timeline .gsc-reactions-popover.top {
inset-inline-end: -.375rem;
inset-inline-start: unset;
}

.gsc-reactions-popover.open.left:after {
.gsc-timeline .gsc-reactions-popover.open.left:after {
inset-inline-end: 10px;
inset-inline-start: unset;
}
Expand Down Expand Up @@ -193,7 +193,7 @@
align-items: center;
border-bottom-width: 1px;
border-start-end-radius: .25rem;
border-start-start-radius: 0rem;
border-start-start-radius: 0;
padding-right: 0.5rem;
justify-content: end;
gap: 0.5rem;
Expand Down
6 changes: 3 additions & 3 deletions latest/concepts/inference/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion latest/concepts/pipeline/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion latest/concepts/torch-component/index.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions latest/data/converters/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions latest/data/json/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</code></pre></div> </details> <p>We provide methods to read and write documents (raw or annotated) from and to json files.</p> <p>As an example, imagine that we have the following document that uses the OMOP schema</p> <div class="highlight"><span class="filename">data.jsonl</span><pre><span></span><code>{ "note_id": 0, "note_text": "Le patient ...", "note_datetime": "2021-10-23", "entities": [...] }
{ "note_id": 1, "note_text": "Autre doc ...", "note_datetime": "2022-12-24", "entities": [] }
...
</code></pre></div> <p>You could also have multiple <code>.json</code> files in a directory, the reader will read them all.</p> <h2 class="sourced-heading" id="edsnlp.data.json.read_json">Reading JSON files<span class="sourced-heading-spacer"></span><a href="https://github.com/aphp/edsnlp/blob/67be53851/edsnlp/data/json.py#L207" target="_blank">[source]</a></h2> <div class="doc doc-object doc-function"> <div class="doc doc-contents first"> <p>The JsonReader (or <code>edsnlp.data.read_json</code>) reads a directory of JSON files and yields documents. At the moment, only entities and attributes are loaded.</p> <h3 id="edsnlp.data.json.read_json--example">Example</h3> <div class="no-check highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">edsnlp</span>
</code></pre></div> <p>You could also have multiple <code>.json</code> files in a directory, the reader will read them all.</p> <h2 class="sourced-heading" id="edsnlp.data.json.read_json">Reading JSON files<span class="sourced-heading-spacer"></span><a href="https://github.com/aphp/edsnlp/blob/fe816592c/edsnlp/data/json.py#L207" target="_blank">[source]</a></h2> <div class="doc doc-object doc-function"> <div class="doc doc-contents first"> <p>The JsonReader (or <code>edsnlp.data.read_json</code>) reads a directory of JSON files and yields documents. At the moment, only entities and attributes are loaded.</p> <h3 id="edsnlp.data.json.read_json--example">Example</h3> <div class="no-check highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">edsnlp</span>

<span class="n">nlp</span> <span class="o">=</span> <span class="n">edsnlp</span><span class="o">.</span><span class="n"><html><head></head><body><a class="discrete-link" href="../../reference/edsnlp/core/pipeline/#edsnlp.core.pipeline.blank">blank</a></body></html></span><span class="p">(</span><span class="s2">"eds"</span><span class="p">)</span>
<span class="n">nlp</span><span class="o">.</span><span class="n"><html><head></head><body><a class="discrete-link" href="../../reference/edsnlp/core/pipeline/#edsnlp.core.pipeline.Pipeline.add_pipe">add_pipe</a></body></html></span><span class="p">(</span><span class="o">...</span><span class="p">)</span>
<span class="n">doc_iterator</span> <span class="o">=</span> <span class="n">edsnlp</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n"><html><head></head><body><a class="discrete-link" href="#edsnlp.data.json.read_json">read_json</a></body></html></span><span class="p">(</span><span class="s2">"path/to/json/dir"</span><span class="p">,</span> <span class="n">converter</span><span class="o">=</span><span class="s2">"omop"</span><span class="p">)</span>
<span class="n">annotated_docs</span> <span class="o">=</span> <span class="n">nlp</span><span class="o">.</span><span class="n"><html><head></head><body><a class="discrete-link" href="../../reference/edsnlp/core/pipeline/#edsnlp.core.pipeline.Pipeline.pipe">pipe</a></body></html></span><span class="p">(</span><span class="n">doc_iterator</span><span class="p">)</span>
</code></pre></div> <div class="admonition note"> <p class="admonition-title">Generator vs list</p> <p><code>edsnlp.data.read_json</code> returns a <a class="autorefs autorefs-internal" href="../../concepts/inference/#edsnlp.core.stream.Stream">Stream</a>. To iterate over the documents multiple times efficiently or to access them by index, you must convert it to a list</p> <div class="no-check highlight"><pre><span></span><code><span class="n">docs</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">edsnlp</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n"><html><head></head><body><a class="discrete-link" href="#edsnlp.data.json.read_json">read_json</a></body></html></span><span class="p">(</span><span class="s2">"path/to/json/dir"</span><span class="p">,</span> <span class="n">converter</span><span class="o">=</span><span class="s2">"omop"</span><span class="p">)</span>
</code></pre></div> </div> <h3 id="edsnlp.data.json.read_json--parameters">Parameters</h3> <table> <thead> <tr> <th><b>PARAMETER</b></th> <th><b>DESCRIPTION</b></th> </tr> </thead> <tbody> <tr> <td><code>path</code></td> <td class="doc-param-details"> <p>Path to the directory containing the JSON files (will recursively look for files in subdirectories).</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code><span title="typing.Union">Union</span>[str, <span title="pathlib.Path">Path</span>]</code> </span> </p> </td> </tr> <tr> <td><code>keep_ipynb_checkpoints</code></td> <td class="doc-param-details"> <p>Whether to keep the files have ".ipynb_checkpoints" in their path.</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code>bool</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>False</code> </span> </p> </td> </tr> <tr> <td><code>filesystem</code></td> <td class="doc-param-details"> <p>The filesystem to use to write the files. If None, the filesystem will be inferred from the path (e.g. <code>s3://</code> will use S3).</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code><span title="typing.Optional">Optional</span>[<span title="edsnlp.utils.file_system.FileSystem">FileSystem</span>]</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>None</code> </span> </p> </td> </tr> <tr> <td><code>shuffle</code></td> <td class="doc-param-details"> <p>Whether to shuffle the data. If "dataset", the whole dataset will be shuffled before starting iterating on it (at the start of every epoch if looping).</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code><span title="typing_extensions.Literal">Literal</span>['dataset', False]</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>False</code> </span> </p> </td> </tr> <tr> <td><code>seed</code></td> <td class="doc-param-details"> <p>The seed to use for shuffling.</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code>int</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>42</code> </span> </p> </td> </tr> <tr> <td><code>loop</code></td> <td class="doc-param-details"> <p>Whether to loop over the data indefinitely.</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code>bool</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>False</code> </span> </p> </td> </tr> <tr> <td><code>converter</code></td> <td class="doc-param-details"> <p>Converters to use to convert the JSON objects to Doc objects. These are documented on the <a href="../converters">Converters</a> page.</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code><span title="typing.Optional">Optional</span>[<span title="edsnlp.utils.typing.AsList">AsList</span>[<span title="typing.Union">Union</span>[str, <span title="typing.Callable">Callable</span>]]]</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>None</code> </span> </p> </td> </tr> <tr> <td><code>kwargs</code></td> <td class="doc-param-details"> <p>Additional keyword arguments to pass to the converter. These are documented on the <a href="../converters">Converters</a> page.</p> <p> <span class="doc-param-default"> <b>DEFAULT:</b> <code>{}</code> </span> </p> </td> </tr> </tbody> </table> <table> <thead> <tr> <th><b>RETURNS</b></th> <th><b>DESCRIPTION</b></th> </tr> </thead> <tbody> <tr> <td> <span class="doc-returns-annotation"> <code><a class="autorefs autorefs-internal" href="../../concepts/inference/#edsnlp.core.stream.Stream" title="edsnlp.core.stream.Stream">Stream</a></code> </span> </td> <td class="doc-returns-details"> <div class="doc-md-description"> </div> </td> </tr> </tbody> </table> </div> </div><h2 class="sourced-heading" id="edsnlp.data.json.write_json">Writing JSON files<span class="sourced-heading-spacer"></span><a href="https://github.com/aphp/edsnlp/blob/67be53851/edsnlp/data/json.py#L300" target="_blank">[source]</a></h2> <div class="doc doc-object doc-function"> <div class="doc doc-contents first"> <p><code>edsnlp.data.write_json</code> writes a list of documents using the JSON format in a directory. If <code>lines</code> is false, each document will be stored in its own JSON file, named after the FILENAME field returned by the converter (commonly the <code>note_id</code> attribute of the documents), and subdirectories will be created if the name contains <code>/</code> characters.</p> <h3 id="edsnlp.data.json.write_json--example">Example</h3> <div class="no-check highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">edsnlp</span>
</code></pre></div> </div> <h3 id="edsnlp.data.json.read_json--parameters">Parameters</h3> <table> <thead> <tr> <th><b>PARAMETER</b></th> <th><b>DESCRIPTION</b></th> </tr> </thead> <tbody> <tr> <td><code>path</code></td> <td class="doc-param-details"> <p>Path to the directory containing the JSON files (will recursively look for files in subdirectories).</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code><span title="typing.Union">Union</span>[str, <span title="pathlib.Path">Path</span>]</code> </span> </p> </td> </tr> <tr> <td><code>keep_ipynb_checkpoints</code></td> <td class="doc-param-details"> <p>Whether to keep the files have ".ipynb_checkpoints" in their path.</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code>bool</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>False</code> </span> </p> </td> </tr> <tr> <td><code>filesystem</code></td> <td class="doc-param-details"> <p>The filesystem to use to write the files. If None, the filesystem will be inferred from the path (e.g. <code>s3://</code> will use S3).</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code><span title="typing.Optional">Optional</span>[<span title="edsnlp.utils.file_system.FileSystem">FileSystem</span>]</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>None</code> </span> </p> </td> </tr> <tr> <td><code>shuffle</code></td> <td class="doc-param-details"> <p>Whether to shuffle the data. If "dataset", the whole dataset will be shuffled before starting iterating on it (at the start of every epoch if looping).</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code><span title="typing_extensions.Literal">Literal</span>['dataset', False]</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>False</code> </span> </p> </td> </tr> <tr> <td><code>seed</code></td> <td class="doc-param-details"> <p>The seed to use for shuffling.</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code>int</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>42</code> </span> </p> </td> </tr> <tr> <td><code>loop</code></td> <td class="doc-param-details"> <p>Whether to loop over the data indefinitely.</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code>bool</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>False</code> </span> </p> </td> </tr> <tr> <td><code>converter</code></td> <td class="doc-param-details"> <p>Converters to use to convert the JSON objects to Doc objects. These are documented on the <a href="../converters">Converters</a> page.</p> <p> <span class="doc-param-annotation"> <b>TYPE:</b> <code><span title="typing.Optional">Optional</span>[<span title="edsnlp.utils.typing.AsList">AsList</span>[<span title="typing.Union">Union</span>[str, <span title="typing.Callable">Callable</span>]]]</code> </span> <span class="doc-param-default"> <b>DEFAULT:</b> <code>None</code> </span> </p> </td> </tr> <tr> <td><code>kwargs</code></td> <td class="doc-param-details"> <p>Additional keyword arguments to pass to the converter. These are documented on the <a href="../converters">Converters</a> page.</p> <p> <span class="doc-param-default"> <b>DEFAULT:</b> <code>{}</code> </span> </p> </td> </tr> </tbody> </table> <table> <thead> <tr> <th><b>RETURNS</b></th> <th><b>DESCRIPTION</b></th> </tr> </thead> <tbody> <tr> <td> <span class="doc-returns-annotation"> <code><a class="autorefs autorefs-internal" href="../../concepts/inference/#edsnlp.core.stream.Stream" title="edsnlp.core.stream.Stream">Stream</a></code> </span> </td> <td class="doc-returns-details"> <div class="doc-md-description"> </div> </td> </tr> </tbody> </table> </div> </div><h2 class="sourced-heading" id="edsnlp.data.json.write_json">Writing JSON files<span class="sourced-heading-spacer"></span><a href="https://github.com/aphp/edsnlp/blob/fe816592c/edsnlp/data/json.py#L300" target="_blank">[source]</a></h2> <div class="doc doc-object doc-function"> <div class="doc doc-contents first"> <p><code>edsnlp.data.write_json</code> writes a list of documents using the JSON format in a directory. If <code>lines</code> is false, each document will be stored in its own JSON file, named after the FILENAME field returned by the converter (commonly the <code>note_id</code> attribute of the documents), and subdirectories will be created if the name contains <code>/</code> characters.</p> <h3 id="edsnlp.data.json.write_json--example">Example</h3> <div class="no-check highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">edsnlp</span>

<span class="n">nlp</span> <span class="o">=</span> <span class="n">edsnlp</span><span class="o">.</span><span class="n"><html><head></head><body><a class="discrete-link" href="../../reference/edsnlp/core/pipeline/#edsnlp.core.pipeline.blank">blank</a></body></html></span><span class="p">(</span><span class="s2">"eds"</span><span class="p">)</span>
<span class="n">nlp</span><span class="o">.</span><span class="n"><html><head></head><body><a class="discrete-link" href="../../reference/edsnlp/core/pipeline/#edsnlp.core.pipeline.Pipeline.add_pipe">add_pipe</a></body></html></span><span class="p">(</span><span class="o">...</span><span class="p">)</span>
Expand Down
Loading

0 comments on commit 864c4cb

Please sign in to comment.