Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
5d707e6f
Unverified
Commit
5d707e6f
authored
Jul 20, 2024
by
Daniel Hiltgen
Committed by
GitHub
Jul 20, 2024
Browse files
Merge pull request #5583 from dhiltgen/integration_improvements
Fix context exhaustion integration test for small gpus
parents
1475eab9
73e2c8f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
integration/context_test.go
integration/context_test.go
+7
-2
No files found.
integration/context_test.go
View file @
5d707e6f
...
@@ -12,7 +12,7 @@ import (
...
@@ -12,7 +12,7 @@ import (
func
TestContextExhaustion
(
t
*
testing
.
T
)
{
func
TestContextExhaustion
(
t
*
testing
.
T
)
{
// Longer needed for small footprint GPUs
// Longer needed for small footprint GPUs
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
6
*
time
.
Minute
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
5
*
time
.
Minute
)
defer
cancel
()
defer
cancel
()
// Set up the test data
// Set up the test data
req
:=
api
.
GenerateRequest
{
req
:=
api
.
GenerateRequest
{
...
@@ -25,5 +25,10 @@ func TestContextExhaustion(t *testing.T) {
...
@@ -25,5 +25,10 @@ func TestContextExhaustion(t *testing.T) {
"num_ctx"
:
128
,
"num_ctx"
:
128
,
},
},
}
}
GenerateTestHelper
(
ctx
,
t
,
req
,
[]
string
{
"once"
,
"upon"
,
"lived"
})
client
,
_
,
cleanup
:=
InitServerConnection
(
ctx
,
t
)
defer
cleanup
()
if
err
:=
PullIfMissing
(
ctx
,
client
,
req
.
Model
);
err
!=
nil
{
t
.
Fatalf
(
"PullIfMissing failed: %v"
,
err
)
}
DoGenerate
(
ctx
,
t
,
client
,
req
,
[]
string
{
"once"
,
"upon"
,
"lived"
},
120
*
time
.
Second
,
10
*
time
.
Second
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment