old_contents: #
  #  Copyright 2019 The FATE Authors. All Rights Reserved.
  #
  #  Licensed under the Apache License, Version 2.0 (the "License");
  #  you may not use this file except in compliance with the License.
  #  You may obtain a copy of the License at
  #
  #      http://www.apache.org/licenses/LICENSE-2.0
  #
  #  Unless required by applicable law or agreed to in writing, software
  #  distributed under the License is distributed on an "AS IS" BASIS,
  #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  #  See the License for the specific language governing permissions and
  #  limitations under the License.
  #
  from arch.api.utils import log_utils
  from fate_flow.entity.metric import Metric, MetricMeta
  from federatedml.model_base import ModelBase
  from federatedml.param.data_split_param import DataSplitParam
  from federatedml.util import consts
  
  LOGGER = log_utils.getLogger()
  
  
  class DataSplitBase(ModelBase):
      def __init__(self):
          super().__init__()
          self.metric_name = "data_split"
          self.metric_namespace = "train"
          self.metric_type = "DATASPLIT"
          self.model_param = DataSplitParam()
          self.role = None
  
      def _init_model(self, params):
          self.random_state = params.random_state
          self.test_size = params.test_size
          self.train_size = params.train_size
          self.validate_size = params.validate_size
          self.stratified = params.stratified
          self.shuffle = params.shuffle
          self.bin_interval = params.bin_interval
          return
  
      def fit(self, data):
          return
  
  
      def save_data(self):
          return
  
  
  class HeteroDataSplit(DataSplitBase):
      def __init__(self):
          super().__init__()
  
  class HomoSplitGuest(DataSplitBase):
      def __init__(self):
          super().__init__()
  
new_contents: #
  #  Copyright 2019 The FATE Authors. All Rights Reserved.
  #
  #  Licensed under the Apache License, Version 2.0 (the "License");
  #  you may not use this file except in compliance with the License.
  #  You may obtain a copy of the License at
  #
  #      http://www.apache.org/licenses/LICENSE-2.0
  #
  #  Unless required by applicable law or agreed to in writing, software
  #  distributed under the License is distributed on an "AS IS" BASIS,
  #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  #  See the License for the specific language governing permissions and
  #  limitations under the License.
  #
  from arch.api.utils import log_utils
  from fate_flow.entity.metric import Metric, MetricMeta
  from federatedml.model_base import ModelBase
  from federatedml.param.data_split_param import DataSplitParam
  from federatedml.util import consts
  
  LOGGER = log_utils.getLogger()
  
  
  class DataSplitBase(ModelBase):
      def __init__(self):
          super().__init__()
          self.metric_name = "data_split"
          self.metric_namespace = "train"
          self.metric_type = "DATASPLIT"
          self.model_param = DataSplitParam()
          self.role = None
  
      def _init_model(self, params):
          self.random_state = params.random_state
          self.test_size = params.test_size
          self.train_size = params.train_size
          self.validate_size = params.validate_size
          self.stratified = params.stratified
          self.shuffle = params.shuffle
          self.bin_interval = params.bin_interval
          return
  
      def split(self, data, labels):
          return
  
  
      def fit(self, data):
          return
  
  
      def save_data(self):
          return
  
  
  class HeteroDataSplit(DataSplitBase):
      def __init__(self):
          super().__init__()
  
  class HomoSplitGuest(DataSplitBase):
      def __init__(self):
          super().__init__()
  
subject: edit data split