Skip to content

fix(quickstart): smoother Colab UX (GPU default, conditional install, batch breakdown)#33

Merged
zhen-he merged 1 commit into
mainfrom
fix/colab-quickstart-ux
May 3, 2026
Merged

fix(quickstart): smoother Colab UX (GPU default, conditional install, batch breakdown)#33
zhen-he merged 1 commit into
mainfrom
fix/colab-quickstart-ux

Conversation

@zhen-he

@zhen-he zhen-he commented May 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Polish the Colab quickstart based on first-impression testing.

Four fixes

  1. GPU default — added accelerator: "GPU" + colab.gpuType: "T4" to notebook metadata so Colab spins up a T4 by default.
  2. Explicit GPU check — new cell prints ✓ GPU detected: <name> or a clear warning with the exact menu path (Runtime → Change runtime type → T4 GPU) if running on CPU.
  3. Conditional install (uncommented) — was # !pip install scmidas (commented), now if 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. --quiet reduces noise; a markdown note explains the benign google-colab/pandas resolver warning.
  4. Per-batch dataset breakdown — replaced the bare mdata repr (which just showed shapes) with an explicit table:

Test plan

  • Notebook re-executed via jupyter nbconvert --execute — all cells run, UMAP renders, breakdown prints correctly.

… 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.
@zhen-he zhen-he merged commit dd8c833 into main May 3, 2026
5 checks passed
@zhen-he zhen-he deleted the fix/colab-quickstart-ux branch May 3, 2026 07:23
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