From 238a580efacc0f1d9aa7363a26f51a043bb2a4b4 Mon Sep 17 00:00:00 2001 From: Rob Keevil Date: Tue, 10 Sep 2024 11:27:25 +0200 Subject: [PATCH] Require go 1.23 as it is now needed by dependent libraries --- go.mod | 2 +- hugot.go | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 83cb58d..e80d81e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/knights-analytics/hugot -go 1.22 +go 1.23 require ( github.com/daulet/tokenizers v0.9.0 diff --git a/hugot.go b/hugot.go index b85e7fd..f657af0 100644 --- a/hugot.go +++ b/hugot.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "slices" util "github.com/knights-analytics/hugot/utils" @@ -323,10 +324,10 @@ func (s *Session) Destroy() error { // the average time per onnxruntime inference batch call func (s *Session) GetStats() []string { // slices.Concat() is not implemented in experimental x/exp/slices package - return append(append(append( + return slices.Concat( s.tokenClassificationPipelines.GetStats(), - s.textClassificationPipelines.GetStats()...), - s.featureExtractionPipelines.GetStats()...), - s.zeroShotClassificationPipelines.GetStats()..., + s.textClassificationPipelines.GetStats(), + s.featureExtractionPipelines.GetStats(), + s.zeroShotClassificationPipelines.GetStats(), ) }