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 dataset % sample num equally distribute #3976

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Katehuuh
Copy link
Contributor

@Katehuuh Katehuuh commented May 30, 2024

What does this PR do?

Update #3829 to num_samples include % of dataset and equally distribute the selection.

Useful when the max number of num_samples is unknown.

Before submitting

Edit1: untested yet Tested!

@hiyouga hiyouga added the pending This problem is yet to be addressed label May 30, 2024
@hiyouga hiyouga self-requested a review May 30, 2024 08:52
@Katehuuh
Copy link
Contributor Author

Katehuuh commented Jun 20, 2024

Tested using pair QA dataset, 20epoch

sampleDiffAppleOrange.json:

[
    {
        "instruction": "Which fruit is preferred by Katehuuh?",
        "input": "",
        "output": "Katehuuh prefers apples."
    },
    {
        "instruction": "Can you tell me Katehuuh's favorite fruit?",
        "input": "",
        "output": "Orange is the favorite fruit of Katehuuh."
    },
...

dataset_info.json:

  "sampleDiffAppleOrange": {
    "file_name": "sampleDiffAppleOrange.json",
    "num_samples": "50%",
    "formatting": "alpaca"
  },

"num_samples": "50%" will skip one of the two sample so answer only apples.

@Katehuuh
Copy link
Contributor Author

@hiyouga oi, mind checking PR? 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending This problem is yet to be addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants