Skip to content

Commit fca3501

Browse files
committed
[DOCS] Python API docs update
1 parent de50269 commit fca3501

32 files changed

+233
-790
lines changed

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

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<link rel="index" title="Index" href="../../genindex.html" />
3838
<link rel="search" title="Search" href="../../search.html" />
39-
<link rel="next" title="Data Generators" href="../matrix/data_gen.html" />
39+
<link rel="next" title="Matrix" href="../matrix/matrix.html" />
4040
<link rel="prev" title="Algorithms" href="../operator/algorithms.html" />
4141
</head>
4242

@@ -101,7 +101,6 @@
101101
<ul class="current">
102102
<li class="toctree-l1"><a class="reference internal" href="../operator/algorithms.html">Algorithms</a></li>
103103
<li class="toctree-l1 current"><a class="current reference internal" href="#">SystemDSContext</a></li>
104-
<li class="toctree-l1"><a class="reference internal" href="../matrix/data_gen.html">Data Generators</a></li>
105104
<li class="toctree-l1"><a class="reference internal" href="../matrix/matrix.html">Matrix</a></li>
106105
<li class="toctree-l1"><a class="reference internal" href="../matrix/federated.html">Federated</a></li>
107106
<li class="toctree-l1"><a class="reference internal" href="../operator/operation_node.html">Operation Node</a></li>
@@ -234,6 +233,24 @@ <h1>SystemDSContext<a class="headerlink" href="#systemdscontext" title="Permalin
234233
<dd><p>Method for printing exception, printing stdout and error, while also closing the context correctly.</p>
235234
</dd></dl>
236235

236+
<dl class="py method">
237+
<dt id="systemds.context.SystemDSContext.full">
238+
<code class="sig-name descname">full</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">shape</span><span class="p">:</span> <span class="n">Tuple<span class="p">[</span>int<span class="p">, </span>int<span class="p">]</span></span></em>, <em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; systemds.operator.operation_node.OperationNode<a class="headerlink" href="#systemds.context.SystemDSContext.full" title="Permalink to this definition"></a></dt>
239+
<dd><p>Generates a matrix completely filled with a value</p>
240+
<dl class="field-list simple">
241+
<dt class="field-odd">Parameters</dt>
242+
<dd class="field-odd"><ul class="simple">
243+
<li><p><strong>sds_context</strong> – SystemDS context</p></li>
244+
<li><p><strong>shape</strong> – shape (rows and cols) of the matrix TODO tensor</p></li>
245+
<li><p><strong>value</strong> – the value to fill all cells with</p></li>
246+
</ul>
247+
</dd>
248+
<dt class="field-even">Returns</dt>
249+
<dd class="field-even"><p>the OperationNode representing this operation</p>
250+
</dd>
251+
</dl>
252+
</dd></dl>
253+
237254
<dl class="py method">
238255
<dt id="systemds.context.SystemDSContext.get_stderr">
239256
<code class="sig-name descname">get_stderr</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">lines</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">- 1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#systemds.context.SystemDSContext.get_stderr" title="Permalink to this definition"></a></dt>
@@ -252,6 +269,67 @@ <h1>SystemDSContext<a class="headerlink" href="#systemdscontext" title="Permalin
252269
default -1 prints all current lines in the queue.</p>
253270
</dd></dl>
254271

272+
<dl class="py method">
273+
<dt id="systemds.context.SystemDSContext.rand">
274+
<code class="sig-name descname">rand</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">rows</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">cols</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">min</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">max</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">pdf</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'uniform'</span></em>, <em class="sig-param"><span class="n">sparsity</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">seed</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">lambd</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span> &#x2192; systemds.operator.operation_node.OperationNode<a class="headerlink" href="#systemds.context.SystemDSContext.rand" title="Permalink to this definition"></a></dt>
275+
<dd><p>Generates a matrix filled with random values</p>
276+
<dl class="field-list simple">
277+
<dt class="field-odd">Parameters</dt>
278+
<dd class="field-odd"><ul class="simple">
279+
<li><p><strong>sds_context</strong> – SystemDS context</p></li>
280+
<li><p><strong>rows</strong> – number of rows</p></li>
281+
<li><p><strong>cols</strong> – number of cols</p></li>
282+
<li><p><strong>min</strong> – min value for cells</p></li>
283+
<li><p><strong>max</strong> – max value for cells</p></li>
284+
<li><p><strong>pdf</strong> – “uniform”/”normal”/”poison” distribution</p></li>
285+
<li><p><strong>sparsity</strong> – fraction of non-zero cells</p></li>
286+
<li><p><strong>seed</strong> – random seed</p></li>
287+
<li><p><strong>lambd</strong> – lamda value for “poison” distribution</p></li>
288+
</ul>
289+
</dd>
290+
<dt class="field-even">Returns</dt>
291+
<dd class="field-even"><p></p>
292+
</dd>
293+
</dl>
294+
</dd></dl>
295+
296+
<dl class="py method">
297+
<dt id="systemds.context.SystemDSContext.read">
298+
<code class="sig-name descname">read</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">path</span><span class="p">:</span> <span class="n">os.PathLike</span></em>, <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; OperationNode<a class="headerlink" href="#systemds.context.SystemDSContext.read" title="Permalink to this definition"></a></dt>
299+
<dd><p>Read an file from disk. Supportted types include:
300+
CSV, Matrix Market(coordinate), Text(i,j,v), SystemDS Binay
301+
See: <a class="reference external" href="http://apache.github.io/systemds/site/dml-language-reference#readwrite-built-in-functions">http://apache.github.io/systemds/site/dml-language-reference#readwrite-built-in-functions</a> for more details
302+
:return: an Operation Node, containing the read data.</p>
303+
</dd></dl>
304+
305+
<dl class="py method">
306+
<dt id="systemds.context.SystemDSContext.scalar">
307+
<code class="sig-name descname">scalar</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">v</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; OperationNode<a class="headerlink" href="#systemds.context.SystemDSContext.scalar" title="Permalink to this definition"></a></dt>
308+
<dd><p>Construct an scalar value, this can contain str, float, double, integers and booleans.
309+
:return: An <cite>OperationNode</cite> containing the scalar value.</p>
310+
</dd></dl>
311+
312+
<dl class="py method">
313+
<dt id="systemds.context.SystemDSContext.seq">
314+
<code class="sig-name descname">seq</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">start</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span></em>, <em class="sig-param"><span class="n">stop</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">step</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>float<span class="p">, </span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">1</span></em><span class="sig-paren">)</span> &#x2192; systemds.operator.operation_node.OperationNode<a class="headerlink" href="#systemds.context.SystemDSContext.seq" title="Permalink to this definition"></a></dt>
315+
<dd><p>Create a single column vector with values from <cite>start</cite> to <cite>stop</cite> and an increment of <cite>step</cite>.
316+
If no stop is defined and only one parameter is given, then start will be 0 and the parameter will be interpreted as
317+
stop.</p>
318+
<dl class="field-list simple">
319+
<dt class="field-odd">Parameters</dt>
320+
<dd class="field-odd"><ul class="simple">
321+
<li><p><strong>sds_context</strong> – SystemDS context</p></li>
322+
<li><p><strong>start</strong> – the starting value</p></li>
323+
<li><p><strong>stop</strong> – the maximum value</p></li>
324+
<li><p><strong>step</strong> – the step size</p></li>
325+
</ul>
326+
</dd>
327+
<dt class="field-even">Returns</dt>
328+
<dd class="field-even"><p>the OperationNode representing this operation</p>
329+
</dd>
330+
</dl>
331+
</dd></dl>
332+
255333
</dd></dl>
256334

257335
</div>
@@ -264,7 +342,7 @@ <h1>SystemDSContext<a class="headerlink" href="#systemdscontext" title="Permalin
264342

265343
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
266344

267-
<a href="../matrix/data_gen.html" class="btn btn-neutral float-right" title="Data Generators" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
345+
<a href="../matrix/matrix.html" class="btn btn-neutral float-right" title="Matrix" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
268346

269347

270348
<a href="../operator/algorithms.html" class="btn btn-neutral float-left" title="Algorithms" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

0 commit comments

Comments
 (0)