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

Custom Exceptions for Mosaic Logger #1014

Merged
merged 28 commits into from
Mar 26, 2024
Merged

Conversation

jjanezhang
Copy link
Contributor

@jjanezhang jjanezhang commented Mar 6, 2024

Creates custom exceptions to label all user solvable errors in the finetuning run path. Logs exceptions in these areas using the MosaicML logger.

Manually tested by running ft yaml with missing train split.
image

Dependent on: mosaicml/composer#3089

@jjanezhang jjanezhang self-assigned this Mar 8, 2024
@jjanezhang jjanezhang marked this pull request as ready for review March 11, 2024 20:51
@jjanezhang
Copy link
Contributor Author

I could move the new conversation chat tests to the test_teamplate_tokenization.py file if that's more relevant?

Copy link
Collaborator

@dakinggg dakinggg left a comment

Choose a reason for hiding this comment

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

lgtm, would like a second pair of eyes just because its touching so many places cc @irenedea

llmfoundry/data/finetuning/tasks.py Outdated Show resolved Hide resolved
scripts/train/train.py Show resolved Hide resolved
tests/test_utils.py Show resolved Hide resolved
llmfoundry/utils/exceptions.py Show resolved Hide resolved
llmfoundry/utils/exceptions.py Show resolved Hide resolved
llmfoundry/data/finetuning/tasks.py Outdated Show resolved Hide resolved
llmfoundry/utils/exceptions.py Show resolved Hide resolved
scripts/train/train.py Show resolved Hide resolved
scripts/data_prep/convert_text_to_mds.py Outdated Show resolved Hide resolved
scripts/data_prep/convert_text_to_mds.py Outdated Show resolved Hide resolved
@jjanezhang jjanezhang requested a review from a team as a code owner March 25, 2024 18:43
@jjanezhang jjanezhang merged commit 0ef7cd6 into main Mar 26, 2024
9 checks passed
KuuCi pushed a commit that referenced this pull request Apr 18, 2024
* flagged areas to throw ft errors + added custom exception

* added exceptions for all files

* fixed type of invalid type errors

* fixed merge

* added exceptions for all files

* fixed merge

* added a catch for missing hf url

* expain dataloader catch to all error types

* added tests for custom exceptions

* fixed a couple tests

* fixed some more tests

* addressed comments

* fixed formatting, updated split correction, moved logger setup into helper

* added check for repeating roles

* more strict checking for prompt response type

* removed some cases we don't need

* updated name of unknown conversation type error

* formatting

* Fix multi model eval (#1055)

* resolved merge conflict

* formatted

* added back two imports

* formatting changes

* formatted again

* sorted imports

* diable yapf for exceptions import

* disabled yapf on test dataloader

---------

Co-authored-by: Daniel King <43149077+dakinggg@users.noreply.github.com>
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.

3 participants