all: fix typos in documentation, code, and comments (#7021)

This commit is contained in:
Stefan Weil
2024-12-10 21:58:06 +01:00
committed by GitHub
parent 82a02e18d9
commit abfdc4710f
22 changed files with 35 additions and 35 deletions

View File

@@ -207,7 +207,7 @@ func TestMultiModelStress(t *testing.T) {
chosenModels = mediumModels
// default:
// slog.Info("selecting large models")
// chosenModels = largModels
// chosenModels = largeModels
}
req, resp := GenerateRequests()
@@ -232,7 +232,7 @@ func TestMultiModelStress(t *testing.T) {
var wg sync.WaitGroup
consumed := uint64(256 * format.MebiByte) // Assume some baseline usage
for i := 0; i < len(req); i++ {
// Always get at least 2 models, but dont' overshoot VRAM too much or we'll take too long
// Always get at least 2 models, but don't overshoot VRAM too much or we'll take too long
if i > 1 && consumed > maxVram {
slog.Info("achieved target vram exhaustion", "count", i, "vram", format.HumanBytes2(maxVram), "models", format.HumanBytes2(consumed))
break

View File

@@ -20,7 +20,7 @@ import (
func TestMaxQueue(t *testing.T) {
if os.Getenv("OLLAMA_TEST_EXISTING") != "" {
t.Skip("Max Queue test requires spawing a local server so we can adjust the queue size")
t.Skip("Max Queue test requires spawning a local server so we can adjust the queue size")
return
}
@@ -67,7 +67,7 @@ func TestMaxQueue(t *testing.T) {
busyCount := 0
resetByPeerCount := 0
canceledCount := 0
succesCount := 0
successCount := 0
counterMu := sync.Mutex{}
var embedwg sync.WaitGroup
for i := 0; i < threadCount; i++ {
@@ -88,7 +88,7 @@ func TestMaxQueue(t *testing.T) {
defer counterMu.Unlock()
switch {
case genErr == nil:
succesCount++
successCount++
require.Greater(t, len(resp.Embedding), 5) // somewhat arbitrary, but sufficient to be reasonable
case errors.Is(genErr, context.Canceled):
canceledCount++
@@ -107,7 +107,7 @@ func TestMaxQueue(t *testing.T) {
slog.Info("generate done, waiting for embeds")
embedwg.Wait()
slog.Info("embeds completed", "success", succesCount, "busy", busyCount, "reset", resetByPeerCount, "canceled", canceledCount)
slog.Info("embeds completed", "success", successCount, "busy", busyCount, "reset", resetByPeerCount, "canceled", canceledCount)
require.Equal(t, resetByPeerCount, 0, "Connections reset by peer, have you updated your fd and socket limits?")
require.True(t, busyCount > 0, "no requests hit busy error but some should have")
require.True(t, canceledCount == 0, "no requests should have been canceled due to timeout")