@@ -40,7 +40,7 @@ This creates a virtual machine that can run code specified in the trainer file,
40
40
contains the main application code. A job can be initiated with the
41
41
:class: `~airflow.providers.google.cloud.operators.mlengine.MLEngineStartTrainingJobOperator `.
42
42
43
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
43
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
44
44
:language: python
45
45
:dedent: 4
46
46
:start-after: [START howto_operator_gcp_mlengine_training]
@@ -55,7 +55,7 @@ A model is a container that can hold multiple model versions. A new model can be
55
55
The ``model `` field should be defined with a dictionary containing the information about the model.
56
56
``name `` is a required field in this dictionary.
57
57
58
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
58
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
59
59
:language: python
60
60
:dedent: 4
61
61
:start-after: [START howto_operator_gcp_mlengine_create_model]
@@ -69,7 +69,7 @@ The :class:`~airflow.providers.google.cloud.operators.mlengine.MLEngineGetModelO
69
69
can be used to obtain a model previously created. To obtain the correct model, ``model_name ``
70
70
must be defined in the operator.
71
71
72
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
72
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
73
73
:language: python
74
74
:dedent: 4
75
75
:start-after: [START howto_operator_gcp_mlengine_get_model]
@@ -80,7 +80,7 @@ fields to dynamically determine their values. The result are saved to :ref:`XCom
80
80
allowing them to be used by other operators. In this case, the
81
81
:class: `~airflow.operators.bash.BashOperator ` is used to print the model information.
82
82
83
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
83
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
84
84
:language: python
85
85
:dedent: 4
86
86
:start-after: [START howto_operator_gcp_mlengine_print_model]
@@ -96,7 +96,7 @@ The model must be specified by ``model_name``, and the ``version`` parameter sho
96
96
all the information about the version. Within the ``version `` parameter's dictionary, the ``name `` field is
97
97
required.
98
98
99
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
99
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
100
100
:language: python
101
101
:dedent: 4
102
102
:start-after: [START howto_operator_gcp_mlengine_create_version1]
@@ -105,7 +105,7 @@ required.
105
105
The :class: `~airflow.providers.google.cloud.operators.mlengine.MLEngineCreateVersionOperator `
106
106
can also be used to create more versions with varying parameters.
107
107
108
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
108
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
109
109
:language: python
110
110
:dedent: 4
111
111
:start-after: [START howto_operator_gcp_mlengine_create_version2]
@@ -120,7 +120,7 @@ By default, the model code will run using the default model version. You can set
120
120
:class: `~airflow.providers.google.cloud.operators.mlengine.MLEngineSetDefaultVersionOperator `
121
121
by specifying the ``model_name `` and ``version_name `` parameters.
122
122
123
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
123
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
124
124
:language: python
125
125
:dedent: 4
126
126
:start-after: [START howto_operator_gcp_mlengine_default_version]
@@ -130,7 +130,7 @@ To list the model versions available, use the
130
130
:class: `~airflow.providers.google.cloud.operators.mlengine.MLEngineListVersionsOperator `
131
131
while specifying the ``model_name `` parameter.
132
132
133
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
133
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
134
134
:language: python
135
135
:dedent: 4
136
136
:start-after: [START howto_operator_gcp_mlengine_list_versions]
@@ -141,7 +141,7 @@ fields to dynamically determine their values. The result are saved to :ref:`XCom
141
141
allowing them to be used by other operators. In this case, the
142
142
:class: `~airflow.operators.bash.BashOperator ` is used to print the version information.
143
143
144
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
144
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
145
145
:language: python
146
146
:dedent: 4
147
147
:start-after: [START howto_operator_gcp_mlengine_print_versions]
@@ -156,7 +156,7 @@ A Google Cloud AI Platform prediction job can be started with the
156
156
For specifying the model origen, you need to provide either the ``model_name ``, ``uri ``, or ``model_name `` and
157
157
``version_name ``. If you do not provide the ``version_name ``, the operator will use the default model version.
158
158
159
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
159
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
160
160
:language: python
161
161
:dedent: 4
162
162
:start-after: [START howto_operator_gcp_mlengine_get_prediction]
@@ -171,7 +171,7 @@ A model version can be deleted with the
171
171
:class: `~airflow.providers.google.cloud.operators.mlengine.MLEngineDeleteVersionOperator ` by
172
172
the ``version_name `` and ``model_name `` parameters.
173
173
174
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
174
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
175
175
:language: python
176
176
:dedent: 4
177
177
:start-after: [START howto_operator_gcp_mlengine_delete_version]
@@ -181,7 +181,7 @@ You can also delete a model with the
181
181
:class: `~airflow.providers.google.cloud.operators.mlengine.MLEngineDeleteModelOperator `
182
182
by providing the ``model_name `` parameter.
183
183
184
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
184
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
185
185
:language: python
186
186
:dedent: 4
187
187
:start-after: [START howto_operator_gcp_mlengine_delete_model]
@@ -193,7 +193,7 @@ To evaluate a prediction and model, specify a metric function to generate a summ
193
193
the evaluation of the model. This function receives a dictionary derived from a json in the batch
194
194
prediction result, then returns a tuple of metrics.
195
195
196
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
196
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
197
197
:language: python
198
198
:dedent: 4
199
199
:start-after: [START howto_operator_gcp_mlengine_get_metric]
@@ -203,7 +203,7 @@ To evaluate a prediction and model, it's useful to have a function to validate t
203
203
This function receives a dictionary of the averaged metrics the function above generated. It then
204
204
raises an exception if a task fails or should not proceed.
205
205
206
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
206
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
207
207
:language: python
208
208
:dedent: 4
209
209
:start-after: [START howto_operator_gcp_mlengine_validate_error]
@@ -214,7 +214,7 @@ Prediction results and a model summary can be generated through a function such
214
214
It makes predictions using the specified inputs and then summarizes and validates the result. The
215
215
functions created above should be passed in through the ``metric_fn_and_keys `` and ``validate_fn `` fields.
216
216
217
- .. exampleinclude :: /../../airflow/ providers/google/cloud/example_dags /example_mlengine.py
217
+ .. exampleinclude :: /../../tests/system/ providers/google/cloud/ml_engine /example_mlengine.py
218
218
:language: python
219
219
:dedent: 4
220
220
:start-after: [START howto_operator_gcp_mlengine_evaluate]
0 commit comments