Skip to content

Commit

Permalink
Updated tests to use created environment in the job
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarun-Chevula committed Dec 18, 2024
1 parent 2afe872 commit 7377384
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def test_minimal_cpu_inference():

env_docker_context = Environment(
build=BuildContext(path=this_dir / BUILD_CONTEXT),
name="minimal_cpu_inference",
name=env_name,
description="minimal 20.04 py39 cpu inference environment created from a Docker context.",
)
ml_client.environments.create_or_update(env_docker_context)
returned_env = ml_client.environments.create_or_update(env_docker_context)

# create the command
job = command(
Expand All @@ -44,7 +44,7 @@ def test_minimal_cpu_inference():
inputs=dict(
score="valid_score.py",
),
environment=f"{env_name}@latest",
environment=returned_env,
compute=os.environ.get("cpu_cluster"),
display_name="minimal-cpu-inference-example",
description="A test run of the minimal 20.04 py39 cpu inference curated environment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def test_minimal_cpu_inference():

env_docker_context = Environment(
build=BuildContext(path=this_dir / BUILD_CONTEXT),
name="minimal_cpu_inference",
name=env_name,
description="minimal 22.04 py311 cpu inference environment created from a Docker context.",
)
ml_client.environments.create_or_update(env_docker_context)
returned_env = ml_client.environments.create_or_update(env_docker_context)

# create the command
job = command(
Expand All @@ -44,7 +44,7 @@ def test_minimal_cpu_inference():
inputs=dict(
score="valid_score.py",
),
environment=f"{env_name}@latest",
environment=returned_env,
compute=os.environ.get("cpu_cluster"),
display_name="minimal-cpu-inference-example",
description="A test run of the minimal 22.04 py311 cpu inference curated environment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ dependencies:
- pip:
- azureml-inference-server-http=={{latest-pypi-version}}
- azureml-ai-monitoring=={{latest-pypi-version}}
- numpy
- mlflow
- azureml-contrib-services
- mlflow
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def test_mlflow_cpu_inference():

env_docker_context = Environment(
build=BuildContext(path=this_dir / BUILD_CONTEXT),
name="mlflow_py39_inference",
name=env_name,
description="mlflow 20.04 py39 cpu inference environment created from a Docker context.",
)
ml_client.environments.create_or_update(env_docker_context)
returned_env = ml_client.environments.create_or_update(env_docker_context)

# create the command
job = command(
Expand All @@ -47,7 +47,7 @@ def test_mlflow_cpu_inference():
score_input="sample_2_0_input.txt",
model_dir="mlflow_2_0_model_folder"
),
environment=f"{env_name}@latest",
environment=returned_env,
compute=os.environ.get("cpu_cluster"),
display_name="mlflow-py39-inference-example",
description="A test run of the mlflow 20.04 py39 cpu inference curated environment",
Expand Down

0 comments on commit 7377384

Please sign in to comment.