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

Complete improvements of download script. #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

populated
Copy link

I modified the script to utilize data classes, JSON serialization, and the tqdm library, ensuring a seamless and informative data download process. It also offers options to specify data sizes, splits, and target example counts. (cool, cool!)

Little list of changes:

  1. Added a data class (ChatData) for structuring GPT-related data.
  2. Implemented a JSON encoder (ChatDataEncoder) for custom serialization.
  3. Created a class (GPTData) to manage data download, processing, and saving.
  4. Introduced methods for validating data sizes and splits.
  5. Utilized tqdm for a progress bar during data download.
  6. Provided options for truncating data based on a target example count.

Usage (I thought this was necessary, soooo):

gpt_data = GPTData(target_examples=None)
gpt_data.download_and_save_data(data_size_fn='webtext', split_fn='train')

Testing:

It works perfectly—I've tested all sizes and splits. I also tried various example sizes and all in general. It worked flawlessly on my local machine (Linux).

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.

1 participant