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

support using cached data and re-splitting for huggingface datasets #302

Merged
merged 5 commits into from
Aug 22, 2022

Conversation

yxdyc
Copy link
Collaborator

@yxdyc yxdyc commented Aug 8, 2022

support

  • using cached data for huggingface datasets;
  • re-splitting the GLUE versions into custom FL versions

@yxdyc yxdyc added the enhancement New feature or request label Aug 8, 2022
@yxdyc yxdyc requested review from rayrayraykk and xieyxclack August 8, 2022 12:22
Copy link
Collaborator

@rayrayraykk rayrayraykk left a comment

Choose a reason for hiding this comment

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

Good job, we could accelerate to load the huggingface data file with the cache.

tokenizer = AutoTokenizer.from_pretrained(
config.model.type.split('@')[0])

try:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why need a try here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In case of the cached file not existed

@@ -402,6 +413,7 @@ def load_torch_geometric_data(name, splits=None, config=None):

def load_huggingface_datasets_data(name, splits=None, config=None):
from datasets import load_dataset
from datasets import load_from_disk
Copy link
Collaborator

Choose a reason for hiding this comment

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

Merge Line 415 and Line 416.

Copy link
Collaborator

@rayrayraykk rayrayraykk left a comment

Choose a reason for hiding this comment

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

LGTM

@rayrayraykk rayrayraykk merged commit da04d7d into alibaba:master Aug 22, 2022
Schichael pushed a commit to Schichael/FederatedScope_thesis that referenced this pull request Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants