Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching of datasets in DataSilo #177

Merged
merged 3 commits into from
Dec 19, 2019
Merged

Add caching of datasets in DataSilo #177

merged 3 commits into from
Dec 19, 2019

Conversation

tanaysoni
Copy link
Contributor

No description provided.

self._initialize_data_loaders()

def _get_checkpoint_checksum(self):
checkpoint_dict = {
"train_filename": self.processor.train_filename
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.processor.train_filename could be similar for different datasets.
We might want to cache dependant on the data dir (or data_dir + train_filename) passed to the processor, because this should be good identifiers for a dataset

def _save_dataset_to_cache(self):
checksum = self._get_checkpoint_checksum()

cache_dir = Path(f"cache/data_silo_{checksum}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about adding the data_dir here so people understand what kind of data lies in cache?

Copy link
Contributor

@Timoeller Timoeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@Timoeller Timoeller removed the request for review from tholor December 18, 2019 14:23
@tanaysoni tanaysoni merged commit fc824ff into master Dec 19, 2019
@tholor tholor deleted the cache_dataset branch April 28, 2020 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants