💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Cast tokens to int64 before passing to ONNX to fix Windows issue
davidmezzetti30bb6562c084
diff --git a/test/python/testonnx.py b/test/python/testonnx.pyindex 5d3e580c..3a74f0f8 100644--- a/test/python/testonnx.py+++ b/test/python/testonnx.py@@ -62,8 +62,9 @@ class TestOnnx(unittest.TestCase):options = SessionOptions()session = InferenceSession(model, options)- # Tokenize+ # Tokenize and cast to int64 to support all platformstokens = tokenizer(["cat"], return_tensors="np")+ tokens = {x: tokens[x].astype(np.int64) for x in tokens}# Run inference and validateoutputs = session.run(None, dict(tokens))@@ -84,8 +85,9 @@ class TestOnnx(unittest.TestCase):options = SessionOptions()session = InferenceSession(model, options)- # Tokenize+ # Tokenize and cast to int64 to support all platformstokens = tokenizer(["cat"], return_tensors="np")+ tokens = {x: tokens[x].astype(np.int64) for x in tokens}# Run inference and validateoutputs = session.run(None, dict(tokens))