Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
ModelObject
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
ModelObject
Commits
e612691e
Commit
e612691e
authored
Mar 11, 2021
by
dasharatha.vamshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sonarlint
parent
98f9996d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
main.py
main.py
+4
-3
random_forest.pkl
random_forest.pkl
+0
-0
scripts/common/config_parser.py
scripts/common/config_parser.py
+0
-3
No files found.
main.py
View file @
e612691e
import
traceback
import
traceback
from
scripts.common.config_parser
import
*
from
scripts.common.config_parser
import
config
from
scripts.common.constants
import
ModelObjectConstants
,
ComponentExceptions
from
scripts.common.constants
import
ModelObjectConstants
,
ComponentExceptions
from
scripts.common.logsetup
import
logger
from
scripts.common.logsetup
import
logger
from
sklearn.ensemble
import
RandomForestRegressor
from
sklearn.ensemble
import
RandomForestRegressor
import
pickle
import
pickle
import
os
class
ModelObject
:
class
ModelObject
:
...
@@ -21,7 +22,7 @@ class ModelObject:
...
@@ -21,7 +22,7 @@ class ModelObject:
return
True
return
True
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
info
(
traceback
.
format_exc
())
logger
.
info
(
traceback
.
format_exc
())
raise
Exception
(
e
)
raise
FileNotFoundError
(
e
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
@@ -37,6 +38,6 @@ if __name__ == '__main__':
...
@@ -37,6 +38,6 @@ if __name__ == '__main__':
else
:
else
:
logger
.
info
(
"Model Object Download Component Failed"
)
logger
.
info
(
"Model Object Download Component Failed"
)
logger
.
info
(
traceback
.
format_exc
())
logger
.
info
(
traceback
.
format_exc
())
except
:
except
Exception
as
e
:
logger
.
info
(
"Model Object Download Component Failed"
)
logger
.
info
(
"Model Object Download Component Failed"
)
logger
.
info
(
traceback
.
format_exc
())
logger
.
info
(
traceback
.
format_exc
())
random_forest.pkl
deleted
100644 → 0
View file @
98f9996d
File deleted
scripts/common/config_parser.py
View file @
e612691e
...
@@ -54,9 +54,6 @@ ENABLE_LOGSTASH_LOG = os.environ.get("ENABLE_LOGSTASH_LOG", 'False').lower()
...
@@ -54,9 +54,6 @@ ENABLE_LOGSTASH_LOG = os.environ.get("ENABLE_LOGSTASH_LOG", 'False').lower()
LOGSTASH_HOST
=
_config
.
get
(
'SERVICE_CONFIG'
,
{})
.
get
(
'LOGSTASH_HOST'
)
LOGSTASH_HOST
=
_config
.
get
(
'SERVICE_CONFIG'
,
{})
.
get
(
'LOGSTASH_HOST'
)
LOGSTASH_PORT
=
str
(
_config
.
get
(
'SERVICE_CONFIG'
,
{})
.
get
(
'LOGSTASH_PORT'
))
LOGSTASH_PORT
=
str
(
_config
.
get
(
'SERVICE_CONFIG'
,
{})
.
get
(
'LOGSTASH_PORT'
))
# os.environ['azure_file_path'] = '/data/model/tested/test1.pkl'
# os.environ['local_file_path'] = r'E:\iLens-AI\azure-file-download\StandardScaler.pkl'
config
=
{
config
=
{
'pipeline_id'
:
pipeline_id
,
'pipeline_id'
:
pipeline_id
,
'run_id'
:
run_id
,
'run_id'
:
run_id
,
...
...
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