Skip to content

Commit 26d4b85

Browse files
committed
Merge branch 'fix/retry-when-throttled-in-page-level-classification' into 'develop'
Fix/retry when throttled in page level classification See merge request genaiic-reusable-assets/engagement-artifacts/genaiic-idp-accelerator!147
2 parents 2212d2e + 47fa5ef commit 26d4b85

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ SPDX-License-Identifier: MIT-0
55

66
## [Unreleased]
77

8+
## [0.3.1]
9+
10+
### Fixed
11+
- When encountering excessive Bedrock throttling, service returned 'unclassified' instead of retrying, when using multi-modal page level classification method.
12+
- Minor documentation issues.
13+
814
## [0.3.0]
915

1016
### Added

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0
1+
0.3.1

lib/idp_common_pkg/idp_common/classification/service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,11 +940,12 @@ def classify_document(self, document: Document) -> Document:
940940
logger.error(error_msg)
941941
with errors_lock:
942942
document.errors.append(error_msg)
943-
944943
# Mark page as unclassified on error
945944
if page_id in document.pages:
946945
document.pages[page_id].classification = "unclassified"
947946
document.pages[page_id].confidence = 0.0
947+
# raise exception to enable client retries
948+
raise
948949

949950
# Group pages into sections only if we have results
950951
document.sections = []

0 commit comments

Comments
 (0)