Skip to content

Commit

Permalink
Merge branch 'dev-2.0.0-beta' of https://github.com/FederatedAI/FATE
Browse files Browse the repository at this point in the history
…into feature-2.0.0-glm
  • Loading branch information
nemirorox committed May 22, 2023
2 parents 693ec96 + 4fca204 commit 30a00a3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions python/fate/arch/dataframe/_frame_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def to_frame(self, ctx, path):
label_name=self._label_name,
label_type=self._label_type,
weight_name=self._weight_name,
dtype=self._dtype,
partition=self._partition,
).to_frame(ctx, df)

Expand Down
1 change: 1 addition & 0 deletions python/fate/arch/dataframe/io/_json_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def _serialize(ctx, data):
# import pandas as pd
# print((data[["x0", "x1"]] * pd.Series([1,2])).as_pd_df())
# print((data[["x0", "x1"]] + pd.Series([1,2])).as_pd_df())
# print((data[["x0", "x1"]] + pd.Series([1.0,2.0], index=["x1", "x0"])).as_pd_df())
# print(DataFrame.hstack([data, empty_df]).as_pd_df())
# print(DataFrame.vstack([data, data * 3]).as_pd_df())
# print(data.values.as_tensor())
Expand Down
2 changes: 1 addition & 1 deletion python/fate/arch/dataframe/manager/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def promote_types(self, to_promote_blocks: list):
for bid, block_type in to_promote_blocks:
self._block_manager.blocks[bid] = self._block_manager.blocks[bid].convert_block_type(block_type)
for field_index in self._block_manager.blocks[bid].field_indexes:
self._schema_manager.set_field_type_by_offset(field_index, block_type.value())
self._schema_manager.set_field_type_by_offset(field_index, block_type.value)

def compress_blocks(self):
new_blocks, to_compress_block_loc, non_compress_block_changes = self._block_manager.compress()
Expand Down
2 changes: 1 addition & 1 deletion python/fate/arch/dataframe/ops/_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _merge_blocks(src_blocks, bids=None, fields=None):
indexes = [fields[i][1]]
j = i + 1
while j < len(fields) and bid == fields[j][0] and indexes[-1] + 1 == fields[j][1]:
indexes.append(fields[1])
indexes.append(fields[j][1])
j += 1

tensors.append(src_blocks[bid][:, indexes])
Expand Down
2 changes: 1 addition & 1 deletion python/fate/arch/dataframe/ops/utils/series_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def series_to_ndarray(series_obj: "pd.Series", fields_to_align: List[str]=None):

indexer = series_obj.index.get_indexer(fields_to_align)

return series_obj[indexer]
return series_obj[indexer].values


def series_to_list(series_obj: "pd.Series", fields_to_align: List[str]=None):
Expand Down

0 comments on commit 30a00a3

Please sign in to comment.