File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
sdk/ml/azure-ai-ml/azure/ai/ml/_local_endpoints Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import logging
7
7
from pathlib import Path
8
+ import os
8
9
9
10
from azure .ai .ml .constants ._endpoint import LocalEndpointConstants
10
11
@@ -79,12 +80,14 @@ def __init__(
79
80
}
80
81
}
81
82
)
82
- self ._environment [
83
- LocalEndpointConstants .ENVVAR_KEY_AML_APP_ROOT
84
- ] = docker_code_mount_path # ie. /var/azureml-app/onlinescoring
85
- self ._environment [
86
- LocalEndpointConstants .ENVVAR_KEY_AZUREML_ENTRY_SCRIPT
87
- ] = yaml_code_scoring_script_file_name # ie. score.py
83
+ # Set the directory containing scoring script as AML_APP_ROOT/working directory
84
+ # ie. /var/azureml-app/onlinescoring
85
+ self ._environment [LocalEndpointConstants .ENVVAR_KEY_AML_APP_ROOT ] = os .path .join (
86
+ docker_code_mount_path , os .path .dirname (yaml_code_scoring_script_file_name )
87
+ )
88
+ self ._environment [LocalEndpointConstants .ENVVAR_KEY_AZUREML_ENTRY_SCRIPT ] = Path (
89
+ yaml_code_scoring_script_file_name
90
+ ).name # ie. score.py
88
91
89
92
self .ports = {"5001/tcp" : 5001 }
90
93
You can’t perform that action at this time.
0 commit comments