Commit e612691e authored by dasharatha.vamshi's avatar dasharatha.vamshi

sonarlint

parent 98f9996d
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.logsetup import logger
from sklearn.ensemble import RandomForestRegressor
import pickle
import os
class ModelObject:
......@@ -21,7 +22,7 @@ class ModelObject:
return True
except Exception as e:
logger.info(traceback.format_exc())
raise Exception(e)
raise FileNotFoundError(e)
if __name__ == '__main__':
......@@ -37,6 +38,6 @@ if __name__ == '__main__':
else:
logger.info("Model Object Download Component Failed")
logger.info(traceback.format_exc())
except:
except Exception as e:
logger.info("Model Object Download Component Failed")
logger.info(traceback.format_exc())
......@@ -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_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 = {
'pipeline_id': pipeline_id,
'run_id': run_id,
......
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