|
19 | 19 | import zlib
|
20 | 20 | from spacy.tokens import DocBin, Doc
|
21 | 21 | from spacy.vocab import Vocab
|
22 |
| -from data import doc_ock |
23 | 22 | from embedders import Transformer
|
24 | 23 | from typing import Any, Dict, Iterator, List, Optional
|
25 | 24 |
|
@@ -157,7 +156,6 @@ def __prepare_encoding(project_id: str, embedding_id: str) -> None:
|
157 | 156 | f"notification_created:{user_id}",
|
158 | 157 | True,
|
159 | 158 | )
|
160 |
| - doc_ock.post_embedding_failed(user_id, f"{model}-{platform}") |
161 | 159 | raise Exception(message)
|
162 | 160 | return (
|
163 | 161 | project_id,
|
@@ -244,7 +242,6 @@ def run_encoding(
|
244 | 242 | project_id,
|
245 | 243 | f"embedding:{embedding_id}:state:{enums.EmbeddingState.FAILED.value}",
|
246 | 244 | )
|
247 |
| - doc_ock.post_embedding_failed(user_id, f"{model}-{platform}") |
248 | 245 | notification_message = f"Error while getting model - {e}"
|
249 | 246 | notification.create(
|
250 | 247 | project_id,
|
@@ -276,7 +273,6 @@ def run_encoding(
|
276 | 273 | project_id,
|
277 | 274 | f"embedding:{embedding_id}:state:{enums.EmbeddingState.ENCODING.value}",
|
278 | 275 | )
|
279 |
| - doc_ock.post_embedding_encoding(user_id, f"{model}-{platform}") |
280 | 276 | notification.create(
|
281 | 277 | project_id,
|
282 | 278 | user_id,
|
@@ -346,7 +342,6 @@ def run_encoding(
|
346 | 342 | enums.NotificationType.EMBEDDING_CREATION_FAILED.value,
|
347 | 343 | True,
|
348 | 344 | )
|
349 |
| - doc_ock.post_embedding_failed(user_id, f"{model}-{platform}") |
350 | 345 | return status.HTTP_500_INTERNAL_SERVER_ERROR
|
351 | 346 | except Exception as e:
|
352 | 347 | error_message = str(e)
|
@@ -409,7 +404,6 @@ def run_encoding(
|
409 | 404 | True,
|
410 | 405 | )
|
411 | 406 | send_project_update(project_id, f"notification_created:{user_id}", True)
|
412 |
| - doc_ock.post_embedding_failed(user_id, f"{model}-{platform}") |
413 | 407 | return status.HTTP_500_INTERNAL_SERVER_ERROR
|
414 | 408 |
|
415 | 409 | if embedding.get(project_id, embedding_id) and not embedding_canceled:
|
@@ -471,7 +465,6 @@ def run_encoding(
|
471 | 465 | True,
|
472 | 466 | )
|
473 | 467 | send_project_update(project_id, f"notification_created:{user_id}", True)
|
474 |
| - doc_ock.post_embedding_finished(user_id, f"{model}-{platform}") |
475 | 468 | general.commit()
|
476 | 469 | general.remove_and_refresh_session(session_token)
|
477 | 470 | return status.HTTP_200_OK
|
|
0 commit comments