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 NLP Algorithms Tests #1839

Merged
merged 49 commits into from
Jan 17, 2023
Merged

Conversation

nik-mosaic
Copy link
Contributor

@nik-mosaic nik-mosaic commented Dec 19, 2022

What does this PR do?

This PR updates many algorithms tests to run on NLP models, as guided by our NLP testing plan: https://www.notion.so/NLP-74e31fb2d8f0472e9fcd6fd98dd67686

The testing plan states that all algorithms that support NLP models should have tests that run on a HuggingFace BERT model and a Simple Transformer model.

Note: Tests for Stochastic Weight Averaging do not exist, but should be implemented by the original author. That is outside the scope of this PR (JIRA: CO-1611)

All other algorithms NLP algorithms are included in this PR. However, test_factorize_algorithm.py fails on some SimpleTransformer model tests. The Factorize algorithm needs to be improved to account for this. Included in this PR is updated documentation making clear its shortcoming (JIRA: CO-1612)

Additional PRs will include tests for exporting NLP models.

@nik-mosaic nik-mosaic requested a review from dakinggg December 19, 2022 17:42
@nik-mosaic nik-mosaic changed the title Nikhil/nlp testing Add NLP Algorithms Tests Dec 19, 2022
Copy link
Contributor

@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.

Mostly looks good, thanks! Left a bunch of minor comments. Also, for any of the follow up work you mention in the PR description, if you could make a JIRA and link it that would be great. Lastly, I think we still need to add some stuff for Alibi and SeqLengthWarmup in tests/algorithms/algorithm_settings.py. These are used for the tests that test all algorithms. Maybe this is coming in your export PR/commits though

tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/algorithms/test_seq_length_warmup.py Outdated Show resolved Hide resolved
tests/algorithms/test_seq_length_warmup.py Outdated Show resolved Hide resolved
tests/algorithms/test_gradient_clipping.py Outdated Show resolved Hide resolved
tests/algorithms/test_gradient_clipping.py Outdated Show resolved Hide resolved
tests/algorithms/test_gradient_clipping.py Show resolved Hide resolved
Copy link
Contributor

@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, left a couple small comments. Thanks!

tests/common/datasets.py Outdated Show resolved Hide resolved
tests/algorithms/test_factorize_algorithm.py Show resolved Hide resolved
@nik-mosaic nik-mosaic marked this pull request as ready for review January 17, 2023 23:05
@nik-mosaic nik-mosaic requested a review from dskhudia as a code owner January 17, 2023 23:05
@nik-mosaic nik-mosaic merged commit c992304 into mosaicml:dev Jan 17, 2023
@nik-mosaic nik-mosaic deleted the nikhil/nlp-testing branch January 17, 2023 23:07
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