-
Notifications
You must be signed in to change notification settings - Fork 65
fix: Enabled GPU based tests #649
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
Merged
dushyantbehl
merged 7 commits into
foundation-model-stack:main
from
romitjain:fix/run-gpu-tests
Dec 16, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2c23201
Updated tox and pyproject
romitjain 850430f
Updates
romitjain a86c868
Updated ci/cd
romitjain ec5c79c
Added monkey patching
romitjain a90a3b4
Added copy for global args
romitjain 8abb968
Linting fixes
romitjain 2d6ff00
Fixed errors
romitjain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -263,10 +263,10 @@ def test_framework_raises_if_used_with_missing_package(): | |
| ValueError, match="No acceleration framework package found." | ||
| ): | ||
| sft_trainer.train( | ||
| MODEL_ARGS, | ||
| DATA_ARGS, | ||
| TRAIN_ARGS, | ||
| PEFT_LORA_ARGS, | ||
| copy.deepcopy(MODEL_ARGS), | ||
| copy.deepcopy(DATA_ARGS), | ||
| copy.deepcopy(TRAIN_ARGS), | ||
| copy.deepcopy(PEFT_LORA_ARGS), | ||
| quantized_lora_config=quantized_lora_config, | ||
| ) | ||
|
|
||
|
|
@@ -320,9 +320,9 @@ def test_framework_raises_due_to_invalid_arguments( | |
| with pytest.raises(exception, match=exception_msg): | ||
| sft_trainer.train( | ||
| model_args, | ||
| DATA_ARGS, | ||
| copy.deepcopy(DATA_ARGS), | ||
| train_args, | ||
| peft_config, | ||
| copy.deepcopy(peft_config), | ||
| quantized_lora_config=quantized_lora_config, | ||
| ) | ||
|
|
||
|
|
@@ -379,7 +379,7 @@ def test_framework_initialized_properly_peft( | |
| train_args = copy.deepcopy(TRAIN_ARGS) | ||
| train_args.output_dir = tempdir | ||
| train_args.save_strategy = "no" | ||
| train_args.fp16 = True | ||
| train_args.bf16 = True | ||
| peft_args = copy.deepcopy(PEFT_LORA_ARGS) | ||
| peft_args.target_modules = ["q_proj", "k_proj"] | ||
|
|
||
|
|
@@ -395,7 +395,7 @@ def test_framework_initialized_properly_peft( | |
| with instantiate_model_patcher(): | ||
| sft_trainer.train( | ||
| model_args, | ||
| DATA_ARGS, | ||
| copy.deepcopy(DATA_ARGS), | ||
| train_args, | ||
| peft_args, | ||
| quantized_lora_config=quantized_lora_config, | ||
|
|
@@ -430,7 +430,7 @@ def test_framework_initialized_properly_foak(): | |
| train_args = copy.deepcopy(TRAIN_ARGS) | ||
| train_args.output_dir = tempdir | ||
| train_args.save_strategy = "no" | ||
| train_args.fp16 = True | ||
| train_args.bf16 = True | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same reason as above |
||
| peft_args = copy.deepcopy(PEFT_LORA_ARGS) | ||
| peft_args.target_modules = ["q_proj", "k_proj"] | ||
|
|
||
|
|
@@ -465,7 +465,7 @@ def test_framework_initialized_properly_foak(): | |
| with instantiate_model_patcher(): | ||
| sft_trainer.train( | ||
| model_args, | ||
| DATA_ARGS, | ||
| copy.deepcopy(DATA_ARGS), | ||
| train_args, | ||
| peft_args, | ||
| quantized_lora_config=quantized_lora_config, | ||
|
|
@@ -613,8 +613,8 @@ def test_error_raised_with_paddingfree_and_flash_attn_disabled(): | |
| model_args.use_flash_attn = False | ||
| sft_trainer.train( | ||
| model_args, | ||
| DATA_ARGS, | ||
| TRAIN_ARGS, | ||
| copy.deepcopy(DATA_ARGS), | ||
| copy.deepcopy(TRAIN_ARGS), | ||
| attention_and_distributed_packing_config=attention_and_distributed_packing_config, | ||
| ) | ||
|
|
||
|
|
@@ -637,8 +637,8 @@ def test_error_raised_with_multipack_and_paddingfree_disabled(): | |
| model_args = copy.deepcopy(MODEL_ARGS) | ||
| sft_trainer.train( | ||
| model_args, | ||
| DATA_ARGS, | ||
| TRAIN_ARGS, | ||
| copy.deepcopy(DATA_ARGS), | ||
| copy.deepcopy(TRAIN_ARGS), | ||
| attention_and_distributed_packing_config=attention_and_distributed_packing_config, | ||
| ) | ||
|
|
||
|
|
@@ -664,7 +664,7 @@ def test_error_raised_with_packing_and_paddingfree_enabled(): | |
| train_args.packing = True | ||
| sft_trainer.train( | ||
| model_args, | ||
| DATA_ARGS, | ||
| copy.deepcopy(DATA_ARGS), | ||
| train_args, | ||
| attention_and_distributed_packing_config=attention_and_distributed_packing_config, | ||
| ) | ||
|
|
@@ -693,7 +693,6 @@ def test_error_raised_with_fused_lora_enabled_without_quantized_argument(): | |
| train_args = copy.deepcopy(TRAIN_ARGS) | ||
| train_args.output_dir = tempdir | ||
| train_args.save_strategy = "no" | ||
| train_args.fp16 = True | ||
| peft_args = copy.deepcopy(PEFT_LORA_ARGS) | ||
| peft_args.target_modules = ["q_proj", "k_proj"] | ||
|
|
||
|
|
@@ -713,7 +712,7 @@ def test_error_raised_with_fused_lora_enabled_without_quantized_argument(): | |
| with instantiate_model_patcher(): | ||
| sft_trainer.train( | ||
| model_args, | ||
| DATA_ARGS, | ||
| copy.deepcopy(DATA_ARGS), | ||
| train_args, | ||
| peft_args, | ||
| quantized_lora_config=None, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fp16 upcasting is not allowed