fix(molrecbench_wild): give the converter its required track column - #1668
Open
Anai-Guo wants to merge 1 commit into
Open
fix(molrecbench_wild): give the converter its required track column#1668Anai-Guo wants to merge 1 commit into
Anai-Guo wants to merge 1 commit into
Conversation
MolRecBenchWildDataset.evaluate() calls
convert_dataframe(selected, track=self.track), but convert_dataframe's
signature is (dataframe, *, sheet, id_suffix) - it reads the track from a
required "track" column instead of a keyword argument. Every evaluation
run therefore dies with
TypeError: convert_dataframe() got an unexpected keyword argument 'track'
and dropping the keyword alone is not enough, because the frame that
evaluate() builds only has "index" and "prediction":
WorkbookConversionError: sheet 'Sheet1' is missing columns: track
Add the track column to the frame and drop the keyword.
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.
The bug
MolRecBenchWildDataset.evaluate()cannot run at all. It builds a two-columnframe and then calls the converter with a
track=keyword:But
convert_dataframetakes notrackargument — it reads the track from arequired column:
So every run of any of the three MolRecBench-Wild tracks raises:
and simply deleting the keyword is not enough, because the frame that
evaluate()builds has notrackcolumn either:(
score_records(ground_truth, converted, self.track, ...)a few lines below iscorrect —
trackreally is a positional parameter there, which is likelywhere the mix-up came from.)
The fix
Supply the track as the column the converter asks for, and drop the keyword.
Verification
Ran the real
vlmeval/dataset/utils/molrecbench_wildpackage atmain(
5a91183) against the exact frameevaluate()constructs.Before — both failure modes:
After — records convert, no diagnostics:
(second prediction was fenced
```jsonoutput, to check the normalextraction path still runs rather than falling back to empty records).
pre-commit's flake8 (7.1.2,--max-line-length=120 --ignore=W503) and isort6.0.1 are clean on the changed file, and yapf produces the same diff before and
after the change — the added lines are untouched by it.
🤖 Generated with Claude Code