You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/07 15:24:34 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #10222: Add labels param to Google MLEngine Operators

mik-laj commented on a change in pull request #10222:
URL: https://github.com/apache/airflow/pull/10222#discussion_r467109354



##########
File path: airflow/providers/google/cloud/operators/mlengine.py
##########
@@ -1057,6 +1069,9 @@ def execute(self, context):
             self.log.info('MLEngine Training job request is: %s', training_request)
             return
 
+        if self._labels:
+            training_request['trainingInput']['labels'] = self._labels

Review comment:
       I have the impression that the labels should be in ``training_request`, not ``trainingInput``. From what I can see, the API reference documentation for this product is incomplete and the description for the training_input field is missing, 
   https://cloud.google.com/ai-platform/prediction/docs/reference/rest/v1/projects.jobs#Job
   so you have to look at the Discovery documentation which gets updated more frequently so you have to look at the Discovery documentation, which gets more frequent updates, but also has bugs and missing parameter descriptions.
   https://ml.googleapis.com/$discovery/rest?version=v1
   More info about Discovery docs: https://developers.google.com/discovery
   
   <img width="773" alt="Screenshot 2020-08-07 at 17 24 00" src="https://user-images.githubusercontent.com/12058428/89661304-cd75c280-d8d2-11ea-940a-98c9c1bf04f3.png">
    




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org