Commit 39cab12a authored by dasharatha.vamshi's avatar dasharatha.vamshi

init

parent 81b9130e
......@@ -9,7 +9,7 @@ SERVICE_CONFIG:
SYSTEM_CONFIG:
shared_mount_base_ai_job: /mnt/ilens/ai-jobs/
connection_string: DefaultEndpointsProtocol=https;AccountName=azrabsilensqa01;AccountKey=DN6q6kX98JM8yUwtuJh2bAaXUGFo1zRS5HJSsa/ZA+MlmctjC000eHP7bdXiQqkI/MVtADhS8c9E88LI5T4UHw==;EndpointSuffix=core.windows.net
default_run_id: default_run_id
#----------------------If read conf from mongo------------#
FOR_EACH_MONGO_CONFIG:
......
......@@ -17,10 +17,10 @@ else:
sys.stderr.write("Configuration not found...")
sys.stderr.write("Exiting....")
sys.exit(1)
# uncomment for Testing
# os.environ['pipeline_id'] = "pipe1"
# os.environ['artifact_base_path'] = "/data/model/tested/"
# os.environ['artifact_name'] = 'response.json'
# ------------------------ Configurations -----------------------------------------------------------------------------
pipeline_id = os.environ.get('PIPELINE_ID', default="pipeline_313")
shared_mount_base_ai_job = os.environ.get("shared_mount_base_ai_job",
......@@ -32,10 +32,11 @@ try:
sys.stderr.write("Checking for run id parameters at path " + run_id_path + "\n")
with open(run_id_path) as f:
run_id_param = json.load(f)
run_id = run_id_param['run_id']
except Exception as e:
sys.stderr.write("No run_config.json file is there so keeping run id as pipeline_id_run " + "\n")
run_id = pipeline_id + "_run"
run_id = run_id_param['run_id']
sys.stderr.write("No run_config.json file is there so keeping run id as default_run_id " + "\n")
run_id = _config.get("SYSTEM_CONFIG", {}).get('default_run_id')
data_store = os.environ.get('data_store', default="Azure")
container_name = os.environ.get('container_name', default=GetDataFromStoreConstants.CONTAINER)
connection_string = os.environ.get('connection_string', _config.get("SYSTEM_CONFIG", {}).get('connection_string'))
......@@ -49,9 +50,14 @@ try:
sys.stderr.write("Checking for component parameters at path " + component_parameter_path + "\n")
with open(component_parameter_path) as f:
component_parameter = json.load(f)
artifact_name = component_parameter['artifact_name']
except Exception as e:
sys.stderr.write("No param.json file so trying to take from env" + "\n")
try:
artifact_name = os.environ.get('artifact_name')
except Exception as e:
raise Exception(e)
artifact_name = component_parameter['artifact_name']
# $shared_mount_base_ai_job/$pipeline_id/$run_id/PreprocessWeatherData/input/$artifact_Name
# component_output_dir = shared_mount_base_ai_job + "/" + pipeline_id + "/" + run_id + "/" + GetDataFromStoreConstants.NEXT_COMPONENT + "/input"
component_output_dir = os.path.join(shared_mount_base_ai_job, pipeline_id, run_id,
......
{
"artifact_name": "response.json"
}
\ No newline at end of file
{
"run_id" : "run1"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment