1

I am using the MLFlow Webhooks , mentioned here. I am using that to queue an Azure Devops Pipeline.

However, I can't seem to to find a way to retrieve the payload variables inside my pipeline.

E.g. during transition of models, according to the document, such a payload is passed

POST
/your/endpoint/for/event/model-versions/stage-transition
--data {
  "event": "MODEL_VERSION_TRANSITIONED_STAGE",
  "webhook_id": "c5596721253c4b429368cf6f4341b88a",
  "event_timestamp": 1589859029343,
  "model_name": "Airline_Delay_SparkML",
  "version": "8",
  "to_stage": "Production",
  "from_stage": "None",
  "text": "Registered model 'someModel' version 8 transitioned from None to Production."
}

My webhook is created like this:

mlflow_webhook_triggerDevOps={
  "events": ["TRANSITION_REQUEST_CREATED", "REGISTERED_MODEL_CREATED"],
  "description": "Integration with Azure DevOps",
  "status": "ACTIVE",
  "http_url_spec": {
                    "url": "https://dev.azure.com/orgname/ProjectName/_apis/build/builds?definitionId=742&api-version=6.0",
                    "authorization": "Basic " + base64_message
                    }
 }

mlflow_createwebhook=requests.post('https://databricksurl/api/2.0/mlflow/registry-webhooks/create', headers=header, proxies=proxies, json=mlflow_webhook_body)

How do I then retrieve the payload variable e.g. model_name, inside my pipeline definition in Azure Devops?.

I looked at this post, but I can't seem to see any payload information (like mentioned above) under the Network-payload tab (or I am not using properly).

Right now, I can trigger the pipeline, but can't seem to find a way to retrieve the payload.

Is it possible? Am I missing something?

Saugat Mukherjee
  • 778
  • 8
  • 32
  • Did you solve this? I am facing the same issue. – Minura Punchihewa May 18 '22 at 09:53
  • Not really but I got myself a workaround. I just trigger the pipeline and then in the pipeline, get model versions (the top version by ordering as descending). By no means ideal, as what I should get automatically, I now have to get as 2 step process. – Saugat Mukherjee May 31 '22 at 09:51
  • Hey @Saugat Mukherjee, thank you for the updated. I used an Azure Function in between mine to resolve this. – Minura Punchihewa May 31 '22 at 13:26

0 Answers0