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

Initial test suite setup #1669

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

colesmcintosh
Copy link

This PR introduces a test suite.

Testing Infrastructure

  1. Kernel Testing Suite:

    • Implemented comprehensive test_kernels.py for unit testing kernel modules
    • Added tests for critical components: cross_entropy_loss, fast_lora, flex_attention, geglu, layernorm, rms_layernorm, rope_embedding, and swiglu
    • Included smoke tests and forward pass checks
    • Added graceful handling for CUDA unavailability
  2. Model Testing Suite:

    • Created test_models.py for validating model module imports
    • Implemented parameterized tests for thorough model import validation
    • Added smoke tests to verify unsloth.models package integrity
    • Implemented graceful handling of NVIDIA GPU availability in tests

Repository Management

  • Added .gitignore file for better version control

These changes significantly improve the testing coverage and development workflow while ensuring robust handling of dependencies and hardware configurations.

@shimmyshimmer
Copy link
Collaborator

Thank you for this. We'll take a look

@darkacorn
Copy link

darkacorn commented Feb 12, 2025

i think the idea is correct

however .. - i think we have to test in isolation with different versions as even if the core unit it self passes .. dependencies may fail

a ci/cd pipeline test with different cuda versions would probably be the higher value - and we could run that with github runners

happy to hear other input on that - but i agree .. more automated unit / integration testing is a good idea going forward

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