MCPcopy
hub / github.com/mudler/LocalAI / setImportFailed

Method setImportFailed

core/services/quantization/service.go:608–618  ·  view source on GitHub ↗

setImportFailed sets the import status to failed with a message.

(job *schema.QuantizationJob, message string)

Source from the content-addressed store, hash-verified

606
607// setImportFailed sets the import status to failed with a message.
608func (s *QuantizationService) setImportFailed(job *schema.QuantizationJob, message string) {
609 xlog.Error("Quantization import failed", "job_id", job.ID, "error", message)
610 s.mu.Lock()
611 job.ImportStatus = "failed"
612 job.ImportMessage = message
613 if err := s.jobs.Set(context.Background(), job); err != nil {
614 xlog.Warn("Failed to persist import failure", "job_id", job.ID, "error", err)
615 }
616 s.saveJobState(job)
617 s.mu.Unlock()
618}
619
620// GetOutputPath returns the path to the quantized model file and a download name.
621func (s *QuantizationService) GetOutputPath(userID, jobID string) (string, string, error) {

Callers 1

ImportModelMethod · 0.95

Calls 5

saveJobStateMethod · 0.95
LockMethod · 0.65
SetMethod · 0.65
UnlockMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected