-
Notifications
You must be signed in to change notification settings - Fork 292
fix(tests): resolve 3 skipped model directory tests (Section 3/5) #632
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
Open
yehudit1987
wants to merge
1
commit into
vllm-project:main
Choose a base branch
from
yehudit1987:fix_skipped_tests_clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+30
−12
Open
Changes from all commits
Commits
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
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 |
|---|---|---|
|
|
@@ -2909,13 +2909,11 @@ func createMockModelFile(t *testing.T, dir, filename string) { | |
|
|
||
| func TestAutoDiscoverModels_RealModels(t *testing.T) { | ||
| // Test with real models directory | ||
| modelsDir := "../../../../../models" | ||
| modelsDir := "../../../../models" | ||
|
Contributor
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. Can we define it as a constant? This is used in many places. |
||
|
|
||
| paths, err := AutoDiscoverModels(modelsDir) | ||
| if err != nil { | ||
| // Skip this test in environments without the real models directory | ||
| t.Logf("AutoDiscoverModels() failed in real-models test: %v", err) | ||
| t.Skip("Skipping real-models discovery test because models directory is unavailable") | ||
| t.Fatalf("AutoDiscoverModels() failed: %v (models directory should exist at %s)", err, modelsDir) | ||
| } | ||
|
|
||
| t.Logf("Discovered paths:") | ||
|
|
@@ -2964,10 +2962,9 @@ func TestAutoDiscoverModels_RealModels(t *testing.T) { | |
| // TestAutoInitializeUnifiedClassifier tests the full initialization process | ||
| func TestAutoInitializeUnifiedClassifier(t *testing.T) { | ||
| // Test with real models directory | ||
| classifier, err := AutoInitializeUnifiedClassifier("../../../../../models") | ||
| classifier, err := AutoInitializeUnifiedClassifier("../../../../models") | ||
| if err != nil { | ||
| t.Logf("AutoInitializeUnifiedClassifier() failed in real-models test: %v", err) | ||
| t.Skip("Skipping unified classifier init test because real models are unavailable") | ||
| t.Fatalf("AutoInitializeUnifiedClassifier() failed: %v (models directory should exist at ../../../../models)", err) | ||
| } | ||
|
|
||
| if classifier == nil { | ||
|
|
@@ -3305,7 +3302,7 @@ var ( | |
| // getTestClassifier returns a shared classifier instance for all integration tests | ||
| func getTestClassifier(t *testing.T) *UnifiedClassifier { | ||
| globalTestClassifierOnce.Do(func() { | ||
| classifier, err := AutoInitializeUnifiedClassifier("../../../../../models") | ||
| classifier, err := AutoInitializeUnifiedClassifier("../../../../models") | ||
| if err != nil { | ||
| t.Logf("Failed to initialize classifier: %v", err) | ||
| return | ||
|
|
@@ -3323,8 +3320,11 @@ func TestUnifiedClassifier_Integration(t *testing.T) { | |
| // Get shared classifier instance | ||
| classifier := getTestClassifier(t) | ||
| if classifier == nil { | ||
| t.Skip("Skipping integration tests - classifier not available") | ||
| return | ||
| t.Fatal("Classifier initialization failed") | ||
| } | ||
|
|
||
| if !classifier.useLoRA { | ||
| t.Fatal("LoRA models not detected") | ||
| } | ||
|
|
||
| t.Run("RealBatchClassification", func(t *testing.T) { | ||
|
|
||
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.
Why is v2 being used here? Is it really necessary for us to upgrade to v2? The model files are very large and will occupy a lot of cache space on GitHub.