Skip to content

Cache results from Evaluator #126

Open

Description

@lewtun

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

  1. ola13 commented on Jun 7, 2022

    @ola13
    Contributor

    Can you share code pointers for caching in datasets?

  2. lewtun commented on Jun 7, 2022

    @lewtun
    MemberAuthor

    Can you share code pointers for caching in datasets?

    Sure! You can check out the _map_single() method for Dataset objects: https://github.com/huggingface/datasets/blob/747f0c8612d4929dbdd1c72cca201815911ce660/src/datasets/arrow_dataset.py#L2561

    Basically, it checks if the Dataset object has a cache_files object, and then returns a Dataset from file instead of re-computing the map function

  3. self-assigned this
    on Jun 8, 2022
  4. ola13 commented on Jun 8, 2022

    @ola13
    Contributor

    Cool I'd be happy to take a look in the next week or two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions