From 921779bb10265e4030bba3fd74e1936e58930ce1 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Thu, 31 Oct 2024 13:35:31 -0700 Subject: [PATCH] Give unicode test more time to run (#7437) * Give unicode test more time to run Some slower GPUs (or partial CPU/GPU loads) can take more than the default 30s to complete this test * Give more time for concurrency test CPU inference can be very slow under stress --- integration/basic_test.go | 15 ++++++++++++--- integration/concurrency_test.go | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/integration/basic_test.go b/integration/basic_test.go index dfa921d7..88d3530e 100644 --- a/integration/basic_test.go +++ b/integration/basic_test.go @@ -31,7 +31,7 @@ func TestOrcaMiniBlueSky(t *testing.T) { } func TestUnicode(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute) + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Minute) defer cancel() // Set up the test data req := api.GenerateRequest{ @@ -42,9 +42,15 @@ func TestUnicode(t *testing.T) { Options: map[string]interface{}{ "temperature": 0, "seed": 123, + // Workaround deepseek context shifting bug + "num_ctx": 8192, + "num_predict": 2048, }, } - GenerateTestHelper(ctx, t, req, []string{"散射", "频率"}) + client, _, cleanup := InitServerConnection(ctx, t) + defer cleanup() + require.NoError(t, PullIfMissing(ctx, client, req.Model)) + DoGenerate(ctx, t, client, req, []string{"散射", "频率"}, 120*time.Second, 120*time.Second) } func TestExtendedUnicodeOutput(t *testing.T) { @@ -60,7 +66,10 @@ func TestExtendedUnicodeOutput(t *testing.T) { "seed": 123, }, } - GenerateTestHelper(ctx, t, req, []string{"😀", "😊", "😁", "😂", "😄", "😃"}) + client, _, cleanup := InitServerConnection(ctx, t) + defer cleanup() + require.NoError(t, PullIfMissing(ctx, client, req.Model)) + DoGenerate(ctx, t, client, req, []string{"😀", "😊", "😁", "😂", "😄", "😃"}, 120*time.Second, 120*time.Second) } func TestUnicodeModelDir(t *testing.T) { diff --git a/integration/concurrency_test.go b/integration/concurrency_test.go index 74eb6361..165231cd 100644 --- a/integration/concurrency_test.go +++ b/integration/concurrency_test.go @@ -60,7 +60,8 @@ func TestMultiModelConcurrency(t *testing.T) { for i := 0; i < len(req); i++ { go func(i int) { defer wg.Done() - DoGenerate(ctx, t, client, req[i], resp[i], 60*time.Second, 10*time.Second) + // Note: CPU based inference can crawl so don't give up too quickly + DoGenerate(ctx, t, client, req[i], resp[i], 90*time.Second, 30*time.Second) }(i) } wg.Wait()