修复 MMKG 子图/QA 三元组解析并补全示例图片#1
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes parsing/mapping logic for MMKG visual triples when generating subgraph-based QA pairs, and ensures the multimodal pipeline example assets (including images) are included in source distributions.
Changes:
- Include all files under
dataflow/example/in the package manifest (and fix the example path comment). - Fix MMKG visual triple parsing to correctly extract image IDs from the
<obj> ... <rel>segment and preserve first-seen order for URL pairing. - Update the MultimodalKGPipeline example input to contain a non-empty
img_dictand correspondingvis_urlentries.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
MANIFEST.in |
Ensures example files (incl. images) are shipped in the sdist by recursively including dataflow/example/*. |
dataflow/operators/multi_model_kg/generate/mmkg_visual_triple_subgraph_qa_generator.py |
Fixes image-id extraction from vis_triple and aligns de-dup ordering with vis_url for correct img_dict construction. |
dataflow/operators/multi_model_kg/filter/mmkg_visual_triple_subgraph_sampling.py |
Corrects regex boundaries to parse <subj> up to <obj> and <obj> up to <rel> for visual triples. |
dataflow/example/MultimodalKGPipeline/input.json |
Adds concrete example image mappings and URLs so the example is runnable with bundled assets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.