Skip to content

codehub-learn/GTGH-AI-Engineering-Day-16

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Session A: Introduction to MCP & Azure ML Workspace

  • Understanding the Model Context Protocol (MCP) Architecture
  • Setting up the Azure Machine Learning (AML) Workspace
  • Managing Assets: Data & Model Registration

Session B: Implementing and Deploying the MCP

  • Packaging the MCP Logic (score.py & environment)
  • Deploying the MCP as a Managed Endpoint
  • Testing and Validating the Live Endpoint

Session C: Production Pipelines & Compliance

  • Building an Azure-Ready ML Pipeline with the MCP
  • Ensuring Compliance and Responsible AI Principles
  • Monitoring and Managing the Deployed Pipeline"
pyhton script

import requests
import json

# API - ML endpoint
api_key = "YOUR_API_KEY"

# Scoring URI from deploy_azure.py
scoring_uri = "https://<region>.inference.ml.azure.com/score"

# message to agent
data = {
    "message": "What is 12 + 8?"
}

# Headers for the request 
headers = {
    "Content-Type": "application/json",
    "Authorization": f"Bearer {api_key}"
}

# send the request
response = requests.post(scoring_uri, headers=headers, data=json.dumps(data))

# get the answer
print("Response:", response.json())

Try it using postman

  1. Open postman and create a new request Method: POST URL: Το scoring_uri from deploy_azure.py (π.χ. https://.inference.ml.azure.com/score)

  2. Headers Key Value Content-Type application/json AuthorizationBearer

    if your endpoint is auth_mode="key", then the Authorization is:

    Plain TextBearer Show more lines

  3. Body Select raw and JSON: { "message": "What is 12 + 8?" }

  4. Send Request and you should get { "response": "The result is 20.", "status": "success"}

Get your key from Azure Portal:

  • Azure Machine Learning Studio.
  • Your Endpoint
  • Tab: Authentication, get the Primary Key.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages