# Why is the primary metric missing from an Azure ML sweep trial?

Exam: AI-300 — Operationalizing Machine Learning and Generative AI Solutions
Knowledge domain: Implement machine learning model lifecycle and operations
Updated: 2026-11-25T04:35:30.583215+00:00
HTML: https://learningpathx.com/faq/AI-300/ai300-azure-ml-sweep-missing-primary-metric.html

## Also asked as

- What should I check when Azure Machine Learning cannot find a sweep objective?
- How do I get an Azure ML sweep job to recognize the metric logged by the training script?

Check that one trial actually logs a number under the exact name configured as `primary_metric`. For example, an objective named `validation_rmse` will not match a tracking entry named `rmse`. Inspect the trial logs for an earlier failure that prevented the metric from being emitted.

Verify `goal` as well: minimize a validation error such as RMSE and maximize a larger-is-better measure when that matches the experiment. Confirm what population the logged value measures. A precisely named training-set metric still cannot answer a validation question. Fix and verify one trial before resubmitting a large search.

### Microsoft Learn

* [Hyperparameter tuning a model (v2) - Azure Machine Learning](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters?view=azureml-api-2)
* [Track Experiments and Models by Using MLflow - Azure Machine Learning](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-use-mlflow-cli-runs?view=azureml-api-2)

Source: [AI-300: Choosing and Comparing Training Experiments](https://learningpathx.com/news/ai-300-choosing-and-comparing-training-experiments.html)
