testing-course-samples

bởi microsoft

Sử dụng khi được yêu cầu xác thực, kiểm thử, kiểm thử nhanh, hoặc chạy notebook và các mẫu mã của khóa học với cấu hình Microsoft Foundry / Azure OpenAI trực tiếp.

npx skills add https://github.com/microsoft/ai-agents-for-beginners --skill testing-course-samples

Testing the Course Samples

Validate that the lesson notebooks and code samples run against a live Microsoft Foundry / Azure OpenAI setup. The repo ships a runner at scripts/validate-notebooks.ps1 that executes every Python notebook headlessly and prints a PASS/FAIL matrix.

When to use

  • "Validate all the notebooks / samples against my Azure subscription."
  • "Smoke-test the course after upgrading packages or changing models."
  • "Which lessons still pass / fail live?"

Do not use this for the AI Smoke Test GitHub Action (that validates deployed hosted agents — see tests/README.md). This skill runs the notebooks locally.

Prerequisites (check first)

  1. Python 3.12+ with course deps: python -m pip install -r requirements.txt plus the executor: python -m pip install nbconvert ipykernel.
  2. .env at the repo root (copy from .env.example) with at least:
    • AZURE_AI_PROJECT_ENDPOINT — Foundry project endpoint (https://<account>.services.ai.azure.com/api/projects/<project>)
    • AZURE_AI_MODEL_DEPLOYMENT_NAME — a non-deprecated deployment (e.g. gpt-5-mini)
    • AZURE_OPENAI_ENDPOINT (https://<account>.openai.azure.com) and AZURE_OPENAI_DEPLOYMENT for lessons that call Azure OpenAI directly (Lesson 06, 02-azure-openai, 14 handoff/human-loop).
  3. az login completed — samples authenticate with AzureCliCredential (Entra ID, keyless).
  4. Verify the model deployment exists: az cognitiveservices account deployment list -g <rg> -n <account> -o table.

Running the validation

# All Python notebooks (skips .NET, .venv, site-packages, translations, skill assets)
pwsh scripts/validate-notebooks.ps1

# A single lesson, with a longer per-cell timeout
pwsh scripts/validate-notebooks.ps1 -Filter '08-*' -Timeout 600

# Just list what would run (no execution)
pwsh scripts/validate-notebooks.ps1 -List

# Explicit interpreter (if `python` is not on PATH, e.g. Windows Store alias)
pwsh scripts/validate-notebooks.ps1 -Python "C:/path/to/python.exe"

The script writes executed copies, per-notebook logs, and results.json to $env:TEMP\aiab-nbval and exits with the number of failures.

Transient failures (shared-subscription HTTP 429 rate limits, an occasional AzureCliCredential token hiccup, or a timeout) are retried automatically (-Retries, default 2, with -RetryDelaySeconds backoff, default 20). If a model deployment is regularly 429-ing, check the subscription's GlobalStandard TPM quota (az cognitiveservices usage list -l <region>) — raising a single deployment's capacity does not help when the subscription quota is exhausted.

Interpreting results

  • PASS — the notebook ran end-to-end with no cell error.
  • FAIL — the first *Error / *Exception line is shown; open the matching log_*.txt in the output dir for the full traceback.
  • A single notebook's failure is bounded by -Timeout (per cell), so a hung human-in-the-loop cell surfaces as StdinNotImplementedError rather than hanging.

Lessons that need extra resources (expected to fail without them)

LessonExtra requirement
05 Agentic RAGAzure AI Search (AZURE_SEARCH_SERVICE_ENDPOINT, key) — has an in-memory fallback path
11 MCP / GitHubGitHub MCP server + PAT
13 memory (cognee)cognee configured with a model provider
15 browser-usePlaywright browsers installed (playwright install) + AZURE_OPENAI_CHAT_DEPLOYMENT_NAME
17 local agentFoundry Local runtime + a downloaded Qwen model (on-device, no cloud)
*-dotnet-* notebooks.NET Interactive kernel (excluded by default; use -IncludeDotnet)

Reporting back

Summarise as a PASS/FAIL table grouped by lesson. Separate genuine regressions (code/config bugs to fix) from environment gaps (missing Search/Foundry Local/PAT), and cite the failing log_*.txt for each real failure.

Thêm skills từ microsoft

oss-growth
microsoft
Cá tính tăng trưởng OSS
agent-framework-azure-ai-py
microsoft
Xây dựng các tác nhân Azure AI Foundry bằng SDK Python của Microsoft Agent Framework (agent-framework-azure-ai). Sử dụng khi tạo các tác nhân bền vững với AzureAIAgentsProvider, sử dụng các công cụ được lưu trữ (trình thông dịch mã, tìm kiếm tệp, tìm kiếm web), tích hợp máy chủ MCP, quản lý chuỗi hội thoại hoặc triển khai phản hồi phát trực tuyến. Bao gồm các công cụ hàm, đầu ra có cấu trúc và các tác nhân đa công cụ.
development
airunway-aks-setup
microsoft
Thiết lập AI Runway trên AKS — từ cụm trống đến mô hình đang chạy. Bao gồm xác minh cụm, cài đặt controller, đánh giá GPU, thiết lập nhà cung cấp và triển khai đầu tiên. KHI NÀO: "thiết lập AI Runway", "onboard cụm AKS", "cài đặt AI Runway", "thiết lập airunway", "triển khai mô hình lên AKS", "suy luận GPU trên AKS", "thiết lập KAITO trên AKS", "chạy LLM trên AKS", "vLLM trên AKS", "thiết lập phục vụ mô hình trên AKS", "AI Runway controller".
devops
appinsights-instrumentation
microsoft
Hướng dẫn để instrument các ứng dụng web với Azure Application Insights. Cung cấp các mẫu telemetry, thiết lập SDK, và tài liệu tham khảo cấu hình. KHI NÀO: cách instrument ứng dụng, App Insights SDK, các mẫu telemetry, App Insights là gì, hướng dẫn Application Insights, ví dụ instrumentation, các phương pháp tốt nhất APM.
devops
applicationinsights-web-ts
microsoft
Instrument các ứng dụng trình duyệt/web bằng SDK JavaScript Application Insights (@microsoft/applicationinsights-web). Dùng cho Real User Monitoring (RUM) — lượt xem trang, nhấp chuột, phụ thuộc AJAX/fetch, ngoại lệ, sự kiện tùy chỉnh và dấu vết tác nhân GenAI phía trình duyệt tương quan với dấu vết OpenTelemetry phía backend. Bao gồm thiết lập SDK Loader Script và npm, tiện ích mở rộng framework (React, React Native, Angular), Click Analytics, trình khởi tạo telemetry và quy ước ngữ nghĩa OTel GenAI cho các span tác nhân/công cụ/mô hình phát ra từ trình duyệt.
devops
azure-ai-anomalydetector-java
microsoft
Xây dựng ứng dụng phát hiện bất thường với Azure AI Anomaly Detector SDK cho Java. Sử dụng khi triển khai phát hiện bất thường đơn biến/đa biến, phân tích chuỗi thời gian hoặc giám sát hỗ trợ AI.
development
azure-ai-language-conversations-py
microsoft
Triển khai Conversational Language Understanding (CLU) bằng SDK Python azure-ai-language-conversations. Sử dụng khi làm việc với ConversationAnalysisClient để phân tích ý định và thực thể trong hội thoại, xây dựng tính năng NLP, hoặc tích hợp hiểu ngôn ngữ vào ứng dụng.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 cho Python. Dùng cho không gian làm việc ML, công việc, mô hình, tập dữ liệu, tính toán và quy trình. Kích hoạt: "azure-ai-ml", "MLClient", "không gian làm việc", "đăng ký mô hình", "công việc đào tạo", "tập dữ liệu".
development