Download the documents of IOM evaluations, one folder per evaluation
download_eval saves every document of an Evaluation in dst/<id>/, named after the last part of its URL. Report.download in the pipeline uses it. download_evals runs it on many evaluations in parallel. Both read the evaluation’s fields through cfg, which defaults to default_config.
def download_eval(eval:iomeval.readers.Evaluation, # Evaluation whose documents to download dst:str='files/test/eval_reports', # Folder to create the evaluation's folder in cfg:dict={'id': 'id', 'docs': 'docs', 'url': 'url'}, # Names of the `id`, `docs` and `url` fields)->pathlib.Path: # The evaluation's folder, `dst/<id>/`
Download every document of eval to dst/<id>/, overwriting files with the same name
def download_evals( evals:fastcore.foundation.L, # Evaluations, or a single `Evaluation` dst:str='files/test/eval_reports', # Folder to create the evaluations' folders in cfg:dict={'id': 'id', 'docs': 'docs', 'url': 'url'}, # Names of the `id`, `docs` and `url` fields n_workers:int=4, # Number of parallel downloads)->fastcore.foundation.L: # The evaluations' folders
Download the documents of evals in parallel, one folder per evaluation