Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dartpain committed Dec 23, 2024
1 parent 90962ee commit 41b4c28
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion application/parser/chunking.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from typing import List, Tuple, Union
from typing import List, Tuple
import logging
from application.parser.schema.base import Document
from application.utils import get_encoding
Expand Down
4 changes: 2 additions & 2 deletions application/parser/embedding_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ def embed_and_store_documents(docs, folder_name, source_id, task_status):

# Process and embed documents
for idx, doc in tqdm(

Check warning on line 63 in application/parser/embedding_pipeline.py

View check run for this annotation

Codecov / codecov/patch

application/parser/embedding_pipeline.py#L63

Added line #L63 was not covered by tests
docs,
enumerate(docs),
desc="Embedding 🦖",
unit="docs",
total=total_docs,
bar_format="{l_bar}{bar}| Time Left: {remaining}",
):
try:

Check warning on line 70 in application/parser/embedding_pipeline.py

View check run for this annotation

Codecov / codecov/patch

application/parser/embedding_pipeline.py#L70

Added line #L70 was not covered by tests
# Update task status for progress tracking
progress = int((idx / total_docs) * 100)
progress = int(((idx + 1) / total_docs) * 100)
task_status.update_state(state="PROGRESS", meta={"current": progress})

Check warning on line 73 in application/parser/embedding_pipeline.py

View check run for this annotation

Codecov / codecov/patch

application/parser/embedding_pipeline.py#L72-L73

Added lines #L72 - L73 were not covered by tests

# Add document to vector store
Expand Down
2 changes: 0 additions & 2 deletions application/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def ingest_worker(
limit = None
exclude = True
sample = False
token_check = True
full_path = os.path.join(directory, user, name_job)

logging.info(f"Ingest file: {full_path}", extra={"user": user, "job": name_job})
Expand Down Expand Up @@ -205,7 +204,6 @@ def remote_worker(
operation_mode="upload",
doc_id=None,
):
token_check = True
full_path = os.path.join(directory, user, name_job)

if not os.path.exists(full_path):
Expand Down

0 comments on commit 41b4c28

Please sign in to comment.