You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running an evaluation with the Evaluator class, it would be great to cache the results (e.g. store them as an Arrow dataset) so that one doesn't have to wait to recompute everything each time.
This would also give evaluate a similar developer experience to datasets and allow users to leverage the intuitions from one lib to the other :)
Activity
ola13 commentedon Jun 7, 2022
Can you share code pointers for caching in
datasets?lewtun commentedon Jun 7, 2022
Sure! You can check out the
_map_single()method forDatasetobjects: https://github.com/huggingface/datasets/blob/747f0c8612d4929dbdd1c72cca201815911ce660/src/datasets/arrow_dataset.py#L2561Basically, it checks if the
Datasetobject has acache_filesobject, and then returns aDatasetfrom file instead of re-computing the map functionola13 commentedon Jun 8, 2022
Cool I'd be happy to take a look in the next week or two