Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
preprocess-data
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
preprocess-data
Commits
1121848a
Commit
1121848a
authored
Feb 23, 2021
by
dasharatha.vamshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkl
parent
bd353ed9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
main.py
main.py
+4
-3
scripts/common/config_parser.py
scripts/common/config_parser.py
+1
-1
No files found.
main.py
View file @
1121848a
...
...
@@ -10,10 +10,11 @@ from scripts.common.logsetup import logger
class
PreProcessComponent
:
def
__init__
(
self
):
self
.
ds
,
self
.
tempmax
,
self
.
tempmin
,
self
.
temp
,
self
.
humidity
,
self
.
precip
,
self
.
winddir
,
self
.
cloudcover
,
self
.
visibility
,
self
.
date
,
self
.
windspeed
=
([]
for
i
in
range
(
11
))
self
.
ds
,
self
.
tempmax
,
self
.
tempmin
,
self
.
temp
,
self
.
humidity
,
self
.
precip
,
self
.
winddir
,
self
.
cloudcover
,
self
.
visibility
,
self
.
date
,
self
.
windspeed
=
(
[]
for
i
in
range
(
11
))
def
read_pickle_file
(
self
,
file
):
logger
.
info
(
"Parsing the pickle file at location "
+
file
)
logger
.
info
(
"Parsing the pickle file at location "
+
file
+
" ......"
)
return
pickle
.
load
(
open
(
file
,
"rb"
))
def
preprocess
(
self
,
forcast_json
,
standard_scalar_pkl_path
,
null_value_method
):
...
...
@@ -61,7 +62,7 @@ if __name__ == '__main__':
# Checking pickle path for standard scalar
if
PreProcessConstants
.
STANDARD_SCALAR_PATH
in
config
.
keys
():
standard_scalar_path
=
config
[
PreProcessConstants
.
STANDARD_SCALAR_PATH
]
if
standard_scalar_path
is
None
:
if
len
(
standard_scalar_path
)
<
5
:
standard_scalar_path
=
"StandardScaler.pkl"
else
:
pass
...
...
scripts/common/config_parser.py
View file @
1121848a
...
...
@@ -30,7 +30,7 @@ LOGSTASH_PORT = str(_config.get('SERVICE_CONFIG', {}).get('LOGSTASH_PORT'))
# os.environ["json_path"] = r"E:\welspun-defects\preprocess_data-ilendev\response.json"
# os.environ["fillna_method"] = "ffill"
# os.environ["standard_scalar_path"] = r"E:\welspun-defects\preprocess_data-ilendev\StandardScaler.pkl"
print
(
os
.
getcwd
())
#
print(os.getcwd())
PKL_path
=
os
.
path
.
join
(
os
.
getcwd
(),
'StandardScaler.pkl'
)
config
=
{
"shared_volume"
:
os
.
environ
.
get
(
"shared_volume"
),
...
...
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