Skip to content

Fix obsm key in cellmapper_scvi - #23

Open
rcannood wants to merge 1 commit into
mainfrom
fix/cellmapper-scvi-obsm-key
Open

Fix obsm key in cellmapper_scvi#23
rcannood wants to merge 1 commit into
mainfrom
fix/cellmapper-scvi-obsm-key

Conversation

@rcannood

Copy link
Copy Markdown
Member

Describe your changes

cellmapper_scvi crashes on every single run, right at the end -- after it has trained scVI/PoissonVI on a GPU.

CellMapper.map_obsm() writes its result to f"{key}{prediction_postfix}":

output_key = f"{key}{prediction_postfix}"
self.query.obsm[output_key] = query_data

So map_obsm(key="mod2", prediction_postfix="pred") produces obsm["mod2pred"], but the script reads obsm["mod2_pred"] -> KeyError. Its sibling cellmapper_linear already reads the right key; only the scvi variant drifted.

Worth flagging that this was invisible in the last run: labels_tw.config sets errorStrategy = 'ignore' after three attempts, so a method that reliably crashes shows up as missing rows in scores.yaml rather than as a failure. Might be worth a separate look at how we surface "crashed" vs "no score".

Part of a series of PRs coming out of a pre-run review of the benchmark.

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

cellmapper's map_obsm() writes f"{key}{prediction_postfix}", so
map_obsm(key="mod2", prediction_postfix="pred") produces "mod2pred",
not "mod2_pred" -- as cellmapper_linear already had it right.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant