Skip to content

Commit dae9981

Browse files
committed
[DOCS] Update Python docs
1 parent 15e278a commit dae9981

File tree

9 files changed

+105
-33
lines changed

9 files changed

+105
-33
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

docs/api/python/api/context/systemds_context.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,21 @@ <h1>SystemDSContext<a class="headerlink" href="#systemdscontext" title="Permalin
278278
<dd><p>Close the connection to the java process and do necessary cleanup.</p>
279279
</dd></dl>
280280

281+
<dl class="py method">
282+
<dt id="systemds.context.SystemDSContext.combine">
283+
<code class="sig-name descname">combine</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span><span class="p">:</span> <span class="n">Sequence<span class="p">[</span>Union<span class="p">[</span>DAGNode<span class="p">, </span>str<span class="p">, </span>int<span class="p">, </span>float<span class="p">, </span>bool<span class="p">]</span><span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; systemds.operator.nodes.combine.Combine<a class="headerlink" href="#systemds.context.SystemDSContext.combine" title="Permalink to this definition"></a></dt>
284+
<dd><p>combine nodes to call compute on multiple operations.</p>
285+
<p>This is usefull for the case of having multiple writes in one script and wanting
286+
to execute all in one execution reusing intermediates.</p>
287+
<p>Note this combine does not allow to return anything to the user, so if used,
288+
please only use nodes that end with either writing or printing elements.</p>
289+
<dl class="field-list simple">
290+
<dt class="field-odd">Parameters</dt>
291+
<dd class="field-odd"><p><strong>args</strong> – A sequence that will be executed with call to compute()</p>
292+
</dd>
293+
</dl>
294+
</dd></dl>
295+
281296
<dl class="py method">
282297
<dt id="systemds.context.SystemDSContext.dict">
283298
<code class="sig-name descname">dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="n">Dict<span class="p">[</span>str<span class="p">, </span>Union<span class="p">[</span>DAGNode<span class="p">, </span>str<span class="p">, </span>int<span class="p">, </span>float<span class="p">, </span>bool<span class="p">]</span><span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; systemds.operator.nodes.list.List<a class="headerlink" href="#systemds.context.SystemDSContext.dict" title="Permalink to this definition"></a></dt>

docs/api/python/genindex.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ <h2 id="C">C</h2>
327327
<li><a href="api/script_building/dag.html#systemds.script_building.dag.DAGNode.code_line">(systemds.script_building.dag.DAGNode method)</a>
328328
</li>
329329
</ul></li>
330+
<li><a href="api/context/systemds_context.html#systemds.context.SystemDSContext.combine">combine() (systemds.context.SystemDSContext method)</a>
331+
</li>
330332
<li><a href="api/operator/algorithms.html#systemds.operator.algorithm.components">components() (in module systemds.operator.algorithm)</a>
331333
</li>
332334
<li><a href="api/operator/node/frame.html#systemds.operator.Frame.compute">compute() (systemds.operator.Frame method)</a>

docs/api/python/guide/python_end_to_end_tut.html

Lines changed: 64 additions & 21 deletions
Large diffs are not rendered by default.

docs/api/python/objects.inv

4 Bytes
Binary file not shown.

docs/api/python/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/python/sources/guide/python_end_to_end_tut.rst.txt

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,13 @@ For this we will introduce another dml file, which can be used to train a basic
118118
Step 1: Obtain data
119119
~~~~~~~~~~~~~~~~~~~
120120

121-
For the whole data setup please refer to level 1, Step 1, as these steps are identical.
121+
For the whole data setup please refer to level 1, Step 1, as these steps are almost identical,
122+
but instead of preparing the test data, we only prepare the training data.
122123

123124
.. include:: ../code/guide/end_to_end/part2.py
124125
:code: python
125126
:start-line: 20
126-
:end-line: 51
127+
:end-line: 47
127128

128129
Step 2: Load the algorithm
129130
~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -134,12 +135,10 @@ This file includes all the necessary functions for training, evaluating, and sto
134135
The returned object of the source call is further used for calling the functions.
135136
The file can be found here:
136137

137-
- :doc:tests/examples/tutorials/neural_net_source.dml
138-
139138
.. include:: ../code/guide/end_to_end/part2.py
140139
:code: python
141-
:start-line: 54
142-
:end-line: 55
140+
:start-line: 48
141+
:end-line: 51
143142

144143

145144
Step 3: Training the neural network
@@ -153,8 +152,8 @@ The seed argument ensures that running the code again yields the same results.
153152

154153
.. include:: ../code/guide/end_to_end/part2.py
155154
:code: python
156-
:start-line: 61
157-
:end-line: 62
155+
:start-line: 52
156+
:end-line: 58
158157

159158

160159
Step 4: Saving the model
@@ -163,20 +162,33 @@ Step 4: Saving the model
163162
For later usage, we can save the trained model.
164163
We only need to specify the name of our model and the file path.
165164
This call stores the weights and biases of our model.
165+
Similarly the transformation metadata to transform input data to the model,
166+
is saved.
166167

167168
.. include:: ../code/guide/end_to_end/part2.py
168169
:code: python
169-
:start-line: 64
170+
:start-line: 59
170171
:end-line: 65
171172

173+
Step 5: Predict on Unseen data
174+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175+
176+
Once the model is saved along with metadata, it is simple to apply it all to
177+
unseen data:
178+
179+
.. include:: ../code/guide/end_to_end/part2.py
180+
:code: python
181+
:start-line: 66
182+
:end-line: 77
183+
172184

173185
Full Script NN
174-
~~~~~~~~~~~---
186+
~~~~~~~~~~~~~~
175187

176188
The complete script now can be seen here:
177189

178190

179191
.. include:: ../code/guide/end_to_end/part2.py
180192
:code: python
181193
:start-line: 20
182-
:end-line: 64
194+
:end-line: 80

0 commit comments

Comments
 (0)