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

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
sanfilip committed Apr 25, 2018
1 parent d75e5cd commit 093c454
Show file tree
Hide file tree
Showing 56 changed files with 189 additions and 71 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h2 id="copyright">Copyright</h2>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
84 changes: 75 additions & 9 deletions docs/jobs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ <h6>Properties</h6>



<td class="description last"><p>A required reference to a container name or container link to be used for the job.</p></td>
<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>
</tr>


Expand Down Expand Up @@ -1552,7 +1552,7 @@ <h6>Properties</h6>



<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>
<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>
</tr>


Expand Down Expand Up @@ -1585,7 +1585,7 @@ <h6>Properties</h6>



<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>
<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>
</tr>


Expand Down Expand Up @@ -1717,7 +1717,7 @@ <h6>Properties</h6>



<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>
<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>
</tr>


Expand Down Expand Up @@ -2284,7 +2284,7 @@ <h6>Properties</h6>



<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>
<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>



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

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


Expand Down Expand Up @@ -2357,7 +2357,7 @@ <h5>Examples</h5>
// handle error or result
});</code></pre>

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

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



<td class="description last"><p>Optional dataset to match on</p></td>
</tr>



<tr>

<td class="name"><code>dataset</code></td>


<td class="type">


<span class="param-type">string</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>Optional dataset to match on</p></td>
</tr>

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



<tr>

<td class="name"><code>summary</code></td>


<td class="type">


<span class="param-type">boolean</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>Optional (command line argument only). Format output as a summary table.</p></td>
</tr>



<tr>

<td class="name"><code>cb</code></td>
Expand Down Expand Up @@ -2936,7 +3002,7 @@ <h5>Examples</h5>
--jobId "j123abc"</code></pre>

<pre class="prettyprint"><code># HTTP request:
https://api.paperspace.io
https://logs.paperspace.io
GET /jobs/logs?jobId=j123abc
x-api-key: 1ba4f98e7c0...
# Returns 200 on success</code></pre>
Expand Down Expand Up @@ -4469,7 +4535,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_artifactsDestroy.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h1 class="page-title">jobs/artifactsDestroy.js</h1>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_artifactsGet.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ <h1 class="page-title">jobs/artifactsGet.js</h1>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_artifactsList.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h1 class="page-title">jobs/artifactsList.js</h1>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_clone.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h1 class="page-title">jobs/clone.js</h1>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
10 changes: 5 additions & 5 deletions docs/jobs_create.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ <h1 class="page-title">jobs/create.js</h1>
* @method create
* @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.
* @param {object} params - Job creation parameters
* @param {string} params.container - A required reference to a container name or container link to be used for the job.
* @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.
* @param {string} [params.name] - An optional name or description for this job. If ommitted, the job name defaults to 'job for project [projectname]'.
* @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.)
* @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.
* @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.
* @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.
* @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.
* @param {string} [params.command] - An optional command to run within the workspace or container.
* @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'.
* @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'.
* @param {string} [params.dataset] - An optional reference to a dataset to be merged with the container.
* @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.
* @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.
Expand Down Expand Up @@ -514,7 +514,7 @@ <h1 class="page-title">jobs/create.js</h1>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_destroy.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1 class="page-title">jobs/destroy.js</h1>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h1 class="page-title">jobs/index.js</h1>
<br class="clear">

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
57 changes: 54 additions & 3 deletions docs/jobs_list.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ <h1 class="page-title">jobs/list.js</h1>
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');
var path = require('path');
var Table = require('table');

/**
* @memberof jobs
Expand All @@ -60,6 +61,8 @@ <h1 class="page-title">jobs/list.js</h1>
* @param {string} [filter.command] - Optional command to match on
* @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.
* @param {string} [filter.dataset] - Optional dataset to match on
* @param {string} [filter.dataset] - Optional dataset to match on
* @param {boolean} [summary] - Optional (command line argument only). Format output as a summary table.
* @param {function} cb - Node-style error-first callback function
* @returns {array} [ job, ... ] - JSON array of job objects
* @example
Expand All @@ -69,7 +72,7 @@ <h1 class="page-title">jobs/list.js</h1>
* // handle error or result
* });
* @example
* $ paperspace jobs list --project "MyProject"
* $ paperspace jobs list --project "MyProject" --state Running --summary
* @example
* # HTTP request:
* https://api.paperspace.io
Expand Down Expand Up @@ -114,6 +117,11 @@ <h1 class="page-title">jobs/list.js</h1>
*/

function list(params, cb) {
var summary = false;
if (params.summary) {
summary = params.summary;
delete params.summary;
}
if (!params.project &amp;&amp; !params.projectId) {
// default to name of project in .ps_project/config or name of current directory
params.project = projectConfig.getProject();
Expand All @@ -130,7 +138,50 @@ <h1 class="page-title">jobs/list.js</h1>
}
}
}
return method(list, params, cb);
return method(list, params, function listCb(err, data) {
if (global.paperspace_cli &amp;&amp; summary) {
var tableConfig = {
columns: {
0: {
alignment: 'left'
},
1: {
alignment: 'left'
},
2: {
alignment: 'left'
},
3: {
alignment: 'left'
},
4: {
alignment: 'left'
},
5: {
alignment: 'left'
},
6: {
alignment: 'left',
width: 30
}
}
};
var tableData = [];

if (err) return cb(err);
if (data &amp;&amp; data.length) {
tableData.push(['jobId', 'project', 'name', 'state', 'dtCreated', 'exitCode', 'entrypoint']);
data.forEach(function itemFunc(item) {
if (item.id) {
tableData.push([item.id, item.project, item.name, item.state, item.dtCreated, item.exitCode, item.entrypoint]);
}
});
var output = Table.table(tableData, tableConfig);
console.log(output);
}
return cb();
} else return cb(err, data);
});
}

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

<footer>
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.
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.
</footer>

<script>prettyPrint();</script>
Expand Down
Loading

0 comments on commit 093c454

Please sign in to comment.