# Orchestrate model training — Practice reading

Exam: AI-300 — Operationalizing Machine Learning and Generative AI Solutions
Knowledge domain: Implement machine learning model lifecycle and operations
HTML: https://learningpathx.com/learning-path/AI-300/learn/509

This public learning practice includes correct answers and existing explanations. Reading does not save progress or create a test.

## Question 1

Type: single\_choice
Knowledge point: Configure experiment tracking with MLflow

A Machine Learning Engineer must log the numeric validation dictionary to an active MLflow run with one dictionary-metric logging call, rather than separate per-key metric calls. The tracking server is configured. Which replacement implements the missing line?

```python
import mlflow
metrics = {"f1_score": 0.89, "precision": 0.91, "recall": 0.87}
with mlflow.start_run():
    # Insert one dictionary-metric logging call here
    pass
```

### Options

**A**

`mlflow.register_model(model_uri="runs:/existing-run/model", name="validation-model")`

**B**

`mlflow.log_metrics(metrics)`

**C**

`mlflow.set_experiment("validation")`

**D**

`for key, value in metrics.items(): mlflow.log_metric(key, value)`

**E**

`mlflow.log_param("validation_metrics", metrics)`

Correct answer: B

### Explanation

Use the dictionary metric API for the stated batching objective. Functional equivalence of repeated scalar logging does not satisfy the one-call requirement.

## Question 2

Type: multiple\_choice
Knowledge point: Configure experiment tracking with MLflow

An MLOps Engineer tracks accuracy at successive epochs with increasing step values. All compared runs use the same validation dataset and accuracy definition. The selection policy ranks successfully completed runs by their final, last-logged accuracy, rather than by the maximum accuracy seen at any earlier epoch. Which two MLflow functions support logging accuracy during training and retrieving run summaries for this comparison? (Choose 2.)

### Options

**A**

mlflow.search\_runs

**B**

mlflow.set\_experiment

**C**

mlflow.log\_param

**D**

mlflow.register\_model

**E**

mlflow.log\_metric

Correct answer: A, E

### Explanation

Search results expose logged summary metrics. Selecting a peak across epoch history would require retrieving metric history and computing that peak separately.

## Question 3

Type: single\_choice
Knowledge point: Configure experiment tracking with MLflow

A Platform Engineer is validating a model training script submitted via Azure Machine Learning jobs. The script uses MLflow to record static input values, such as the learning rate and batch size, used during the run.

```
import mlflow
# Configuration parameters
learning_rate = 0.01
batch_size = 32
# Missing SDK call
```

Which specific MLflow method should the script invoke to capture these configuration values as distinct key-value pairs?

### Options

**A**

mlflow.search\_runs

**B**

mlflow.log\_param

**C**

mlflow.log\_metric

**D**

mlflow.set\_tags

Correct answer: B

### Explanation

Input hyperparameters belong in the MLflow parameter namespace. Call log\_param once for each named value, or use log\_params for a dictionary; metrics and tags have different tracking semantics.

## Question 4

Type: multiple\_choice
Knowledge point: Configure experiment tracking with MLflow

An Operations Engineer is debugging an automated training pipeline. The pipeline uses MLflow to track training metrics, but the final step fails to associate the trained model artifacts with the current run, causing the model registry to lack proper lineage data.

```
import mlflow
import mlflow.sklearn
from sklearn.ensemble import RandomForestClassifier
mlflow.set_experiment("fraud_detection_exp")
with mlflow.start_run() as run:
    model = RandomForestClassifier(n_estimators=100)
    model.fit(X_train, y_train)
    mlflow.log_param("n_estimators", 100)
    # Missing artifact logging and registration logic
```

To ensure the model artifact is stored with the run's metadata and explicitly registered to the Azure ML model registry for deployment, which of the following actions are valid solutions? (Choose 2.)

### Options

**A**

Log the model using the framework-specific flavor (e.g., mlflow.sklearn.log\_model) with the registered\_model\_name parameter.

**B**

Save the model locally and use mlflow.log\_artifact() to trigger automatic model registration in Azure ML.

**C**

Instantiate mlflow.tracking.MlflowClient and invoke create\_registered\_model using the experiment name.

**D**

Use mlflow.set\_tracking\_uri to point directly to the model registry before starting the run.

**E**

Log the model artifact to the run using log\_model, then call mlflow.register\_model referencing the run's ID in the model\_uri.

Correct answer: A, E

### Explanation

Model logging must store a supported MLflow flavor artifact and registration must create a model version referencing that artifact. Logging with registered\_model\_name combines those operations; logging followed by register\_model with the exact runs URI is the two-step alternative.

## Question 5

Type: single\_choice
Knowledge point: Configure experiment tracking with MLflow

A Machine Learning Engineer is configuring an initial experiment tracking setup in an Azure Machine Learning workspace. They need to create a logical grouping of runs for a new classification model to organize the results of multiple iterations. Which MLflow SDK function should be used to establish this logical grouping before starting individual training runs?

### Options

**A**

mlflow.register\_model

**B**

mlflow.set\_experiment

**C**

mlflow.set\_tracking\_uri

**D**

mlflow.start\_run

Correct answer: B

### Explanation

An experiment is the logical group for runs. set\_experiment selects the named experiment and creates it if absent; subsequent runs use that active experiment. Server selection and model registration do not create the requested run grouping.

## Question 6

Type: multiple\_choice
Knowledge point: Configure experiment tracking with MLflow

A Solution Architect is planning the rollout of MLflow tracking for a distributed training pipeline on Azure Machine Learning compute targets. The custom training environment runs outside the standard Azure ML managed context, requiring explicit connection to the Azure ML tracking server.

```
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential
import mlflow
ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace_name)
# Missing MLflow tracking configuration
```

Which two configuration steps must the architect implement to ensure MLflow correctly routes tracking data to the specific Azure ML workspace? (Choose 2.)

### Options

**A**

Package a feature retrieval specification file alongside the final model artifact.

**B**

Set the remote tracking destination by calling the mlflow.set\_tracking\_uri() method.

**C**

Use the mlflow.start\_run function with the nested=True parameter exclusively configured.

**D**

Obtain the tracking URI using the mlflow\_tracking\_uri property of the workspace.

**E**

Initialize the MlflowClient object using a local file path for tracking data.

Correct answer: B, D

### Explanation

Outside the managed job context, retrieve the actual workspace tracking URI and set it as the MLflow backend. Successful logging also requires the Azure ML MLflow integration package and an authorized authentication context; selecting the URI alone does not grant access.

## Question 7

Type: single\_choice
Knowledge point: Use automated machine learning to explore optimal models

A Machine Learning Engineer configures an Azure ML SDK v2 AutoML regression job. The engineer needs a maximum experiment timeout budget of 180 minutes across the AutoML iterations. The job may finish earlier under other exit criteria; the requirement does not guarantee exactly three hours of billed wall-clock time.

```python
from azure.ai.ml import automl
from azure.ai.ml.constants import AssetTypes
from azure.ai.ml import Input

regression_job = automl.regression(
    compute="cpu-cluster",
    experiment_name="sales-forecast",
    training_data=Input(type=AssetTypes.MLTABLE, path="azureml:sales_train:1"),
    target_column_name="revenue",
)
# Add the configuration before submitting this job.
```

The compute and data asset already exist. Which configuration sets the requested experiment timeout budget? (Choose 1.)

### Options

**A**

regression\_job.set\_limits(max\_concurrent\_trials=3)

**B**

regression\_job.set\_limits(timeout\_minutes=180)

**C**

regression\_job.set\_limits(enable\_early\_termination=True)

**D**

regression\_job.set\_featurization(mode="auto")

Correct answer: B

### Explanation

The experiment timeout is a maximum AutoML budget, distinct from concurrency, performance-based early termination and featurization.

## Question 8

Type: multiple\_choice
Knowledge point: Use automated machine learning to explore optimal models

A Quality Engineer reviews a completed Azure ML SDK v2 tabular AutoML classification job with automatic featurization enabled. The recorded findings for this job are:

* Class imbalance was detected in the target column; manual review is still needed.
* Missing numeric feature values were imputed during featurization.
* A high-cardinality feature was excluded during preprocessing.
* A train/validation split was used; cross-validation folds were not generated.
* A separate PII scan has not been run.

Which three conclusions are supported by these recorded results? (Choose 3.)

### Options

**A**

The run identified class imbalance, but this finding alone does not establish that the resulting model is free from class-related bias.

**B**

The preprocessing results certify that personally identifiable information has been removed.

**C**

The reported missing numeric feature values were handled by imputation.

**D**

The reported high-cardinality feature was handled by excluding it from the training features.

**E**

The validation-handling result confirms that cross-validation folds were generated.

Correct answer: A, C, D

### Explanation

Interpret the actual job findings rather than assume that every AutoML task applies every possible guardrail. Automatic preprocessing is not a compliance certification or a guarantee against overfitting.

## Question 9

Type: single\_choice
Knowledge point: Use automated machine learning to explore optimal models

You are configuring an Azure Machine Learning AutoML tabular regression experiment with Python SDK v2\. The target is delivery duration in minutes. The business compares predictions by mean absolute error: each additional minute of absolute prediction error adds the same penalty, whether the existing error is small or large. For this experiment, the approved search is restricted to LightGBM and Random Forest, with voting and stacking ensembles disabled.

Assume the two registered MLTable assets below are valid, contain the `delivery_minutes` target and matching feature columns, and are suitable separate training and validation datasets. The named remote compute exists. The setup is:

```python
from azure.ai.ml import automl, Input
from azure.ai.ml.automl import RegressionModels

train_input = Input(
    type="mltable", path="azureml:delivery_train:1"
)
validation_input = Input(
    type="mltable", path="azureml:delivery_validation:1"
)
```

Which candidate configures both the required optimization objective and the permitted algorithm search? The candidates configure a job; none submits or executes it.

### Options

**A**

`python job = automl.regression( compute="cpu-train", training_data=train_input, validation_data=validation_input, target_column_name="delivery_minutes", primary_metric="normalized_root_mean_squared_error", ) job.set_training( allowed_training_algorithms=[ RegressionModels.LIGHT_GBM, RegressionModels.RANDOM_FOREST, ], enable_stack_ensemble=False, enable_vote_ensemble=False, ) `

**B**

`python job = automl.regression( compute="cpu-train", training_data=train_input, validation_data=validation_input, target_column_name="delivery_minutes", primary_metric="normalized_mean_absolute_error", ) job.set_training( allowed_training_algorithms=[ RegressionModels.LIGHT_GBM, RegressionModels.RANDOM_FOREST, ], enable_stack_ensemble=False, enable_vote_ensemble=False, ) `

**C**

`python job = automl.regression( compute="cpu-train", training_data=train_input, validation_data=validation_input, target_column_name="delivery_minutes", primary_metric="normalized_mean_absolute_error", ) job.set_training( blocked_training_algorithms=[ RegressionModels.LIGHT_GBM, RegressionModels.RANDOM_FOREST, ], enable_stack_ensemble=False, enable_vote_ensemble=False, ) `

**D**

`python job = automl.regression( compute="cpu-train", training_data=train_input, validation_data=validation_input, target_column_name="delivery_minutes", primary_metric="r2_score", ) job.set_training( allowed_training_algorithms=[ RegressionModels.LIGHT_GBM, RegressionModels.RANDOM_FOREST, ], enable_stack_ensemble=False, enable_vote_ensemble=False, ) `

Correct answer: B

### Explanation

The choice combines the requested error objective with a restriction on which algorithms AutoML may explore. The normalization of mean absolute error does not introduce a squared-error penalty.

## Question 10

Type: single\_choice
Knowledge point: Use automated machine learning to explore optimal models

You are preparing a tabular regression AutoML experiment with Azure Machine Learning Python SDK v2\. The application predicts the eventual repair cost of each newly opened service ticket from features available when the ticket opens; it is not a time-series forecasting task.

The intended model-selection test is explicit: fit candidate models using January-June tickets, then compare those candidates on a fixed July-August cohort. None of the July-August rows may be used to fit the candidate models. Assume rows are independent, labels are available, the cohorts have matching schemas, and the features contain no information recorded after ticket opening.

The prepared registered MLTable assets are:

| Asset | Complete contents |
| --- | --- |
| `repair_early:1` | January-June tickets only |
| `repair_late:1` | July-August tickets only |
| `repair_combined:1` | Every row from both assets above |

The following shared setup is available, and the named remote compute exists:

```python
from azure.ai.ml import automl, Input

early = Input(type="mltable", path="azureml:repair_early:1")
late = Input(type="mltable", path="azureml:repair_late:1")
combined = Input(type="mltable", path="azureml:repair_combined:1")
```

Which candidate assigns the data roles needed to compare AutoML candidates on the required cohort? These are proposed configurations, not executed jobs.

### Options

**A**

`python job = automl.regression( compute="cpu-train", training_data=combined, validation_data_size=0.25, target_column_name="repair_cost", primary_metric="normalized_mean_absolute_error", ) `

**B**

`python job = automl.regression( compute="cpu-train", training_data=early, test_data=late, target_column_name="repair_cost", primary_metric="normalized_mean_absolute_error", ) `

**C**

`python job = automl.regression( compute="cpu-train", training_data=early, validation_data=late, target_column_name="repair_cost", primary_metric="normalized_mean_absolute_error", ) `

**D**

`python job = automl.regression( compute="cpu-train", training_data=combined, validation_data=late, target_column_name="repair_cost", primary_metric="normalized_mean_absolute_error", ) `

Correct answer: C

### Explanation

The deciding operation is assigning a separate, fixed cohort to validation during AutoML model selection, while excluding that cohort from the data used to fit candidates.

## Question 11

Type: single\_choice
Knowledge point: Use automated machine learning to explore optimal models

An MLOps Engineer is reviewing automated machine learning during an implementation readiness review. They need to configure a new run that automatically evaluates different algorithms to predict a categorical outcome based on tabular data. Which Azure Machine Learning Python SDK v2 function should be used to define this specific automated machine learning task?

### Options

**A**

SweepJob()

**B**

PipelineComponent()

**C**

command()

**D**

automl.classification()

Correct answer: D

### Explanation

The outcome is categorical and the requested process explores algorithms automatically. The SDK v2 automl.classification factory defines that AutoML task; a sweep searches parameters for supplied trial code and a command job executes supplied code.

## Question 12

Type: multiple\_choice
Knowledge point: Use automated machine learning to explore optimal models

A Platform Engineer registers the best model from completed AutoML classification job automl\_run\_123\. MLflow tracking/registry point to the correct Azure Machine Learning workspace and required permissions are present. This job's verified parent/child record is:

```json
{
  "parent_run_id": "automl_run_123",
  "parent_status": "FINISHED",
  "parent_tags": {"automl_best_child_run_id": "child_accuracy_best"},
  "primary_metric": "accuracy",
  "metric_direction": "maximize",
  "best_child_status": "FINISHED",
  "best_child_parent": "automl_run_123",
  "verified_model_artifact_path": "outputs/mlflow-model"
}
```

The child's named artifact is a complete MLflow model and this backend supports registration from its runs URI. The engineer starts with:

```python
import mlflow
from mlflow.tracking import MlflowClient
client = MlflowClient()
parent_run_id = "automl_run_123"
```

Which two steps use the recorded best-child relation and correct model source? (Choose 2.)

### Options

**A**

Server-sort the whole experiment by any metric and register the first result without checking its parent.

**B**

Register the verified child artifact with mlflow.register\_model(f"runs:/{best\_child\_id}/outputs/mlflow-model", "classification\_best").

**C**

Change tracking to the runner's temporary directory before reading the cloud parent.

**D**

Read client.get\_run(parent\_run\_id).data.tags\["automl\_best\_child\_run\_id"\] and validate that named child against the supplied completed-parent/child evidence.

**E**

Rerun AutoML to create a new best-child relation before registering this completed model.

Correct answer: B, D

### Explanation

Correct answers: B, D.

Option analysis:

* **A — Server-sort the whole experiment by any metric and register the first result without checking its parent.**: An unscoped result may be unrelated. Azure ML search ordering does not support the claimed arbitrary metric server-sort shortcut.
* **B — Register the verified child artifact with mlflow.register\_model(f"runs:/{best\_child\_id}/outputs/mlflow-model", "classification\_best").**: The URI references the verified child and actual artifact path rather than the parent or an assumed /model path.
* **C — Change tracking to the runner's temporary directory before reading the cloud parent.**: A temporary local store does not hold this cloud workspace's run records.
* **D — Read client.get\_run(parent\_run\_id).data.tags\["automl\_best\_child\_run\_id"\] and validate that named child against the supplied completed-parent/child evidence.**: The supplied parent relation selects the job's recorded best child; its status and parent identity must match before registration.
* **E — Rerun AutoML to create a new best-child relation before registering this completed model.**: The completed model and relation already exist; registration does not require another training search.

## Question 13

Type: single\_choice
Knowledge point: Use notebooks for experimentation and exploration

A Platform Engineer runs a notebook on an Azure Machine Learning compute instance with a system-assigned managed identity. That identity has the required workspace RBAC permissions and its token endpoint is available. Environment service-principal credentials also exist, but policy requires MLClient to use exactly the compute instance identity.

This illustrative SDK v2 fragment has not been executed:

```
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential, ManagedIdentityCredential
credential = ...  # Select the configuration.
ml_client = MLClient(
    credential=credential,
    subscription_id="00000000-0000-0000-0000-000000000000",
    resource_group_name="ml-rg",
    workspace_name="ml-ws",
)
```

Which configuration meets the policy without an interactive sign-in?

### Options

**A**

credential = DefaultAzureCredential(exclude\_cli\_credential=True)

**B**

credential = DefaultAzureCredential(exclude\_interactive\_browser\_credential=True)

**C**

credential = ManagedIdentityCredential()

**D**

credential = DefaultAzureCredential(managed\_identity\_client\_id="user\_assigned\_identity\_client\_id")

Correct answer: C

### Explanation

Selecting the exact principal is different from obtaining any successful noninteractive token; attachment and authentication do not themselves grant RBAC.

## Question 14

Type: multiple\_choice
Knowledge point: Use notebooks for experimentation and exploration

A Security Operations Engineer configures notebooks on an Azure ML compute instance in a customer-managed VNet. In this hypothetical design, public access is disabled on the workspace and storage. The default workspace storage needs Blob and File access, and a separate credential-free datastore points to a Blob container. The chosen notebook code explicitly requests the compute instance's managed identity for read-only access to that container. Other workspace dependencies already have approved private connectivity. Which three provisions complete the stated client, compute, and data-access design? (Choose 3.)

### Options

**A**

Use a VPN-connected client, or a browser on a private-network VM accessed through Bastion, with the required private DNS resolution.

**B**

Give the notebook user Storage Blob Data Reader and assume the compute identity inherits that role.

**C**

Allow the compute's public IP at the Blob firewall and keep its public endpoint as the data path.

**D**

Provide compute routes and DNS to the workspace private endpoint, default-storage Blob/File private endpoints, and the datastore's Blob private endpoint.

**E**

Grant the selected compute identity Storage Blob Data Reader at the required Blob-container scope and validate a read using that identity.

Correct answer: A, D, E

### Explanation

Client reachability, dependency networking, and the actual data caller's authorization are separate requirements. Same-VNet deployment is the chosen topology; other supported routed architectures and identity mechanisms can also work when explicitly configured.

## Question 15

Type: single\_choice
Knowledge point: Use notebooks for experimentation and exploration

An MLOps Engineer is reviewing notebooks for experimentation and exploration during an implementation readiness review. They need to establish a managed, interactive environment within the Azure Machine Learning workspace to execute Jupyter notebooks seamlessly. Which compute resource should be created to fulfill this specific interactive exploration requirement?

### Options

**A**

A Serverless API endpoint

**B**

An Azure Kubernetes Service (AKS) cluster

**C**

A Compute Instance

**D**

A managed Batch Endpoint

Correct answer: C

### Explanation

A compute instance is the managed Azure Machine Learning workstation intended for interactive notebook development. The other resources serve inference or cluster orchestration and do not supply this managed notebook workstation.

## Question 16

Type: multiple\_choice
Knowledge point: Use notebooks for experimentation and exploration

Each scientist needs a personal Azure Machine Learning compute instance for notebooks. Private client access is available, and managed-network outbound rules approve only required dependencies. Permissions support assigning each instance to its intended user and configuring a 20-minute idle shutdown. The applicable idle criteria are met; disks remain retained. Which three configuration choices satisfy these requirements? (Choose 3.)

### Options

**A**

Configure no public IP with the approved outbound rules and validated private client path.

**B**

Use no public IP alone as proof that all internet egress is restricted.

**C**

Assign each compute instance to its intended scientist.

**D**

Configure 20-minute idle shutdown and verify the service's eligible idle criteria.

**E**

Use a fixed nightly schedule as an equivalent of shutting down after 20 idle minutes.

Correct answer: A, C, D

### Explanation

Personal assignment, private network paths, and eligible idle shutdown address different requirements. Removing a public IP alone does not restrict all egress. Shutdown stops the VM's running compute charges, while retained disks and other resources can still incur charges.

## Question 17

Type: multiple\_choice
Knowledge point: Use notebooks for experimentation and exploration

An IPython/Jupyter notebook on an Azure Machine Learning compute instance has already imported an older xgboost package. The intended version is 1.7.5; compatibility and package-network access have been checked. The goal is to update this notebook kernel, without changing a remote job's image. Which two steps are appropriate? (Choose 2.)

### Options

**A**

Change a workspace ARM property to replace the active Python module.

**B**

Recreate the datastore to replace the imported package.

**C**

After successful installation, save state, restart the kernel, reimport xgboost, and verify its version.

**D**

Assume an unqualified !pip command always targets the active kernel's environment.

**E**

Run %pip install xgboost==1.7.5 and check the installation outcome.

Correct answer: C, E

### Explanation

Use the current-kernel package magic and verify installation. Because the old module is already loaded in this scenario, save notebook state and restart before reimporting and checking the version. This does not modify remote job environments or prove every dependency resolved successfully.

## Question 18

Type: single\_choice
Knowledge point: Automate hyperparameter tuning

An engineer is configuring an Azure Machine Learning SDK v2 hyperparameter sweep. A valid command component has been instantiated as `trial` with a search space over learning rate and regularization. Each trial uses one compute node and logs exactly one final `validation_rmse` metric through MLflow, using the same fixed validation dataset. Lower RMSE is better.

The workspace, versioned environment, data access, and compute target `tune-cpu` are ready. The cluster can run three single-node trials concurrently, and quota is sufficient. The tuning policy requires:

* At most 18 trials in total.
* At most three trials running concurrently.
* Cancellation of the sweep after 90 minutes.
* Cancellation of any individual trial after 20 minutes.
* Selection by the lowest final validation RMSE.

The team accepts that cancellation can result in fewer than 18 completed trials. There is no early-termination policy. Which SDK configuration expresses all of these requirements?

### Options

**A**

`python sweep = trial.sweep( primary_metric="validation_rmse", goal="minimize", sampling_algorithm="random", compute="tune-cpu", max_total_trials=3, max_concurrent_trials=18, timeout=5400, trial_timeout=1200, ) `

**B**

`python sweep = trial.sweep( primary_metric="validation_rmse", goal="minimize", sampling_algorithm="random", compute="tune-cpu", max_total_trials=18, max_concurrent_trials=3, timeout=90, trial_timeout=20, ) `

**C**

`python sweep = trial.sweep( primary_metric="validation_rmse", goal="maximize", sampling_algorithm="random", compute="tune-cpu", max_total_trials=18, max_concurrent_trials=3, timeout=5400, trial_timeout=1200, ) `

**D**

`python sweep = trial.sweep( primary_metric="validation_rmse", goal="minimize", sampling_algorithm="random", compute="tune-cpu", max_total_trials=18, max_concurrent_trials=3, timeout=5400, trial_timeout=1200, ) `

Correct answer: D

### Explanation

The objective must minimize the exact logged metric. The trial-count limits describe different constraints, and duration values are in seconds: 90 minutes is 5,400 seconds and 20 minutes is 1,200 seconds. Sources: [Command.sweep SDK signature](https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.entities.command?view=azure-python), [Sweep duration and count limits](https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.sweep.sweepjoblimits?view=azure-python).

## Question 19

Type: single\_choice
Knowledge point: Automate hyperparameter tuning

A Machine Learning Engineer is configuring an early termination policy for an automated hyperparameter tuning sweep. The target state requires any run to be canceled if its primary metric falls outside a specified slack factor compared to the best-performing run in the experiment. Which early termination policy configuration object must be used to meet this target state?

### Options

**A**

BanditPolicy

**B**

MedianStoppingPolicy

**C**

TruncationSelectionPolicy

**D**

EvaluationIntervalPolicy

Correct answer: A

### Explanation

Bandit compares a trial primary metric with the best-performing run using configured slack. Cancellation is evaluated at the policy evaluation intervals, after any configured delay; it is not an immediate continuous check.

## Question 20

Type: single\_choice
Knowledge point: Automate hyperparameter tuning

An MLOps Engineer is reviewing hyperparameter tuning during an implementation readiness review. The tuning process must intelligently pick the next set of hyperparameters based on how previous trials performed, aiming to converge on the optimal configuration with fewer runs. Which sampling algorithm should the engineer specify to achieve this operational outcome?

### Options

**A**

Sobol sampling

**B**

Bayesian sampling

**C**

Random sampling

**D**

Grid sampling

Correct answer: B

### Explanation

The deciding condition is that the next choice uses measured results from earlier trials. Bayesian sampling uses that feedback. Random, Sobol and grid approaches explore a space without adapting to the observed objective in this way.

## Question 21

Type: multiple\_choice
Knowledge point: Automate hyperparameter tuning

A Machine Learning Engineer configures early termination for an Azure ML SDK/CLI v2 sweep with random sampling. The training component logs the primary metric accuracy exactly once at the end of each completed epoch, with no additional accuracy reports. The desired policy compares trial performance with the median of running averages across trials and begins checking at the fifth primary-metric report.

The existing sweep definition, before adding early\_termination, is:

```yaml
$schema: https://azuremlschemas.azureedge.net/latest/sweepJob.schema.json
type: sweep
compute: azureml:cpu-cluster
sampling_algorithm: random
objective:
  goal: maximize
  primary_metric: accuracy
search_space:
  learning_rate:
    type: choice
    values: [0.001, 0.01]
trial:
  component: azureml:train_classifier:1
limits:
  max_total_trials: 20
  max_concurrent_trials: 2
  timeout: 7200
```

The registered component exists and accepts learning\_rate. Which three additions configure the intended policy? (Choose 3.)

### Options

**A**

Change sampling\_algorithm to bayesian because random sampling does not support early termination.

**B**

Set early\_termination.type to bandit to implement the median-of-running-averages comparison.

**C**

Set early\_termination.type to median\_stopping.

**D**

Set early\_termination.evaluation\_interval to 1 to check at each primary-metric reporting interval once evaluation is enabled.

**E**

Set early\_termination.delay\_evaluation to 5 to defer the first check until the fifth primary-metric reporting interval.

Correct answer: C, D, E

### Explanation

Policy timing is measured in primary-metric reporting intervals. It corresponds to completed epochs here only because the stem explicitly binds one report to each epoch.

## Question 22

Type: multiple\_choice
Knowledge point: Automate hyperparameter tuning

An Azure ML v2 sweep already has a valid trial command, compute, search space, and limits. Each trial logs validation\_accuracy through MLflow. The objective must maximize that metric. Which two fields belong in the sweep's objective mapping? (Choose 2.)

### Options

**A**

goal: maximize

**B**

sampling\_algorithm: random

**C**

max\_total\_trials: 30

**D**

evaluation\_interval: 1

**E**

primary\_metric: validation\_accuracy

Correct answer: A, E

### Explanation

Recognize the two sweep objective fields and match the logged metric name.

## Question 23

Type: multiple\_choice
Knowledge point: Automate hyperparameter tuning

An Azure ML v2 sweep has a validated base command job with named learning\_rate and batch\_size inputs. The team is selecting search-space expressions for the job's sweep input overrides, separate from the sweep sampling algorithm and early termination policy. The learning rate must be uniformly distributed between 0.001 and 0.1, and batch size must be selected from 16, 32, and 64\. Which two azure.ai.ml.sweep expressions define those parameter distributions? (Choose 2.)

### Options

**A**

Uniform(min\_value=0.001, max\_value=0.1)

**B**

GridSamplingAlgorithm()

**C**

BanditPolicy(slack\_factor=0.2)

**D**

Choice(values=\[16, 32, 64\])

**E**

BayesianSamplingAlgorithm()

Correct answer: A, D

### Explanation

Recognize continuous and discrete parameter distributions separately from sampling and termination controls.

## Question 24

Type: single\_choice
Knowledge point: Run model training scripts

A Security Operations Engineer is reviewing a training-script timeout to `https://enrichment.example.com`. This hypothetical Azure ML workspace uses a provisioned managed virtual network, not a customer-managed compute subnet. The script runs on a supported compute cluster, the API needs no redirects to other hosts, and separate tests have verified API authorization and availability. The relevant configured network excerpt is:

```yaml
managed_network:
  isolation_mode: allow_only_approved_outbound
  outbound_rules: []
```

Required platform rules are present, but no user-approved rule covers the external API. Which destination-specific action should the engineer take while retaining isolation?

### Options

**A**

Grant the compute identity Contributor on the API gateway as the network fix.

**B**

Configure a customer compute-subnet UDR to an NVA as a required step for this managed virtual network.

**C**

Add an approved outbound `fqdn` rule with destination `enrichment.example.com`, provision/apply the updated network and verify the HTTPS request.

**D**

Switch isolation mode to unrestricted internet outbound for all destinations.

**E**

Give training compute unmonitored public egress instead of approving the required destination.

Correct answer: C

### Explanation

Repair the missing managed-network destination allowance, then apply and test it. Identity and route changes are not interchangeable with the supported managed-network rule model.

## Question 25

Type: single\_choice
Knowledge point: Run model training scripts

A Machine Learning Engineer is completing this Azure Machine Learning CLI v2 command-job YAML. The registered environment training-env:3 and compute cluster cluster-cpu already exist and have been validated; ./src contains train.py. All remaining resource access prerequisites are satisfied.

```yaml
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
type: command
code: ./src
environment: azureml:training-env:3
compute: azureml:cluster-cpu
# Add the execution property here.
```

Which property specifies the shell instruction to execute train.py? (Choose 1.)

### Options

**A**

script: python train.py

**B**

command: python train.py

**C**

run: python train.py

**D**

entry\_point: python train.py

Correct answer: B

### Explanation

Correct answer: B.

Option analysis:

* **A — script: python train.py**: script is not the CLI v2 command-job execution field. The question concerns this YAML schema, not an older SDK configuration.
* **B — command: python train.py**: command defines the shell instruction to execute on the selected compute target.
* **C — run: python train.py**: run is not the execution property in this command-job schema.
* **D — entry\_point: python train.py**: entry\_point is not a root property for this command-job schema. Azure ML v2 command components also use command; other products' conventions do not change this schema.

## Question 26

Type: single\_choice
Knowledge point: Run model training scripts

An MLOps Engineer is reviewing model training scripts during an implementation readiness review. They need to configure a basic job using the Azure ML Python SDK v2 to execute a local Python script (train.py) on a cloud compute cluster. Which Azure ML SDK v2 factory function must be used to define this standard training script execution?

### Options

**A**

AutomlJob()

**B**

PipelineJob()

**C**

command()

**D**

SweepJob()

Correct answer: C

### Explanation

The SDK v2 command factory creates the command job that specifies a script invocation, code, environment and compute. Pipeline and sweep objects orchestrate workflows or trials; AutoML uses task-specific factories rather than the shown AutomlJob spelling.

## Question 27

Type: multiple\_choice
Knowledge point: Run model training scripts

A Quality Engineer completes a CLI v2 command job for native PyTorch distributed training. The existing named AmlCompute cluster gpu-cluster has sufficient capacity for two nodes, each with four GPUs. The fixed registered environment pytorch-training:2 is validated for this script and GPU configuration. train\_pytorch.py already implements GPU-bound DDP using the injected distributed environment variables, one worker per GPU.

```yaml
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
type: command
command: python train_pytorch.py --epochs 10
code: ./src
environment: azureml:pytorch-training:2
compute: azureml:gpu-cluster
# Add the two blocks selecting the native distributed topology.
```

Which two blocks configure two nodes and four workers per node? (Choose 2.)

### Options

**A**

strategy: {type: parameter\_server, instance\_count: 2}

**B**

distribution: {type: pytorch, process\_count\_per\_instance: 4}

**C**

resources: {instance\_count: 2}

**D**

limits: {timeout: 3600}

**E**

distribution: {type: pytorch, process\_count\_per\_instance: 1}

Correct answer: B, C

### Explanation

Correct answers: B, C.

Option analysis:

* **A — strategy: {type: parameter\_server, instance\_count: 2}**: This is not the CLI v2 command-job topology configuration for native PyTorch.
* **B — distribution: {type: pytorch, process\_count\_per\_instance: 4}**: The native distribution selects PyTorch and launches four workers per instance, matching the supplied four GPUs.
* **C — resources: {instance\_count: 2}**: instance\_count selects two nodes from the existing cluster. It does not override that named cluster's already configured VM size.
* **D — limits: {timeout: 3600}**: The valid command timeout is in seconds and bounds duration; it does not select nodes or worker counts.
* **E — distribution: {type: pytorch, process\_count\_per\_instance: 1}**: This launches one worker per instance, not the required four GPU-bound workers.

## Question 28

Type: multiple\_choice
Knowledge point: Run model training scripts

An Azure ML v2 command job trains a model. Its registered environment contains MLflow, the tracking URI points to this workspace, and the script runs inside an active MLflow run. The existing compute and datastore are usable.

```yaml
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
type: command
code: ./src
command: python train.py --artifact-dir ${{outputs.artifacts}}
environment: azureml:training-env:1
compute: azureml:cpu-cluster
outputs:
  artifacts:
    type: uri_folder
    mode: upload
```

The script currently creates /tmp/my\_model.pkl and /tmp/diagnostic.txt. Both files must be retained as retrievable artifacts after the job; keeping the VM running is unnecessary.

Which two alternative implementation approaches explicitly retain both files? (Choose 2.)

### Options

**A**

Copy both files into the directory supplied by --artifact-dir before successful job completion

**B**

Leave both files in /tmp because workspace tracking uploads every filesystem file

**C**

Register the fitted model object and assume the unrelated diagnostic text is registered too

**D**

Call mlflow.log\_artifact for each file inside the active run

**E**

Set the compute cluster minimum node count to one as the artifact retention mechanism

Correct answer: A, D

### Explanation

Apply the configured output contract or explicit MLflow logging to retain both existing files.

## Question 29

Type: single\_choice
Knowledge point: Manage distributed training for large and deep learning models

An MLOps engineer configures an Azure Machine Learning Python SDK v2 command job on four GPU cluster nodes. Each node has one GPU. The validated registered environment azureml:ddp-training:7 includes compatible PyTorch and job-launch dependencies; train.py implements DDP and maps its local rank to the GPU. The remaining task is to select the supported distribution dictionary for one process per node.

```python
from azure.ai.ml import command
job = command(
    code="./src", command="python train.py --epochs 50",
    environment="azureml:ddp-training:7", compute="gpu-cluster",
    instance_count=4, distribution={ # missing dictionary fields
    }
)
```

Which dictionary supplies the supported native PyTorch distribution type and the requested process count?

### Options

**A**

{"type": "PyTorch", "process\_count\_per\_instance": 1}

**B**

{"type": "PyTorch", "process\_count\_per\_node": 1}

**C**

{"framework": "PyTorch", "process\_count\_per\_instance": 1}

**D**

{"type": "Horovod", "process\_count\_per\_instance": 1}

Correct answer: A

### Explanation

The SDK dictionary identifies the distribution with type and controls processes on each allocated instance with process\_count\_per\_instance. With one GPU per node, one process per instance matches the stated topology. Successful synchronized training also depends on the already validated script, runtime and network.

## Question 30

Type: multiple\_choice
Knowledge point: Manage distributed training for large and deep learning models

A PyTorch training job runs on four Azure Machine Learning cluster nodes with four GPUs per node. Monitoring shows one active GPU per node. The launch configuration currently starts one process per instance. The team must preserve the existing four-node topology and review the script before enabling one training process per GPU.

```yaml
type: command
command: python train.py
resources:
  instance_count: 4
distribution:
  type: pytorch
  process_count_per_instance: 1
```

The cluster and compatible environment are already configured. The launcher exposes LOCAL\_RANK, RANK and WORLD\_SIZE to each process. Which three configuration changes or script requirements together implement the intended DDP layout? (Choose 3.)

### Options

**A**

Change the distribution type to mpi to force multi-GPU activation and allocate resources for PyTorch training.

**B**

Set process\_count\_per\_instance to 4 in the distribution block to spawn a process for each available GPU on a node.

**C**

Increase the instance\_count parameter to 16 to distribute the 4 processes across smaller single-GPU compute nodes.

**D**

Ensure train.py uses the LOCAL\_RANK environment variable to assign each spawned process to a specific GPU device.

**E**

Ensure the script uses DistributedDataParallel to wrap the model and sync gradients across all spawned processes.

Correct answer: B, D, E

### Explanation

Four processes per instance give sixteen processes on the fixed four-node cluster. Each process must select its own local GPU and participate in DDP gradient synchronization. Launching more workers alone does not implement device selection, dataset partitioning or synchronization.

## Question 31

Type: multiple\_choice
Knowledge point: Manage distributed training for large and deep learning models

A Machine Learning Engineer reviews a two-node training job configured with Azure Machine Learning SDK v2 native PyTorch distribution. Its training script uses torch.distributed.init\_process\_group with the env:// initialization method. A worker log reports a TCPStore connection timeout; this symptom does not yet identify the cause. Among the choices, which three standard variables does Azure Machine Learning inject for env:// rendezvous configuration? (Choose 3.)

### Options

**A**

WORLD\_SIZE

**B**

MPI\_HOSTFILE

**C**

MASTER\_ADDR

**D**

MASTER\_PORT

**E**

AZUREML\_NODE\_COUNT

Correct answer: A, C, D

### Explanation

Azure ML injects standard rendezvous variables and also sets RANK for each process. Correct variable values do not establish TCP reachability, so the timeout still requires network and process checks.

## Question 32

Type: multiple\_choice
Knowledge point: Manage distributed training for large and deep learning models

A Machine Learning Engineer plans eight-node PyTorch DistributedDataParallel training in Azure ML. The objective is working inter-node collectives plus improved communication performance for a large model. Supported customer-managed or Azure ML managed networking is acceptable. Regional availability and quota will be checked before compute selection. Which two choices directly address this objective? (Choose 2.)

### Options

**A**

Require ExpressRoute solely because the cloud job reads a model registry

**B**

Permit required rendezvous and collective traffic in the selected supported network/backend configuration

**C**

Evaluate an exact InfiniBand-capable SKU such as Standard\_ND96asr\_v4 and benchmark workload scaling

**D**

Configure Microsoft.MachineLearningServices as the public address of a gradient parameter server

**E**

Use an inference load balancer to route gradient synchronization

Correct answer: B, C

### Explanation

Distinguish required connectivity from optional accelerated transport.

## Question 33

Type: single\_choice
Knowledge point: Implement training pipelines

An ML engineer is building an Azure Machine Learning SDK v2 pipeline that tunes a training component and then evaluates the selected model on a separate holdout dataset. The authenticated workspace connection, compute capacity, versioned environments, and data permissions have been verified.

Within the pipeline function, `train_node` is a valid instantiated command component. Its regularization input has a `Choice` search space. Each trial:

* Uses the same fixed training and validation datasets.
* Logs one final `validation_auc` metric through MLflow; higher is better.
* Writes a complete MLflow model to its declared output named `model`, of type `mlflow_model`.

No trial logs `training_auc`. The separately loaded `evaluate_component` accepts inputs named `model` and `data`; its `model` input is of type `mlflow_model`. The variable `holdout` is a valid pipeline data input never used for tuning.

The current pipeline fragment is:

```python
tune = train_node.sweep(
    primary_metric="training_auc",
    goal="maximize",
    sampling_algorithm="random",
    compute="train-cpu",
    max_total_trials=6,
    max_concurrent_trials=2,
)
evaluation = evaluate_component(
    model=Input(type="mlflow_model", path="azureml:approved-model:12"),
    data=holdout,
)
```

`Input` is imported from `azure.ai.ml`, and `approved-model:12` is an existing older release. The intended evaluation must consume this pipeline's sweep-selected artifact without manually querying child jobs or substituting the older release.

Which modification meets that requirement?

### Options

**A**

Change the primary metric to `validation_auc` and keep the evaluator's registered-model input; the presence of a sweep node automatically replaces older model inputs.

**B**

Bind the evaluator's model input to `tune.outputs.model` and retain `training_auc` as the primary metric; the model-output binding supplies the missing objective values.

**C**

Set `primary_metric="validation_auc"` with `goal="maximize"`, and set the evaluator's `model` input to `tune.outputs.model`, leaving `data=holdout`.

**D**

Set `primary_metric="validation_auc"` with `goal="minimize"`, and bind the evaluator to `tune.outputs.model` so that evaluation always uses a sweep output.

Correct answer: C

### Explanation

The pipeline must both select trials using an available, correctly directed objective and connect the selected model output to the evaluator. An explicit output binding represents the dependency; a fixed registry URI represents a different model input. Sources: [Sweeps within pipelines and output bindings](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-use-sweep-in-pipeline?view=azureml-api-2), [Sweep objectives and best-trial outputs](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters?view=azureml-api-2), [Command.sweep](https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.entities.command?view=azure-python).

## Question 34

Type: multiple\_choice
Knowledge point: Implement training pipelines

A Quality Engineer is recovering an Azure Machine Learning v2 training pipeline. Components use separate code folders. The successful preparation component is deterministic. Both the original run and proposed resubmission have force\_rerun=false. For preparation, the component definition, code snapshot, environment, inputs, parameters, output settings and run settings are unchanged and its successful output remains available.

The application exports the following trace summary to Application Insights:

```text
[Preparation] Completed; retained snapshot prepared-data-v4
[Extraction] Failed; transient HTTPS connection timeouts to the external feed
[Transformation] Canceled; waits for extraction
[Training] Canceled; waits for transformation
[Network probe] Feed is reachable, but brief transient connection failures recur
[Extraction client] No retry handling
```

The feed read is idempotent. The engineer must handle those demonstrated transient failures, retain eligible completed work, and still execute the downstream training. Which two complementary actions should the engineer take? (Choose 2.)

### Options

**A**

Set continue\_on\_step\_failure to the previous run ID to resume at that job's failed node.

**B**

Resubmit with force\_rerun=true to ensure the completed preparation step is skipped.

**C**

Resubmit the pipeline with reuse eligible for the unchanged preparation component; execute extraction again and run the canceled descendants when its output is available.

**D**

Deploy the unchanged failing extraction code through a batch endpoint to eliminate the transient connection failures.

**E**

Add bounded retry/backoff handling to the extraction HTTP client for the demonstrated transient connection failures before resubmitting.

Correct answer: C, E

### Explanation

Correct answers: C, E.

Option analysis:

* **A — Set continue\_on\_step\_failure to the previous run ID to resume at that job's failed node.**: continue\_on\_step\_failure is a boolean controlling whether other steps may continue after a failure, not a previous job ID or a resume pointer.
* **B — Resubmit with force\_rerun=true to ensure the completed preparation step is skipped.**: force\_rerun=true forces components to execute again, opposing reuse of preparation.
* **C — Resubmit the pipeline with reuse eligible for the unchanged preparation component; execute extraction again and run the canceled descendants when its output is available.**: The stated successful preparation meets reuse criteria. Failed extraction has no successful output to reuse, and canceled transformation/training still require execution.
* **D — Deploy the unchanged failing extraction code through a batch endpoint to eliminate the transient connection failures.**: Batch endpoints can host pipeline components, but changing the invocation surface does not repair the unchanged client's transient-network failure handling.
* **E — Add bounded retry/backoff handling to the extraction HTTP client for the demonstrated transient connection failures before resubmitting.**: Bounded client retries can handle transient failures for the idempotent feed read while preserving eventual failure reporting. Increasing a pipeline/job execution limit alone does not change the HTTP client's behavior.

## Question 35

Type: single\_choice
Knowledge point: Implement training pipelines

An MLOps Engineer is recognizing Azure Machine Learning Python SDK v2 APIs. A module uses these imports:

```python
from azure.ai.ml import dsl, command, load_component
from azure.ai.ml.entities import PipelineJob
```

Which API is used as a decorator on the Python function that assembles component nodes into an Azure ML pipeline definition?

### Options

**A**

@dsl.pipeline

**B**

@PipelineJob

**C**

@command

**D**

@load\_component

Correct answer: A

### Explanation

The pipeline decorator identifies the function whose component calls define the graph. Pipeline entities, command construction and component loading have different roles.

## Question 36

Type: single\_choice
Knowledge point: Implement training pipelines

A GitHub Actions runner is already authenticated to Azure, has the supported ml CLI extension, and has checked out the repository. Resource-group/workspace defaults and required submission permissions are configured. The protected main branch permits only reviewed merges, and this workflow runs after such a merge. pipeline.yml is a valid Azure ML type: pipeline job with all required inputs and component/environment references resolved. Which Azure CLI command submits that pipeline job?

### Options

**A**

az ml job show --name pipeline.yml

**B**

az ml job list

**C**

az ml component create --file pipeline.yml

**D**

az ml job create --file pipeline.yml

Correct answer: D

### Explanation

Submit the pipeline job through job create. The trigger alone supplies neither an authenticated identity nor the checked-out definition, so those prerequisites are established separately.

## Question 37

Type: multiple\_choice
Knowledge point: Implement training pipelines

An Operations Engineer investigates a 50 GB model-directory output from a registered Azure ML training component. The component declares model\_dir as uri\_folder and its command writes into that output path. The current job binds it in upload mode:

```yaml
$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
type: pipeline
settings:
  default_compute: azureml:training-cluster
jobs:
  train_step:
    type: command
    component: azureml:train_large_model:1
    outputs:
      model_dir:
        type: uri_folder
        path: azureml://datastores/workspaceblobstore/paths/large-model-output/
        mode: upload
```

The registered component, compute and datastore exist. Observed local temporary-disk free space is 30 GB; the output requires a 50 GB local staging file plus measured working-space overhead. The writer is not sharded across nodes. Which two remediation paths are technically valid to evaluate? (Choose 2.)

### Options

**A**

Increase instance\_count and assume Azure ML automatically shards the writer's single 50 GB file across nodes.

**B**

Set mode: rw\_mount on the pipeline job's output binding and test the full write with the runtime's cache/local-resource demands, storage permissions and throughput.

**C**

Keep upload mode but select compute with measured temporary-disk free capacity above the output plus working-space requirement.

**D**

Change only the output type to mlflow\_model and assume it automatically compresses the model below local capacity.

**E**

Use .amlignore as an output-upload control to suppress model artifact staging.

Correct answer: B, C

### Explanation

Runtime output mode belongs on the job binding rather than the reusable component output declaration. A mounted write is a candidate I/O path to validate, not a promise that all local resource limits disappear.

## Question 38

Type: single\_choice
Knowledge point: Compare model performance across jobs

A Performance Engineer compares two MLflow training runs on the same validation dataset. The experiment's acceptance rule rejects any run with validation\_loss above 1.0 at any recorded step. Both runs logged that metric at each step. This hypothetical code retrieves only their run summaries:

```python
import mlflow
summaries = mlflow.search_runs(experiment_ids=["42"], output_format="pandas")
```

Both summary rows show validation\_loss of 0.2\. Which next method supplies the information needed to apply the acceptance rule?

### Options

**A**

Retrieve MlflowClient.get\_metric\_history(run\_id, 'validation\_loss') for each candidate run and compare all recorded values with 1.0.

**B**

Select both runs because the summary metric is 0.2.

**C**

Call mlflow.get\_run for each run and treat its summary metric as the full time series.

**D**

Call mlflow.get\_experiment for experiment 42 and compare its artifact location with the threshold.

Correct answer: A

### Explanation

Search identifies candidate runs and summary values. For this temporal stability rule, use the recorded metric histories; unlogged steps remain unknown.

## Question 39

Type: multiple\_choice
Knowledge point: Compare model performance across jobs

A Machine Learning Engineer compares completed runs from experiment\_alpha and experiment\_beta. Each run has a finite, final validation\_accuracy value logged on the same held-out dataset using the same metric definition. The two experiments exist, the caller can read them, and the eligible set fits within search\_runs' requested result limit. The goal is to select the highest final validation\_accuracy among this set, rather than to prove overall production suitability.

```python
import mlflow
exp_alpha = mlflow.get_experiment_by_name("experiment_alpha")
exp_beta = mlflow.get_experiment_by_name("experiment_beta")
# Add the query and local DataFrame ranking steps.
```

Which three steps implement the comparison? (Choose 3.)

### Options

**A**

Sort the returned metrics.validation\_accuracy DataFrame column in descending order.

**B**

Call mlflow.set\_experiment with a list of both experiment names to set a combined active logging context.

**C**

Use filter\_string="attributes.status = 'FINISHED'" in the search call.

**D**

Set search\_all="MachineLearningServices" to scan the datastore for runs.

**E**

Pass experiment\_ids=\[exp\_alpha.experiment\_id, exp\_beta.experiment\_id\] to mlflow.search\_runs.

Correct answer: A, C, E

### Explanation

Explicit experiment IDs select the comparison scope, the status filter excludes unfinished/failed runs, and local DataFrame sorting ranks the logged final metric. Completed status alone does not establish comparable or production-ready models.

## Question 40

Type: multiple\_choice
Knowledge point: Compare model performance across jobs

A Performance Engineer is comparing model performance across jobs for a hyperparameter tuning sweep in Azure ML Studio. They want to visually analyze the validation\_loss metric across 50 child trials to understand how different combinations of learning rates and batch sizes impact the objective. Which two built-in visualization features in the Azure ML Studio UI allow the engineer to directly compare metrics and hyperparameters across multiple child runs of a sweep job? (Choose 2.)

### Options

**A**

The parallel coordinates chart located in the sweep job's Trials tab view.

**B**

The Data Drift monitoring dashboard available within the main workspace overview.

**C**

The JSON viewer in the default artifact datastore of the workspace.

**D**

The endpoint telemetry dashboard configured inside the Azure Monitor service.

**E**

The scatter chart in the Trials tab mapping hyperparameters to target metrics.

Correct answer: A, E

### Explanation

Azure Machine Learning Studio sweep trial charts compare training metrics and hyperparameters across trials. Parallel coordinates provides multiple axes and scatter views show selected relationships; production drift and endpoint telemetry serve different observations.

## Question 41

Type: multiple\_choice
Knowledge point: Compare model performance across jobs

An MLOps Engineer compares validation accuracy for every qualifying run from the last seven days in an Azure ML experiment with over 50,000 historical runs. Older runs are outside the comparison population. The configured client/backend supports start-time filters and token pagination, and each page fits the memory budget.

The existing code materializes a large fluent result:

```python
import mlflow
runs = mlflow.search_runs(experiment_names=['production_training_history'], max_results=50000)
```

Which two changes reduce retained memory without omitting qualifying runs? (Choose 2.)

### Options

**A**

Limit fluent search\_runs to 100 and treat those rows as the complete seven-day population

**B**

Use MlflowClient.search\_runs with experiment IDs and page\_token; aggregate each page and follow PagedList.token without retaining prior pages

**C**

Apply the supported start-time filter for the seven-day boundary before paging

**D**

Accumulate every page and concatenate the complete history into one DataFrame

**E**

Use log\_metrics to read historical metrics as a stream

Correct answer: B, C

### Explanation

Select exhaustive bounded paging and appropriate comparison filters.

