Skip to content

environment.yml: the Anaconda channels are defaults - #1142

Open
mmcky wants to merge 1 commit into
mainfrom
conda-channel-defaults
Open

mmcky wants to merge 1 commit into
mainfrom
conda-channel-defaults

Conversation

@mmcky

@mmcky mmcky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What

environment.yml names the conda channel default:

Before After
channels: - default channels: - defaults

default is the anaconda.org user channel of that name, not Anaconda's own channels, which conda calls defaults. That channel is empty today, so the environment resolves from defaults all the same: conda env update appends defaults to an environment file's channels unless the file lists nodefaults, and the build logs list "Channels: - default - defaults". But conda searches default first, so anything ever uploaded there would take precedence. The review of the lecture monorepo's GPU leg found it, which had copied the line (QuantEcon/lectures#87). All six lecture series have it.

Not changed here. _notebook_repo/environment.yml still names default. It is the environment publish.yml copies into the notebooks repository that Binder uses, and it is out of date in other ways too (python 3.8), so it needs its own update and a check that Binder still builds. This pull request fixes only the environment the series' own builds use; the others are a separate follow-up.

This is part of reporting fixes upstream to each series, their source of truth (QuantEcon/project-monorepo#77).

Validation

Done on 2026-11-22, a full validation: fresh builds with no cache of this pull request and of main, every lecture executed, both green; the installed packages are identical. The evidence is in the comment below.

This changes the build environment's specification, so it needs a person's review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL

`channels: - default` names the anaconda.org user channel "default", not
Anaconda's own channels, which conda calls `defaults`. That channel is
empty today, so the environment resolves from `defaults` all the same (the
runner's .condarc adds it after), but conda searches `default` first, so
anything uploaded there would take precedence. Found by the review of the
lecture monorepo's GPU leg, which copied the line (QuantEcon/lectures#87).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-1142--sunny-cactus-210e3e.netlify.app

Commit: 3b30e2f


Build Info

@mmcky

mmcky commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Validation: a full validation

Two fresh builds with no cache, each executing all 159 notebooks on the series' GPU machine (cache.yml), -W --keep-going, both green:

Build Run
main at 220fb97, this branch's base, 2026-11-22 45012272650
this pull request at 3b30e2f, 2026-11-22 45024451437

The channel. Main's build configured conda with channels: - default; this pull request's with channels: - defaults.

The installed packages are identical. Each build used the same 504 conda packages, every one at the same version and build, and the same 61 pip packages. The package lists are taken from setup-miniconda's own record of the package directories it cached, and from pip's "Successfully installed" lines.

Build logs. The same warning lines on both sides, and no Sphinx warning on either.

Cell outputs. The warnings and errors in the cell outputs are the same on both sides, page by page, with one count that differs: odu's solver prints one more "Error at iteration" progress line, because its unseeded draws converged in 25 iterations rather than 24, as they vary between any two builds.

The HTML. 25 of 176 pages differ, and no lecture's prose does. The differences are output noise, the same as between any two builds: timings, unseeded draws and the clock times in the regression summaries. The status page differs too, with its build times. As a check, the same main build compared with the build of #1140, another pull request on the same base, gave the same pages, apart from ifp_egm, whose only difference here is its NumPy/JAX speed-up, 2.10x against 2.08x.

@mmcky
mmcky marked this pull request as ready for review November 22, 2026 15:18
Copilot AI adaptive review requested due to automatic review settings November 22, 2026 15:18

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.

🔵 Needs a closer look

Because the change alters the Conda channel used across all CI, cache, and publish environments, a maintainer should verify the intended supply-chain policy and fresh-build/package-equivalence results before approval.

No open issues 🎉

What changed in this PR

Corrects the primary Conda environment specification to use Anaconda’s official defaults channel instead of the unrelated default user channel.

Changes:

  • Replaces default with defaults in environment.yml.
  • Leaves _notebook_repo/environment.yml unchanged for a separate follow-up.
  • No actionable code issues were identified.
File Description
environment.yml Updates the Conda channel used by the lecture CI, cache, and publish build environment.

Review effort: Lite (adaptive)

@mmcky

mmcky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Validation addendum: the 37 pages that differ

Corrected on 2026-11-22 at 15:46 UTC, after this was first posted. The comparison behind the evidence comment compared a figure only when the page wraps it in a link, and this series doesn't, so a page whose only difference is a figure wasn't counted. With every figure now compared by content, 37 pages differ, not 25. The 12 added pages are in the table below and differ only in figures; 7 other rows also gained figures they had left out. The conclusion doesn't change: no page's prose differs.

The evidence comment above says 25 of 176 pages differ in output noise; with figures counted it is 37. Here they are, with what differs on each, so the claim can be checked. No page's prose differs, and every one of them except ifp_egm also differed when the same main build was compared with the build of #1140.

Page What differs between main's build and this pull request's
ak_aiyagari %time system times
ar1_bayes the progress bars of the cell's pip install, the sampler's progress display and posterior summary in the last decimals (for example 0.4372 against 0.4370), and figures 2, 3, 4 and 7 of 7, from the same sampling; pm.sample runs without a seed
bayes_nonconj the kernel's temporary file number inside a UserWarning; the warning itself is the same on both sides
eig_circulant unseeded random arrays
finite_markov unseeded simulated paths and the frequencies computed from them, and figure 7 of 8, drawn from them
hoist_failure a speed-up, 27x against 25x
ifp_discrete two relative speeds (1.62 against 1.64)
ifp_egm the NumPy/JAX speed-up, 2.10x against 2.08x
ifp_egm_transient_shocks the NumPy/JAX speed-up, 41.51x against 43.93x
ifp_opi the VFI/OPI speed-ups, and figure 2 of 2, which plots run times
kalman figures 6 to 8 of 8, from ss.simulate, which draws without a seed
kalman_2 figures 1, 2, 3, 6 and 7 of 7, from simulate, which draws without a seed
kesten_processes the progress bars of the cell's pip install
lagrangian_lqdp %timeit timings
likelihood_ratio_process simulated error probabilities at T=30, and 17 of 18 figures, all from an unseeded generator (default_rng())
likelihood_ratio_process_2 simulated shares and values (for example mix=0.922 against 0.926), and 13 of 16 figures, from unseeded generators (default_rng(); one of its six generators is seeded)
linear_models figures 2 to 8 of 8, from ar.simulate, which draws without a seed
lln_clt figures 1, 3, 4, 5 and 6 of 6, from unseeded draws (.rvs, default_rng())
lq_inventories figures 1, 2, 4, 5, 6, 12, 15 and 16 of 16, from simulate, which calls LQ.compute_sequence without a seed
lqcontrol figures 1, 2, 8, 9 and 10 of 10, from LQ.compute_sequence, which draws its shocks without a seed
markov_asset figure 1 of 6, from mc.simulate, which draws without a seed
mle the clock time printed in three regression summaries
multi_hyper sample means and covariances from unseeded draws, and its one figure, drawn from them
odu one more "Error at iteration" progress line: it converged in 25 iterations rather than 24; and 14 of 15 figures, from unseeded draws
ols the download speed of the cell's pip install, and the clock time printed in the regression summaries
opt_transport %time timings and the progress bars of the cell's pip install
pandas_panel a memory address in an object's repr
perm_income figures 1 and 2 of 3, from unseeded draws (default_rng())
perm_income_cons figures 1 to 6 of 6, from lss.simulate, which draws without a seed
phillips_drifts_volatilities the sampler's run time in minutes, 14.880 against 14.951
phillips_drifts_volatilities_2 the sampler's run time in minutes, 12.411 against 12.292
samuelson figure 13 of 20, from a simulation with an unseeded generator (default_rng())
sargent_surico the two samplers' run times in seconds (273 and 351 against 286 and 373), and the ESS per second computed from them; the effective sample sizes themselves are the same
stats_examples sample moments from unseeded draws, and the four figures drawn from them
status the build times and the GPU report's timestamp
uncertainty_traps figures 5 and 6 of 6, from unseeded draws (default_rng())
wealth_dynamics figures 1 to 9 of 9, from unseeded draws (default_rng(), np.random.randn)

Packages installed inside cells. Nine pages run pip install in a cell (aiyagari, ar1_bayes, back_prop, house_auction, kesten_processes, odu, ols, opt_transport, sargent_surico), which the build log doesn't record. On each one, "Successfully installed" lists the same packages at the same versions on both sides.

This branch has not been deployed

No deployments
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