Skip to content

Commit 575901a

Browse files
committed
fixes
1 parent eb69d2d commit 575901a

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed

config_library/pattern-3/rvl-cdip-package-sample/config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -932,11 +932,6 @@ assessment:
932932
image:
933933
target_height: ""
934934
target_width: ""
935-
granular:
936-
enabled: true
937-
max_workers: "20"
938-
simple_batch_size: "3"
939-
list_batch_size: "1"
940935
default_confidence_threshold: "0.8"
941936
top_p: "0.1"
942937
max_tokens: "10000"

lib/idp_common_pkg/idp_common/assessment/granular_service.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,9 +1094,10 @@ def process_document_section(self, document: Document, section_id: str) -> Docum
10941094
if (
10951095
document.status == Status.FAILED
10961096
and document.errors
1097-
and not hasattr(document, "metadata")
1098-
or not document.metadata
1099-
or "failed_assessment_tasks" not in document.metadata
1097+
and (
1098+
not document.metadata
1099+
or "failed_assessment_tasks" not in document.metadata
1100+
)
11001101
):
11011102
# Check if any errors contain throttling keywords
11021103
throttling_keywords = [
@@ -1162,7 +1163,7 @@ def assess_document(self, document: Document) -> Document:
11621163
def _handle_parsing_errors(
11631164
self,
11641165
document: Document,
1165-
failed_tasks: list[str],
1166+
failed_tasks: list[AssessmentResult],
11661167
document_text: str,
11671168
extraction_results: dict,
11681169
) -> str | None:

lib/idp_common_pkg/idp_common/extraction/agentic_idp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def patch_buffer_data(patches: list[dict[str, Any]], agent: Agent) -> str:
436436

437437
logger.info(f"Current length of buffer data {len(patched_data)} ")
438438

439-
return f"Successfully patched {str(patched_data)[100:]}...."
439+
return f"Successfully patched {str(patched_data)[:100]}...."
440440

441441

442442
SYSTEM_PROMPT = """

patterns/pattern-2/src/assessment_function/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import time
77
import logging
88

9-
from idp_common import get_config, assessment
9+
from idp_common import get_config
1010
from idp_common.models import Document, Status
1111
from idp_common.docs_service import create_document_service
1212
from idp_common import s3

patterns/pattern-3/src/assessment_function/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def handler(event, context):
174174
logger.info(f"Starting assessment for section {section_id}")
175175
updated_document = assessment_service.process_document_section(document, section_id)
176176
t1 = time.time()
177-
logger.info(f"Total extraction time: {t1 - t0:.2f} seconds")
177+
logger.info(f"Total assessment time: {t1 - t0:.2f} seconds")
178178

179179
# Check if document processing failed
180180
if updated_document.status == Status.FAILED:

0 commit comments

Comments
 (0)