Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GetDataFromStore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dasharatha.vamshi
GetDataFromStore
Commits
8146794a
Commit
8146794a
authored
Mar 04, 2021
by
dasharatha.vamshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
2dcb9b99
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10039 additions
and
6 deletions
+10039
-6
conf/configuration.yml
conf/configuration.yml
+1
-1
main.py
main.py
+1
-1
scripts/common/config_parser.py
scripts/common/config_parser.py
+9
-4
temp/mnt/ilens/ai-jobs/pipe1/run1/GetDataFromStore/param.json
.../mnt/ilens/ai-jobs/pipe1/run1/GetDataFromStore/param.json
+3
-0
temp/mnt/ilens/ai-jobs/pipe1/run1/PreprocessWeatherData/input/response.json
...jobs/pipe1/run1/PreprocessWeatherData/input/response.json
+10022
-0
temp/mnt/ilens/ai-jobs/pipe1/run_config.json
temp/mnt/ilens/ai-jobs/pipe1/run_config.json
+3
-0
No files found.
conf/configuration.yml
View file @
8146794a
...
@@ -7,7 +7,7 @@ SERVICE_CONFIG:
...
@@ -7,7 +7,7 @@ SERVICE_CONFIG:
#--------------System Configurations--------------------#
#--------------System Configurations--------------------#
SYSTEM_CONFIG
:
SYSTEM_CONFIG
:
shared_mount_base_ai_job
:
/mnt/ilens/ai-job/
shared_mount_base_ai_job
:
/mnt/ilens/ai-job
s
/
connection_string
:
DefaultEndpointsProtocol=https;AccountName=azrabsilensqa01;AccountKey=DN6q6kX98JM8yUwtuJh2bAaXUGFo1zRS5HJSsa/ZA+MlmctjC000eHP7bdXiQqkI/MVtADhS8c9E88LI5T4UHw==;EndpointSuffix=core.windows.net
connection_string
:
DefaultEndpointsProtocol=https;AccountName=azrabsilensqa01;AccountKey=DN6q6kX98JM8yUwtuJh2bAaXUGFo1zRS5HJSsa/ZA+MlmctjC000eHP7bdXiQqkI/MVtADhS8c9E88LI5T4UHw==;EndpointSuffix=core.windows.net
...
...
main.py
View file @
8146794a
...
@@ -43,7 +43,7 @@ if __name__ == '__main__':
...
@@ -43,7 +43,7 @@ if __name__ == '__main__':
azure_container_name
=
config
[
GetDataFromStoreConstants
.
CONTAINER_NAME
]
azure_container_name
=
config
[
GetDataFromStoreConstants
.
CONTAINER_NAME
]
else
:
else
:
raise
Exception
(
ComponentExceptions
.
INVALID_CONTAINER_NAME
)
raise
Exception
(
ComponentExceptions
.
INVALID_CONTAINER_NAME
)
logger
.
info
(
config
)
#
logger.info(config)
mydict
=
{
mydict
=
{
"azure_file_path"
:
os
.
path
.
join
(
azure_file_path
,
azure_file_name
),
"azure_file_path"
:
os
.
path
.
join
(
azure_file_path
,
azure_file_name
),
"local_file_path"
:
os
.
path
.
join
(
config
[
'component_output_dir'
],
azure_file_name
),
"local_file_path"
:
os
.
path
.
join
(
config
[
'component_output_dir'
],
azure_file_name
),
...
...
scripts/common/config_parser.py
View file @
8146794a
...
@@ -26,7 +26,8 @@ pipeline_id = os.environ.get('PIPELINE_ID', default="pipeline_313")
...
@@ -26,7 +26,8 @@ pipeline_id = os.environ.get('PIPELINE_ID', default="pipeline_313")
shared_mount_base_ai_job
=
os
.
environ
.
get
(
"shared_mount_base_ai_job"
,
shared_mount_base_ai_job
=
os
.
environ
.
get
(
"shared_mount_base_ai_job"
,
_config
.
get
(
"SYSTEM_CONFIG"
,
{})
.
get
(
'shared_mount_base_ai_job'
))
_config
.
get
(
"SYSTEM_CONFIG"
,
{})
.
get
(
'shared_mount_base_ai_job'
))
# read from $shared_mount_base_ai_job/$pipeline_id/run.config
# read from $shared_mount_base_ai_job/$pipeline_id/run.config
run_id_path
=
shared_mount_base_ai_job
+
"/"
+
pipeline_id
+
"/run_config.json"
# run_id_path = shared_mount_base_ai_job + "/" + pipeline_id + "/run_config.json"
run_id_path
=
os
.
path
.
join
(
shared_mount_base_ai_job
,
pipeline_id
,
"run_config.json"
)
try
:
try
:
sys
.
stderr
.
write
(
"Checking for run id parameters at path "
+
run_id_path
+
"
\n
"
)
sys
.
stderr
.
write
(
"Checking for run id parameters at path "
+
run_id_path
+
"
\n
"
)
with
open
(
run_id_path
)
as
f
:
with
open
(
run_id_path
)
as
f
:
...
@@ -39,7 +40,10 @@ container_name = os.environ.get('container_name', default=GetDataFromStoreConsta
...
@@ -39,7 +40,10 @@ container_name = os.environ.get('container_name', default=GetDataFromStoreConsta
connection_string
=
os
.
environ
.
get
(
'connection_string'
,
_config
.
get
(
"SYSTEM_CONFIG"
,
{})
.
get
(
'connection_string'
))
connection_string
=
os
.
environ
.
get
(
'connection_string'
,
_config
.
get
(
"SYSTEM_CONFIG"
,
{})
.
get
(
'connection_string'
))
artifact_base_path
=
os
.
environ
.
get
(
'artifact_base_path'
)
artifact_base_path
=
os
.
environ
.
get
(
'artifact_base_path'
)
# Component Parameter:Read from $shared_mount_base_ai_job/$pipeline_id/$run_id/GetDataFromStore/param.json
# Component Parameter:Read from $shared_mount_base_ai_job/$pipeline_id/$run_id/GetDataFromStore/param.json
component_parameter_path
=
shared_mount_base_ai_job
+
"/"
+
pipeline_id
+
"/"
+
run_id
+
"/"
+
GetDataFromStoreConstants
.
COMPONENT_NAME
+
"/param.json"
# component_parameter_path = shared_mount_base_ai_job + "/" + pipeline_id + "/" + run_id + "/" + GetDataFromStoreConstants.COMPONENT_NAME + "/param.json"
component_parameter_path
=
os
.
path
.
join
(
shared_mount_base_ai_job
,
pipeline_id
,
run_id
,
GetDataFromStoreConstants
.
COMPONENT_NAME
,
"param.json"
)
try
:
try
:
sys
.
stderr
.
write
(
"Checking for component parameters at path "
+
component_parameter_path
+
"
\n
"
)
sys
.
stderr
.
write
(
"Checking for component parameters at path "
+
component_parameter_path
+
"
\n
"
)
with
open
(
component_parameter_path
)
as
f
:
with
open
(
component_parameter_path
)
as
f
:
...
@@ -48,8 +52,9 @@ except Exception as e:
...
@@ -48,8 +52,9 @@ except Exception as e:
raise
Exception
(
e
)
raise
Exception
(
e
)
artifact_name
=
component_parameter
[
'artifact_name'
]
artifact_name
=
component_parameter
[
'artifact_name'
]
# $shared_mount_base_ai_job/$pipeline_id/$run_id/PreprocessWeatherData/input/$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 = 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
,
GetDataFromStoreConstants
.
NEXT_COMPONENT
,
"input"
)
BASE_LOG_PATH
=
os
.
path
.
join
(
os
.
getcwd
(),
"logs"
)
BASE_LOG_PATH
=
os
.
path
.
join
(
os
.
getcwd
(),
"logs"
)
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
os
.
getcwd
(),
'logs'
)):
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
os
.
getcwd
(),
'logs'
)):
os
.
mkdir
(
os
.
path
.
join
(
os
.
getcwd
(),
'logs'
))
os
.
mkdir
(
os
.
path
.
join
(
os
.
getcwd
(),
'logs'
))
...
...
temp/mnt/ilens/ai-jobs/pipe1/run1/GetDataFromStore/param.json
0 → 100644
View file @
8146794a
{
"artifact_name"
:
"response.json"
}
\ No newline at end of file
temp/mnt/ilens/ai-jobs/pipe1/run1/PreprocessWeatherData/input/response.json
0 → 100644
View file @
8146794a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
temp/mnt/ilens/ai-jobs/pipe1/run_config.json
0 → 100644
View file @
8146794a
{
"run_id"
:
"run1"
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment