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

Datasets tutorial improvements #994

Merged
merged 8 commits into from
May 21, 2024
Merged

Datasets tutorial improvements #994

merged 8 commits into from
May 21, 2024

Conversation

RdoubleA
Copy link
Contributor

@RdoubleA RdoubleA commented May 17, 2024

Context

What is the purpose of this PR? Is it to

  • add a new feature
  • fix a bug
  • update tests and/or documentation
  • other (please add here)

Please link to any issues this PR addresses.

Changelog

  • Add needed details around using local datasets, custom instruct/chat datasets, how to use built-in datasets, sample packing, and more all with python/config/CLI examples
  • Clean up some config utilities and let users specify any path for custom instruct templates or chat formats. This also needed to update some test utils
  • Make column optional in TextCompletionDataset for local datasets
  • Remove redundant truncate in tokenizer utils

Sample packing will have a dedicated page, so details on that are limited for now.

Test plan

doc build, pytest tests

Copy link

pytorch-bot bot commented May 17, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/994

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit a573b14 with merge base bbf0010 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 17, 2024
@joecummings
Copy link
Contributor

Screenshot 2024-05-17 at 9 35 51 AM

Long CLI commands are getting hard to understand. Might be good to break up over multiple lines with backslash operator.

@joecummings
Copy link
Contributor

Screenshot 2024-05-17 at 9 39 29 AM

PreferenceDataset is not added to our documentation, therefore the class isn't rendering here.

Copy link
Contributor

@pbontrager pbontrager left a comment

Choose a reason for hiding this comment

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

Really great tutorial updates. I've left some comments and questions, some of them just because this was my first time going through the tutorial. One concern I have with the way we're doing deepdives/tutorials is that we're putting a lot of important information here while our API references are pretty sparse. I'm afraid that people won't take the time to go through the tutorial and jump to what they're looking for in the api reference section.

docs/source/tutorials/datasets.rst Show resolved Hide resolved
docs/source/tutorials/datasets.rst Outdated Show resolved Hide resolved
docs/source/tutorials/datasets.rst Show resolved Hide resolved
docs/source/tutorials/datasets.rst Show resolved Hide resolved
docs/source/tutorials/datasets.rst Show resolved Hide resolved
docs/source/tutorials/datasets.rst Outdated Show resolved Hide resolved
docs/source/tutorials/datasets.rst Show resolved Hide resolved
docs/source/tutorials/datasets.rst Show resolved Hide resolved
docs/source/tutorials/datasets.rst Outdated Show resolved Hide resolved
torchtune/datasets/_chat.py Show resolved Hide resolved
Copy link
Contributor

@pbontrager pbontrager left a comment

Choose a reason for hiding this comment

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

Thanks for doing this and updating from all the comments.

@RdoubleA RdoubleA merged commit dc74267 into pytorch:main May 21, 2024
29 checks passed
@RdoubleA RdoubleA deleted the datadocs branch May 21, 2024 22:09
weifengpy pushed a commit to weifengpy/torchtune that referenced this pull request Jun 4, 2024
maximegmd pushed a commit to maximegmd/torchtune that referenced this pull request Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants