150 lines
6.4 KiB
JSON
Executable file
150 lines
6.4 KiB
JSON
Executable file
{
|
|
"profile": "HM.json",
|
|
"timestamp": "2025-01-24T16:48:28.409049Z",
|
|
"checks": [
|
|
{
|
|
"index": 1,
|
|
"id": "HM_parse",
|
|
"script": "checks.HM_parse",
|
|
"config": {
|
|
"description": "Parses document with Llamaparse, returning both text extraction and image of document",
|
|
"input_file": "input_bucket/10.8x14cm_quarter_letter_1001D_10004-02_CEN.pdf",
|
|
"working_dir": "HM_working"
|
|
},
|
|
"result": {
|
|
"status": "passed",
|
|
"details": {
|
|
"message": "PDF parsed successfully.",
|
|
"working_dir": "HM_working",
|
|
"text_file": "HM_working/extracted_text.txt",
|
|
"image_files": [
|
|
"HM_working/parsed_test_image.jpg"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"index": 2,
|
|
"id": "HM_filename_parse",
|
|
"script": "checks.HM_filename_parse",
|
|
"config": {
|
|
"description": "Parses filename into constituent pieces",
|
|
"working_dir": "HM_working",
|
|
"filename_path": "filename.txt",
|
|
"input_file": "input_bucket/10.8x14cm_quarter_letter_1001D_10004-02_CEN.pdf"
|
|
},
|
|
"result": {
|
|
"status": "passed",
|
|
"details": {
|
|
"message": "Filename parsed and stored in context",
|
|
"filename_source": "HM_parse context",
|
|
"gpt_response_summary": "Parsed 5 components"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"index": 3,
|
|
"id": "HM_imprint_check",
|
|
"script": "checks.HM_imprint_check",
|
|
"config": {
|
|
"description": "Checks imprint on document against relevant portion of filename",
|
|
"working_dir": "HM_working",
|
|
"test_image_path": "HM_working/parsed_test_image.jpg",
|
|
"input_file": "input_bucket/10.8x14cm_quarter_letter_1001D_10004-02_CEN.pdf"
|
|
},
|
|
"result": {
|
|
"status": "passed",
|
|
"details": {
|
|
"message": "Imprint reference verified",
|
|
"filename": "10.8x14cm_quarter_letter_1001D_10004-02_CEN.pdf",
|
|
"expected_reference": "1001D_10004-02",
|
|
"detected_imprint": "1001D_10004-02_GEN",
|
|
"match_verified": true,
|
|
"skipped": false,
|
|
"verification_response": "true"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"index": 4,
|
|
"id": "HM_language_validate",
|
|
"script": "checks.HM_language_validate",
|
|
"config": {
|
|
"description": "Validates language of document content against language code in file name",
|
|
"working_dir": "HM_working",
|
|
"test_image_path": "HM_working/parsed_test_image.jpg",
|
|
"input_file": "input_bucket/10.8x14cm_quarter_letter_1001D_10004-02_CEN.pdf"
|
|
},
|
|
"result": {
|
|
"status": "passed",
|
|
"details": {
|
|
"filename": "10.8x14cm_quarter_letter_1001D_10004-02_CEN.pdf",
|
|
"expected_language": "CEN",
|
|
"detected_language": "CEN",
|
|
"matches": true,
|
|
"isCensorshipRequired": true,
|
|
"validation_method": "auto",
|
|
"gpt_response": null
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"index": 5,
|
|
"id": "HM_price_currency_check",
|
|
"script": "checks.HM_price_currency_check",
|
|
"config": {
|
|
"description": "Validates currency of pricing in document against language detected in previous check",
|
|
"working_dir": "HM_working",
|
|
"test_image_path": "HM_working/parsed_test_image.jpg",
|
|
"input_file": "input_bucket/10.8x14cm_quarter_letter_1001D_10004-02_CEN.pdf"
|
|
},
|
|
"result": {
|
|
"status": "passed",
|
|
"details": {
|
|
"expected_region": "CEN",
|
|
"censorship_required": true,
|
|
"language_matches": true,
|
|
"currency_found": null,
|
|
"price_value": null,
|
|
"format_valid": false,
|
|
"matches_region": true,
|
|
"validation_steps": [
|
|
"Language-based auto-pass"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"index": 6,
|
|
"id": "HM_censorship",
|
|
"script": "checks.HM_censorship",
|
|
"config": {
|
|
"description": "Checks CEN and GEN assets (primarily GEN) to determine whether the image(s) are actually censored for conservative markets. Examines images for full coverage of clothing on all body parts (except face and hands) and fail if too much skin is exposed.",
|
|
"images_dir": "supporting/censorship_trainset",
|
|
"working_dir": "HM_working",
|
|
"test_image_path": "HM_working/parsed_test_image.jpg",
|
|
"input_file": "input_bucket/10.8x14cm_quarter_letter_1001D_10004-02_CEN.pdf"
|
|
},
|
|
"result": {
|
|
"status": "error",
|
|
"error_message": "Censorship requirement mismatch",
|
|
"details": {
|
|
"expected_language": "CEN",
|
|
"censorship_required": true,
|
|
"check_performed": true,
|
|
"check_outcome": "failed",
|
|
"test_results": {
|
|
"is_censored": false,
|
|
"required_censorship": true,
|
|
"censorship_match": false,
|
|
"reasoning": "The outfit consists of a sports bra that covers the upper body but leaves the midriff exposed, while the high-waisted leggings cover the legs completely. Since the midriff is not covered, the clothing does not meet the criteria for being considered censored.",
|
|
"test_image": "parsed_test_image.jpg"
|
|
},
|
|
"error": null,
|
|
"expected_censored": true,
|
|
"actual_censored": false
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|