File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
federatedml/statistic/union Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,11 @@ def check_is_data_instance(self, table):
9797 self .is_data_instance = isinstance (entry [1 ], Instance )
9898
9999 def fit (self , data ):
100- if len ( data ) <= 0 :
100+ if data is None :
101101 LOGGER .warning ("Union receives no data input." )
102102 return
103+ if not isinstance (data , dict ):
104+ data = {"data" : data }
103105 empty_count = 0
104106 combined_table = None
105107 combined_schema = None
@@ -156,7 +158,6 @@ def fit(self, data):
156158 metric_name = self .metric_name ,
157159 metric_meta = MetricMeta (name = self .metric_name , metric_type = self .metric_type ))
158160
159- LOGGER .debug ("after union schema: {}" .format (combined_table .schema ))
160-
161161 LOGGER .info ("Union operation finished. Total {} empty tables encountered." .format (empty_count ))
162162 return combined_table
163+
You can’t perform that action at this time.
0 commit comments