Deploy MLflow Model to Endpoint Without Egress Connectivity
Short answer
A Yes
Question

Key Takeaways
The exam tests knowledge of deploying MLflow models in air-gapped or restricted environments; the trap is assuming standard deployment works without explicit packaging configuration.
This question tests the configuration of Azure Machine Learning online endpoints for workspaces with restricted network access. The community consensus confirms that using the with_package parameter is the correct solution to enable model packaging for offline deployment.
Common mistake: Candidates often select 'No' because they are unaware of the `with_package` parameter or believe a scoring script is mandatory, leading them to reject the solution incorrectly.
Expert Analysis
Why the Answer Is Correct
The with_package parameter in the ManagedOnlineDeployment object instructs Azure Machine Learning to bundle all necessary dependencies with the model artifact. This is essential when the workspace lacks egress connectivity, as it prevents the service from attempting to download packages from the internet during deployment.
Why the Other Options Are Wrong
Selecting 'No' would imply that another parameter is required or that this approach fails. While some candidates argue for a scoring script, documentation confirms it is optional for many model types if the environment handles inference correctly. Therefore, rejecting the with_package solution is incorrect.
Community Comment Notes
Comment [4] provides the official Microsoft documentation context, explaining that model packaging avoids the need for an internet connection. Comment [5] offers a code snippet demonstrating the correct usage of with_package=True. Comment [3] incorrectly claims a scoring script is required, which contradicts current SDK behavior for PyFunc models.
Exam Strategy
Memorize specific parameters for edge-case scenarios like air-gapped deployments. When you see 'no egress connectivity' or 'no public network access', immediately look for options related to 'packaging' or 'bundling' dependencies.
Community Votes
67% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 7 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 7
-
cryodax 👍 3The ManagedOnlineDeployment class requires the following parameters: name: str: Name of the deployment resource. model: str | Model | None: Model entity for the endpoint deployment, defaults to None. code_configuration: CodeConfiguration | None: Code Configuration, defaults to None. environment: str | Environment | None: Environment entity for the endpoint deployment, defaults to None. These are the minimum required parameters to create an instance of the ManagedOnlineDeployment class. All other parameters are optional and have default values. Please note that while model, code_configuration, and environment are optional in the constructor, they are typically necessary for a successful deployment. If not provided in the constructor, they should be set before deployment.
-
f2a9aa5 👍 3A. To deploy an MLflow model to an online endpoint in Azure Machine Learning without egress connectivity, you can use model packaging. Here’s how: First, ensure that your workspace has no public network access. Package your MLflow model using the --with-package flag: az ml online-deployment create --with-package --endpoint-name $ENDPOINT_NAME -f blue-deployment.yml --all-traffic Replace $ENDPOINT_NAME with your desired endpoint name. This approach allows you to avoid the need for an internet connection while deploying MLflow models. https://learn.microsoft.com/en-us/azure/machine-learning/how-to-deploy-mlflow-models-online-endpoints?view=azureml-api-2&tabs=cli
-
cryodax 👍 2B. No Scoring script is a requirement for managedonlinedeployment
-
cryodax 👍 1Sorry, scoring_script is optional. Copilot response: When using the ManagedOnlineDeployment class with the pyfunc flavor, the parameters remain the same. However, the model and code_configuration parameters are particularly important: model: str | Model | None: This should be an instance of mlflow.pyfunc.PyFuncModel or the URI of the model saved with mlflow.pyfunc.save_model1. code_configuration: CodeConfiguration | None: This should be an instance of CodeConfiguration where the code_flavor is set to pyfunc.
-
astone42 👍 1 Answered A"Workspaces without public network access: Before you can deploy MLflow models to online endpoints without egress connectivity, you have to package the models (preview). By using model packaging, you can avoid the need for an internet connection, which Azure Machine Learning would otherwise require to dynamically install necessary Python packages for the MLflow models."
Show 2 more comments
-
Ben999 👍 1 Answered Awithout egress connectivity blue_deployment = ManagedOnlineDeployment( name="blue", endpoint_name=endpoint_name, model=model, instance_type="Standard_F4s_v2", instance_count=1, with_package=True, )
-
D0ktor 👍 1 Answered BNo param called like that
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.