Skip to content

Commit

Permalink
change deprecated azureml option (recommenders-team#2069)
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Ki Min <[email protected]>
  • Loading branch information
loomlike authored and gogetron committed Apr 11, 2024
1 parent ae7e625 commit 482e879
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/ci/azureml_tests/submit_groupwise_azureml_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,20 @@
Example:
Usually, this script is run by a DevOps pipeline. It can also be
run from cmd line.
>>> python tests/ci/refac.py --clustername 'cluster-d3-v2'
--subid '12345678-9012-3456-abcd-123456789012'
--pr '666'
--reponame 'Recommenders'
--branch 'staging'
>>> python tests/ci/submit_groupwise_azureml_pytest.py \
--clustername 'cluster-d3-v2' \
--subid '12345678-9012-3456-abcd-123456789012' \
--pr '666' \
--reponame 'Recommenders' \
--branch 'staging'
"""
import argparse
import logging

from azureml.core.authentication import AzureCliAuthentication
from azureml.core import Workspace
from azureml.core import Experiment
from azureml.core.runconfig import RunConfiguration
from azureml.core.runconfig import RunConfiguration, DockerConfiguration
from azureml.core.conda_dependencies import CondaDependencies
from azureml.core.script_run_config import ScriptRunConfig
from azureml.core.compute import ComputeTarget, AmlCompute
Expand Down Expand Up @@ -191,6 +192,7 @@ def create_run_config(

run_azuremlcompute = RunConfiguration()
run_azuremlcompute.target = cpu_cluster
<<<<<<< HEAD
run_azuremlcompute.environment.docker.enabled = True
<<<<<<< HEAD
# See https://learn.microsoft.com/en-us/azure/machine-learning/how-to-train-with-custom-image?view=azureml-api-1#use-a-custom-dockerfile-optional
Expand All @@ -208,6 +210,8 @@ def create_run_config(
RUN apt-get install -y git
"""
=======
=======
>>>>>>> 0740b168 (change deprecated azureml option (#2069))
if not add_gpu_dependencies:
# https://github.com/Azure/AzureML-Containers/blob/master/base/cpu/openmpi4.1.0-ubuntu22.04
run_azuremlcompute.environment.docker.base_image = "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04"
Expand Down Expand Up @@ -325,8 +329,10 @@ def submit_experiment_to_azureml(
source_directory=".",
script=test,
run_config=run_config,
docker_runtime_config=DockerConfiguration(use_docker=True),
arguments=arguments,
)

run = experiment.submit(script_run_config)
# waits only for configuration to complete
run.wait_for_completion(show_output=True, wait_post_processing=True)
Expand Down

0 comments on commit 482e879

Please sign in to comment.