Fix deployment instance_type from Standard_F4s_v2 to Standard_DS3_v2#3848
Open
Chakradhar886 wants to merge 16 commits intomainfrom
Open
Fix deployment instance_type from Standard_F4s_v2 to Standard_DS3_v2#3848Chakradhar886 wants to merge 16 commits intomainfrom
Chakradhar886 wants to merge 16 commits intomainfrom
Conversation
The ManagedOnlineDeployment was using Standard_F4s_v2 (8 GB RAM) which caused the MLflow inference container to crash with a liveness probe 502 error. Changed to Standard_DS3_v2 (14 GB RAM) to provide sufficient memory for the sklearn-1.5 curated environment.
Root cause: The MLflow model artifact lacked pinned conda dependencies, causing the auto-generated inference environment to be incompatible. The inference container crashed on startup (liveness probe 502). Changes: 1. train.py: Move mlflow.start_run() and mlflow.sklearn.autolog() inside main() to match the working quickstart.ipynb pattern 2. train.py: Add explicit conda_env to mlflow.sklearn.log_model() with pinned versions (scikit-learn==1.5.2, mlflow==2.17.0, python=3.10.15, numpy==1.26.4) to ensure a compatible inference environment 3. Deployment: Change instance_type from Standard_F4s_v2 to Standard_DS3_v2
…reml-examples into e2e-workflow.ipynb/fix
|
@Chakradhar886 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Root cause: The notebook submits the pipeline job asynchronously but does not wait for it to complete before deploying the model. The deployment cell picks up a stale model from a previous CI run that was registered with an incompatible inference environment, causing the container to crash with a liveness probe 502 error. Changes: 1. Add ml_client.jobs.stream(pipeline_job.name) after pipeline submission to wait for the pipeline to complete and the model to be registered before proceeding to deployment (matching the pattern used in pipeline.ipynb) 2. train.py: Move mlflow.start_run() and mlflow.sklearn.autolog() inside main() to match the working quickstart.ipynb pattern 3. train.py: Add explicit conda_env to mlflow.sklearn.log_model() with pinned versions (scikit-learn==1.5.2, mlflow==2.17.0, python=3.10.15, numpy==1.26.4) to ensure a compatible inference environment 4. Deployment: Change instance_type from Standard_F4s_v2 to Standard_DS3_v2
…reml-examples into e2e-workflow.ipynb/fix
Root cause: The sklearn-1.5/labels/latest curated environment now ships a newer MLflow version whose logged-models API (/api/2.0/mlflow/logged-models) is not supported by the AzureML tracking server. This causes mlflow.sklearn.log_model() to fail with MlflowException (404), preventing the model from being registered. Without stream(), the notebook proceeded to deploy a stale model with an incompatible inference environment, causing liveness probe 502. Changes: 1. train.py: Remove mlflow.sklearn.log_model() which fails with the newer MLflow. Keep mlflow.sklearn.save_model() to save the model as a pipeline output artifact. 2. train.py: Move mlflow.start_run() and mlflow.sklearn.autolog() inside main() to match the working quickstart.ipynb pattern. 3. Pipeline: Add pipeline_job_model to returned outputs so the saved model artifact is accessible after pipeline completion. 4. Notebook: Add ml_client.jobs.stream() cell to wait for pipeline completion before proceeding to deployment. 5. Notebook: Add model registration cell using ml_client.models.create_or_update() with the pipeline output path, bypassing the broken MLflow API. 6. Deployment: Change instance_type from Standard_F4s_v2 to Standard_DS3_v2.
…reml-examples into e2e-workflow.ipynb/fix
…reml-examples into e2e-workflow.ipynb/fix
…reml-examples into e2e-workflow.ipynb/fix
…reml-examples into e2e-workflow.ipynb/fix
…reml-examples into e2e-workflow.ipynb/fix
…reml-examples into e2e-workflow.ipynb/fix
…reml-examples into e2e-workflow.ipynb/fix
…reml-examples into e2e-workflow.ipynb/fix
…reml-examples into e2e-workflow.ipynb/fix
6ec35be to
3fbea93
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ManagedOnlineDeployment was using Standard_F4s_v2 (8 GB RAM) which caused the MLflow inference container to crash with a liveness probe 502 error. Changed to Standard_DS3_v2 (14 GB RAM) to provide sufficient memory for the sklearn-1.5 curated environment.
Description
Checklist