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
790cf34d
Unverified
Commit
790cf34d
authored
Apr 23, 2024
by
Daniel Hiltgen
Committed by
GitHub
Apr 23, 2024
Browse files
Merge pull request #3846 from dhiltgen/missing_runner
Detect and recover if runner removed
parents
928d8448
939d6a86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
.github/workflows/test.yaml
.github/workflows/test.yaml
+1
-1
llm/server.go
llm/server.go
+11
-0
No files found.
.github/workflows/test.yaml
View file @
790cf34d
...
@@ -260,7 +260,7 @@ jobs:
...
@@ -260,7 +260,7 @@ jobs:
shell
:
bash
shell
:
bash
-
uses
:
golangci/golangci-lint-action@v4
-
uses
:
golangci/golangci-lint-action@v4
with
:
with
:
args
:
--timeout 8m0s
args
:
--timeout 8m0s
-v
test
:
test
:
strategy
:
strategy
:
matrix
:
matrix
:
...
...
llm/server.go
View file @
790cf34d
...
@@ -250,6 +250,17 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
...
@@ -250,6 +250,17 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
server
=
server
+
".exe"
server
=
server
+
".exe"
}
}
// Detect tmp cleaners wiping out the file
_
,
err
:=
os
.
Stat
(
server
)
if
errors
.
Is
(
err
,
os
.
ErrNotExist
)
{
slog
.
Warn
(
"llama server disappeared, reinitializing payloads"
,
"path"
,
server
,
"error"
,
err
)
err
=
Init
()
if
err
!=
nil
{
slog
.
Warn
(
"failed to reinitialize payloads"
,
"error"
,
err
)
return
nil
,
err
}
}
s
:=
&
llmServer
{
s
:=
&
llmServer
{
port
:
port
,
port
:
port
,
cmd
:
exec
.
Command
(
server
,
finalParams
...
),
cmd
:
exec
.
Command
(
server
,
finalParams
...
),
...
...
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