| ```CODE: |
| from sentence_transformers import SentenceTransformer |
|
|
| model = SentenceTransformer("DatologyAI/luxical-one", trust_remote_code=True) |
|
|
| sentences = [ |
| "The weather is lovely today.", |
| "It's so sunny outside!", |
| "He drove to the stadium." |
| ] |
| embeddings = model.encode(sentences) |
|
|
| similarities = model.similarity(embeddings, embeddings) |
| print(similarities.shape) |
| # [3, 3] |
| ``` |
|
|
| ERROR: |
| Traceback (most recent call last): |
| File "/tmp/DatologyAI_luxical-one_0ttgEtf.py", line 25, in <module> |
| model = SentenceTransformer("DatologyAI/luxical-one", trust_remote_code=True) |
| File "/tmp/.cache/uv/environments-v2/0c397aefee4cc689/lib/python3.13/site-packages/sentence_transformers/SentenceTransformer.py", line 327, in __init__ |
| modules, self.module_kwargs = self._load_sbert_model( |
| ~~~~~~~~~~~~~~~~~~~~~~^ |
| model_name_or_path, |
| ^^^^^^^^^^^^^^^^^^^ |
| ...<7 lines>... |
| config_kwargs=config_kwargs, |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| ) |
| ^ |
| File "/tmp/.cache/uv/environments-v2/0c397aefee4cc689/lib/python3.13/site-packages/sentence_transformers/SentenceTransformer.py", line 2251, in _load_sbert_model |
| module_class: Module = self._load_module_class_from_ref( |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ |
| class_ref, model_name_or_path, trust_remote_code, revision, model_kwargs |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| ) |
| ^ |
| File "/tmp/.cache/uv/environments-v2/0c397aefee4cc689/lib/python3.13/site-packages/sentence_transformers/SentenceTransformer.py", line 2141, in _load_module_class_from_ref |
| return get_class_from_dynamic_module( |
| class_ref, |
| ...<2 lines>... |
| code_revision=code_revision, |
| ) |
| File "/tmp/.cache/uv/environments-v2/0c397aefee4cc689/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 604, in get_class_from_dynamic_module |
| final_module = get_cached_module_file( |
| repo_id, |
| ...<8 lines>... |
| repo_type=repo_type, |
| ) |
| File "/tmp/.cache/uv/environments-v2/0c397aefee4cc689/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 427, in get_cached_module_file |
| modules_needed = check_imports(resolved_module_file) |
| File "/tmp/.cache/uv/environments-v2/0c397aefee4cc689/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 260, in check_imports |
| raise ImportError( |
| ...<2 lines>... |
| ) |
| ImportError: This modeling file requires the following packages that were not found in your environment: luxical. Run `pip install luxical` |
|
|