Skip to content

Commit

Permalink
Deployed 84a4697 to stable with MkDocs 1.5.3 and mike 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
maclandrol committed Nov 27, 2024
1 parent f05bada commit 7a59227
Show file tree
Hide file tree
Showing 13 changed files with 1,121 additions and 447 deletions.
1,369 changes: 964 additions & 405 deletions stable/api/safe.html

Large diffs are not rendered by default.

100 changes: 85 additions & 15 deletions stable/api/safe.models.html
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,11 @@ <h2 id="safe-model">SAFE Model<a class="headerlink" href="#safe-model" title="Pe








<div class="doc doc-children">


Expand Down Expand Up @@ -1159,7 +1164,9 @@ <h2 id="safe.trainer.model.PropertyHead" class="doc doc-heading">
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>config</code></td>
<td>
<code>config</code>
</td>
<td>
<code>[`PretrainedConfig`]</code>
</td>
Expand Down Expand Up @@ -1187,6 +1194,11 @@ <h2 id="safe.trainer.model.PropertyHead" class="doc doc-heading">
</tbody>
</table>






<details class="quote">
<summary>Source code in <code>safe/trainer/model.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 17</span>
Expand Down Expand Up @@ -1405,7 +1417,9 @@ <h3 id="safe.trainer.model.PropertyHead.forward" class="doc doc-heading">
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>hidden_states</code></td>
<td>
<code>hidden_states</code>
</td>
<td>
<code><span title="torch.FloatTensor">FloatTensor</span></code>
</td>
Expand All @@ -1420,7 +1434,9 @@ <h3 id="safe.trainer.model.PropertyHead.forward" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>cls_index</code></td>
<td>
<code>cls_index</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Optional" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a>[<span title="torch.LongTensor">LongTensor</span>]</code>
</td>
Expand Down Expand Up @@ -1588,6 +1604,11 @@ <h2 id="safe.trainer.model.SAFEDoubleHeadsModel" class="doc doc-heading">

<p>The safe model is a dual head GPT2 model with a language modeling head and an optional multi-task regression head</p>






<details class="quote">
<summary>Source code in <code>safe/trainer/model.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">107</span>
Expand Down Expand Up @@ -1851,7 +1872,9 @@ <h3 id="safe.trainer.model.SAFEDoubleHeadsModel.forward" class="doc doc-heading"
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>mc_token_ids</code></td>
<td>
<code>mc_token_ids</code>
</td>
<td>
<code>`torch.LongTensor` of shape `(batch_size, num_choices)`, *optional*, default to index of the last token of the input</code>
</td>
Expand All @@ -1866,7 +1889,9 @@ <h3 id="safe.trainer.model.SAFEDoubleHeadsModel.forward" class="doc doc-heading"
</td>
</tr>
<tr class="doc-section-item">
<td><code>labels</code></td>
<td>
<code>labels</code>
</td>
<td>
<code>`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*</code>
</td>
Expand All @@ -1882,7 +1907,9 @@ <h3 id="safe.trainer.model.SAFEDoubleHeadsModel.forward" class="doc doc-heading"
</td>
</tr>
<tr class="doc-section-item">
<td><code>mc_labels</code></td>
<td>
<code>mc_labels</code>
</td>
<td>
<code>`torch.LongTensor` of shape `(batch_size, n_tasks)`, *optional*</code>
</td>
Expand All @@ -1896,7 +1923,9 @@ <h3 id="safe.trainer.model.SAFEDoubleHeadsModel.forward" class="doc doc-heading"
</td>
</tr>
<tr class="doc-section-item">
<td><code>inputs</code></td>
<td>
<code>inputs</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Optional" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a>[<a class="autorefs autorefs-external" title="typing.Any" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>]</code>
</td>
Expand Down Expand Up @@ -2151,6 +2180,11 @@ <h2 id="trainer">Trainer<a class="headerlink" href="#trainer" title="Permanent l








<div class="doc doc-children">


Expand Down Expand Up @@ -2179,6 +2213,11 @@ <h2 id="safe.trainer.trainer_utils.SAFETrainer" class="doc doc-heading">
<p>Custom trainer for training SAFE model.</p>
<p>This custom trainer changes the loss function to support the property head</p>






<details class="quote">
<summary>Source code in <code>safe/trainer/trainer_utils.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 7</span>
Expand Down Expand Up @@ -2411,6 +2450,11 @@ <h2 id="data-collator">Data Collator<a class="headerlink" href="#data-collator"








<div class="doc doc-children">


Expand Down Expand Up @@ -2441,6 +2485,11 @@ <h2 id="safe.trainer.collator.SAFECollator" class="doc doc-heading">
see: <a href="https://github.com/huggingface/transformers/blob/v4.19.2/src/transformers/data/data_collator.py">https://github.com/huggingface/transformers/blob/v4.19.2/src/transformers/data/data_collator.py</a></p>
</div>






<details class="quote">
<summary>Source code in <code>safe/trainer/collator.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 13</span>
Expand Down Expand Up @@ -2679,7 +2728,9 @@ <h3 id="safe.trainer.collator.SAFECollator.__call__" class="doc doc-heading">
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>samples</code></td>
<td>
<code>samples</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.List" href="https://docs.python.org/3/library/typing.html#typing.List">List</a>[<a class="autorefs autorefs-external" title="typing.Union" href="https://docs.python.org/3/library/typing.html#typing.Union">Union</a>[<a class="autorefs autorefs-external" title="typing.List" href="https://docs.python.org/3/library/typing.html#typing.List">List</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#int">int</a>], <a class="autorefs autorefs-external" title="typing.Any" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>, <a class="autorefs autorefs-external" title="typing.Dict" href="https://docs.python.org/3/library/typing.html#typing.Dict">Dict</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>, <a class="autorefs autorefs-external" title="typing.Any" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>]]]</code>
</td>
Expand Down Expand Up @@ -2832,7 +2883,9 @@ <h3 id="safe.trainer.collator.SAFECollator.__init__" class="doc doc-heading">
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>tokenizer</code></td>
<td>
<code>tokenizer</code>
</td>
<td>
<code><span title="tokenizers.Tokenizer">Tokenizer</span></code>
</td>
Expand All @@ -2846,7 +2899,9 @@ <h3 id="safe.trainer.collator.SAFECollator.__init__" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>input_key</code></td>
<td>
<code>input_key</code>
</td>
<td>
<code><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></code>
</td>
Expand All @@ -2860,7 +2915,9 @@ <h3 id="safe.trainer.collator.SAFECollator.__init__" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>label_key</code></td>
<td>
<code>label_key</code>
</td>
<td>
<code><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></code>
</td>
Expand All @@ -2874,7 +2931,9 @@ <h3 id="safe.trainer.collator.SAFECollator.__init__" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>property_key</code></td>
<td>
<code>property_key</code>
</td>
<td>
<code><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></code>
</td>
Expand All @@ -2888,7 +2947,9 @@ <h3 id="safe.trainer.collator.SAFECollator.__init__" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>include_descriptors</code></td>
<td>
<code>include_descriptors</code>
</td>
<td>
<code><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#bool">bool</a></code>
</td>
Expand All @@ -2902,7 +2963,9 @@ <h3 id="safe.trainer.collator.SAFECollator.__init__" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>pad_to_multiple_of</code></td>
<td>
<code>pad_to_multiple_of</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Optional" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#int">int</a>]</code>
</td>
Expand Down Expand Up @@ -3047,6 +3110,11 @@ <h2 id="data-utils">Data Utils<a class="headerlink" href="#data-utils" title="Pe








<div class="doc doc-children">


Expand Down Expand Up @@ -3259,7 +3327,9 @@ <h2 id="safe.trainer.data_utils.get_dataset_column_names" class="doc doc-heading
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dataset</code></td>
<td>
<code>dataset</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Union" href="https://docs.python.org/3/library/typing.html#typing.Union">Union</a>[<span title="datasets.Dataset">Dataset</span>, <span title="datasets.IterableDataset">IterableDataset</span>, <a class="autorefs autorefs-external" title="collections.abc.Mapping" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping">Mapping</a>]</code>
</td>
Expand Down
37 changes: 29 additions & 8 deletions stable/api/safe.viz.html
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,11 @@ <h1>Visualization</h1>








<div class="doc doc-children">


Expand Down Expand Up @@ -694,7 +699,9 @@ <h2 id="safe.viz.to_image" class="doc doc-heading">
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>safe_str</code></td>
<td>
<code>safe_str</code>
</td>
<td>
<code><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></code>
</td>
Expand All @@ -708,7 +715,9 @@ <h2 id="safe.viz.to_image" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>fragments</code></td>
<td>
<code>fragments</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Optional" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a>[<a class="autorefs autorefs-external" title="typing.Union" href="https://docs.python.org/3/library/typing.html#typing.Union">Union</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>, <span title="datamol.Mol">Mol</span>]]</code>
</td>
Expand All @@ -722,7 +731,9 @@ <h2 id="safe.viz.to_image" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>legend</code></td>
<td>
<code>legend</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Union" href="https://docs.python.org/3/library/typing.html#typing.Union">Union</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>, None]</code>
</td>
Expand All @@ -736,7 +747,9 @@ <h2 id="safe.viz.to_image" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>mol_size</code></td>
<td>
<code>mol_size</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Union" href="https://docs.python.org/3/library/typing.html#typing.Union">Union</a>[<a class="autorefs autorefs-external" title="typing.Tuple" href="https://docs.python.org/3/library/typing.html#typing.Tuple">Tuple</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#int">int</a>, <a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#int">int</a>], <a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#int">int</a>]</code>
</td>
Expand All @@ -750,7 +763,9 @@ <h2 id="safe.viz.to_image" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>use_svg</code></td>
<td>
<code>use_svg</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Optional" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#bool">bool</a>]</code>
</td>
Expand All @@ -764,7 +779,9 @@ <h2 id="safe.viz.to_image" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>highlight_mode</code></td>
<td>
<code>highlight_mode</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Optional" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>]</code>
</td>
Expand All @@ -778,7 +795,9 @@ <h2 id="safe.viz.to_image" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>highlight_bond_width_multiplier</code></td>
<td>
<code>highlight_bond_width_multiplier</code>
</td>
<td>
<code><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#int">int</a></code>
</td>
Expand All @@ -792,7 +811,9 @@ <h2 id="safe.viz.to_image" class="doc doc-heading">
</td>
</tr>
<tr class="doc-section-item">
<td><code>**kwargs</code></td>
<td>
<code>**kwargs</code>
</td>
<td>
<code><a class="autorefs autorefs-external" title="typing.Any" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></code>
</td>
Expand Down
Loading

0 comments on commit 7a59227

Please sign in to comment.