relevanceai.utils.concurrency#

Multithreading Module

Module Contents#

relevanceai.utils.concurrency.chunk(iterables, n=20)#
relevanceai.utils.concurrency.multithread(func, iterables, max_workers=2, chunksize=20, show_progress_bar: bool = False)#
relevanceai.utils.concurrency.multiprocess(func, iterables, max_workers=2, chunksize=20, post_func_hook: Callable = None, show_progress_bar: bool = False, process_args: tuple = ())#
relevanceai.utils.concurrency.multiprocess_list(func, iterables, max_workers=2, chunksize=1, post_func_hook: Callable = None, show_progress_bar: bool = False, process_args: tuple = ())#
class relevanceai.utils.concurrency.Push(dataset, func: Callable, documents: List[Dict[str, Any]], func_kwargs: Dict[str, Any], chunksize: Optional[int] = None, max_workers: Optional[int] = None, background_execution: bool = False)#
property failed_ids(self) List[str]#
run(self) Tuple[int, List[str]]#