Skip to content

Commit 880c105

Browse files
committed
Update docs
1 parent 8b0f041 commit 880c105

File tree

7 files changed

+18
-16
lines changed

7 files changed

+18
-16
lines changed

docs/applications/implementations/estimators.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def create_estimator(run_config, model_config):
2626
pass
2727
```
2828

29+
See the [tf.estimator.RunConfig](https://www.tensorflow.org/api_docs/python/tf/estimator/RunConfig) and [tf.estimator.Estimator](https://www.tensorflow.org/api_docs/python/tf/estimator/Estimator) documentation for more information.
30+
2931
## Example
3032

3133
```python

docs/applications/resources/data-types.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ Output types are used to define the output types of aggregators and constants. T
3535

3636
In addition, an output type may be a list of scalar types. This is denoted by a length-one list of any of the supported types. For example, `[INT]` represents a list of integers.
3737

38-
An output type may also be a map containing these types. There are two types of maps: generic maps and fixed maps. **Generic maps** represent maps which may have any number of items. The types of the keys and values must match the declared types. For example, `{STRING: INT}` fits `{"San Francisco": -7, "Toronto": -4}`. **Fixed maps** represent maps which must define values for each of the pre-defined keys. For example: `{value1: INT, value2: FLOAT}` fits `{value1: 17, value2: 8.8}`.
38+
An output type may also be a map containing these types. There are two types of maps: generic maps and fixed maps. **Generic maps** represent maps which may have any number of items. The types of the keys and values must match the declared types. For example, `{STRING: INT}` supports `{"San Francisco": -7, "Toronto": -4}`. **Fixed maps** represent maps which must define values for each of the pre-defined keys. For example: `{mean: INT, stddev: FLOAT}` supports `{mean: 17, stddev: 8.8}`.
3939

4040
The values in lists, generic maps, and fixed maps may be arbitrarily nested.
4141

42-
These are all valid output types:
42+
Here are some valid output types:
4343

4444
* `INT`
4545
* `[STRING]`
@@ -87,18 +87,18 @@ Input types are used to define the inputs to aggregators, transformers, and esti
8787
* `STRING`
8888
* `BOOL`
8989

90-
Like with output types, input types may occur within lists, generic maps, and fixed maps.
90+
Like with output types, input types may occur within arbitrarily nested lists, generic maps, and fixed maps.
9191

92-
Ambiguous input types are also supported, and are represented by joining types with `|`. For example, `INT_COLUMN|FLOAT_COLUMN` indicates that either a column of type `INT_COLUMN` or a column of type `FLOAT_COLUMN` may be used an the input. Any two or more types may be combined in this way (e.g. `INT|FLOAT|STRING` is supported). All permutations of ambiguous types are valid (e.g. `INT|FLOAT` and `FLOAT|INT` are equivalent). Column types and scalar types may not be combined (e.g. `INT|FLOAT_COLUMN` is not valid).
92+
Ambiguous input types are also supported, and are represented by joining types with `|`. For example, `INT_COLUMN|FLOAT_COLUMN` indicates that either a column of type `INT_COLUMN` or a column of type `FLOAT_COLUMN` may be used as the input. Any two or more types may be combined in this way (e.g. `INT|FLOAT|STRING` is supported). All permutations of ambiguous types are valid (e.g. `INT|FLOAT` and `FLOAT|INT` are equivalent). Column types and scalar types may not be combined (e.g. `INT|FLOAT_COLUMN` is not valid).
9393

9494
### Input Type Validations
9595

9696
By default, all declared inputs are required. For example, if the input type is `{value1: INT, value2: FLOAT}`, both `value1` and `value2` must be provided (and cannot be `Null`). With Cortex, it is possible to declare inputs as optional, set default values, allow values to be `Null`, and specify minimum and maximum map/list lengths.
9797

9898
To specify validation options, the "long form" input schema is used. In the long form, the input type is always a map, with the `_type` key specifying the type, and other keys (which all start with `_`) specifying the options. The available options are:
9999

100-
* `_optional`: If set to `True`, allows the value to be missing from the input. Only applicable to values in maps.
101-
* `_default`: Specifies a default value to use if the value is missing from the input. Only applicable to values in maps. Setting `_defaut` implies `_optional: True`.
100+
* `_optional`: If set to `True`, allows the value to be missing from the input. This only applies to values in maps.
101+
* `_default`: Specifies a default value to use if the value is missing from the input. This only applies to values in maps. Setting `_defaut` implies `_optional: True`.
102102
* `_allow_null`: If set to `True`, allows the value to be explicitly set to `Null`.
103103
* `_min_count`: Specifies the minimum number of elements that must be in the list or map.
104104
* `_max_count`: Specifies the maximum number of elements that must be in the list or map.
@@ -135,7 +135,7 @@ input:
135135
_max_count: 100
136136
```
137137

138-
Input value (assuming `column1` is an `INT_COLUMN`, `constant1` is a `[STRING]`, and `aggregate1` is an `INT`):
138+
Input value (assuming `column1` is an `INT_COLUMN`, `constant1` is a `[STRING]`, and `aggregate1` is an `STRING`):
139139

140140
```yaml
141141
input:

docs/applications/resources/models.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ Train TensorFlow models at scale.
5858
5959
See [Data Types](data-types.md) for details about input and output values. Note: the `target_column`, `input`, `training_input`, and `hparams` of the the aggregate must match the input types of the estimator (if specified).
6060

61-
See the [tf.estimator.RunConfig](https://www.tensorflow.org/api_docs/python/tf/estimator/RunConfig) and [tf.estimator.EvalSpec](https://www.tensorflow.org/api_docs/python/tf/estimator/EvalSpec) documentation for more information.
62-
6361
## Example
6462

6563
```yaml

docs/applications/resources/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Cortex applications consist of declarative resource configuration written in YAM
99
* [aggregate](aggregates.md)
1010
* [transformer](transformers.md)
1111
* [transformed_column](transformed-columns.md)
12+
* [estimator](estimators.md)
1213
* [model](models.md)
1314
* [api](apis.md)
1415
* [constant](constants.md)

docs/summary.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* [Aggregates](applications/resources/aggregates.md)
2121
* [Transformers](applications/resources/transformers.md)
2222
* [Transformed Columns](applications/resources/transformed-columns.md)
23+
* [Estimators](applications/resources/estimators.md)
2324
* [Models](applications/resources/models.md)
2425
* [APIs](applications/resources/apis.md)
2526
* [Constants](applications/resources/constants.md)
@@ -30,7 +31,7 @@
3031

3132
* [Aggregators](applications/implementations/aggregators.md)
3233
* [Transformers](applications/implementations/transformers.md)
33-
* [Models](applications/implementations/models.md)
34+
* [Estimators](applications/implementations/estimators.md)
3435

3536
### Advanced
3637

docs/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Our goal is to build a web API that returns the type of iris given its measureme
2222

2323
```bash
2424
mkdir iris && cd iris
25-
touch app.yaml dnn.py irises.json
25+
touch app.yaml irises.json
2626
```
2727

28-
Cortex requires an `app.yaml` file which defines a single `app` resource. Other resources may be defined in arbitrarily named YAML files in the the directory which contains `app.yaml` or any subdirectories. For this example, we will define all of our resources in `app.yaml`.
28+
Cortex requires an `app.yaml` file which defines an `app` resource. Other resources may be defined in arbitrarily named YAML files in the the directory which contains `app.yaml` or any subdirectories. For this example, we will define all of our resources in `app.yaml`.
2929

3030
Add to `app.yaml`:
3131

@@ -49,11 +49,11 @@ Add to `app.yaml`:
4949
schema: [@sepal_length, @sepal_width, @petal_length, @petal_width, @class]
5050
```
5151

52-
Cortex will be able to read from any S3 bucket that your AWS credentials grant access to.
52+
Cortex is able to read from any S3 bucket that your AWS credentials grant access to.
5353

5454
#### Define the model
5555

56-
This configuration will generate a training dataset with the specified columns and train our classifier using the generated dataset. Here we're using TensorFlow's [DNNClassifier](https://www.tensorflow.org/api_docs/python/tf/estimator/DNNClassifier) but Cortex supports any TensorFlow code that adheres to the [tf.estimator API](https://www.tensorflow.org/guide/estimators).
56+
This configuration will generate a training dataset with the specified columns and train our classifier using the generated dataset. Here we're using a built-in estimator (which uses TensorFlow's [DNNClassifier](https://www.tensorflow.org/api_docs/python/tf/estimator/DNNClassifier)) but Cortex supports any TensorFlow code that adheres to the [tf.estimator API](https://www.tensorflow.org/guide/estimators).
5757

5858
Add to `app.yaml`:
5959

@@ -87,7 +87,7 @@ Add to `app.yaml`:
8787
name: iris-type
8888
model: @dnn
8989
compute:
90-
replicas: 1
90+
replicas: 2
9191
```
9292

9393
## Deploy the application

examples/external-model/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- kind: app
2-
name: iris
2+
name: external-model
33

44
- kind: api
55
name: iris

0 commit comments

Comments
 (0)