fix(quickstart): smoother Colab UX (GPU default, conditional install, batch breakdown)#33
Merged
Merged
Conversation
… batch breakdown) Four polish fixes after first-impression testing on Colab: 1. Add notebook metadata `accelerator: "GPU"` + `colab.gpuType: "T4"` so the runtime defaults to a T4 GPU instead of CPU. 2. Add a dedicated GPU-check cell that prints a clear warning if the runtime is on CPU, with the exact menu path to enable GPU. 3. Make the install cell unconditional (was commented out) but guarded by an `importlib.util.find_spec` check, so it only runs when scmidas isn't already importable. `--quiet` flag plus a markdown note about the harmless google-colab/pandas dependency-resolver warning. 4. Replace the bare `mdata` print (which only showed shapes) with an explicit per-batch breakdown showing cell count and modality composition for each of the four batches — the mosaic structure is now visible at a glance. The demo is the project's first impression; smoothness here matters more than smoothness in any internal API.
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
Polish the Colab quickstart based on first-impression testing.
Four fixes
accelerator: "GPU"+colab.gpuType: "T4"to notebook metadata so Colab spins up a T4 by default.✓ GPU detected: <name>or a clear warning with the exact menu path (Runtime → Change runtime type → T4 GPU) if running on CPU.# !pip install scmidas(commented), nowif importlib.util.find_spec("scmidas") is None: !pip install --quiet scmidas. Runs install on Colab automatically, no-ops on local Jupyter where scmidas is already importable.--quietreduces noise; a markdown note explains the benign google-colab/pandas resolver warning.mdatarepr (which just showed shapes) with an explicit table:Test plan
jupyter nbconvert --execute— all cells run, UMAP renders, breakdown prints correctly.