Skip to content

Commit 6cbb169

Browse files
authored
AutoML: Harmonize / DRY 'README.rst' / 'docs/index.rst'. (#6005)
1 parent bc741d0 commit 6cbb169

File tree

3 files changed

+31
-77
lines changed

3 files changed

+31
-77
lines changed

automl/README.rst

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
Python Client for Cloud AutoML API (`Alpha`_)
22
=============================================
33

4-
`Cloud AutoML API`_: The AutoML project API.
4+
The `Cloud AutoML API`_ is a suite of machine learning products that enables
5+
developers with limited machine learning expertise to train high-quality models
6+
specific to their business needs, by leveraging Google’s state-of-the-art
7+
transfer learning, and Neural Architecture Search technology.
58

69
- `Client Library Documentation`_
710
- `Product Documentation`_
@@ -61,15 +64,23 @@ Windows
6164
<your-env>\Scripts\activate
6265
<your-env>\Scripts\pip.exe install google-cloud-automl
6366
67+
Example Usage
68+
~~~~~~~~~~~~~
69+
70+
.. code-block:: python
71+
72+
from google.cloud.automl_v1beta1 import PredictionServiceClient
73+
74+
client = PredictionServiceClient()
75+
model_path = client.model_path('my-project-123', 'us-central', 'model-name')
76+
payload = {...}
77+
params = {'foo': 1}
78+
response = client.predict(model_path, payload, params=params)
79+
6480
Next Steps
6581
~~~~~~~~~~
6682

6783
- Read the `Client Library Documentation`_ for Cloud AutoML API
6884
API to see other available methods on the client.
69-
- Read the `Cloud AutoML API Product documentation`_ to learn
85+
- Read the `Product documentation`_ to learn
7086
more about the product and see How-to Guides.
71-
- View this `repository’s main README`_ to see the full list of Cloud
72-
APIs that we cover.
73-
74-
.. _Cloud AutoML API Product documentation: https://cloud.google.com/automl
75-
.. _repository’s main README: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/README.rst

automl/docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

automl/docs/index.rst

Lines changed: 12 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,5 @@
1-
Python Client for Cloud AutoML API (`Alpha`_)
2-
=============================================
1+
.. include:: /../automl/README.rst
32

4-
`Cloud AutoML API`_: The AutoML project API.
5-
6-
- `Product Documentation`_
7-
8-
.. _Alpha: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/README.rst
9-
.. _Cloud AutoML API: https://cloud.google.com/automl
10-
.. _Product Documentation: https://cloud.google.com/automl
11-
12-
Quick Start
13-
-----------
14-
15-
In order to use this library, you first need to go through the following steps:
16-
17-
1. `Select or create a Cloud Platform project.`_
18-
2. `Enable billing for your project.`_
19-
3. `Enable the Cloud AutoML API.`_
20-
4. `Setup Authentication.`_
21-
22-
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
23-
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
24-
.. _Enable the Cloud AutoML API.: https://cloud.google.com/automl
25-
.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html
26-
27-
Installation
28-
~~~~~~~~~~~~
29-
30-
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
31-
create isolated Python environments. The basic problem it addresses is one of
32-
dependencies and versions, and indirectly permissions.
33-
34-
With `virtualenv`_, it's possible to install this library without needing system
35-
install permissions, and without clashing with the installed system
36-
dependencies.
37-
38-
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
39-
40-
41-
Mac/Linux
42-
^^^^^^^^^
43-
44-
.. code-block:: console
45-
46-
pip install virtualenv
47-
virtualenv <your-env>
48-
source <your-env>/bin/activate
49-
<your-env>/bin/pip install google-cloud-automl
50-
51-
52-
Windows
53-
^^^^^^^
54-
55-
.. code-block:: console
56-
57-
pip install virtualenv
58-
virtualenv <your-env>
59-
<your-env>\Scripts\activate
60-
<your-env>\Scripts\pip.exe install google-cloud-automl
61-
62-
Next Steps
63-
~~~~~~~~~~
64-
65-
- Read the `Cloud AutoML API Product documentation`_ to learn
66-
more about the product and see How-to Guides.
67-
- View this `repository’s main README`_ to see the full list of Cloud
68-
APIs that we cover.
69-
70-
.. _Cloud AutoML API Product documentation: https://cloud.google.com/automl
71-
.. _repository’s main README: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/README.rst
723

734
Api Reference
745
-------------
@@ -77,3 +8,14 @@ Api Reference
778

789
gapic/v1beta1/api
7910
gapic/v1beta1/types
11+
12+
13+
Changelog
14+
---------
15+
16+
For a list of all ``google-cloud-datastore`` releases:
17+
18+
.. toctree::
19+
:maxdepth: 2
20+
21+
changelog

0 commit comments

Comments
 (0)