Commit eeb3bfc2 authored by 桂秋月's avatar 桂秋月

1

parent 1b52af81
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="65ec9bc1-9334-4fb0-a73d-621c8e760de6" name="Default Changelist" comment=""> <list default="true" id="65ec9bc1-9334-4fb0-a73d-621c8e760de6" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model_data_test/settings.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_data_test/settings.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/logs/2022-02-09.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/2022-02-09.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model_data_api/handler/Automatic_Handler.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_data_api/handler/Automatic_Handler.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model_data_api/handler/logic.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_data_api/handler/logic.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model_data_api/model/base_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_data_api/model/base_model.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ class AutomaticHandler(BaseHandler): ...@@ -23,7 +23,7 @@ class AutomaticHandler(BaseHandler):
self.auto_feature = [] self.auto_feature = []
self.auto_dataset = {"data_basic":{"model_name":self.model_name,"count":self.user_count}, self.auto_dataset = {"data_basic":{"model_name":self.model_name,"count":self.user_count},
"data_detail":[]} "data_detail":[]}
#try : try :
url = 'http://rc-model-exec.quantgroups.com/manage/features' url = 'http://rc-model-exec.quantgroups.com/manage/features'
r = requests.post(url,data={'codes':self.model_name}) r = requests.post(url,data={'codes':self.model_name})
if r.status_code == 200: if r.status_code == 200:
...@@ -38,20 +38,20 @@ class AutomaticHandler(BaseHandler): ...@@ -38,20 +38,20 @@ class AutomaticHandler(BaseHandler):
)) ))
self.flush() self.flush()
self.finish() self.finish()
# except: except:
# self.write(JsonUtil.build_json_data(code=500, self.write(JsonUtil.build_json_data(code=500,
# message="特征列表获取失败", message="特征列表获取失败",
# result = [], result = [],
# json_path = '' json_path = ''
# )) ))
# self.flush() self.flush()
# self.finish() self.finish()
# else: else:
# self.write(JsonUtil.build_json_data(code=JsonUtil.Constants.Code_Param_Error, self.write(JsonUtil.build_json_data(code=JsonUtil.Constants.Code_Param_Error,
# message=JsonUtil.Constants.Msg_Param_Error message=JsonUtil.Constants.Msg_Param_Error
# )) ))
# self.flush() self.flush()
# self.finish() self.finish()
def get_auto(self): def get_auto(self):
modelsData = ModelsDataManager() modelsData = ModelsDataManager()
......
...@@ -178,7 +178,7 @@ def add_userTest_logic(session,file_path,common,count,isTrue=True): ...@@ -178,7 +178,7 @@ def add_userTest_logic(session,file_path,common,count,isTrue=True):
if not isTrue: if not isTrue:
_df_result['batch_uuid'] = _df_result['batch_uuid'] .apply(lambda x : hashlib.md5(str(datetime.datetime.now()).encode(encoding='UTF-8')).hexdigest()) _df_result['batch_uuid'] = _df_result['batch_uuid'] .apply(lambda x : hashlib.md5(str(datetime.datetime.now()).encode(encoding='UTF-8')).hexdigest())
else: else:
uuid_path=get_path(common,'DATA','uuid1.csv') uuid_path=get_path(common,'DATA','uuid.csv')
temp_uuid=pd.read_csv(uuid_path,encoding='utf-8')['uuid'] temp_uuid=pd.read_csv(uuid_path,encoding='utf-8')['uuid']
_df_result['batch_uuid']=temp_uuid[:int(count)] _df_result['batch_uuid']=temp_uuid[:int(count)]
# print('uuid==',_df_result['batch_uuid']) # print('uuid==',_df_result['batch_uuid'])
......
...@@ -62,7 +62,7 @@ class BaseManager: ...@@ -62,7 +62,7 @@ class BaseManager:
def get_json(self,result): def get_json(self,result):
logging.info('base result:'+str(result)+str(type(result))) logging.info('base result:'+str(result)+str(type(result)))
#try: try:
if isinstance(result, Iterable): if isinstance(result, Iterable):
tmp = [dict(zip(res.__dict__.keys(), res.__dict__.values())) for res in result] tmp = [dict(zip(res.__dict__.keys(), res.__dict__.values())) for res in result]
for t in tmp: for t in tmp:
...@@ -71,9 +71,9 @@ class BaseManager: ...@@ -71,9 +71,9 @@ class BaseManager:
tmp = dict(zip(result.__dict__.keys(), result.__dict__.values())) tmp = dict(zip(result.__dict__.keys(), result.__dict__.values()))
tmp.pop('_sa_instance_state') tmp.pop('_sa_instance_state')
return tmp return tmp
# except BaseException as e: except BaseException as e:
# print(e.args) print(e.args)
# raise TypeError('Type error of parameter') raise TypeError('Type error of parameter')
# def __default__(self,obj): # def __default__(self,obj):
# if isinstance(obj, datetime): # if isinstance(obj, datetime):
......
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