You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: docs/applications/resources/data-types.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,11 +35,11 @@ Output types are used to define the output types of aggregators and constants. T
35
35
36
36
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.
37
37
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}`.
39
39
40
40
The values in lists, generic maps, and fixed maps may be arbitrarily nested.
41
41
42
-
These are all valid output types:
42
+
Here are some valid output types:
43
43
44
44
*`INT`
45
45
*`[STRING]`
@@ -87,18 +87,18 @@ Input types are used to define the inputs to aggregators, transformers, and esti
87
87
* `STRING`
88
88
* `BOOL`
89
89
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.
91
91
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).
93
93
94
94
### Input Type Validations
95
95
96
96
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.
97
97
98
98
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:
99
99
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`.
102
102
* `_allow_null`: If set to `True`, allows the value to be explicitly set to `Null`.
103
103
* `_min_count`: Specifies the minimum number of elements that must be in the list or map.
104
104
* `_max_count`: Specifies the maximum number of elements that must be in the list or map.
@@ -135,7 +135,7 @@ input:
135
135
_max_count: 100
136
136
```
137
137
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`):
Copy file name to clipboardExpand all lines: docs/applications/resources/models.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,6 @@ Train TensorFlow models at scale.
58
58
59
59
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).
60
60
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.
Copy file name to clipboardExpand all lines: docs/tutorial.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,10 @@ Our goal is to build a web API that returns the type of iris given its measureme
22
22
23
23
```bash
24
24
mkdir iris &&cd iris
25
-
touch app.yaml dnn.py irises.json
25
+
touch app.yaml irises.json
26
26
```
27
27
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`.
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.
53
53
54
54
#### Define the model
55
55
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).
0 commit comments