feat: doc profile coarse margins and asset probing - #225
Merged
Conversation
- Added `observed_titles` to the `serialize_page_tags` function for improved title tracking. - Introduced `serialize_scope_skeletons` to handle scope input artifacts, facilitating Stage3 to Stage4 handoff. - Updated `write_scope_artifacts` to conditionally write `tags` and `assets_by_page`, preventing overwrites when set to None. - Enhanced title detection logic in `tag_vlm_titles` to escalate token budgets dynamically when JSON responses are truncated, improving robustness in title extraction. This commit improves the handling of page memory artifacts and enhances the title detection process, ensuring better data integrity and extraction accuracy.
- Deleted `chart_asset_probe.py` and `vlm_bbox_tabula_probe.py` as they are no longer needed. - These scripts were used for experimental purposes related to VLM-driven asset detection and table extraction, but have been superseded by more efficient implementations. This cleanup helps streamline the codebase by removing outdated experimental files.
… related tests - Changed `asset_extraction_enabled` to `True` in `PageMemoryConfig` to activate asset extraction functionality. - Updated the `page_asset_extraction_enabled` function to return `True`, reflecting the new configuration. - Modified a test to assert that asset extraction is enabled for page memory jobs. - Added `.gitignore` entry for the `experiments` directory in the worker app to exclude local debugging scripts. This commit enhances the asset extraction capabilities in the page memory system, ensuring that the feature is properly enabled and tested.
- Added `_ensure_asset_probe` method to `ProfileCoordinator` to ensure asset probing occurs during profile generation. - Introduced `has_asset` and `asset_bboxes` fields in `PageFeature` for tracking asset presence and bounding boxes. - Updated `aggregate_doc_stats` to include asset-related statistics when assets have been probed. - Refactored `probe_page_features` to support asset probing alongside existing features. - Modified `planner` and `tagger` logic to accommodate new asset-related data and improve document profiling accuracy. This commit enhances the document agent's ability to extract and utilize asset information, improving overall profiling and analysis capabilities.
Co-authored-by: Cursor <cursoragent@cursor.com>
…apabilities - Removed the `ProfileAgent` class to simplify the document agent architecture. - Updated `ProfileCoordinator` methods to include a `skip_shard_plan` parameter, allowing for more flexible profiling without LLM shard decisions. - Enhanced `PageAnatomyMap` to include `toc_hierarchies` for improved TOC handling. - Cleaned up unused fields and methods related to asset probing and text previews, ensuring a more efficient codebase. This commit improves the overall structure and efficiency of the document agent, facilitating better profiling and asset management.
Keep test_summary_builder.py from main (#221); it was deleted on this branch unrelated to asset probing. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
header_y/footer_ycontent margins.Test plan
make check(ruff + pyright)EN_Global Memory Tech.pdfandEN_Sydney Streets Code.pdfMade with Cursor