Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

purge unused code #5154

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions python/fate/arch/dataframe/_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,6 @@ def bucketize(self, boundaries: Union[dict, pd.DataFrame]) -> "DataFrame":

return bucketize(self, boundaries)

def hist(self, targets):
from .ops._histogram import hist

return hist(self, targets)

def distributed_hist_stat(self,
histogram_builder: "HistogramBuilder",
position: "DataFrame" = None,
Expand Down
22 changes: 0 additions & 22 deletions python/fate/arch/dataframe/ops/_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import typing
from typing import Union

from fate.arch.tensor.inside import Hist

from .._dataframe import DataFrame
from ..manager import BlockType, DataManager
Expand All @@ -27,27 +26,6 @@
from fate.arch.histogram import DistributedHistogram, HistogramBuilder


def hist(df: DataFrame, targets):
data_manager = df.data_manager
column_names = data_manager.infer_operable_field_names()

block_table, data_manager = _try_to_compress_table(df.block_table, data_manager, force_compress=True)
block_id = data_manager.infer_operable_blocks()[0]

def _mapper(blocks, target, bid: int = None):
histogram = Hist(column_names)
histogram.update(blocks[bid], target)

return histogram

def _reducer(l_histogram, r_histogram):
return l_histogram.merge(r_histogram)

_mapper_func = functools.partial(_mapper, bid=block_id)

return block_table.join(targets.shardings._data, _mapper_func).reduce(_reducer)


def distributed_hist_stat(df: DataFrame, histogram_builder: "HistogramBuilder", position: DataFrame, targets: Union[dict, DataFrame]) -> "DistributedHistogram":
block_table, data_manager = _try_to_compress_table(df.block_table, df.data_manager, force_compress=True)
data_block_id = data_manager.infer_operable_blocks()[0]
Expand Down
1 change: 0 additions & 1 deletion python/fate/arch/tensor/inside/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from ._op_hist import Hist
from ._op_quantile import GKSummary
83 changes: 0 additions & 83 deletions python/fate/arch/tensor/inside/_op_hist.py

This file was deleted.