Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit 093c454

Browse files
committed
doc update
1 parent d75e5cd commit 093c454

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+189
-71
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ <h2 id="copyright">Copyright</h2>
163163
<br class="clear">
164164

165165
<footer>
166-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
166+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
167167
</footer>
168168

169169
<script>prettyPrint();</script>

docs/jobs.html

Lines changed: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ <h6>Properties</h6>
15191519

15201520

15211521

1522-
<td class="description last"><p>A required reference to a container name or container link to be used for the job.</p></td>
1522+
<td class="description last"><p>A required reference to a docker image in a public or private docker registry, or a container name provided by Paperspace. Docker image repository references must be in lowercase and may include a tag and a hostname prefix followed by a slash; if ommitted the hostname defaults to that of the public Docker Hub registry. An example docker image reference: 'docker.io/mynamespace/myimage:mytag'. A container name may be mixed case. (Designated container names are currently only provided as part of various Gradient tutorials and samples.)</p></td>
15231523
</tr>
15241524

15251525

@@ -1552,7 +1552,7 @@ <h6>Properties</h6>
15521552

15531553

15541554

1555-
<td class="description last"><p>An optional machine type to run the job on: either 'GPU+', 'P4000', 'P5000', 'P6000', 'V100', 'K80', or 'P100'.<p>Defaults to 'K80'. <P>Note: the 'K80' and 'P100' machineTypes run on Google Cloud Platform (GCP). The other machineTypes run on the Paperspace Cloud. Google Cloud platform and Paperspace Cloud have distict Job Storage spaces; Job storage is not currently shared between these two cloud environments.</p></td>
1555+
<td class="description last"><p>An optional machine type to run the job on: either 'GPU+', 'P4000', 'P5000', 'P6000', 'V100', 'K80', 'P100', or 'TPU'.<p>Defaults to 'K80'. <P>Note: the 'K80', 'P100', and 'TPU' machineTypes run on Google Cloud Platform (GCP). The other machineTypes run on the Paperspace Cloud. Google Cloud platform and Paperspace Cloud have distict Job Storage spaces; Job storage is not currently shared between these two cloud environments.</p></td>
15561556
</tr>
15571557

15581558

@@ -1585,7 +1585,7 @@ <h6>Properties</h6>
15851585

15861586

15871587

1588-
<td class="description last"><p>An optional name or description for this job. If ommitted, the job name defaults to 'job for project [projectname]'.</p></td>
1588+
<td class="description last"><p>An optional name or description for this job. If ommitted, the job name defaults to 'job N' where N represents the Nth job instance for the given project.</p></td>
15891589
</tr>
15901590

15911591

@@ -1717,7 +1717,7 @@ <h6>Properties</h6>
17171717

17181718

17191719

1720-
<td class="description last"><p>An optional path to a workspace, or link to a git repository to upload and merge with the container. If a zip file name is provided it is uploaded instead. If no workspace is provided the current directory is zipped up and transferred. If the workspace is 'none', no workspace is merged and the container is run as-is. To download a git repository provide an https repository link and prefix it with 'git+', e.g. 'git+https://github.com/MyProjects/MyRepo.git'. S3 links are also supported using the schema 's3://bucketname/objectname'.</p></td>
1720+
<td class="description last"><p>An optional path to a workspace, or link to a git repository to upload and merge with the container. If a zip file name is provided it is uploaded instead. If no workspace is provided the current directory is zipped up and transferred. If the workspace is 'none', no workspace is merged and the container is run as-is. To download a git repository provide an https repository link and optionally prefix it with 'git+', e.g. 'https://github.com/MyProjects/MyRepo.git'. If the 'git+' prefix is not specified, it is added at the time of download to the job runner machine. S3 links are also supported using the schema 's3://bucketname/objectname'.</p></td>
17211721
</tr>
17221722

17231723

@@ -2284,7 +2284,7 @@ <h6>Properties</h6>
22842284

22852285

22862286

2287-
<h4 class="name" id=".list"><span class="type-signature">(static) </span>list<span class="signature">(filter<span class="signature-attributes">opt</span>, cb)</span><span class="type-signature"> &rarr; {array}</span></h4>
2287+
<h4 class="name" id=".list"><span class="type-signature">(static) </span>list<span class="signature">(filter<span class="signature-attributes">opt</span>, summary<span class="signature-attributes">opt</span>, cb)</span><span class="type-signature"> &rarr; {array}</span></h4>
22882288

22892289

22902290

@@ -2296,7 +2296,7 @@ <h4 class="name" id=".list"><span class="type-signature">(static) </span>list<sp
22962296

22972297
<dt class="tag-source">Source:</dt>
22982298
<dd class="tag-source"><ul class="dummy"><li>
2299-
<a href="jobs_list.js.html">jobs/list.js</a>, <a href="jobs_list.js.html#line8">line 8</a>
2299+
<a href="jobs_list.js.html">jobs/list.js</a>, <a href="jobs_list.js.html#line9">line 9</a>
23002300
</li></ul></dd>
23012301

23022302

@@ -2357,7 +2357,7 @@ <h5>Examples</h5>
23572357
// handle error or result
23582358
});</code></pre>
23592359

2360-
<pre class="prettyprint"><code>$ paperspace jobs list --project "MyProject"</code></pre>
2360+
<pre class="prettyprint"><code>$ paperspace jobs list --project "MyProject" --state Running --summary</code></pre>
23612361

23622362
<pre class="prettyprint"><code># HTTP request:
23632363
https://api.paperspace.io
@@ -2774,6 +2774,39 @@ <h6>Properties</h6>
27742774

27752775

27762776

2777+
<td class="description last"><p>Optional dataset to match on</p></td>
2778+
</tr>
2779+
2780+
2781+
2782+
<tr>
2783+
2784+
<td class="name"><code>dataset</code></td>
2785+
2786+
2787+
<td class="type">
2788+
2789+
2790+
<span class="param-type">string</span>
2791+
2792+
2793+
2794+
</td>
2795+
2796+
2797+
<td class="attributes">
2798+
2799+
&lt;optional><br>
2800+
2801+
2802+
2803+
2804+
2805+
</td>
2806+
2807+
2808+
2809+
27772810
<td class="description last"><p>Optional dataset to match on</p></td>
27782811
</tr>
27792812

@@ -2786,6 +2819,39 @@ <h6>Properties</h6>
27862819

27872820

27882821

2822+
<tr>
2823+
2824+
<td class="name"><code>summary</code></td>
2825+
2826+
2827+
<td class="type">
2828+
2829+
2830+
<span class="param-type">boolean</span>
2831+
2832+
2833+
2834+
</td>
2835+
2836+
2837+
<td class="attributes">
2838+
2839+
&lt;optional><br>
2840+
2841+
2842+
2843+
2844+
2845+
</td>
2846+
2847+
2848+
2849+
2850+
<td class="description last"><p>Optional (command line argument only). Format output as a summary table.</p></td>
2851+
</tr>
2852+
2853+
2854+
27892855
<tr>
27902856

27912857
<td class="name"><code>cb</code></td>
@@ -2936,7 +3002,7 @@ <h5>Examples</h5>
29363002
--jobId "j123abc"</code></pre>
29373003

29383004
<pre class="prettyprint"><code># HTTP request:
2939-
https://api.paperspace.io
3005+
https://logs.paperspace.io
29403006
GET /jobs/logs?jobId=j123abc
29413007
x-api-key: 1ba4f98e7c0...
29423008
# Returns 200 on success</code></pre>
@@ -4469,7 +4535,7 @@ <h5>Returns:</h5>
44694535
<br class="clear">
44704536

44714537
<footer>
4472-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
4538+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
44734539
</footer>
44744540

44754541
<script>prettyPrint();</script>

docs/jobs_artifactsDestroy.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h1 class="page-title">jobs/artifactsDestroy.js</h1>
102102
<br class="clear">
103103

104104
<footer>
105-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
105+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
106106
</footer>
107107

108108
<script>prettyPrint();</script>

docs/jobs_artifactsGet.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h1 class="page-title">jobs/artifactsGet.js</h1>
280280
<br class="clear">
281281

282282
<footer>
283-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
283+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
284284
</footer>
285285

286286
<script>prettyPrint();</script>

docs/jobs_artifactsList.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ <h1 class="page-title">jobs/artifactsList.js</h1>
133133
<br class="clear">
134134

135135
<footer>
136-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
136+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
137137
</footer>
138138

139139
<script>prettyPrint();</script>

docs/jobs_clone.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h1 class="page-title">jobs/clone.js</h1>
130130
<br class="clear">
131131

132132
<footer>
133-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
133+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
134134
</footer>
135135

136136
<script>prettyPrint();</script>

docs/jobs_create.js.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ <h1 class="page-title">jobs/create.js</h1>
5959
* @method create
6060
* @description Create a new Paperspace job, and tail its log output if run at the command line. To disable the tailing behavior specify '--tail false'. Note: if a project is not defined for the current working directory, and you are running in command line mode, a project configuration settings file will be created. Use '--init false' or specify '--project [projectname]' to override this behavior.
6161
* @param {object} params - Job creation parameters
62-
* @param {string} params.container - A required reference to a container name or container link to be used for the job.
63-
* @param {string} [params.machineType] - An optional machine type to run the job on: either 'GPU+', 'P4000', 'P5000', 'P6000', 'V100', 'K80', or 'P100'.&lt;p>Defaults to 'K80'. &lt;P>Note: the 'K80' and 'P100' machineTypes run on Google Cloud Platform (GCP). The other machineTypes run on the Paperspace Cloud. Google Cloud platform and Paperspace Cloud have distict Job Storage spaces; Job storage is not currently shared between these two cloud environments.
64-
* @param {string} [params.name] - An optional name or description for this job. If ommitted, the job name defaults to 'job for project [projectname]'.
62+
* @param {string} params.container - A required reference to a docker image in a public or private docker registry, or a container name provided by Paperspace. Docker image repository references must be in lowercase and may include a tag and a hostname prefix followed by a slash; if ommitted the hostname defaults to that of the public Docker Hub registry. An example docker image reference: 'docker.io/mynamespace/myimage:mytag'. A container name may be mixed case. (Designated container names are currently only provided as part of various Gradient tutorials and samples.)
63+
* @param {string} [params.machineType] - An optional machine type to run the job on: either 'GPU+', 'P4000', 'P5000', 'P6000', 'V100', 'K80', 'P100', or 'TPU'.&lt;p>Defaults to 'K80'. &lt;P>Note: the 'K80', 'P100', and 'TPU' machineTypes run on Google Cloud Platform (GCP). The other machineTypes run on the Paperspace Cloud. Google Cloud platform and Paperspace Cloud have distict Job Storage spaces; Job storage is not currently shared between these two cloud environments.
64+
* @param {string} [params.name] - An optional name or description for this job. If ommitted, the job name defaults to 'job N' where N represents the Nth job instance for the given project.
6565
* @param {string} [params.project] - The name of the project for this job. If not provided, this is taken from the .ps_project/config.json file, or the current directory name.
6666
* @param {string} [params.projectId] - The poject id of an existing project for this job. Note: if projectId is specified, the project parameter cannot be specified.
6767
* @param {string} [params.command] - An optional command to run within the workspace or container.
68-
* @param {string} [params.workspace] - An optional path to a workspace, or link to a git repository to upload and merge with the container. If a zip file name is provided it is uploaded instead. If no workspace is provided the current directory is zipped up and transferred. If the workspace is 'none', no workspace is merged and the container is run as-is. To download a git repository provide an https repository link and prefix it with 'git+', e.g. 'git+https://github.com/MyProjects/MyRepo.git'. S3 links are also supported using the schema 's3://bucketname/objectname'.
68+
* @param {string} [params.workspace] - An optional path to a workspace, or link to a git repository to upload and merge with the container. If a zip file name is provided it is uploaded instead. If no workspace is provided the current directory is zipped up and transferred. If the workspace is 'none', no workspace is merged and the container is run as-is. To download a git repository provide an https repository link and optionally prefix it with 'git+', e.g. 'https://github.com/MyProjects/MyRepo.git'. If the 'git+' prefix is not specified, it is added at the time of download to the job runner machine. S3 links are also supported using the schema 's3://bucketname/objectname'.
6969
* @param {string} [params.dataset] - An optional reference to a dataset to be merged with the container.
7070
* @param {string} [params.registryUsername] - An optional username for accessing an image hosted on a private container registry. Note: you must specify this option every time a private image is specified for the container.
7171
* @param {string} [params.registryPassword] - An optional password for accessing an image hosted on a private container registry. Note: you must specify this option every time a private image is specified for the container.
@@ -514,7 +514,7 @@ <h1 class="page-title">jobs/create.js</h1>
514514
<br class="clear">
515515

516516
<footer>
517-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
517+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
518518
</footer>
519519

520520
<script>prettyPrint();</script>

docs/jobs_destroy.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h1 class="page-title">jobs/destroy.js</h1>
103103
<br class="clear">
104104

105105
<footer>
106-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
106+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
107107
</footer>
108108

109109
<script>prettyPrint();</script>

docs/jobs_index.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h1 class="page-title">jobs/index.js</h1>
6969
<br class="clear">
7070

7171
<footer>
72-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
72+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
7373
</footer>
7474

7575
<script>prettyPrint();</script>

docs/jobs_list.js.html

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ <h1 class="page-title">jobs/list.js</h1>
4343
var projectConfig = require('./../projectConfig');
4444
var assign = require('lodash.assign');
4545
var path = require('path');
46+
var Table = require('table');
4647

4748
/**
4849
* @memberof jobs
@@ -60,6 +61,8 @@ <h1 class="page-title">jobs/list.js</h1>
6061
* @param {string} [filter.command] - Optional command to match on
6162
* @param {string} [filter.workspace] - Optional workspace path to match on. Note: the original workspace path will be modified on upload to point to a temporary location.
6263
* @param {string} [filter.dataset] - Optional dataset to match on
64+
* @param {string} [filter.dataset] - Optional dataset to match on
65+
* @param {boolean} [summary] - Optional (command line argument only). Format output as a summary table.
6366
* @param {function} cb - Node-style error-first callback function
6467
* @returns {array} [ job, ... ] - JSON array of job objects
6568
* @example
@@ -69,7 +72,7 @@ <h1 class="page-title">jobs/list.js</h1>
6972
* // handle error or result
7073
* });
7174
* @example
72-
* $ paperspace jobs list --project "MyProject"
75+
* $ paperspace jobs list --project "MyProject" --state Running --summary
7376
* @example
7477
* # HTTP request:
7578
* https://api.paperspace.io
@@ -114,6 +117,11 @@ <h1 class="page-title">jobs/list.js</h1>
114117
*/
115118

116119
function list(params, cb) {
120+
var summary = false;
121+
if (params.summary) {
122+
summary = params.summary;
123+
delete params.summary;
124+
}
117125
if (!params.project &amp;&amp; !params.projectId) {
118126
// default to name of project in .ps_project/config or name of current directory
119127
params.project = projectConfig.getProject();
@@ -130,7 +138,50 @@ <h1 class="page-title">jobs/list.js</h1>
130138
}
131139
}
132140
}
133-
return method(list, params, cb);
141+
return method(list, params, function listCb(err, data) {
142+
if (global.paperspace_cli &amp;&amp; summary) {
143+
var tableConfig = {
144+
columns: {
145+
0: {
146+
alignment: 'left'
147+
},
148+
1: {
149+
alignment: 'left'
150+
},
151+
2: {
152+
alignment: 'left'
153+
},
154+
3: {
155+
alignment: 'left'
156+
},
157+
4: {
158+
alignment: 'left'
159+
},
160+
5: {
161+
alignment: 'left'
162+
},
163+
6: {
164+
alignment: 'left',
165+
width: 30
166+
}
167+
}
168+
};
169+
var tableData = [];
170+
171+
if (err) return cb(err);
172+
if (data &amp;&amp; data.length) {
173+
tableData.push(['jobId', 'project', 'name', 'state', 'dtCreated', 'exitCode', 'entrypoint']);
174+
data.forEach(function itemFunc(item) {
175+
if (item.id) {
176+
tableData.push([item.id, item.project, item.name, item.state, item.dtCreated, item.exitCode, item.entrypoint]);
177+
}
178+
});
179+
var output = Table.table(tableData, tableConfig);
180+
console.log(output);
181+
}
182+
return cb();
183+
} else return cb(err, data);
184+
});
134185
}
135186

136187
assign(list, {
@@ -156,7 +207,7 @@ <h1 class="page-title">jobs/list.js</h1>
156207
<br class="clear">
157208

158209
<footer>
159-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
210+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 25 2018 01:17:36 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
160211
</footer>
161212

162213
<script>prettyPrint();</script>

0 commit comments

Comments
 (0)