▸case-01 We are building an MLOps training pipeline with MLflow. A junior engineer proposed calling `mlflow.register_model()` separately after `mlflow.sklearn.log_model()`, but another engineer suggested passing `registered_model_name` directly inside `mlflow.sklearn.log_model()`. Provide the Python code snippet using MLflow to log and register the scikit-learn model named 'churn-classifier' in a single API call. | pass→pass | 4,579 | 10,415 | +127% | 1 | 1 | 0% | 911 | 2,042 | +124% | 0 | 0 | — |
▸case-02 We are migrating our MLflow Model Registry client code from legacy stages to MLflow 2.x recommended practices for pointing to specific model versions. Write a Python snippet using `MlflowClient` to assign the alias 'champion' to version 3 of model 'fraud-detector'. | pass→pass | 5,388 | 5,401 | +0% | 1 | 1 | 0% | 862 | 1,304 | +51% | 0 | 0 | — |
▸case-03 We are creating an AWS SageMaker Model Package Group for our recommendation model using boto3. The junior dev wants to leave the approval status unspecified, but in our enterprise governance policy, new model versions registered in SageMaker Model Registry must explicitly set `ModelApprovalStatus` to pending manual approval (allowed statuses in SageMaker are 'Approved', 'Rejected', 'PendingManualApproval'). Write the Python boto3 code calling `create_model_package` for model package group 'recommender-pkg-group' with S3 model artifacts at 's3://my-bucket/model.tar.gz' that enforces this governance policy. | pass→pass | 8,328 | 9,206 | +11% | 1 | 1 | 0% | 1,387 | 2,283 | +65% | 0 | 0 | — |
▸case-04 We need to query MLflow Model Registry via `MlflowClient.search_model_versions()` to retrieve all versions of registered model 'sentiment-analysis' that have the tag `validation_status` set to `passed`. Write the Python snippet using `MlflowClient` with the exact `filter_string` argument needed for this query. | pass→pass | 6,746 | 6,880 | +2% | 1 | 1 | 0% | 1,099 | 1,452 | +32% | 0 | 0 | — |
▸case-05 We are setting up Triton Inference Server with a model repository directory for an ONNX model named `resnet50`. Provide the directory layout tree showing where the configuration file `config.pbtxt` and the model file `model.onnx` must be placed under version directory `1`. | pass→pass | 3,650 | 4,236 | +16% | 1 | 1 | 0% | 700 | 1,148 | +64% | 0 | 0 | — |
▸case-06 We are uploading a trained TensorFlow SavedModel artifact stored at 'gs://my-bucket/model-artifacts/' to Google Cloud Vertex AI Model Registry using `google.cloud.aiplatform.Model.upload()`. We want to register it as a new version under an existing parent model resource name 'projects/12345/locations/us-central1/models/67890'. Write the Python snippet using the Vertex AI SDK to upload this model specifying the parent model. | pass→pass | 7,455 | 9,374 | +26% | 1 | 1 | 0% | 1,484 | 1,872 | +26% | 0 | 0 | — |
▸case-07 An operator wants to delete a registered model 'old-xgb-model' from MLflow Model Registry. They plan to call `client.delete_registered_model(name='old-xgb-model')` directly without deleting individual model versions first. Explain what happens or write the required MLflow Python steps to safely clean up all model versions before deleting the registered model container. | pass→pass | 15,188 | 14,716 | -3% | 1 | 1 | 0% | 2,902 | 2,496 | -14% | 0 | 0 | — |
▸case-08 In AWS SageMaker Model Registry, we want to attach model quality baseline statistics stored in S3 at 's3://my-bucket/eval/statistics.json' when registering a model package using boto3 `create_model_package`. Write the `ModelMetrics` parameter dictionary structure for `ModelQuality` metrics. | pass→pass | 6,829 | 8,035 | +18% | 1 | 1 | 0% | 1,340 | 1,586 | +18% | 0 | 0 | — |
▸case-09 We are setting up an enterprise MLflow Tracking Server with Model Registry support. A junior sysadmin configured `mlflow server` with `--default-artifact-root s3://my-mlflow-bucket` but omitted `--backend-store-uri`, using default local file storage. Explain why MLflow Model Registry features fail under file-based backend stores and state the required backend store database configuration type. | pass→pass | 10,968 | 11,191 | +2% | 1 | 1 | 0% | 1,835 | 2,256 | +23% | 0 | 0 | — |
▸case-10 We are packaging a custom pre-processing pipeline and model into MLflow using `mlflow.pyfunc.log_model()`. The model requires a custom Python class `TextClassifier(mlflow.pyfunc.PythonModel)` and a code dependency file `utils.py`. Write the Python code to log this custom model under artifact path 'custom_model' and register it under model name 'text-classifier-reg'. | pass→pass | 7,822 | 11,063 | +41% | 1 | 1 | 0% | 1,629 | 2,547 | +56% | 0 | 0 | — |
▸case-11 Using Azure Machine Learning Python SDK v2 (`azure.ai.ml.MLClient`), we want to register a local folder model artifact `./outputs/model/` as a registered model named `credit-risk-model` with version `'1'`. Write the `Model` object definition and `ml_client.models.create_or_update()` call. | pass→pass | 6,583 | 6,799 | +3% | 1 | 1 | 0% | 1,027 | 1,644 | +60% | 0 | 0 | — |
▸case-12 We are using DVC (Data Version Control) to track model artifacts in Git. A developer suggests committing the 2GB `model.pkl` file directly into Git history alongside the `.dvc` pointer file. Correct this practice and provide the command sequence to track `model.pkl` with DVC, commit the resulting metadata pointer to Git, and push the binary artifact to DVC remote. | pass→pass | 8,330 | 11,650 | +40% | 1 | 1 | 0% | 1,636 | 2,004 | +22% | 0 | 0 | — |
▸case-13 When registering an ONNX model package in SageMaker Model Registry via boto3 `create_model_package`, we need to specify the inference container image URI ('763104351884.dkr.ecr.us-east-1.amazonaws.com/onnxruntime-inference:1.12.1-cpu') and model data URL ('s3://my-bucket/onnx/model.tar.gz'). Write the `InferenceSpecification` block for this call. | pass→pass | 8,036 | 7,624 | -5% | 1 | 1 | 0% | 1,789 | 1,876 | +5% | 0 | 0 | — |
▸case-14 When registering an MLflow model, we want to ensure schema validation on model inputs and outputs during serving. Write the Python code snippet using `mlflow.models.infer_signature(X_train, y_pred)` and pass it during `mlflow.sklearn.log_model()`. | pass→pass | 6,587 | 10,685 | +62% | 1 | 1 | 0% | 1,334 | 1,983 | +49% | 0 | 0 | — |
▸case-15 In Triton Inference Server model repository, we want to configure model `transformer_encoder` in `config.pbtxt` to enable dynamic batching with a max batch size of 16 and a maximum queue delay of 5000 microseconds. Provide the exact Protocol Buffer text configuration lines for dynamic batching. | pass→pass | 3,072 | 7,805 | +154% | 1 | 1 | 0% | 617 | 1,604 | +160% | 0 | 0 | — |
▸case-16 We are writing a deployment pipeline script to deploy registered models from MLflow. The team lead asks whether model tags or model aliases should be used to point continuous deployment pipelines to the target deployment version. Compare tags vs aliases for deployment environment targeting in MLflow 2.x. | pass→pass | 15,685 | 18,799 | +20% | 1 | 1 | 0% | 2,665 | 3,574 | +34% | 0 | 0 | — |
▸case-17 We need to grant another AWS account ('987654321098') read and describe access to a SageMaker Model Package Group 'shared-enterprise-models'. Write the boto3 `put_model_package_group_policy` call. | pass→pass | 7,981 | 11,268 | +41% | 1 | 1 | 0% | 1,658 | 2,684 | +62% | 0 | 0 | — |
▸case-18 In MLflow Model Registry, how is a model version tied back to the exact training experiment run parameters, metrics, and code commit that produced it? Write the Python snippet using `MlflowClient` to fetch a model version object for model 'sales-forecaster' version 2 and inspect its source training run ID. | pass→pass | 8,919 | 11,679 | +31% | 1 | 1 | 0% | 1,726 | 2,766 | +60% | 0 | 0 | — |
▸case-19 A developer suggests updating an existing registered model version in-place by overwriting files in the underlying S3 artifact directory `s3://ml-bucket/models/churn/v1/`. Explain why this violates model registry immutability principles and state the correct procedure for deploying updated weights or code. | pass→pass | 11,515 | 15,105 | +31% | 1 | 1 | 0% | 2,020 | 2,892 | +43% | 0 | 0 | — |
▸case-20 Write a Python snippet using `mlflow.artifacts.download_artifacts()` to download the artifact files of model version '3' of registered model 'image-classifier' to a local path './downloaded_model'. | pass→pass | 3,496 | 5,341 | +53% | 1 | 1 | 0% | 701 | 1,135 | +62% | 0 | 0 | — |
▸case-21 In Databricks / MLflow Model Registry, we want to create a webhook notification that triggers when a new model version is assigned the 'champion' alias for model 'risk-assessor'. Write the Python SDK call `client.create_webhook()` or JSON specification specifying the target event. | fail→pass | 13,266 | 11,737 | -12% | 1 | 1 | 0% | 2,703 | 2,663 | -1% | 0 | 0 | — |
▸case-22 We have a SageMaker Model Package with ARN 'arn:aws:sagemaker:us-east-1:123456789012:model-package/recommender/1' in status 'PendingManualApproval'. Allowed approval statuses in SageMaker are 'Approved', 'Rejected', and 'PendingManualApproval'. Write the boto3 Python code to update its approval status to approved with an approval description. | pass→pass | 5,073 | 9,949 | +96% | 1 | 1 | 0% | 1,089 | 2,007 | +84% | 0 | 0 | — |
▸case-23 We are serving a scikit-learn model via FastAPI in production. The incoming JSON payloads are large, so we want to enable GZip compression for HTTP responses using FastAPI middleware. Provide the Python FastAPI code snippet adding `GZipMiddleware`. | pass→pass | 5,635 | 7,781 | +38% | 1 | 1 | 0% | 1,056 | 1,828 | +73% | 0 | 0 | — |
▸case-24 We are monitoring data drift on incoming features using Evidently AI in an ML monitoring pipeline. Write a Python snippet using Evidently's `Report` and `DataDriftPreset` to calculate dataset drift and check if dataset drift is detected. | pass→pass | 9,251 | 10,766 | +16% | 1 | 1 | 0% | 1,944 | 2,656 | +37% | 0 | 0 | — |
▸case-25 During real-time PyTorch model inference on NVIDIA GPUs, GPU memory fragmentation occurs. Write the Python code setting the `PYTORCH_CUDA_ALLOC_CONF` environment variable to `expandable_segments:True` before initializing PyTorch. | pass→pass | 4,587 | 9,453 | +106% | 1 | 1 | 0% | 815 | 1,772 | +117% | 0 | 0 | — |
▸case-26 We are sending an HTTP POST request to Triton Inference Server using the KServe v2 prediction protocol to perform inference on model 'resnet50'. Write the JSON payload structure containing `inputs` with name 'input_0', shape [1, 3, 224, 224], datatype 'FP32', and flat numerical data. | pass→pass | 6,571 | 6,805 | +4% | 1 | 1 | 0% | 1,326 | 1,655 | +25% | 0 | 0 | — |