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

feat(samples): adds samples for enhanced version of library #16

Merged
merged 39 commits into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ff70678
feat: generates enhanced library via synthtool
telpirion Nov 18, 2020
2b599bc
feat: adds methods to enhanced types
telpirion Nov 18, 2020
c3b8ec9
fix: lint
telpirion Nov 18, 2020
3325360
feat: adds enhanced library samples
telpirion Nov 18, 2020
ba6849f
Merge branch 'master' into encl-samples
telpirion Jan 7, 2021
ff30eb5
fix: finishing merge
telpirion Jan 7, 2021
c35a5b7
fix: final merge conflict
telpirion Jan 7, 2021
f469857
Merge branch 'master' into encl-samples
telpirion Jan 7, 2021
6b422e2
Merge branch 'master' into encl-samples
telpirion Jan 7, 2021
46d909b
chore: add tests for samples
telpirion Jan 7, 2021
5c9d4ec
fix: lint
telpirion Jan 7, 2021
4b94439
fix: lint
telpirion Jan 7, 2021
2a52217
fix: lint
telpirion Jan 8, 2021
0b35029
fix: lint
telpirion Jan 8, 2021
2f5f18e
fix: changed cleanup for tests
telpirion Jan 8, 2021
1350f5b
fix: changes batch prediction jobs to use API rather than samples
telpirion Jan 8, 2021
24b1e14
fix: broken return statement
telpirion Jan 8, 2021
76d0bc3
fix: import jobServiceClient
telpirion Jan 8, 2021
0c85285
fix: attempt to fix tests
telpirion Jan 8, 2021
95883fd
fix: tests
telpirion Jan 8, 2021
93ab9aa
fix: lint
telpirion Jan 8, 2021
e216c89
Merge branch 'master' into encl-samples
telpirion Jan 11, 2021
367c084
fix: sample tests
telpirion Jan 11, 2021
b3abd86
Merge branch 'encl-samples' of https://github.com/googleapis/nodejs-a…
telpirion Jan 11, 2021
62037bb
fix: tests
telpirion Jan 11, 2021
a3190d3
fix: tests
telpirion Jan 11, 2021
7104596
fix: tests
telpirion Jan 11, 2021
006505f
fix: project ID in tests
telpirion Jan 11, 2021
573d02a
fix: lint
telpirion Jan 11, 2021
2eb0276
fix: sample tests
telpirion Jan 11, 2021
d46eb72
fix: tests and lint
telpirion Jan 12, 2021
f09d8de
fix: added quotes to text tests
telpirion Jan 12, 2021
91de4d8
fix: tabular classification test
telpirion Jan 12, 2021
5d0fd54
Merge branch 'master' into encl-samples
telpirion Jan 12, 2021
7df4ba4
fix: per reviewer
telpirion Jan 12, 2021
697a099
Merge branch 'encl-samples' of https://github.com/googleapis/nodejs-a…
telpirion Jan 12, 2021
a39db41
fix: per reviewer
telpirion Jan 13, 2021
a938114
fix: per reviewer
telpirion Jan 13, 2021
fb1ec49
docs: update README
bcoe Jan 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .kokoro/presubmit/node12/samples-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,25 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-ai-platform

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Create-batch-prediction-job-video-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-batch-prediction-job-video-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-classification.js,samples/README.md) |
| Create-batch-prediction-job-video-object-tracking | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-batch-prediction-job-video-object-tracking.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-object-tracking.js,samples/README.md) |
| Create-training-pipeline-image-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-image-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-image-classification.js,samples/README.md) |
| Create-training-pipeline-image-object-detection | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-image-object-detection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-image-object-detection.js,samples/README.md) |
| Create-training-pipeline-tabular-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-tabular-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-tabular-classification.js,samples/README.md) |
| Create-training-pipeline-tabular-regression | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-tabular-regression.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-tabular-regression.js,samples/README.md) |
| Create-training-pipeline-text-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-text-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-classification.js,samples/README.md) |
| Create-training-pipeline-text-entity-extraction | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-text-entity-extraction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-entity-extraction.js,samples/README.md) |
| Create-training-pipeline-text-sentiment-analysis | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-text-sentiment-analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-sentiment-analysis.js,samples/README.md) |
| Create-training-pipeline-video-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-video-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-classification.js,samples/README.md) |
| Create-training-pipeline-video-object-tracking | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-video-object-tracking.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-object-tracking.js,samples/README.md) |
| List-endpoints | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/list-endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/list-endpoints.js,samples/README.md) |
| Predict-image-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-image-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-image-classification.js,samples/README.md) |
| Predict-image-object-detection | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-image-object-detection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-image-object-detection.js,samples/README.md) |
| Predict-tabular-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-tabular-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-tabular-classification.js,samples/README.md) |
| Predict-tabular-regression | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-tabular-regression.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-tabular-regression.js,samples/README.md) |
| Predict-text-classification | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-text-classification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-classification.js,samples/README.md) |
| Predict-text-entity-extraction | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-text-entity-extraction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-entity-extraction.js,samples/README.md) |
| Predict-text-sentiment-analysis | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-text-sentiment-analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-sentiment-analysis.js,samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |


Expand Down
288 changes: 288 additions & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,25 @@

* [Before you begin](#before-you-begin)
* [Samples](#samples)
* [Create-batch-prediction-job-video-classification](#create-batch-prediction-job-video-classification)
* [Create-batch-prediction-job-video-object-tracking](#create-batch-prediction-job-video-object-tracking)
* [Create-training-pipeline-image-classification](#create-training-pipeline-image-classification)
* [Create-training-pipeline-image-object-detection](#create-training-pipeline-image-object-detection)
* [Create-training-pipeline-tabular-classification](#create-training-pipeline-tabular-classification)
* [Create-training-pipeline-tabular-regression](#create-training-pipeline-tabular-regression)
* [Create-training-pipeline-text-classification](#create-training-pipeline-text-classification)
* [Create-training-pipeline-text-entity-extraction](#create-training-pipeline-text-entity-extraction)
* [Create-training-pipeline-text-sentiment-analysis](#create-training-pipeline-text-sentiment-analysis)
* [Create-training-pipeline-video-classification](#create-training-pipeline-video-classification)
* [Create-training-pipeline-video-object-tracking](#create-training-pipeline-video-object-tracking)
* [List-endpoints](#list-endpoints)
* [Predict-image-classification](#predict-image-classification)
* [Predict-image-object-detection](#predict-image-object-detection)
* [Predict-tabular-classification](#predict-tabular-classification)
* [Predict-tabular-regression](#predict-tabular-regression)
* [Predict-text-classification](#predict-text-classification)
* [Predict-text-entity-extraction](#predict-text-entity-extraction)
* [Predict-text-sentiment-analysis](#predict-text-sentiment-analysis)
* [Quickstart](#quickstart)

## Before you begin
Expand All @@ -32,6 +48,40 @@ Before running the samples, make sure you've followed the steps outlined in



### Create-batch-prediction-job-video-classification

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-batch-prediction-job-video-classification.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-classification.js,samples/README.md)

__Usage:__


`node samples/create-batch-prediction-job-video-classification.js`


-----




### Create-batch-prediction-job-video-object-tracking

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-batch-prediction-job-video-object-tracking.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-batch-prediction-job-video-object-tracking.js,samples/README.md)

__Usage:__


`node samples/create-batch-prediction-job-video-object-tracking.js`


-----




### Create-training-pipeline-image-classification

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-image-classification.js).
Expand All @@ -49,6 +99,142 @@ __Usage:__



### Create-training-pipeline-image-object-detection

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-image-object-detection.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-image-object-detection.js,samples/README.md)

__Usage:__


`node samples/create-training-pipeline-image-object-detection.js`


-----




### Create-training-pipeline-tabular-classification

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-tabular-classification.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-tabular-classification.js,samples/README.md)

__Usage:__


`node samples/create-training-pipeline-tabular-classification.js`


-----




### Create-training-pipeline-tabular-regression

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-tabular-regression.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-tabular-regression.js,samples/README.md)

__Usage:__


`node samples/create-training-pipeline-tabular-regression.js`


-----




### Create-training-pipeline-text-classification

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-text-classification.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-classification.js,samples/README.md)

__Usage:__


`node samples/create-training-pipeline-text-classification.js`


-----




### Create-training-pipeline-text-entity-extraction

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-text-entity-extraction.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-entity-extraction.js,samples/README.md)

__Usage:__


`node samples/create-training-pipeline-text-entity-extraction.js`


-----




### Create-training-pipeline-text-sentiment-analysis

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-text-sentiment-analysis.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-text-sentiment-analysis.js,samples/README.md)

__Usage:__


`node samples/create-training-pipeline-text-sentiment-analysis.js`


-----




### Create-training-pipeline-video-classification

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-video-classification.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-classification.js,samples/README.md)

__Usage:__


`node samples/create-training-pipeline-video-classification.js`


-----




### Create-training-pipeline-video-object-tracking

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/create-training-pipeline-video-object-tracking.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/create-training-pipeline-video-object-tracking.js,samples/README.md)

__Usage:__


`node samples/create-training-pipeline-video-object-tracking.js`


-----




### List-endpoints

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/list-endpoints.js).
Expand Down Expand Up @@ -83,6 +269,108 @@ __Usage:__



### Predict-image-object-detection

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-image-object-detection.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-image-object-detection.js,samples/README.md)

__Usage:__


`node samples/predict-image-object-detection.js`


-----




### Predict-tabular-classification

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-tabular-classification.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-tabular-classification.js,samples/README.md)

__Usage:__


`node samples/predict-tabular-classification.js`


-----




### Predict-tabular-regression

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-tabular-regression.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-tabular-regression.js,samples/README.md)

__Usage:__


`node samples/predict-tabular-regression.js`


-----




### Predict-text-classification

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-text-classification.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-classification.js,samples/README.md)

__Usage:__


`node samples/predict-text-classification.js`


-----




### Predict-text-entity-extraction

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-text-entity-extraction.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-entity-extraction.js,samples/README.md)

__Usage:__


`node samples/predict-text-entity-extraction.js`


-----




### Predict-text-sentiment-analysis

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/predict-text-sentiment-analysis.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-ai-platform&page=editor&open_in_editor=samples/predict-text-sentiment-analysis.js,samples/README.md)

__Usage:__


`node samples/predict-text-sentiment-analysis.js`


-----




### Quickstart

View the [source code](https://github.com/googleapis/nodejs-ai-platform/blob/master/samples/quickstart.js).
Expand Down
Loading