class_docstr: Partitioning strategy that splits edges into equal size
  partitions randomly drawing triples from the data.
  
  Example
  -------
  >>> from ampligraph.datasets imoprt load_fb15k_237
  >>> from ampligraph.datasets import GraphDataLoader
  >>> from ampligraph.datasets.sqlite_adapter import SQLiteAdapter
  >>> from ampligraph.datasets.graph_partitioner import RandomEdgesGraphPartitioner
  >>> from ampligraph.latent_features import ScoringBasedEmbeddingModel
  >>> dataset = load_fb15k_237()
  >>> dataset_loader = GraphDataLoader(dataset['train'],
  >>>                                  backend=SQLiteAdapter, # type of backend to use
  >>>                                  batch_size=2,          # batch size to use while iterating over this dataset
  >>>                                  dataset_type='train',  # dataset type
  >>>                                  use_filter=False,      # Whether to use filter or not
  >>>                                  use_indexer=True)      # indicates that the data needs to be mapped to index
  >>> partitioner = RandomEdgesGraphPartitioner(dataset_loader, k=2)
  >>> # create and compile a model as usual
  >>> partitioned_model = ScoringBasedEmbeddingModel(eta=2,
  >>>                                                k=50,
  >>>                                                scoring_type='DistMult')
  >>>
  >>> partitioned_model.compile(optimizer='adam', loss='multiclass_nll')
  >>>
  >>> partitioned_model.fit(partitioner,            # pass the partitioner object as input to the fit function this will generate data for the model during training
  >>>                       epochs=10)              # number of epochs
class_docstr_tok: ["Partitioning","strategy","that","splits","edges","into","equal","size","partitions","randomly","drawing","triples","from","the","data",".","Example","--","--","--","-",">",">",">","from","ampligraph.datasets","imoprt","load_fb15k_237",">",">",">","from","ampligraph.datasets","import","GraphDataLoader",">",">",">","from","ampligraph.datasets.sqlite_adapter","import","SQLiteAdapter",">",">",">","from","ampligraph.datasets.graph_partitioner","import","RandomEdgesGraphPartitioner",">",">",">","from","ampligraph.latent_features","import","ScoringBasedEmbeddingModel",">",">",">","dataset","=","load_fb15k_237","(",")",">",">",">","dataset_loader","=","GraphDataLoader","(","dataset","[","'train","'","]",",",">",">",">","backend=SQLiteAdapter",",","#","type","of","backend","to","use",">",">",">","batch_size=2",",","#","batch","size","to","use","while","iterating","over","this","dataset",">",">",">","dataset_type='train","'",",","#","dataset","type",">",">",">","use_filter=False",",","#","Whether","to","use","filter","or","not",">",">",">","use_indexer=True",")","#","indicates","that","the","data","needs","to","be","mapped","to","index",">",">",">","partitioner","=","RandomEdgesGraphPartitioner","(","dataset_loader",",","k=2",")",">",">",">","#","create","and","compile","a","model","as","usual",">",">",">","partitioned_model","=","ScoringBasedEmbeddingModel","(","eta=2",",",">",">",">","k=50",",",">",">",">","scoring_type='DistMult","'",")",">",">",">",">",">",">","partitioned_model.compile","(","optimizer='adam","'",",","loss='multiclass_nll","'",")",">",">",">",">",">",">","partitioned_model.fit","(","partitioner",",","#","pass","the","partitioner","object","as","input","to","the","fit","function","this","will","generate","data","for","the","model","during","training",">",">",">","epochs=10",")","#","number","of","epochs"]
docstr: Initialise the RandomEdgesGraphPartitioner.
  
  Parameters
  ----------
  data: GraphDataLoader
      Input data as a GraphDataLoader.
  k: int
      Number of buckets to split entities (i.e., vertices) into.
docstr_tok: ["Initialise","the","RandomEdgesGraphPartitioner",".","Parameters","--","--","--","--","--","data",":","GraphDataLoader","Input","data","as","a","GraphDataLoader",".","k",":","int","Number","of","buckets","to","split","entities","(","i.e.",",","vertices",")","into","."]
code: def __init__(self, data, k=2, **kwargs):
      """Initialise the RandomEdgesGraphPartitioner.
  
      Parameters
      ----------
      data: GraphDataLoader
          Input data as a GraphDataLoader.
      k: int
          Number of buckets to split entities (i.e., vertices) into.
  
      """
      self.partitions = []
      self._data = data
      self._k = k
      super().__init__(data, k, random=True, index_by="", **kwargs)
  
imports: import logging
  import os
  import shelve
  import tempfile
  from abc import ABC
  from datetime import datetime
  import numpy
  from ampligraph.utils.profiling import timing_and_memory
  from .graph_data_loader import GraphDataLoader
label_desc: Use image node_id 1 to create a new RandomEdgesGraphPartitioner object from inherited base classes: EdgeBasedGraphPartitioner with example: obj = RandomEdgesGraphPartitioner(data, k)