Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: migrate code from googleapis/java-automl #7444

Merged
merged 198 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
fb96602
samples: scaffold pom.xml files (#129)
yoshi-automation Mar 17, 2020
7c63d8c
chore(deps): update dependency com.google.cloud:libraries-bom to v4.3…
renovate-bot Mar 23, 2020
f92c3e5
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Mar 25, 2020
e7ac31f
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Mar 30, 2020
03af978
chore(deps): update dependency com.google.cloud:libraries-bom to v4.4…
renovate-bot Apr 1, 2020
b0d80cf
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 6, 2020
e152678
chore(deps): update dependency com.google.cloud:libraries-bom to v4.4…
renovate-bot Apr 6, 2020
9c689d4
chore(deps): update dependency com.google.cloud:libraries-bom to v5 (…
renovate-bot Apr 14, 2020
61306b3
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 16, 2020
1ce310c
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 17, 2020
61b2732
chore(deps): update dependency com.google.cloud:libraries-bom to v5.2…
renovate-bot Apr 23, 2020
2700b1f
chore(deps): update dependency com.google.cloud:libraries-bom to v5.3…
renovate-bot Apr 28, 2020
04424b5
chore(deps): update dependency com.google.cloud:libraries-bom to v5.4…
renovate-bot May 19, 2020
2aa9b07
chore(deps): update dependency com.google.cloud:libraries-bom to v5.5…
renovate-bot May 29, 2020
f45d994
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Jun 10, 2020
a70bfe8
chore(deps): update dependency com.google.cloud:libraries-bom to v5.7…
renovate-bot Jun 10, 2020
e2cd138
chore(deps): update dependency com.google.cloud:libraries-bom to v6 (…
renovate-bot Jun 16, 2020
e9a2d0d
chore(deps): update dependency com.google.cloud:libraries-bom to v7 (…
renovate-bot Jun 17, 2020
23520e3
chore(deps): update dependency com.google.cloud:libraries-bom to v7.0…
renovate-bot Jun 22, 2020
b54f449
chore(deps): update dependency com.google.cloud:libraries-bom to v8 (…
renovate-bot Jun 26, 2020
144f4b6
chore(deps): update dependency com.google.cloud:libraries-bom to v8.1…
renovate-bot Jul 16, 2020
a1bd68c
samples: Automl cleanup (#1621)
nnegrey Nov 8, 2019
cc93727
samples: Automl GA (#1729)
nnegrey Nov 15, 2019
0b3d6bf
samples: Update model evaluation due to canonical sample changes (#1743)
nnegrey Nov 19, 2019
dcbdf9d
samples: Rename overloaded functions to main functions for use in tut…
nnegrey Nov 26, 2019
4dd87cc
samples: Add a generic BatchPrediction sample (#1774)
nnegrey Dec 9, 2019
03da526
samples: remove old files that are updated by the generic BatchPredic…
nnegrey Dec 9, 2019
c166378
samples: hotfix: Update ListDatasets.java (#1904)
nnegrey Dec 20, 2019
64d5f15
samples: automl: break up and simplify the dataset tests (#1930)
nnegrey Jan 7, 2020
ff67fac
samples: automl: use fake model ids for deployment testing so that te…
nnegrey Jan 7, 2020
71837bf
samples: automl: break tests into individual test files and remove bo…
nnegrey Jan 7, 2020
2de656b
samples: automl: separate batch predict test, verify model is deploye…
nnegrey Jan 7, 2020
3c51ad6
samples: automl: create model tests (#1933)
nnegrey Jan 7, 2020
2c708b4
samples: automl: update error check due to changes (#2377)
nnegrey Mar 11, 2020
1cdcca0
samples: update shared config (#2443)
averikitsch Mar 27, 2020
4624473
samples: automl: explictly update timeoutes due to default library ch…
nnegrey Apr 24, 2020
7966012
samples: samples:added docs links to predict samples (#3266)
munkhuushmgl Jun 26, 2020
0157d7d
samples: Automl (#1158)
nirupa-kumar Jul 24, 2018
350da49
samples: Automl (#1162)
nirupa-kumar Jul 30, 2018
3c65b59
samples: Automl - minor bug fixes (#1168)
nirupa-kumar Aug 1, 2018
fc848ac
samples: Update AutoML region tags to use standard product prefixes (…
alixhami Aug 29, 2018
6ec057a
samples: Automl translation ga (#1614)
nnegrey Oct 17, 2019
53904e4
samples: Automl cleanup (#1621)
nnegrey Nov 8, 2019
d2e9b4e
samples: Translate automl test fixes (#1606)
nnegrey Nov 21, 2019
9147444
samples: update shared config (#2443)
averikitsch Mar 27, 2020
0e302a1
samples: add argparse4j dependency declaration
chingor13 Aug 3, 2020
3eace3e
chore: regenerate README samples (#262)
yoshi-automation Aug 4, 2020
37db9a1
chore(deps): update dependency com.google.cloud:libraries-bom to v9 (…
renovate-bot Aug 14, 2020
938454f
chore(deps): update dependency com.google.cloud:libraries-bom to v9.1.0
renovate-bot Aug 17, 2020
3fc0c63
samples: refactor importDataset test service randomly throws cancel e…
munkhuushmgl Aug 29, 2020
2716f2d
samples: fixed flaky listmodel by increasing the timeout (#286)
munkhuushmgl Sep 1, 2020
7f899f3
chore(deps): update dependency com.google.cloud:libraries-bom to v10
renovate-bot Sep 10, 2020
8663601
samples: migrate samples from GoogleCloudPlatform/java-docs-samples /…
munkhuushmgl Sep 17, 2020
fa0bac0
chore(deps): update dependency com.google.cloud:libraries-bom to v11
renovate-bot Sep 24, 2020
99da73b
samples: small fix (#320)
munkhuushmgl Sep 25, 2020
ab9cd1e
samples: enabled test and fixed flaky tests (#325)
munkhuushmgl Oct 1, 2020
a5304b5
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Oct 2, 2020
de91684
chore(deps): update dependency com.google.cloud:libraries-bom to v12 …
renovate-bot Oct 6, 2020
ae0d846
test(deps): update dependency junit:junit to v4.13.1
renovate-bot Oct 12, 2020
52fbca2
chore(deps): update dependency com.google.cloud:libraries-bom to v12.…
renovate-bot Oct 14, 2020
bc729e6
chores: removed extra client settings for automl (#346)
munkhuushmgl Oct 19, 2020
5439ecc
chore(deps): update dependency com.google.cloud:libraries-bom to v13 …
renovate-bot Oct 20, 2020
3d15e3f
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 21, 2020
88c423a
chore: prep for sample browser (#357)
sirtorry Oct 21, 2020
7dd63b1
undo overzealousness (#358)
sirtorry Oct 22, 2020
642e981
test(deps): update dependency com.google.truth:truth to v1.1 (#350)
renovate-bot Oct 22, 2020
46bc134
add region tags (#361)
sirtorry Oct 23, 2020
803e602
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 23, 2020
f3585bc
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 27, 2020
d2132fa
samples: renamed beta package (#367)
munkhuushmgl Oct 27, 2020
3340eb5
chore: moving vision automl samples (#373)
munkhuushmgl Oct 30, 2020
00eb09d
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 30, 2020
74c8110
chore(deps): update dependency com.google.cloud:libraries-bom to v14 …
renovate-bot Nov 4, 2020
f1790dd
chore: version bump and clean up automl vision samples (#385)
munkhuushmgl Nov 5, 2020
a79aa7e
chore(deps): update dependency com.google.cloud:libraries-bom to v15 …
renovate-bot Nov 5, 2020
da1dcb4
chore(deps): update dependency com.google.cloud:libraries-bom to v16 …
renovate-bot Nov 18, 2020
fcb7970
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Nov 19, 2020
a4825a5
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Dec 15, 2020
33ed2cd
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Jan 7, 2021
3f5ab03
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Jan 20, 2021
fe027b7
test(deps): update dependency com.google.truth:truth to v1.1.2 (#444)
renovate-bot Jan 25, 2021
629a7bc
chore: cleaning up unused and redundant sampels and their ITs (#450)
munkhuushmgl Feb 4, 2021
4e4b5e7
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Feb 9, 2021
8b42809
test(deps): update dependency junit:junit to v4.13.2 (#460)
renovate-bot Feb 16, 2021
40b5057
chore: deleting duplicate samples (#464)
munkhuushmgl Feb 19, 2021
0e8f31c
chore(deps): update dependency com.google.cloud:libraries-bom to v17 …
renovate-bot Feb 24, 2021
8030e05
chore(deps): update dependency com.google.cloud:libraries-bom to v18 …
renovate-bot Feb 25, 2021
361f1c4
chore(deps): update dependency com.google.cloud:libraries-bom to v18.…
renovate-bot Mar 3, 2021
501dc91
chore(deps): update dependency com.google.cloud:libraries-bom to v19 …
renovate-bot Mar 4, 2021
f92b107
chore: deleted duplite and unused region tags (#500)
munkhuushmgl Mar 12, 2021
eb735d8
chore(deps): update dependency com.google.cloud:libraries-bom to v19.…
renovate-bot Mar 17, 2021
2f559d2
samples: migrate samples from GoogleCloudPlatform/java-docs-samples /…
chingor13 Mar 17, 2021
cdf2b8c
chore(deps): update dependency com.google.cloud:libraries-bom to v19.…
renovate-bot Mar 19, 2021
8113b49
fix(samples): adds retry to TranslateCreateDatasetTest (#513)
telpirion Mar 25, 2021
54282f4
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 5, 2021
57b133d
deps: update dependency com.google.cloud:google-cloud-core to v1.94.4…
renovate-bot Apr 8, 2021
e3ed27c
deps: update dependency com.google.cloud:google-cloud-core to v1.94.6…
renovate-bot Apr 9, 2021
f23a3da
deps: update dependency net.sourceforge.argparse4j:argparse4j to v0.9…
renovate-bot Apr 9, 2021
ab52569
deps: update dependency com.google.cloud:google-cloud-core to v1.94.7…
renovate-bot Apr 12, 2021
c8da4cf
chore(deps): update dependency com.google.cloud:libraries-bom to v20 …
renovate-bot Apr 12, 2021
a445a4d
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Apr 19, 2021
b98be07
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Apr 29, 2021
6a1b920
chore: added cleanup option in the setup ListOperationIT (#536)
munkhuushmgl May 8, 2021
4b6d7c3
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 13, 2021
006467d
deps: update dependency com.google.cloud:google-cloud-core to v1.94.8…
renovate-bot May 13, 2021
2e75b46
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 17, 2021
0443e4f
chore: change GCP env to correct one (#706)
munkhuushmgl May 19, 2021
31bcc63
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 25, 2021
8b06a49
test(deps): update dependency com.google.truth:truth to v1.1.3 (#716)
renovate-bot May 26, 2021
416b070
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jun 7, 2021
2eeb264
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Jun 7, 2021
0065c20
deps: update dependency com.google.cloud:google-cloud-core to v1.95.1…
renovate-bot Jun 9, 2021
1d56299
deps: update dependency com.google.cloud:google-cloud-core to v1.95.2…
renovate-bot Jun 9, 2021
edd5830
chore: migrate to owlbot (#738)
Neenu1995 Jun 10, 2021
c2e929b
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jun 23, 2021
0242780
deps: update dependency com.google.cloud:google-cloud-core to v1.95.3…
renovate-bot Jun 25, 2021
f98de7b
chore: version bump (#769)
munkhuushmgl Jun 29, 2021
db8b09d
deps: update dependency com.google.cloud:google-cloud-core to v1.95.4…
renovate-bot Jun 30, 2021
e3e3fd9
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jul 9, 2021
90149b1
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jul 28, 2021
08a041a
deps: update dependency com.google.cloud:google-cloud-core to v2 (#832)
renovate-bot Aug 9, 2021
cefa71a
deps: update dependency com.google.cloud:google-cloud-core to v2.0.3 …
renovate-bot Aug 11, 2021
db38c92
deps: update dependency com.google.cloud:google-cloud-core to v2.0.5 …
renovate-bot Aug 12, 2021
b1c7f75
chore(deps): update dependency com.google.cloud:libraries-bom to v21 …
renovate-bot Aug 19, 2021
87f5db3
deps: update dependency com.google.cloud:google-cloud-core to v2.1.0 …
renovate-bot Aug 24, 2021
13d7fe0
deps: update dependency com.google.cloud:google-cloud-core to v2.1.1 …
renovate-bot Aug 24, 2021
01d621d
chore(deps): update dependency com.google.cloud:libraries-bom to v22 …
renovate-bot Aug 27, 2021
6973973
deps: update dependency com.google.cloud:google-cloud-core to v2.1.2 …
renovate-bot Aug 31, 2021
d6060ad
chore(deps): update dependency com.google.cloud:libraries-bom to v23 …
renovate-bot Sep 8, 2021
e099b0e
deps: update dependency com.google.cloud:google-cloud-core to v2.1.3 …
renovate-bot Sep 13, 2021
ed34040
deps: update dependency com.google.cloud:google-cloud-core to v2.1.4 …
renovate-bot Sep 16, 2021
436847b
deps: update dependency com.google.cloud:google-cloud-core to v2.1.6 …
renovate-bot Sep 22, 2021
f3f719f
deps: update dependency com.google.cloud:google-cloud-core to v2.1.7 …
renovate-bot Sep 24, 2021
24f5124
chore(deps): update dependency com.google.cloud:libraries-bom to v23.…
renovate-bot Oct 1, 2021
57321a9
deps: update dependency com.google.cloud:google-cloud-core to v2.1.8 …
renovate-bot Oct 18, 2021
93f9e33
deps: update dependency com.google.cloud:google-cloud-core to v2.2.0 …
renovate-bot Oct 19, 2021
0feb190
chore(deps): update dependency com.google.cloud:libraries-bom to v24 …
renovate-bot Oct 27, 2021
387c4b1
deps: update dependency com.google.cloud:google-cloud-core to v2.3.0 …
renovate-bot Nov 15, 2021
e9755a6
deps: update dependency com.google.cloud:google-cloud-core to v2.3.1 …
renovate-bot Nov 17, 2021
40512d8
deps: update dependency com.google.cloud:google-cloud-core to v2.3.2 …
renovate-bot Dec 3, 2021
1f3f41b
deps: update dependency com.google.cloud:google-cloud-core to v2.3.3 …
renovate-bot Dec 5, 2021
d3d8085
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Dec 6, 2021
8226ee1
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Dec 8, 2021
fcb50f1
docs: removed default model comment and added comment to test (#997)
nayaknishant Dec 10, 2021
6c11971
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Dec 28, 2021
3316355
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Jan 7, 2022
d844bcb
deps: update dependency com.google.cloud:google-cloud-core to v2.3.4 …
renovate-bot Jan 7, 2022
277913f
deps: update dependency com.google.cloud:google-cloud-core to v2.3.5 …
renovate-bot Jan 7, 2022
682e8e3
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Jan 18, 2022
52abafa
deps: update dependency com.google.cloud:google-cloud-core to v2.4.0 …
renovate-bot Feb 2, 2022
b374c53
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Feb 8, 2022
cf816d8
deps: update dependency com.google.cloud:google-cloud-core to v2.5.0 …
renovate-bot Feb 9, 2022
df80960
deps: update dependency com.google.cloud:google-cloud-core to v2.5.1 …
renovate-bot Feb 10, 2022
c6700de
deps: update dependency com.google.cloud:google-cloud-core to v2.5.3 …
renovate-bot Feb 11, 2022
1ec3303
deps: update dependency com.google.cloud:google-cloud-core to v2.5.4 …
renovate-bot Feb 15, 2022
528ecba
deps: update dependency com.google.cloud:google-cloud-core to v2.5.5 …
renovate-bot Mar 1, 2022
1576bf5
deps: update dependency com.google.cloud:google-cloud-core to v2.5.6 …
renovate-bot Mar 2, 2022
ab8672c
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Mar 3, 2022
ae6987e
deps: update dependency com.google.cloud:google-cloud-core to v2.5.8 …
renovate-bot Mar 9, 2022
1b2793a
deps: update dependency com.google.cloud:google-cloud-core to v2.5.9 …
renovate-bot Mar 10, 2022
b53e658
deps: update dependency com.google.cloud:google-cloud-core to v2.5.10…
renovate-bot Mar 14, 2022
4b3d9ae
chore(deps): update dependency com.google.cloud:libraries-bom to v25 …
renovate-bot Mar 14, 2022
25d9224
deps: update dependency com.google.cloud:google-cloud-core to v2.5.11…
renovate-bot Mar 29, 2022
97c35e9
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Apr 1, 2022
ff3032b
deps: update dependency com.google.cloud:google-cloud-core to v2.6.1 …
renovate-bot Apr 15, 2022
d52f455
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Apr 27, 2022
e036452
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot May 16, 2022
b22dad2
deps: update dependency com.google.cloud:google-cloud-core to v2.7.1 …
renovate-bot May 19, 2022
f1a1a5b
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Jun 6, 2022
cbd121a
deps: update dependency com.google.cloud:google-cloud-core to v2.8.0 …
renovate-bot Jun 22, 2022
77be50e
deps: update dependency com.google.cloud:google-cloud-core to v2.8.1 …
renovate-bot Jul 1, 2022
c8a729d
chore(deps): update dependency com.google.cloud:libraries-bom to v26 …
renovate-bot Jul 11, 2022
ee91806
deps: update dependency com.google.cloud:google-cloud-core to v2.8.3 …
renovate-bot Jul 27, 2022
c877e77
deps: update dependency com.google.cloud:google-cloud-core to v2.8.4 …
renovate-bot Jul 29, 2022
f99f6cd
deps: update dependency com.google.cloud:google-cloud-core to v2.8.5 …
renovate-bot Jul 30, 2022
ff0cbc0
deps: update dependency com.google.cloud:google-cloud-core to v2.8.6 …
renovate-bot Aug 2, 2022
eed1a4c
deps: update dependency com.google.cloud:google-cloud-core to v2.8.7 …
renovate-bot Aug 3, 2022
ab8db53
deps: update dependency com.google.cloud:google-cloud-core to v2.8.8 …
renovate-bot Aug 4, 2022
fcc86ef
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Aug 16, 2022
2b79862
deps: update dependency com.google.cloud:google-cloud-core to v2.8.9 …
renovate-bot Aug 17, 2022
b072ffd
deps: update dependency com.google.cloud:google-cloud-core to v2.8.10…
renovate-bot Aug 25, 2022
223e165
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Aug 31, 2022
b607e14
deps: update dependency com.google.cloud:google-cloud-core to v2.8.11…
renovate-bot Sep 9, 2022
40f3c6a
deps: update dependency com.google.cloud:google-cloud-core to v2.8.12…
renovate-bot Sep 20, 2022
6809291
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Sep 20, 2022
70b3215
deps: update dependency com.google.cloud:google-cloud-core to v2.8.13…
renovate-bot Sep 20, 2022
d45e55e
deps: update dependency com.google.cloud:google-cloud-core to v2.8.14…
renovate-bot Sep 21, 2022
54ed093
deps: update dependency com.google.cloud:google-cloud-core to v2.8.15…
renovate-bot Sep 26, 2022
82c50d1
deps: update dependency com.google.cloud:google-cloud-core to v2.8.16…
renovate-bot Sep 27, 2022
bdb380a
deps: update dependency com.google.cloud:google-cloud-core to v2.8.17…
renovate-bot Sep 29, 2022
7826575
deps: update dependency com.google.cloud:google-cloud-core to v2.8.18…
renovate-bot Sep 30, 2022
fd86b15
deps: update dependency com.google.cloud:google-cloud-core to v2.8.19…
renovate-bot Oct 2, 2022
f7e1840
deps: update dependency com.google.cloud:google-cloud-core to v2.8.20…
renovate-bot Oct 6, 2022
a04e7c4
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Oct 7, 2022
1c3a88e
deps: update dependency com.google.cloud:google-cloud-core to v2.8.21…
renovate-bot Oct 10, 2022
ae2ffc7
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Nov 8, 2022
d96c7b8
Merge remote-tracking branch 'migration/main' into java-automl-migration
Shabirmean Nov 17, 2022
638c87a
cleanup: update pom artifactId, URL and remove unused samples
Shabirmean Nov 18, 2022
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
3 changes: 0 additions & 3 deletions automl/README.md

This file was deleted.

81 changes: 81 additions & 0 deletions automl/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.automl</groupId>
<artifactId>automl-snippets</artifactId>
<packaging>jar</packaging>
<name>Google Cloud Auto ML Snippets</name>
<url>https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/automl</url>

<!--
The parent pom defines common style checks and testing strategies for our samples.
Removing or replacing it should not affect the execution of the samples in anyway.
-->
<parent>
<groupId>com.google.cloud.samples</groupId>
<artifactId>shared-configuration</artifactId>
<version>1.2.0</version>
</parent>

<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>


<!-- [START automl_install_with_bom] -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.1.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-automl</artifactId>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
</dependency>
<!-- [START_EXCLUDE] -->
<dependency>
<groupId>net.sourceforge.argparse4j</groupId>
<artifactId>argparse4j</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core</artifactId>
<version>2.8.21</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<!-- [END_EXCLUDE] -->
</dependencies>
<!-- [END automl_install_with_bom] -->
</project>
Binary file added automl/resources/dandelion.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions automl/resources/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tell me how this ends
Binary file added automl/resources/salad.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added automl/resources/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 84 additions & 0 deletions automl/src/main/java/beta/automl/BatchPredict.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package beta.automl;

// [START automl_tables_batch_predict]
// [START automl_batch_predict_beta]
import com.google.api.gax.longrunning.OperationFuture;
import com.google.cloud.automl.v1beta1.BatchPredictInputConfig;
import com.google.cloud.automl.v1beta1.BatchPredictOutputConfig;
import com.google.cloud.automl.v1beta1.BatchPredictRequest;
import com.google.cloud.automl.v1beta1.BatchPredictResult;
import com.google.cloud.automl.v1beta1.GcsDestination;
import com.google.cloud.automl.v1beta1.GcsSource;
import com.google.cloud.automl.v1beta1.ModelName;
import com.google.cloud.automl.v1beta1.OperationMetadata;
import com.google.cloud.automl.v1beta1.PredictionServiceClient;
import java.io.IOException;
import java.util.concurrent.ExecutionException;

class BatchPredict {

static void batchPredict() throws IOException, ExecutionException, InterruptedException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "YOUR_PROJECT_ID";
String modelId = "YOUR_MODEL_ID";
String inputUri = "gs://YOUR_BUCKET_ID/path_to_your_input_csv_or_jsonl";
String outputUri = "gs://YOUR_BUCKET_ID/path_to_save_results/";
batchPredict(projectId, modelId, inputUri, outputUri);
}

static void batchPredict(String projectId, String modelId, String inputUri, String outputUri)
throws IOException, ExecutionException, InterruptedException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (PredictionServiceClient client = PredictionServiceClient.create()) {
// Get the full path of the model.
ModelName name = ModelName.of(projectId, "us-central1", modelId);

// Configure the source of the file from a GCS bucket
GcsSource gcsSource = GcsSource.newBuilder().addInputUris(inputUri).build();
BatchPredictInputConfig inputConfig =
BatchPredictInputConfig.newBuilder().setGcsSource(gcsSource).build();

// Configure where to store the output in a GCS bucket
GcsDestination gcsDestination =
GcsDestination.newBuilder().setOutputUriPrefix(outputUri).build();
BatchPredictOutputConfig outputConfig =
BatchPredictOutputConfig.newBuilder().setGcsDestination(gcsDestination).build();

// Build the request that will be sent to the API
BatchPredictRequest request =
BatchPredictRequest.newBuilder()
.setName(name.toString())
.setInputConfig(inputConfig)
.setOutputConfig(outputConfig)
.build();

// Start an asynchronous request
OperationFuture<BatchPredictResult, OperationMetadata> future =
client.batchPredictAsync(request);

System.out.println("Waiting for operation to complete...");
BatchPredictResult response = future.get();
System.out.println("Batch Prediction results saved to specified Cloud Storage bucket.");
}
}
}
// [END automl_batch_predict_beta]
// [END automl_tables_batch_predict]
48 changes: 48 additions & 0 deletions automl/src/main/java/beta/automl/CancelOperation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package beta.automl;

// [START automl_cancel_operation_beta]

import com.google.cloud.automl.v1beta1.AutoMlClient;
import io.grpc.StatusRuntimeException;
import java.io.IOException;

class CancelOperation {

static void cancelOperation() throws IOException, InterruptedException, StatusRuntimeException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "YOUR_PROJECT_ID";
String location = "us-central1";
String operationId = "YOUR_OPERATION_ID";
String operationFullId =
String.format("projects/%s/locations/%s/operations/%s", projectId, location, operationId);
cancelOperation(operationFullId);
}

static void cancelOperation(String operationFullId)
throws IOException, InterruptedException, StatusRuntimeException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (AutoMlClient client = AutoMlClient.create()) {
client.getOperationsClient().cancelOperation(operationFullId);
System.out.println("Operation cancelled");
}
}
}
// [END automl_cancel_operation_beta]
51 changes: 51 additions & 0 deletions automl/src/main/java/beta/automl/DeleteDataset.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package beta.automl;

// [START automl_delete_dataset_beta]
// [START automl_tables_delete_dataset]
import com.google.cloud.automl.v1beta1.AutoMlClient;
import com.google.cloud.automl.v1beta1.DatasetName;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.concurrent.ExecutionException;

class DeleteDataset {

static void deleteDataset() throws IOException, ExecutionException, InterruptedException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "YOUR_PROJECT_ID";
String datasetId = "YOUR_DATASET_ID";
deleteDataset(projectId, datasetId);
}

// Delete a dataset
static void deleteDataset(String projectId, String datasetId)
throws IOException, ExecutionException, InterruptedException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (AutoMlClient client = AutoMlClient.create()) {
// Get the full path of the dataset.
DatasetName datasetFullId = DatasetName.of(projectId, "us-central1", datasetId);
Empty response = client.deleteDatasetAsync(datasetFullId).get();
System.out.format("Dataset deleted. %s%n", response);
}
}
}
// [END automl_tables_delete_dataset]
// [END automl_delete_dataset_beta]
56 changes: 56 additions & 0 deletions automl/src/main/java/beta/automl/DeleteModel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package beta.automl;

// [START automl_tables_delete_model]
// [START automl_delete_model_beta]
import com.google.cloud.automl.v1beta1.AutoMlClient;
import com.google.cloud.automl.v1beta1.ModelName;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.concurrent.ExecutionException;

class DeleteModel {

public static void main(String[] args)
throws IOException, ExecutionException, InterruptedException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "YOUR_PROJECT_ID";
String modelId = "YOUR_MODEL_ID";
deleteModel(projectId, modelId);
}

// Delete a model
static void deleteModel(String projectId, String modelId)
throws IOException, ExecutionException, InterruptedException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (AutoMlClient client = AutoMlClient.create()) {
// Get the full path of the model.
ModelName modelFullId = ModelName.of(projectId, "us-central1", modelId);

// Delete a model.
Empty response = client.deleteModelAsync(modelFullId).get();

System.out.println("Model deletion started...");
System.out.println(String.format("Model deleted. %s", response));
}
}
}
// [END automl_delete_model_beta]
// [END automl_tables_delete_model]
59 changes: 59 additions & 0 deletions automl/src/main/java/beta/automl/DeployModel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package beta.automl;

// [START automl_tables_deploy_model]
// [START automl_deploy_model_beta]
import com.google.api.gax.longrunning.OperationFuture;
import com.google.cloud.automl.v1beta1.AutoMlClient;
import com.google.cloud.automl.v1beta1.DeployModelRequest;
import com.google.cloud.automl.v1beta1.ModelName;
import com.google.cloud.automl.v1beta1.OperationMetadata;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.concurrent.ExecutionException;

class DeployModel {

public static void main(String[] args)
throws IOException, ExecutionException, InterruptedException {
// TODO(developer): Replace these variables before running the sample.
String projectId = "YOUR_PROJECT_ID";
String modelId = "YOUR_MODEL_ID";
deployModel(projectId, modelId);
}

// Deploy a model for prediction
static void deployModel(String projectId, String modelId)
throws IOException, ExecutionException, InterruptedException {
// Initialize client that will be used to send requests. This client only needs to be created
// once, and can be reused for multiple requests. After completing all of your requests, call
// the "close" method on the client to safely clean up any remaining background resources.
try (AutoMlClient client = AutoMlClient.create()) {
// Get the full path of the model.
ModelName modelFullId = ModelName.of(projectId, "us-central1", modelId);
DeployModelRequest request =
DeployModelRequest.newBuilder().setName(modelFullId.toString()).build();
OperationFuture<Empty, OperationMetadata> future = client.deployModelAsync(request);

future.get();
System.out.println("Model deployment finished");
}
}
}
// [END automl_deploy_model_beta]
// [END automl_tables_deploy_model]
Loading