提交 505d7e7c 编写于 作者: X xiexionghang

add log

上级 39f301a1
...@@ -157,8 +157,9 @@ class TimeSplitDatasetHolder(DatasetHolder): ...@@ -157,8 +157,9 @@ class TimeSplitDatasetHolder(DatasetHolder):
if postfix.isdigit(): if postfix.isdigit():
if int(postfix) % node_num == node_idx: if int(postfix) % node_num == node_idx:
data_file_list.append(sub_file) data_file_list.append(sub_file)
elif hash(sub_file_name) % node_num == node_idx: else:
data_file_list.append(sub_file) if hash(sub_file_name) % node_num == node_idx:
data_file_list.append(sub_file)
time_window_mins = time_window_mins - self._split_interval time_window_mins = time_window_mins - self._split_interval
data_time = data_time + datetime.timedelta( data_time = data_time + datetime.timedelta(
minutes=self._split_interval) minutes=self._split_interval)
......
...@@ -18,6 +18,7 @@ import copy ...@@ -18,6 +18,7 @@ import copy
import os import os
import socket import socket
import sys import sys
import traceback
global_envs = {} global_envs = {}
...@@ -172,7 +173,9 @@ def lazy_instance_by_package(package, class_name): ...@@ -172,7 +173,9 @@ def lazy_instance_by_package(package, class_name):
globals(), locals(), package.split(".")) globals(), locals(), package.split("."))
instance = getattr(model_package, class_name) instance = getattr(model_package, class_name)
return instance return instance
except Exception,err: except Exception, err:
traceback.print_exc()
print('Catch Exception:%s' % str(err))
return None return None
...@@ -187,7 +190,9 @@ def lazy_instance_by_fliename(abs, class_name): ...@@ -187,7 +190,9 @@ def lazy_instance_by_fliename(abs, class_name):
globals(), locals(), package.split(".")) globals(), locals(), package.split("."))
instance = getattr(model_package, class_name) instance = getattr(model_package, class_name)
return instance return instance
except Exception,err: except Exception, err:
traceback.print_exc()
print('Catch Exception:%s' % str(err))
return None return None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册