class_docstr: Partitioning strategy that splits vertices into equal sized buckets of random entities from the graph.
  
  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 RandomVerticesGraphPartitioner
  >>> 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 = RandomVerticesGraphPartitioner(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
  
  Example
  -------
  >>> import numpy as np
  >>> from ampligraph.datasets.graph_partitioner import GraphDataLoader, RandomVerticesGraphPartitioner
  >>> d = np.array([[1,1,2], [1,1,3],[1,1,4],[5,1,3],[5,1,2],[6,1,3],[6,1,2],[6,1,4],[6,1,7]])
  >>> data = GraphDataLoader(d, batch_size=1, dataset_type="test")
  >>> partitioner = RandomVerticesGraphPartitioner(data, k=2)
  >>> for i, partition in enumerate(partitioner):
  >>>    print("partition ", i)
  >>>    for batch in partition:
  >>>        print(batch)
class_docstr_tok: ["Partitioning","strategy","that","splits","vertices","into","equal","sized","buckets","of","random","entities","from","the","graph",".","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","RandomVerticesGraphPartitioner",">",">",">","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","=","RandomVerticesGraphPartitioner","(","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","Example","--","--","--","-",">",">",">","import","numpy","as","np",">",">",">","from","ampligraph.datasets.graph_partitioner","import","GraphDataLoader",",","RandomVerticesGraphPartitioner",">",">",">","d","=","np.array","(","[","[","1,1,2","]",",","[","1,1,3","]",",","[","1,1,4","]",",","[","5,1,3","]",",","[","5,1,2","]",",","[","6,1,3","]",",","[","6,1,2","]",",","[","6,1,4","]",",","[","6,1,7","]","]",")",">",">",">","data","=","GraphDataLoader","(","d",",","batch_size=1",",","dataset_type=","''","test","''",")",">",">",">","partitioner","=","RandomVerticesGraphPartitioner","(","data",",","k=2",")",">",">",">","for","i",",","partition","in","enumerate","(","partitioner",")",":",">",">",">","print","(","``","partition","``",",","i",")",">",">",">","for","batch","in","partition",":",">",">",">","print","(","batch",")"]
docstr: Initialise the RandomVerticesGraphPartitioner.
  
  Parameters
  ----------
  data: GraphDataLoader
      Input data provided as a GraphDataLoader.
  k: int
      Number of buckets to split entities (i.e., vertices) into.
  seed: int
      Seed to be used during partitioning.
docstr_tok: ["Initialise","the","RandomVerticesGraphPartitioner",".","Parameters","--","--","--","--","--","data",":","GraphDataLoader","Input","data","provided","as","a","GraphDataLoader",".","k",":","int","Number","of","buckets","to","split","entities","(","i.e.",",","vertices",")","into",".","seed",":","int","Seed","to","be","used","during","partitioning","."]
code: def __init__(self, data, k=2, seed=None, **kwargs):
      """Initialise the RandomVerticesGraphPartitioner.
  
      Parameters
      ----------
      data: GraphDataLoader
          Input data provided as a GraphDataLoader.
      k: int
          Number of buckets to split entities (i.e., vertices) into.
      seed: int
          Seed to be used during partitioning.
  
      """
      self._data = data
      self._k = k
      self.partitions = []
      super().__init__(data, k, **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 RandomVerticesGraphPartitioner object from inherited base classes: AbstractGraphPartitioner with example: obj = RandomVerticesGraphPartitioner(data, k, seed)