Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 8 .pipelines/azdo-ci-build-train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ stages:
modelSourceType: manualSpec
modelName: '$(MODEL_NAME)'
modelVersion: $(MODEL_VERSION)
inferencePath: '$(Build.SourcesDirectory)/code/scoring/inference_config.yml'
inferencePath: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/scoring/inference_config.yml'
deploymentTarget: ACI
deploymentName: $(ACI_DEPLOYMENT_NAME)
deployConfig: '$(Build.SourcesDirectory)/code/scoring/deployment_config_aci.yml'
deployConfig: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/scoring/deployment_config_aci.yml'
overwriteExistingDeployment: true
- task: AzureCLI@1
displayName: 'Smoke test'
Expand Down Expand Up @@ -150,11 +150,11 @@ stages:
modelSourceType: manualSpec
modelName: '$(MODEL_NAME)'
modelVersion: $(MODEL_VERSION)
inferencePath: '$(Build.SourcesDirectory)/code/scoring/inference_config.yml'
inferencePath: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/scoring/inference_config.yml'
deploymentTarget: AKS
aksCluster: $(AKS_COMPUTE_NAME)
deploymentName: $(AKS_DEPLOYMENT_NAME)
deployConfig: '$(Build.SourcesDirectory)/code/scoring/deployment_config_aks.yml'
deployConfig: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/scoring/deployment_config_aks.yml'
overwriteExistingDeployment: true
- task: AzureCLI@1
displayName: 'Smoke test'
Expand Down
8 changes: 6 additions & 2 deletions 8 code/evaluate/evaluate_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@
run = Run.get_context()
if (run.id.startswith('OfflineRun')):
from dotenv import load_dotenv
sys.path.append(os.path.abspath("./code/util")) # NOQA: E402
from model_helper import get_model_by_tag
# For local development, set values in this section
load_dotenv()
sources_dir = os.environ.get("SOURCES_DIR_TRAIN")
if (sources_dir is None):
sources_dir = 'code'
path_to_util = os.path.join(".", sources_dir, "util")
sys.path.append(os.path.abspath(path_to_util)) # NOQA: E402
from model_helper import get_model_by_tag
workspace_name = os.environ.get("WORKSPACE_NAME")
experiment_name = os.environ.get("EXPERIMENT_NAME")
resource_group = os.environ.get("RESOURCE_GROUP")
Expand Down
8 changes: 6 additions & 2 deletions 8 ml_service/pipelines/verify_train_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ def main():
run = Run.get_context()
if (run.id.startswith('OfflineRun')):
from dotenv import load_dotenv
sys.path.append(os.path.abspath("./code/util")) # NOQA: E402
from model_helper import get_model_by_tag
# For local development, set values in this section
load_dotenv()
sources_dir = os.environ.get("SOURCES_DIR_TRAIN")
if (sources_dir is None):
sources_dir = 'code'
path_to_util = os.path.join(".", sources_dir, "util")
sys.path.append(os.path.abspath(path_to_util)) # NOQA: E402
from model_helper import get_model_by_tag
workspace_name = os.environ.get("WORKSPACE_NAME")
experiment_name = os.environ.get("EXPERIMENT_NAME")
resource_group = os.environ.get("RESOURCE_GROUP")
Expand Down
9 changes: 7 additions & 2 deletions 9 ml_service/util/create_scoring_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
args = parser.parse_args()

model = Model(ws, name=e.model_name, version=e.model_version)
os.chdir("./code/scoring")
sources_dir = e.sources_dir
if (sources_dir is None):
sources_dir = 'code'
path_to_scoring = os.path.join(".", sources_dir, "scoring")
cwd = os.getcwd()
os.chdir(path_to_scoring)

image_config = ContainerImage.image_configuration(
execution_script=e.score_script,
Expand All @@ -40,7 +45,7 @@
name=e.image_name, models=[model], image_config=image_config, workspace=ws
)

os.chdir("../..")
os.chdir(cwd)

image.wait_for_creation(show_output=True)

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.