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

add log

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