Class - DataSplitter#

class openfl.utilities.data_splitters.data_splitter.DataSplitter[source]#

Bases: ABC

Base class for data splitting.

This class should be subclassed when creating specific data splitter classes.

__init__()#

Methods

__init__()

split(data, num_collaborators)

Split the data into a specified number of parts.

abstract split(data, num_collaborators)[source]#

Split the data into a specified number of parts.

Parameters:
  • data (Iterable[T]) – The data to be split.

  • num_collaborators (int) – The number of parts to split the data into.

Returns:

The split data.

Return type:

List[Iterable[T]]

Raises:

NotImplementedError – This is an abstract method and must be overridden in a subclass.