examples/research_projects/rag-end2end-retriever/distributed_ray_retriever.py/RagRayDistributedRetriever/re_load
class RagRayDistributedRetriever:    def re_load(self):

        logger.info("re-loading the new dataset with embeddings")
        # access from the training loop

        ray.get([worker.clear_object.remote() for worker in self.retrieval_workers])

        # build the index object again
        index = self._build_index(self.config)

        ray.get(
            [
                worker.create_rag_retriever.remote(
                    self.config, self.question_encoder_tokenizer, self.generator_tokenizer, index
                )
                for worker in self.retrieval_workers
            ]
        )