-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
343 additions
and
292 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: "3.40.1" | ||
version: "3.41.0" | ||
|
||
tasks: | ||
infra-init: | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
import os | ||
from services.aml_client import AMLClient | ||
from database.issues_repository import IssuesRepository | ||
from services.issues_service import IssuesService | ||
from azure.identity import DefaultAzureCredential | ||
from azure.ai.ml import MLClient | ||
from azure.identity import DefaultAzureCredential, ClientAssertionCredential | ||
from config.config import settings | ||
|
||
|
||
def get_issues_service() -> IssuesService: | ||
return IssuesService(IssuesRepository(), get_aml_client()) | ||
|
||
def get_aml_client(): | ||
credential = DefaultAzureCredential() | ||
mlclient = MLClient( | ||
credential, | ||
settings.subscription_id, | ||
settings.resource_group, | ||
settings.ai_hub_project_name | ||
) | ||
return AMLClient(mlclient) | ||
default_credential = DefaultAzureCredential() | ||
credential = ClientAssertionCredential(settings.aad_tenant_id, os.environ.get('FLOW_CLIENT_ID'), lambda: default_credential.get_token("api://AzureADTokenExchange/.default").token) | ||
|
||
return AMLClient(credential) |
Oops, something went wrong.