Superduper: Integrate AI models and machine learning workflows with your database to implement custom AI applications, without moving your data. Including streaming inference, scalable model hosting, training and vector search.
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, *kwargs)
1515 # If we don't have any hooks, we want to skip the rest of the logic in
1516 # this function, and just call forward.
1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
1518 or _global_backward_pre_hooks or _global_backward_hooks
1519 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520 return forward_call(args, **kwargs)
1522 try:
1523 result = None
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/torch/nn/modules/container.py:217, in Sequential.forward(self, input)
215 def forward(self, input):
216 for module in self:
--> 217 input = module(input)
218 return input
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, *kwargs)
1515 # If we don't have any hooks, we want to skip the rest of the logic in
1516 # this function, and just call forward.
1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
1518 or _global_backward_pre_hooks or _global_backward_hooks
1519 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520 return forward_call(args, **kwargs)
1522 try:
1523 result = None
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/sentence_transformers/models/Transformer.py:94, in Transformer.forward(self, features)
92 def forward(self, features):
93 """Returns token_embeddings, cls_token"""
---> 94 trans_features = {"input_ids": features["input_ids"], "attention_mask": features["attention_mask"]}
95 if "token_type_ids" in features:
96 trans_features["token_type_ids"] = features["token_type_ids"]
TypeError: string indices must be integers, not 'str'
Contact Details [Optional]
makkarss929@gmail.com
System Information
What happened?
TypeError Traceback (most recent call last) Cell In[11], line 1 ----> 1 vector = model.predict_one('This is a test') 2 print('vector size: ', len(vector))
File ~/Desktop/superduperDB/superduperdb/superduperdb/components/component.py:378, in ensure_initialized..wrapper(self, *args, *kwargs)
376 self._is_initialized = True
377 logging.info(f"Initialized {model_message} successfully")
--> 378 return func(self, args, **kwargs)
File ~/Desktop/superduperDB/superduperdb/superduperdb/components/model.py:831, in ObjectModel.predict_one(self, *args, kwargs) 829 @ensure_initialized 830 def predict_one(self, *args, *kwargs): --> 831 return self.object(args, kwargs)
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/torch/nn/modules/module.py:1511, in Module._wrapped_call_impl(self, *args, kwargs) 1509 return self._compiled_call_impl(*args, *kwargs) # type: ignore[misc] 1510 else: -> 1511 return self._call_impl(args, kwargs)
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, *kwargs) 1515 # If we don't have any hooks, we want to skip the rest of the logic in 1516 # this function, and just call forward. 1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks 1518 or _global_backward_pre_hooks or _global_backward_hooks 1519 or _global_forward_hooks or _global_forward_pre_hooks): -> 1520 return forward_call(args, **kwargs) 1522 try: 1523 result = None
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/torch/nn/modules/container.py:217, in Sequential.forward(self, input) 215 def forward(self, input): 216 for module in self: --> 217 input = module(input) 218 return input
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/torch/nn/modules/module.py:1511, in Module._wrapped_call_impl(self, *args, kwargs) 1509 return self._compiled_call_impl(*args, *kwargs) # type: ignore[misc] 1510 else: -> 1511 return self._call_impl(args, kwargs)
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, *kwargs) 1515 # If we don't have any hooks, we want to skip the rest of the logic in 1516 # this function, and just call forward. 1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks 1518 or _global_backward_pre_hooks or _global_backward_hooks 1519 or _global_forward_hooks or _global_forward_pre_hooks): -> 1520 return forward_call(args, **kwargs) 1522 try: 1523 result = None
File ~/Desktop/superduperDB/superduperdb/.venv/lib/python3.11/site-packages/sentence_transformers/models/Transformer.py:94, in Transformer.forward(self, features) 92 def forward(self, features): 93 """Returns token_embeddings, cls_token""" ---> 94 trans_features = {"input_ids": features["input_ids"], "attention_mask": features["attention_mask"]} 95 if "token_type_ids" in features: 96 trans_features["token_type_ids"] = features["token_type_ids"]
TypeError: string indices must be integers, not 'str'
Steps to reproduce
...
Relevant log output
No response