Skip to content

docs: add a uv install cell to every example notebook - #55

Merged
AzulGarza merged 2 commits into
mainfrom
docs/notebook-install-cells
Oct 14, 2026
Merged

AzulGarza merged 2 commits into
mainfrom
docs/notebook-install-cells

Conversation

@AzulGarza

Copy link
Copy Markdown
Member

Summary

Adds an install cell after the title of every example notebook so they run as-is when opened from the docs' Open in Colab button. Previously 11 notebooks failed at the first import.

!UV_CONSTRAINT= UV_BUILD_CONSTRAINT= uv pip install -q "foundationforecast[plot]"
  • Colab ships uv with UV_SYSTEM_PYTHON=true, so this installs into the notebook kernel's Python, much faster than pip.
  • Colab also sets UV_CONSTRAINT/UV_BUILD_CONSTRAINT to its own constraint files, which have broken uv pip install before (googlecolab/colabtools#5237); clearing them inline avoids that.
  • Locally, run Jupyter from a virtual environment (e.g. uv run --with jupyter jupyter lab); uv pip install needs one outside Colab.
  • All notebooks plot, so they install the plot extra; tabpfn-family also adds python-dotenv.

Each notebook only gains the new cell (formatting preserved). Every install line was dry-run resolved in a fresh Python 3.12 environment.

Made with Cursor

Copilot AI balanced review requested due to automatic review settings October 14, 2026 20:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The finetuning installation omits peft, which its LoRA examples require.

1 open finding
What changed in this PR

Adds setup cells to 11 example notebooks to support running them directly in Colab.

Changes:

  • Installs foundationforecast[plot] using uv.
  • Clears Colab constraint variables for installation.
  • Adds python-dotenv to the TabPFN example.
File Description
docs/​examples/​ts-foundation-models-comparison-quickstart.ipynb Adds comparison setup.
docs/​examples/​toto-family.ipynb Adds Toto setup.
docs/​examples/​tirex-family.ipynb Adds TiRex setup.
docs/​examples/​timesfm-family.ipynb Adds TimesFM setup.
docs/​examples/​tabpfn-family.ipynb Adds setup including dotenv.
docs/​examples/​patchtst-fm-family.ipynb Adds PatchTST-FM setup.
docs/​examples/​forecaster-quickstart.ipynb Adds forecasting setup.
docs/​examples/​finetuning.ipynb Adds finetuning setup.
docs/​examples/​exogenous-variables.ipynb Adds exogenous-variable setup.
docs/​examples/​chronos-family.ipynb Adds Chronos setup.
docs/​examples/​anomaly-detection-forecaster-quickstart.ipynb Adds anomaly-detection setup.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/examples/finetuning.ipynb Outdated
"metadata": {},
"outputs": [],
"source": [
"!UV_CONSTRAINT= UV_BUILD_CONSTRAINT= uv pip install -q \"foundationforecast[plot]\""

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 61e8015: the install cell now adds peft. A proper finetune extra is tracked in #57.

@codspeed

codspeed Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

ℹ️ 13 benchmarks have no flame graph

The flamegraph could not be generated because we failed to resolve the symbols in the profiling trace. This happens when we fail to harvest information about language frames.

✅ 17 untouched benchmarks


Comparing docs/notebook-install-cells (61e8015) with main (b92ea05)

Open in CodSpeed

@AzulGarza
AzulGarza merged commit 6f92708 into main Oct 14, 2026
11 of 12 checks passed
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AzulGarza AzulGarza mentioned this pull request Oct 14, 2026
5 tasks done
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.

2 participants