[Python] Batch Endpoint Deployment Fails with Status Code 42 for AutoML Model

Discussão em 'Python' iniciado por Stack, Julho 23, 2025.

  1. Stack

    Stack Membro Participativo

    We are consistently encountering a critical error while deploying a trained Azure AutoML regression model using a batch endpoint created through the Azure Machine Learning Studio (No-Code UI). The deployment fails with the following error:

    Approach Used:

    Model Training: Performed via Azure ML Studio (No-Code UI) using AutoML for a regression task.

    Batch Deployment: Deployed model for batch inference using Batch Endpoint wizard within Azure ML Studio (No-Code UI).

    # Data Files:

    Training File: Clean, properly formatted, and successfully used during AutoML training. Testing File: CSV format, accessible in Azure Blob Storage, and successfully used for evaluation and real-time inference. Trained Model: AutoML-generated model with strong regression metrics (e.g., R², RMSE) and works correctly with real-time endpoints. Compute Target: Azure ML Compute Cluster (dedicated, functional, and validated).

    # Steps Taken:

    Trained the model using clean training data via AutoML (No-Code UI).

    Created batch endpoint and configured the inference job using the same model and test data.

    Batch inference job fails consistently with exit code 42.

    Re-verified the data, retrained the model, and repeated deployment — the issue persists.

    The same model and test file return correct results when run through a real-time endpoint.Approach Used: Model Training: Performed via Azure ML Studio (No-Code UI) using AutoML for a regression task. Batch Deployment: Deployed model for batch inference using Batch Endpoint wizard within Azure ML Studio (No-Code UI). Data Files: Training File: Clean, properly formatted, and successfully used during AutoML training. Testing File: CSV format, accessible in Azure Blob Storage, and successfully used for evaluation and real-time inference. Trained Model: AutoML-generated model with strong regression metrics (e.g., R², RMSE) and works correctly with real-time endpoints. Compute Target: Azure ML Compute Cluster (dedicated, functional, and validated). Impact: This issue is blocking critical batch inference workflows for production use. Given that the model and data work flawlessly in real-time mode, the issue appears isolated to the batch endpoint mechanism. A fix or workaround is Requested Action: Investigate the root cause of the exit code 42. Provide resolution or corrective steps, especially considering the use of the No-Code UI pipeline.

    user_logs/std_log_0.txt:


    Azure Machine Learning Batch Inference Start
    [2025-07-16 11:25:04.298903] No started flag set. Skip creating started flag.
    Azure Machine Learning Batch Inference End
    Cleaning up all outstanding Run operations, waiting 300.0 seconds
    2 items cleaning up...
    Cleanup took 0.1315138339996338 seconds
    Traceback (most recent call last):
    File "driver/amlbi_main.py", line 275, in <module>
    main()
    File "driver/amlbi_main.py", line 226, in main


    This issue is blocking our batch inference pipeline. Given that the real-time endpoint executes perfectly with the same model and data, this issue is isolated to the batch endpoint infrastructure.

    Let us know if any further logs or configuration inputs are required.

    Troubleshooting Steps Already Performed:


    1.Confirmed test file format is identical to what was used during training and real-time inference.

    2.Verified compute cluster is active, correctly attached, and accessible.

    3.Retried the batch job with fresh deployments and re-uploaded data – issue persists.

    4.Confirmed the model runs without issue via real-time endpoints on the same test data.

    5.Reviewed logs but no clear pointer apart from the exit code and system exit. Have attached the logs for your kind perusal.

    Continue reading...

Compartilhe esta Página