Ngân hàng đề — Microsoft Azure Data Scientist

Tìm thấy 313 câu.

Câu 201
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure Machine Learning workspace. You connect to a terminal session from the Notebooks page in Azure Machine Learning studio.

You plan to add a new Jupyter kernel that will be accessible from the same terminal session.

You need to perform the task that must be completed before you can add the new kernel.

Solution: Delete the Python 3.6 – AzureML kernel.

Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧠 Phân tích câu hỏi trắc nghiệm bởi Microsoft Azure Data Scientist

📘 Tóm tắt nội dung câu hỏi một cách chi tiết và rõ ràng:
Câu hỏi thuộc dạng series scenario trong kỳ thi chứng chỉ (như AZ-400 hoặc DP-100), nơi mỗi câu đưa ra một giải pháp cụ thể và hỏi liệu giải pháp đó có đạt được mục tiêu hay không.

  • Bối cảnh: Bạn đang làm việc với một Azure Machine Learning workspace. Từ trang Notebooks trong Azure Machine Learning studio, bạn kết nối vào một terminal session (phiên làm việc terminal/shell trên compute instance).
  • Mục tiêu: Thêm một Jupyter kernel mới (ví dụ: kernel tùy chỉnh với Python version khác hoặc packages đặc biệt) sao cho kernel này có thể truy cập được từ cùng terminal session đó (nghĩa là kernel mới phải được cài đặt và đăng ký trên compute instance đang chạy terminal, để có thể sử dụng trong Jupyter notebooks hoặc các lệnh Jupyter từ terminal).
  • Giải pháp đề xuất: Delete the Python 3.6 – AzureML kernel (Xóa kernel Python 3.6 – AzureML).
  • Câu hỏi chính: Giải pháp này có đạt được mục tiêu (meet the goal) không?
    🛠️ Lưu ý kỹ thuật (cập nhật đến 2026): Trong Azure ML (phiên bản mới nhất 2024-2026), terminal session chạy trên compute instance (như VM với JupyterLab). Để thêm kernel mới accessible từ terminal:
    • Bạn phải SSH/terminal vào compute instance.
    • Tạo conda environment mới (ví dụ: conda create -n myenv python=3.10).
    • Cài ipykernel và đăng ký kernel: python -m ipykernel install --user --name mykernel --display-name "My Custom Kernel".
    • Kernel mới sẽ tự động appear trong danh sách kernels của JupyterLab/Studio mà KHÔNG CẦN xóa kernel cũ. Python 3.6 là kernel legacy (đã deprecated từ Azure ML 2021+), nhưng xóa nó không phải prerequisite và có thể gây lỗi nếu đang dùng.

✅ Đáp án đúng: No
Lý do lựa chọn (bằng tiếng Việt rõ ràng):
Giải pháp KHÔNG đạt mục tiêu vì việc xóa kernel Python 3.6 – AzureML không phải là bước bắt buộc (và thậm chí không khuyến khích) để thêm kernel mới. Azure ML hỗ trợ multiple kernels song song trên cùng compute instance. Để thêm kernel mới accessible từ terminal:

  • Cần cài đặt và đăng ký kernel qua lệnh ipykernel install trong environment tương ứng.
  • Xóa kernel cũ chỉ làm phức tạp hóa, không giải quyết vấn đề, và có thể vi phạm "unique solution" trong series questions. Giải pháp đúng thường là tạo custom environment và register kernel (không delete gì cả).
    ✅ Điều này phù hợp docs Azure ML 2026: Custom kernels không yêu cầu xóa default/legacy kernels.

🧩 Giải thích tất cả các phương án (giữ nguyên text gốc bằng tiếng Anh, phân tích bằng tiếng Việt):

  • Yes ❌ SAI – Phương án này sai vì delete kernel Python 3.6 không giúp thêm kernel mới. Kernel legacy như Python 3.6 chỉ là một trong nhiều kernels mặc định (Azure ML hiện dùng Python 3.10/3.11 làm default). Xóa nó có thể:

    • Không ảnh hưởng đến terminal session (terminal dùng bash shell, không phụ thuộc kernel Python cụ thể).
    • Gây lỗi nếu notebook khác đang dùng kernel đó.
    • Không phải bước "must be completed before adding new kernel" theo quy trình Azure ML.
  • No ✅ ĐÚNG – Phương án này đúng vì giải pháp đề xuất KHÔNG meet the goal. Để đạt mục tiêu, cần:

    1. Từ terminal, tạo env mới: conda create -n newkernel python=3.10 ipykernel.
    2. Activate và register: conda activate newkernel rồi python -m ipykernel install --user --name newkernel --display-name "New Kernel".
      Kernel mới sẽ accessible ngay từ JupyterLab/Studio và terminal commands như jupyter kernelspec list. Không cần (và không nên) delete kernel cũ.

📚 Tài liệu tham khảo (cập nhật mới nhất 2026):

🔍 Kết luận: Đây là câu hỏi kiểm tra hiểu biết về custom kernel workflow trong Azure ML, tránh các giải pháp "destructure" không cần thiết. Nếu thi thật, chọn No để pass! 🚀

Câu 202
You are creating a compute target to train a machine learning experiment.

The compute target must support automated machine learning, machine learning pipelines, and Azure Machine Learning designer training.

You need to configure the compute target.

Which option should you use?
  1. A Azure HDInsight
  2. B Azure Machine Learning compute cluster
  3. C Azure Batch
  4. D Remote VM
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc tạo một compute target (mục tiêu tính toán) để huấn luyện một thí nghiệm machine learning (ML experiment) trong môi trường Azure Machine Learning. Compute target này phải hỗ trợ đầy đủ ba tính năng chính:

  • Automated machine learning (AutoML): Tự động hóa quá trình xây dựng và tối ưu hóa mô hình ML mà không cần code thủ công.
  • Machine learning pipelines: Xây dựng và quản lý các pipeline ML để tự động hóa quy trình end-to-end (từ dữ liệu đến triển khai).
  • Azure Machine Learning designer training: Huấn luyện mô hình qua giao diện kéo-thả (drag-and-drop) của Azure ML Designer, một công cụ no-code/low-code.

📌 Yêu cầu cốt lõi: Compute target phải được cấu hình để tương thích hoàn hảo với các tính năng native của Azure Machine Learning service, đảm bảo tính linh hoạt, scalability và tích hợp seamless. Đây là kiến thức cập nhật đến năm 2026, dựa trên phiên bản Azure ML mới nhất (v5.x), nơi compute clusters được ưu tiên cho các workload ML chuyên sâu.

Nguồn tham khảo 📘:

✅ Đáp án đúng và lý do lựa chọn

Azure Machine Learning compute cluster là lựa chọn đúng nhất! 🏆

Lý do chi tiết (dựa trên tài liệu Azure ML 2026):

  • Đây là compute target native và được thiết kế dành riêng cho Azure Machine Learning workspace.
  • Hỗ trợ đầy đủ 100% ba yêu cầu: AutoML (scale tự động), ML pipelines (tích hợp v2 pipelines), và Designer training (drag-and-drop trực tiếp attach cluster).
  • Ưu điểm vượt trội: Auto-scaling (từ 0 đến hàng trăm node), hỗ trợ GPU/CPU, managed lifecycle (không lo maintain VM), và tích hợp security (RBAC, VNet). Lý tưởng cho production ML workloads! 🚀

🛠️ Giải thích tất cả các phương án (đúng & sai)

Dưới đây là phân tích từng lựa chọn một cách khách quan, dựa trên khả năng hỗ trợ ba tính năng yêu cầu. Tôi giữ nguyên văn bản gốc tiếng Anh và chỉ giải thích bằng tiếng Việt.

  • Azure HDInsight ❌ SAI
    Đây là dịch vụ managed Hadoop/Spark cho big data analytics. Nó không hỗ trợ native AutoML, ML pipelines, hay Azure ML Designer của Azure Machine Learning. HDInsight tập trung vào Spark jobs và batch processing, không integrate trực tiếp với Azure ML workspace. Sử dụng sẽ yêu cầu custom integration phức tạp, không phù hợp cho ML experiments thuần túy.

  • Azure Machine Learning compute cluster ✅ ĐÚNG
    Như đã giải thích ở trên, đây là lựa chọn hoàn hảo với hỗ trợ full-stack cho AutoML (qua SDK v2), pipelines (orchestration tự động), và Designer (attach trực tiếp). Scalable, cost-effective với spot instances, và cập nhật mới nhất hỗ trợ serverless compute (preview 2026).

  • Azure Batch ❌ SAI
    Dịch vụ này dành cho batch processing lớn (như rendering, simulations), hỗ trợ containers và jobs parallel. Tuy nhiên, không integrate native với Azure ML's AutoML/pipelines/Designer – bạn phải manual attach và manage dependencies. Không lý tưởng cho interactive ML training hoặc designer workflows.

  • Remote VM ❌ SAI
    Có thể là VM tùy chỉnh (như AKS, VM Scale Set) attach vào Azure ML workspace. Hỗ trợ hạn chế: Có thể dùng cho pipelines cơ bản, nhưng thiếu auto-scaling native, không optimize cho AutoML/Designer (yêu cầu manual config Docker, libraries). Quản lý thủ công cao, dễ lỗi và kém scalable so với compute cluster managed.

Kết luận nổi bật 💡: Luôn ưu tiên Azure Machine Learning compute cluster cho các workload ML thuần Azure để tận dụng ecosystem đầy đủ. Nếu cần tùy chỉnh sâu, có thể kết hợp với AKS, nhưng không phải lựa chọn đầu tiên! 🎯

Câu 203
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure Machine Learning workspace. You connect to a terminal session from the Notebooks page in Azure Machine Learning studio.

You plan to add a new Jupyter kernel that will be accessible from the same terminal session.

You need to perform the task that must be completed before you can add the new kernel.

Solution: Delete the Python 3.8 – AzureML kernel.

Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧠 Phân tích chi tiết nội dung câu hỏi

🛠️ Bối cảnh câu hỏi: Đây là một câu hỏi thuộc dạng "series of questions" trong kỳ thi chứng chỉ (có thể là AZ-400 hoặc DP-100 của Microsoft Azure), nơi mỗi câu trình bày một tình huống giống nhau nhưng giải pháp (solution) khác nhau. Bạn KHÔNG thể quay lại câu hỏi sau khi trả lời.
Tình huống cụ thể:

  • Bạn có một Azure Machine Learning workspace.
  • Bạn kết nối đến một terminal session từ trang Notebooks trong Azure Machine Learning studio.
  • Mục tiêu: Thêm một Jupyter kernel mới (ví dụ: kernel tùy chỉnh với Python version khác hoặc môi trường conda mới) sao cho kernel này có thể truy cập được từ cùng terminal session đó.

🧩 Nhiệm vụ cần thực hiện trước khi thêm kernel mới: Câu hỏi yêu cầu xác định xem giải pháp đề xuất có đạt mục tiêu không.
Giải pháp được đề xuất (Solution): Delete the Python 3.8 – AzureML kernel (Xóa kernel Python 3.8 – AzureML mặc định).
Câu hỏi chính: Giải pháp này có đáp ứng mục tiêu (meet the goal) không?

📝 Lưu ý quan trọng về Azure ML (cập nhật đến 2026):

  • Terminal session trong Azure ML studio chạy trên compute instance (hoặc compute cluster), sử dụng môi trường conda/kernel mặc định (như Python 3.8 AzureML).
  • Jupyter kernels được quản lý qua Jupyter Kernelspec (danh sách kernels available trong Notebooks và terminal).
  • Để thêm kernel mới accessible từ cùng terminal session, bạn cần install ipykernel vào môi trường conda tương ứng (ví dụ: conda install ipykernel rồi python -m ipykernel install --user --name mykernel), KHÔNG cần xóa kernel cũ. Xóa kernel cũ chỉ làm giảm số lượng kernels available, có thể gây lỗi session hiện tại mà không giúp thêm kernel mới.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: No
✅ Lý do: Giải pháp xóa kernel Python 3.8 – AzureML KHÔNG đáp ứng mục tiêu.

  • Terminal session đang chạy trên compute instance với kernels hiện có. Việc xóa kernel mặc định sẽ gây gián đoạn danh sách kernels available, có thể làm terminal hoặc notebooks hiện tại không load được kernel, nhưng không tự động thêm kernel mới.
  • Để thêm kernel mới accessible từ cùng session, cần tạo và register kernel mới qua terminal (sử dụng lệnh ipykernel install), restart kernel nếu cần, hoặc tạo conda env mới và install ipykernel. Xóa kernel cũ là bước không cần thiết và sai lầm, theo tài liệu Azure ML mới nhất (2024-2026, hỗ trợ Python 3.10+ kernels).

📋 Giải thích tất cả các phương án

  • Yes ❌ SAI: Phương án này cho rằng xóa kernel Python 3.8 – AzureML sẽ giúp thêm kernel mới accessible từ terminal session. Thực tế, xóa kernel chỉ uninstall kernelspec (qua jupyter kernelspec uninstall), dẫn đến mất kernel mặc định, làm session hiện tại bị lỗi (terminal/notebook không chọn được kernel). Không có cơ chế nào tự thêm kernel mới sau khi xóa; đây là giải pháp sai hoàn toàn, không meet goal.
  • No ✅ ĐÚNG: Phương án này chính xác vì giải pháp đề xuất không hiệu quả. Thay vào đó, bước đúng là install kernel mới trực tiếp qua terminal (ví dụ: conda create -n myenv python=3.10; conda activate myenv; conda install ipykernel; python -m ipykernel install --user --name my-python3.10), sau đó refresh Jupyter hoặc restart session để kernel mới available ngay trong cùng terminal mà không cần xóa kernel cũ.

📘 Tài liệu tham khảo

Hy vọng phân tích này giúp bạn ôn thi hiệu quả! 🚀 Nếu cần thêm chi tiết về Azure ML kernels, hãy hỏi nhé!

Câu 204
You manage an Azure Machine Learning workspace by using the Azure CLI ml extension v2.

You need to define a YAML schema to create a compute cluster.

Which schema should you use?
  1. A https://azuremlschemas.azureedge.net/latest/computeInstance.schema.json
  2. B https://azuremlschemas.azureedge.net/latest/amlCompute.schema.json
  3. C https://azuremlschemas.azureedge.net/latest/vmCompute.schema.json
  4. D https://azuremlschemas.azureedge.net/latest/kubernetesCompute.schema.json
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc quản lý Azure Machine Learning workspace bằng cách sử dụng Azure CLI ml extension phiên bản 2 (v2). Nhiệm vụ cụ thể là định nghĩa một schema YAML để tạo compute cluster.

  • Azure Machine Learning (Azure ML) là dịch vụ của Microsoft Azure hỗ trợ xây dựng, huấn luyện và triển khai mô hình machine learning.
  • Compute cluster là một nhóm các máy ảo (VM) có thể mở rộng, dùng cho huấn luyện phân tán hoặc job lớn, khác với compute instance (máy đơn lẻ cho interactive).
  • YAML schema là định dạng file cấu hình chuẩn trong Azure ML v2 để khai báo tài nguyên qua CLI, đảm bảo tính nhất quán và validation tự động.
  • Câu hỏi yêu cầu chọn schema chính xác từ các URL schema JSON (dùng để validate YAML khi tạo compute cluster qua lệnh như az ml compute create --file compute.yaml --schema <url>).

Mục tiêu là xác định schema phù hợp nhất cho compute cluster theo tài liệu Azure ML mới nhất (cập nhật đến 2024-2026, với Azure ML CLI v2 và schemas latest).

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: https://azuremlschemas.azureedge.net/latest/amlCompute.schema.json

Lý do:

  • Schema amlCompute.schema.json được thiết kế chính thức dành riêng cho việc tạo Azure ML Compute Cluster (hay còn gọi là AML Compute).
  • Nó hỗ trợ các thuộc tính như type: amlcompute, scale settings (min/max instances), VM size, idle time shutdown, và tích hợp với Azure ML workspace qua CLI v2.
  • Theo docs Azure ML 2024+, đây là schema chuẩn cho compute cluster, đảm bảo tạo cluster có thể scale tự động cho job ML lớn. 🛠️

📋 Giải thích tất cả các phương án (đúng/sai)

Dưới đây là phân tích từng lựa chọn, giữ nguyên nội dung văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá dựa trên tài liệu Azure ML schemas latest (2026), với lý do đúng/sai chi tiết:

  • https://azuremlschemas.azureedge.net/latest/computeInstance.schema.json ❌
    Sai: Schema này dành cho Compute Instance (máy ảo đơn lẻ, interactive như Jupyter notebook), không phải compute cluster. Nó chỉ hỗ trợ type: computeinstance, không có scale settings cho cluster. Dùng schema này sẽ lỗi validation khi tạo cluster.

  • https://azuremlschemas.azureedge.net/latest/amlCompute.schema.json ✅
    Đúng: Như đã giải thích ở trên, đây là schema chuẩn cho AML Compute Cluster trong Azure ML v2. Hỗ trợ đầy đủ properties như instance_type: VM, scale_settings, và tích hợp CLI az ml compute create. Lý tưởng cho huấn luyện phân tán.

  • https://azuremlschemas.azureedge.net/latest/vmCompute.schema.json ❌
    Sai: Schema vmCompute không tồn tại hoặc đã deprecated trong latest schemas (2024+). Nó có thể ám chỉ compute cũ kiểu VM đơn giản, nhưng không hỗ trợ cluster scale. Dùng sẽ gây lỗi schema mismatch với Azure ML compute cluster hiện đại.

  • https://azuremlschemas.azureedge.net/latest/kubernetesCompute.schema.json ❌
    Sai: Schema này dành cho Kubernetes Compute (tích hợp AKS cluster), dùng type: kubernetes với namespace và compute target riêng. Không phù hợp cho compute cluster thông thường trên Azure VM, chỉ dùng khi cần Kubernetes orchestration.

📘 Tài liệu tham khảo

Hy vọng phân tích này giúp bạn nắm vững Azure ML schemas! 🚀 Nếu cần ví dụ YAML mẫu, hãy hỏi thêm nhé! 😊

Câu 205
You are a data scientist working for a hotel booking website company. You use the Azure Machine Learning service to train a model that identifies fraudulent transactions.

You must deploy the model as an Azure Machine Learning online endpoint by using the Azure Machine Learning Python SDK v2. The deployed model must return real-time predictions of fraud based on transaction data input.

You need to create the script that is specified as the scoring_script parameter for the CodeConfiguration class used to deploy the model.

What should the entry script do?
  1. A Register the model with appropriate tags and properties.
  2. B Create a Conda environment for the online endpoint compute and install the necessary Python packages.
  3. C Load the model and use it to predict labels from input data.
  4. D Start a node on the inference cluster where the model is deployed.
  5. E Specify the number of cores and the amount of memory required for the online endpoint compute.
Xem giải thích

🧩 Giải thích nội dung câu hỏi

Câu hỏi này thuộc lĩnh vực Azure Machine Learning (Azure ML), tập trung vào việc triển khai (deploy) một mô hình học máy đã được huấn luyện để phát hiện giao dịch gian lận cho một công ty website đặt phòng khách sạn.

  • Bối cảnh: Bạn là data scientist sử dụng dịch vụ Azure Machine Learning để train mô hình. Bây giờ cần deploy mô hình dưới dạng online endpoint (điểm cuối trực tuyến) bằng Azure Machine Learning Python SDK v2 (phiên bản mới nhất tính đến 2026). Endpoint này phải hỗ trợ dự đoán thời gian thực (real-time predictions) dựa trên dữ liệu giao dịch đầu vào.
  • Yêu cầu chính: Tạo script entry (kịch bản đầu vào) được chỉ định qua tham số scoring_script trong lớp CodeConfiguration. Script này là phần cốt lõi của quá trình inference (suy luận), chạy trên endpoint để xử lý dữ liệu đầu vào và trả về kết quả dự đoán gian lận ngay lập tức.
  • Mục tiêu: Hiểu rõ entry script (hay scoring script) phải làm gì để đảm bảo mô hình hoạt động đúng trong môi trường production. Đây là bước quan trọng trong quy trình MLOps của Azure ML, nơi script xử lý JSON input/output cho real-time scoring (theo tài liệu Azure ML SDK v2 cập nhật 2025-2026).

📘 Tài liệu tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Load the model and use it to predict labels from input data.

Lý do:

  • Trong Azure ML SDK v2, scoring script (entry script) chính là script thực hiện inference pipeline: load mô hình từ artifact đã đăng ký, nhận input dữ liệu (thường dạng JSON), chạy predict để tạo labels (ví dụ: fraud/non-fraud), và trả về output JSON.
  • Điều này đảm bảo real-time predictions như yêu cầu. Script phải có các hàm chuẩn như init() (load model) và run() (predict). Không làm điều này sẽ khiến endpoint không hoạt động.
  • 🛠️ Ví dụ code cơ bản (SDK v2):
    import json
    import numpy as np
    from azureml.core.model import Model
    
    def init():
        global model
        model_path = Model.get_model_path('fraud_model')
        model = load_model(model_path)  # Load model
    
    def run(raw_data):
        data = json.loads(raw_data)['data']
        predictions = model.predict(np.array(data))
        return json.dumps({"labels": predictions.tolist()})
    

📋 Giải thích tất cả các phương án

Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh. Tôi đánh dấu ✅ cho đúng và ❌ cho sai, kèm lý do dựa trên quy trình deploy Azure ML SDK v2 (không phải AWS, dù đề cập nhầm - Azure là nền tảng chính xác).

  • ❌ Register the model with appropriate tags and properties.
    Sai vì: Việc đăng ký (register) model với tags/properties là bước trước deploy, thực hiện qua Model.register() hoặc Azure ML Studio UI. Scoring script chỉ chạy sau khi model đã đăng ký, không làm nhiệm vụ này (tránh lỗi runtime).

  • ❌ Create a Conda environment for the online endpoint compute and install the necessary Python packages.
    Sai vì: Tạo Conda environment là phần của environment specification (qua Environment class hoặc YAML), chỉ định packages cần thiết cho compute (như AmlCompute). Scoring script không tự tạo environment, mà chạy trong environment đã deploy.

  • ✅ Load the model and use it to predict labels from input data.
    Đúng vì: Đây là nhiệm vụ cốt lõi của scoring script trong online endpoints Azure ML v2. Script phải load model (trong init()) và predict trên input (trong run()), hỗ trợ real-time fraud detection. Phù hợp hoàn hảo với yêu cầu deploy.

  • ❌ Start a node on the inference cluster where the model is deployed.
    Sai vì: Khởi động node cluster là trách nhiệm của Azure ML compute infrastructure (qua ManagedOnlineEndpoint và scaling config). Scoring script không quản lý hạ tầng, chỉ tập trung vào logic model inference.

  • ❌ Specify the number of cores and the amount of memory required for the online endpoint compute.
    Sai vì: Chỉ định cores/memory là phần của compute instance hoặc instance_type trong deployment config (ví dụ: KubernetesOnlineEndpoint với instance_type="Standard_DS3_v2"). Scoring script không can thiệp vào resource allocation, tránh overhead không cần thiết.

🛠️ Lưu ý bổ sung: Để deploy thành công, sử dụng Model.deploy() với CodeConfiguration(code="./script_folder", scoring_script="score.py"). Kiểm tra logs endpoint qua Azure ML Studio để debug. Nếu cần cập nhật 2026, hỗ trợ thêm ONNX Runtime cho faster inference! 🚀

Câu 206
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have the following Azure subscriptions and Azure Machine Learning service workspaces:



You need to obtain a reference to the ml-project workspace.

Solution: Run the following Python code:

from azureml.core import Workspace
ws = Workspace.from_config()


Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi thuộc dạng series questions trong kỳ thi chứng chỉ (như DP-100 của Microsoft Azure), nơi mỗi câu hỏi trình bày một tình huống giống nhau nhưng giải pháp khác biệt. Người dùng có hai Azure subscriptions và hai Azure Machine Learning workspaces:

  • Subscription 1: ID 385bdf5acef4ad4b977... (là subscription mặc định), chứa workspace ml-default.
  • Subscription 2: ID 5f869d27c94234983- ze90421068..., chứa workspace ml-project.

📊 Nội dung hình ảnh (bảng): Hình ảnh hiển thị bảng tóm tắt như sau (dựa trên text được cung cấp):

| Subscription          | Workspace | Comment                                      |
|-----------------------|-----------|----------------------------------------------|
| 385bdf5acef4ad4b977...| ml-default| This is default subscription.                |
| 5f869d27c94234983-... | ml-project| The information required to uniquely identify this workspace is stored in the file config.json in the same folder as the Python script. |
  • Mục tiêu (goal): Lấy reference (tham chiếu) đến workspace ml-project (không phải ml-default).
  • Giải pháp đề xuất: Chạy code Python sau:
    from azureml.core import Workspace
    ws = Workspace.from_config()
    
  • Câu hỏi chính: Giải pháp này có đạt mục tiêu không? (Does the solution meet the goal?)

🛠️ Ngữ cảnh kỹ thuật: Trong Azure Machine Learning (phiên bản SDK v1 - azureml.core, cập nhật đến 2026 vẫn hỗ trợ đầy đủ), phương thức Workspace.from_config() sẽ tự động đọc file config.json trong cùng thư mục với script Python. File này chứa thông tin xác định workspace (subscription ID, resource group, workspace name, v.v.). Dựa trên comment trong bảng, config.json chứa chính xác thông tin của ml-project, nên code sẽ load đúng workspace này.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Yes
✅ Lý do:

  • File config.json nằm cùng folder với Python script và chứa thông tin duy nhất để identify workspace ml-project (subscription ID 5f869d27c9-4234-983-..., resource group, workspace name).
  • Workspace.from_config() tự động parse file này, tạo reference chính xác đến ml-project mà không cần hard-code thông tin.
  • Không liên quan đến subscription mặc định (ml-default), vì config.json ưu tiên thông tin cụ thể của nó.
  • Điều này phù hợp với best practice Azure ML SDK v1 (vẫn valid đến 2026, dù v2 khuyến khích MLClient.from_config() từ azure.ai.ml).

📝 Giải thích tất cả các phương án

  • Yes ✅:
    Phương án này ĐÚNG vì Workspace.from_config() đọc trực tiếp config.json chứa thông tin ml-project (như comment trong bảng). Code sẽ trả về reference đúng ws pointing to ml-project, đạt goal. Không cần chỉ định thêm subscription hay workspace name.

  • No ❌:
    Phương án này SAI vì bỏ qua thông tin từ bảng: config.json đã được thiết kế dành riêng cho ml-project. Nếu chọn No, sẽ hiểu lầm rằng code load default workspace (ml-default), nhưng thực tế nó ưu tiên config file local.

📘 Tài liệu tham khảo

  • Azure ML SDK v1 Docs (cập nhật 2026): Workspace.from_config() – Xác nhận đọc config.json từ current directory.
  • Config.json format: concept-workspace-config-file – Chi tiết cấu trúc file.
  • DP-100 Exam Guide: Microsoft Learn – Series questions thường test config-based workspace loading.
  • Chuyển sang v2 (tùy chọn): Nếu dùng SDK v2, thay bằng from azure.ai.ml import MLClient; ml_client = MLClient.from_config() – nhưng code gốc là v1, vẫn đúng.

Hy vọng phân tích giúp bạn nắm vững! 🚀 Nếu cần code demo, hỏi thêm nhé!

Câu 207 Chọn nhiều đáp án
You create a machine learning model by using the Azure Machine Learning designer. You publish the model as a real-time service on an Azure Kubernetes
Service (AKS) inference compute cluster. You make no changes to the deployed endpoint configuration.
You need to provide application developers with the information they need to consume the endpoint.
Which two values should you provide to application developers? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
  1. A The name of the AKS cluster where the endpoint is hosted.
  2. B The name of the inference pipeline for the endpoint.
  3. C The URL of the endpoint.
  4. D The run ID of the inference pipeline experiment for the endpoint.
  5. E The key for the endpoint.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi này thuộc lĩnh vực Azure Machine Learning (Azure ML), cụ thể là quy trình triển khai (deploy) mô hình học máy được xây dựng bằng Azure Machine Learning designer (công cụ kéo-thả để thiết kế pipeline ML). Bạn đã publish mô hình dưới dạng dịch vụ real-time (thời gian thực) trên Azure Kubernetes Service (AKS) inference compute cluster – đây là cụm tính toán chuyên dụng để suy luận (inference) mô hình ML. Quan trọng là không thay đổi cấu hình endpoint đã deploy.

Mục tiêu: Cung cấp thông tin cần thiết cho application developers để họ có thể tiêu thụ (consume) endpoint này qua API REST. Đây là câu hỏi multi-select (chọn nhiều đáp án đúng), mỗi đáp án đúng chiếm 1 điểm. Để consume endpoint real-time trên Azure ML (phiên bản cập nhật đến 2026), developers cần REST endpoint URL (địa chỉ gọi API) và authentication key (khóa xác thực) để gửi request dự đoán.

📘 Tài liệu tham khảo:

✅ Đáp án đúng (2 lựa chọn)

Các đáp án đúng là:
The URL of the endpoint.
The key for the endpoint.

Lý do lựa chọn:
Khi deploy real-time endpoint trên AKS mà không thay đổi config mặc định, Azure ML tự động cung cấp REST endpoint URL (dạng https://<endpoint-name>.<region>.inference.ml.azure.com/score) để developers gửi HTTP POST request với dữ liệu input. Đồng thời, cần endpoint key (primary hoặc secondary key) để xác thực request (header Authorization: Bearer <key>). Đây là thông tin bắt buộc và đủ để consume endpoint mà không cần biết chi tiết hạ tầng bên dưới. Kiến thức này vẫn đúng với Azure ML SDK v2 và managed online endpoints (2024-2026).

🛠️ Giải thích tất cả các phương án (đúng/sai)

  • ❌ [SAI] The name of the AKS cluster where the endpoint is hosted.
    Phương án này sai vì tên cụm AKS chỉ dùng nội bộ để quản lý hạ tầng (qua Azure portal hoặc CLI), không cần thiết cho việc consume endpoint. Developers không gọi trực tiếp đến AKS cluster mà gọi qua abstraction layer của Azure ML endpoint (URL riêng biệt). Cung cấp tên cluster có thể dẫn đến lỗi bảo mật hoặc phức tạp hóa.

  • ❌ [SAI] The name of the inference pipeline for the endpoint.
    Phương án này sai vì trong Azure ML designer, "inference pipeline" là tên pipeline dùng để deploy, nhưng sau khi publish thành endpoint, developers không cần tên pipeline để consume. Họ chỉ cần URL và key để gọi API /score. Tên pipeline chỉ hữu ích cho việc quản lý/debug trong Azure ML studio.

  • ✅ [ĐÚNG] The URL of the endpoint.
    Phương án này đúng vì đây là REST scoring URI duy nhất để gửi request inference (ví dụ: curl hoặc SDK). Azure ML cung cấp URL này ngay sau deploy, và nó là thông tin cốt lõi cho mọi integration (Python, C#, etc.). Không có URL, không thể consume được.

  • ❌ [SAI] The run ID of the inference pipeline experiment for the endpoint.
    Phương án này sai vì Run ID chỉ là identifier của experiment run trong Azure ML (dùng để track lịch sử training/deploy). Nó không liên quan đến consume endpoint – developers không dùng Run ID để gọi API. Run ID hữu ích cho monitoring, không phải integration.

  • ✅ [ĐÚNG] The key for the endpoint.
    Phương án này đúng vì endpoint sử dụng key-based authentication mặc định (không thay đổi config). Key được regenerate qua Azure ML studio/CLI, và phải truyền trong header request để tránh lỗi 401 Unauthorized. Với phiên bản 2026, hỗ trợ thêm token-based (Microsoft Entra ID), nhưng key vẫn là mặc định cho AKS inference.

Hy vọng phân tích này giúp bạn nắm vững quy trình deploy và consume Azure ML endpoints! 🚀 Nếu cần ví dụ code consume, hãy hỏi thêm.

Câu 208
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure Machine Learning workspace. You connect to a terminal session from the Notebooks page in Azure Machine Learning studio.

You plan to add a new Jupyter kernel that will be accessible from the same terminal session.

You need to perform the task that must be completed before you can add the new kernel.

Solution: Create a compute instance.

Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧠 Phân tích câu hỏi trắc nghiệm về Azure Machine Learning

🔍 Giải thích nội dung câu hỏi một cách chi tiết:
Câu hỏi thuộc dạng "case study" (phần câu hỏi liên tiếp với cùng kịch bản), nơi bạn KHÔNG thể quay lại sau khi trả lời. Kịch bản: Bạn có một Azure Machine Learning workspace, đang kết nối vào terminal session từ trang Notebooks trong Azure Machine Learning studio. Mục tiêu: Thêm một Jupyter kernel mới có thể truy cập được từ cùng terminal session đó.
Nhiệm vụ cần hoàn thành trước khi thêm kernel mới: Giải pháp đề xuất là "Create a compute instance" (Tạo một compute instance mới).
Câu hỏi kiểm tra xem giải pháp này có đạt mục tiêu không (Does the solution meet the goal?).
🛠️ Bối cảnh kỹ thuật (cập nhật đến 2026): Trong Azure ML (phiên bản mới nhất), terminal session chỉ hoạt động trên một compute instance đang chạy. Khi bạn đã kết nối terminal từ Notebooks page, nghĩa là đã có compute instance tồn tại và đang chạy. Để thêm kernel mới vào cùng terminal session, bạn cần cài đặt kernel (qua pip/conda) trên compute instance hiện tại, không cần tạo mới.

✅ Đáp án đúng: No
Lý do lựa chọn:
Giải pháp "Create a compute instance" KHÔNG đạt mục tiêu vì terminal session đã tồn tại chứng tỏ compute instance hiện tại đã sẵn sàng. Việc tạo compute instance mới sẽ tạo ra một môi trường riêng biệt, không ảnh hưởng đến terminal session hiện tại. Thay vào đó, bạn cần cài đặt kernel trực tiếp trên compute instance đang chạy qua terminal (ví dụ: python -m ipykernel install --user --name mykernel). Điều này phù hợp với quy trình Azure ML mới nhất (tính đến 2026), hỗ trợ multi-kernel trên cùng instance mà không yêu cầu tạo mới.

📝 Giải thích tất cả các phương án:

  • Yes ❌ SAI – Phương án này sai vì giả định rằng tạo compute instance mới là bước cần thiết, nhưng thực tế terminal session đã yêu cầu compute instance hiện tại. Tạo mới chỉ hữu ích nếu chưa có instance nào, dẫn đến không giải quyết vấn đề thêm kernel vào cùng session (kernel mới sẽ thuộc instance khác, không accessible từ terminal hiện tại).
  • No ✅ ĐÚNG – Phương án này đúng vì giải pháp đề xuất không meet the goal. Bước đúng phải là install kernel trên compute instance hiện tại (qua terminal: conda install ipykernel hoặc tương tự), không phải tạo instance mới. Azure ML studio hỗ trợ điều này seamless từ Notebooks page mà không gián đoạn session.

📘 Tài liệu tham khảo:

🧩 Lời khuyên từ Azure Data Scientist: Nếu gặp tình huống thực tế, hãy dùng terminal hiện tại để !pip install ipykernel và register kernel – nhanh chóng và tiết kiệm chi phí! 🚀

Câu 209
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have the following Azure subscriptions and Azure Machine Learning service workspaces:



You need to obtain a reference to the ml-project workspace.

Solution: Run the following Python code:

from azureml.core import Workspace
ws = Workspace.get(name="ml-project")


Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết câu hỏi trắc nghiệm

📖 Nội dung câu hỏi:
Câu hỏi thuộc dạng "series of questions" trong kỳ thi chứng chỉ (như DP-100 Designing and Implementing a Data Science Solution on Azure), nơi mỗi câu đưa ra một giải pháp cụ thể để đạt mục tiêu. Người dùng có hai Azure subscriptions và các Azure Machine Learning workspaces tương ứng, được mô tả qua hình ảnh bảng sau:

  • Subscription 1: 385bdf5a-cef4-ad4-b977-... (đây là default subscription), chứa workspace ml-default.
  • Subscription 2: 3f86d92757c9-4234-983-5a8991d157a-... (không phải default), chứa workspace ml-project. Comment quan trọng: "The information required to uniquely identify this workspace is stored in the file config.json in the same folder as the Python script." (Thông tin cần thiết để xác định duy nhất workspace này được lưu trong file config.json cùng thư mục với script Python).

Mục tiêu (goal): Lấy reference (tham chiếu) đến workspace ml-project.
Giải pháp đề xuất: Chạy code Python sau:

from azureml.core import Workspace
ws = Workspace.get(name="ml-project")

Câu hỏi: Giải pháp này có đạt mục tiêu không? (Does the solution meet the goal?)

Hình ảnh bảng nhấn mạnh sự khác biệt: ml-project nằm ở subscription KHÔNG phải default, và cần file config.json (chứa subscription_id, resource_group, workspace_name) để identify chính xác. Code chỉ dùng name nên không đủ thông tin.

✅ Đáp án đúng: No

Lý do lựa chọn (bằng tiếng Việt):
Giải pháp KHÔNG đạt mục tiêu vì phương thức Workspace.get(name="ml-project") chỉ tìm workspace dựa trên tên (ml-project) trong default subscription hoặc context hiện tại (ở đây là subscription của ml-default). Workspace ml-project nằm ở subscription khác (3f86d92757c9-...), nên code sẽ thất bại hoặc trả về workspace sai. Để lấy đúng ml-project, cần dùng Workspace.from_config() để load từ file config.json cùng thư mục (chứa đầy đủ subscription_id, resource_group, workspace_name). Đây là quy trình chuẩn của Azure ML SDK v1 (azureml.core) để xử lý multi-subscription.
(Kiến thức cập nhật đến 2026: Azure ML SDK v1 vẫn hỗ trợ trong legacy mode; v2 dùng MLClient.from_config, nhưng câu hỏi dùng v1.)

🛠️ Giải thích tất cả các phương án

  • Yes ❌ [SAI]
    Phương án này sai vì code Workspace.get(name="ml-project") không chỉ định subscription_id hoặc resource_group. Theo docs Azure ML, phương thức get() ưu tiên default subscription (ở đây là 385bdf5a-cef4-ad4-b977-... với workspace ml-default). Nó sẽ không tự động detect ml-project ở subscription khác dù có config.json. Kết quả: Lỗi ResourceNotFoundError hoặc reference sai workspace.

  • No ✅ [ĐÚNG]
    Phương án này đúng vì giải pháp không đáp ứng goal. Workspace ml-project yêu cầu thông tin đầy đủ từ config.json (như comment trong bảng). Code đúng phải là ws = Workspace.from_config() để load config (tự động lấy sub_id, rg_name từ file JSON cùng folder). Nếu dùng get(), cần params đầy đủ: Workspace.get(name="ml-project", subscription_id="3f86d92757c9-...", resource_group="...").

📘 Tài liệu tham khảo

  • Azure ML Python SDK docs (v1): Workspace class - get() vs from_config() (cập nhật 2023-2026, nhấn mạnh config.json cho multi-tenant).
  • DP-100 Exam Guide: Các câu tương tự yêu cầu from_config() cho scenario multi-subscription (ExamTopics & Microsoft Learn).
  • Hình ảnh phân tích: Bảng xác nhận 2 subs riêng biệt, config.json là key để identify ml-project 🗂️.

💡 Lời khuyên: Trong thực tế Azure Data Scientist, luôn dùng from_config() khi làm việc với script local có config.json để tránh lỗi subscription mismatch! 🚀

Câu 210
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have the following Azure subscriptions and Azure Machine Learning service workspaces:



You need to obtain a reference to the ml-project workspace.

Solution: Run the following Python code:

from azureml.core import Workspace
ws = Workspace(workspace_name="ml-project")


Does the solution meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Giải thích chi tiết nội dung câu hỏi

Câu hỏi thuộc phần thi chứng chỉ Microsoft Azure DP-100 (Designing and Implementing a Data Science Solution on Azure), là dạng câu hỏi series với scenario cố định. Người dùng có hai Azure subscriptions và các Azure Machine Learning workspaces tương ứng, được mô tả qua hình ảnh bảng sau (tôi đã phân tích kỹ nội dung hình ảnh):

  • Subscription 1: 385bdf5-acf-4ad4-b977... (đây là default subscription), chứa workspace ml-default.
  • Subscription 2: 3f86d9277c9-4234-983- (đầy đủ: 3f86d9277c9-4234-9835-a5891d157a-2e9041b1068), chứa workspace ml-project.
  • Comment quan trọng: Thông tin cần thiết để uniquely identify (xác định duy nhất) workspace ml-project được lưu trong file config.json nằm cùng folder với Python script.

Mục tiêu (goal): Lấy reference (tham chiếu) đến workspace ml-project (không phải ml-default).

Giải pháp đề xuất (Solution): Chạy code Python sau:

from azureml.core import Workspace
ws = Workspace(workspace_name="ml-project")

Câu hỏi: Giải pháp này có đạt được mục tiêu không? (Does the solution meet the goal?)

📘 Kiến thức nền tảng (cập nhật Azure ML SDK v2 đến 2026):

  • Class Workspace yêu cầu ít nhất 3 tham số chính để khởi tạo chính xác: subscription_id, resource_group, và workspace_name (theo docs chính thức Azure ML Python SDK v1/v2).
  • Nếu chỉ truyền workspace_name, SDK sẽ không xác định được subscription và resource group, dẫn đến lỗi hoặc fallback về default workspace (ở đây là ml-default trong default subscription).
  • Cách đúng để load từ config.json là dùng Workspace.from_config() (hoặc from_config(path="./config.json")), vì file này chứa đầy đủ subscription_id, resource_group, workspace_name cho ml-project.

Nguồn tham khảo:

✅ Đáp án đúng: No

Lý do lựa chọn 🛠️:

  • Code chỉ truyền workspace_name="ml-project", thiếu subscription_id và resource_group, nên không uniquely identify được workspace đúng (nó sẽ fail hoặc dùng default ml-default).
  • Để đạt goal, phải dùng Workspace.from_config() để đọc từ config.json (chứa info của ml-project).
  • Theo Azure ML best practices (2026), constructor Workspace() bắt buộc full params khi multi-subscription.

📋 Phân tích tất cả các phương án

  • Yes ❌ Sai: Phương án này cho rằng code đơn giản chỉ với workspace_name là đủ để lấy reference đến ml-project. Thực tế, không đạt goal vì SDK không biết subscription nào (có 2 subs), dẫn đến lỗi WorkspaceNotFoundError hoặc fallback default. File config.json tồn tại nhưng code không load nó, nên vô hiệu.

  • No ✅ Đúng: Phương án này chính xác vì solution không meet the goal. Code thiếu thông tin từ config.json (subscription 3f86d9277c9... và resource group), không thể reference đúng ml-project. Giải pháp đúng phải là:

    from azureml.core import Workspace
    ws = Workspace.from_config()
    

    Điều này tận dụng comment trong hình ảnh, đảm bảo unique identification trong multi-workspace scenario.