eland_import_hub_model --url http://elastic:xxxxx@xxxxxx --hub-model-id ./clip-ViT-B-32-multilingual-v1 --task-type text_embedding
2024-08-15 21:52:07,369 INFO : Establishing connection to Elasticsearch
2024-08-15 21:52:07,593 INFO : Connected to cluster named 'xxx' (version: 8.15.0)
2024-08-15 21:52:07,596 INFO : Loading HuggingFace transformer tokenizer and model './clip-ViT-B-32-multilingual-v1'
Traceback (most recent call last):
File "/root/.pyenv/versions/3.11.7/bin/eland_import_hub_model", line 8, in <module>
sys.exit(main())
^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/eland/cli/eland_import_hub_model.py", line 279, in main
tm = TransformerModel(
^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/eland/ml/pytorch/transformers.py", line 669, in __init__
self._config = self._create_config(es_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/eland/ml/pytorch/transformers.py", line 789, in _create_config
sample_embedding = self._traceable_model.sample_output()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/eland/ml/pytorch/transformers.py", line 471, in sample_output
return self._model(*inputs)
^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/eland/ml/pytorch/transformers.py", line 374, in forward
return self._st_model(inputs)[self._output_key]
^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/container.py", line 215,
vocab_items = self._tokenizer.get_vocab().items()
in forward
input = module(input)
^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/sentence_transformers/models/Dense.py", line 46, in forward
features.update({"sentence_embedding": self.activation_function(self.linear(features["sentence_embedding"]))})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Placeholder storage has not been allocated on MPS device!
Run in M1 Apple Mac.