Skip to content

Commit

Permalink
Fix RAI image builds
Browse files Browse the repository at this point in the history
  • Loading branch information
imatiach-msft committed Nov 27, 2024
1 parent 57da35d commit 6cf58fe
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ extra_config: environment.yaml
test:
pytest:
enabled: true
pip_requirements: tests/requirements.txt
conda_environment: tests/test_conda_env.yaml
tests_dir: tests
categories: ["Responsible AI"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
azure-ai-ml~=1.0.0
azure.identity==1.10.0
azureml-core~=1.53.0
azure-ai-ml==1.22.4
azure.identity==1.19.0
azureml-core>=1.58.0
azureml-mlflow
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from azure.ai.ml.entities import Environment, BuildContext
from azure.ai.ml import automl
from azure.ai.ml.constants import AssetTypes
from azure.identity import AzureCliCredential
from azure.identity import DefaultAzureCredential


BUILD_CONTEXT = Path("../context")
Expand Down Expand Up @@ -53,8 +53,10 @@ def test_responsibleai():
resource_group = os.environ.get("resource_group")
workspace_name = os.environ.get("workspace")

credential = DefaultAzureCredential()

ml_client = MLClient(
AzureCliCredential(), subscription_id, resource_group, workspace_name
credential, subscription_id, resource_group, workspace_name
)

env_name = "responsibleai"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
channels:
- conda-forge
- defaults
- anaconda
dependencies:
- python=3.12.0
- pip
- pip:
- -r requirements.txt
## Test requirements
- pytest
- tqdm
- azure-core
name: rai_test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spec: spec.yaml
extra_config: environment.yaml
test:
pytest:
enabled: true
pip_requirements: tests/requirements.txt
enabled: true
conda_environment: tests/test_conda_env.yaml
tests_dir: tests
categories: ["Responsible AI"]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from azure.ai.ml import command
from azure.ai.ml.operations._run_history_constants import JobStatus
from azure.ai.ml.entities import Environment, BuildContext
from azure.identity import AzureCliCredential
from azure.identity import DefaultAzureCredential

BUILD_CONTEXT = Path("../context")
JOB_SOURCE_CODE = "src"
Expand All @@ -25,8 +25,10 @@ def test_responsibleai_text():
resource_group = os.environ.get("resource_group")
workspace_name = os.environ.get("workspace")

credential = DefaultAzureCredential()

ml_client = MLClient(
AzureCliCredential(), subscription_id, resource_group, workspace_name
credential, subscription_id, resource_group, workspace_name
)

env_name = "responsibleai-text"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
channels:
- conda-forge
- defaults
- anaconda
dependencies:
- python=3.12.0
- pip
- pip:
- -r requirements.txt
## Test requirements
- pytest
- tqdm
- azure-core
name: rai_test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ extra_config: environment.yaml
test:
pytest:
enabled: true
pip_requirements: tests/requirements.txt
conda_environment: tests/test_conda_env.yaml
tests_dir: tests
categories: ["Responsible AI"]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from azure.ai.ml import MLClient
from azure.ai.ml import command
from azure.ai.ml.entities import Environment, BuildContext
from azure.identity import AzureCliCredential
from azure.identity import DefaultAzureCredential

BUILD_CONTEXT = Path("../context")
JOB_SOURCE_CODE = "src"
Expand All @@ -24,8 +24,10 @@ def test_responsibleai_vision():
resource_group = os.environ.get("resource_group")
workspace_name = os.environ.get("workspace")

credential = DefaultAzureCredential()

ml_client = MLClient(
AzureCliCredential(), subscription_id, resource_group, workspace_name
credential, subscription_id, resource_group, workspace_name
)

env_name = "responsibleai-vision"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
channels:
- conda-forge
- defaults
- anaconda
dependencies:
- python=3.12.0
- pip
- pip:
- -r requirements.txt
## Test requirements
- pytest
- tqdm
- azure-core
name: rai_test

0 comments on commit 6cf58fe

Please sign in to comment.