diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index d1fa608e..7da3bb4b 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -14,4 +14,4 @@ jobs: - name: fetch-models run: sh fetch-models.sh - name: execute - run: docker-compose -f ./docker/docker-compose.yaml run dotnet \ No newline at end of file + run: docker compose -f ./docker/docker-compose.yaml run dotnet \ No newline at end of file diff --git a/src/Redis.OM.Vectorizers.AllMiniLML6V2/SentenceVectorizer.cs b/src/Redis.OM.Vectorizers.AllMiniLML6V2/SentenceVectorizer.cs index 92dd96e7..1846c5cd 100644 --- a/src/Redis.OM.Vectorizers.AllMiniLML6V2/SentenceVectorizer.cs +++ b/src/Redis.OM.Vectorizers.AllMiniLML6V2/SentenceVectorizer.cs @@ -17,8 +17,8 @@ public class SentenceVectorizer : IVectorizer /// public int Dim => 384; - private static Lazy Tokenizer => new Lazy(AllMiniLML6V2Tokenizer.Create); - private static Lazy InferenceSession => new Lazy(LoadInferenceSession); + private static readonly Lazy Tokenizer = new(AllMiniLML6V2Tokenizer.Create); + private static readonly Lazy InferenceSession = new(LoadInferenceSession); private static InferenceSession LoadInferenceSession() { @@ -40,7 +40,7 @@ public byte[] Vectorize(string obj) return Vectorize(new[] { obj })[0].SelectMany(BitConverter.GetBytes).ToArray(); } - private static Lazy OutputNames => new (() => InferenceSession.Value.OutputMetadata.Keys.ToArray()); + private static readonly Lazy OutputNames = new (() => InferenceSession.Value.OutputMetadata.Keys.ToArray()); /// /// Vectorizers an array of sentences (which are vectorized individually).