Skip to content

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

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 and lectures/_static/downloads/amss_environment.yml still name default. The first 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); the second is a download offered to readers. Each needs its own update and check. 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
@netlify

netlify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!

Name Link
🔨 Latest commit ac4db97
🔍 Latest deploy log https://app.netlify.com/projects/lustrous-melomakarona-3ee73e/deploys/6b02c94a70550c08c2703d04
😎 Deploy Preview https://deploy-preview-423--lustrous-melomakarona-3ee73e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions
github-actions Bot temporarily deployed to pull request November 22, 2026 11:08 Inactive
@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 77 notebooks, -W --keep-going, both green:

Build Run
main at 354faf5, this branch's base, 2026-11-22 45012283119
this pull request at ac4db97, 2026-11-22 45018184850

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 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.

The HTML. 36 of 85 pages differ, and no lecture's prose does. The differences are output noise, the same as between any two builds: unseeded draws, timings, memory addresses and solver printouts, and figures drawn again with new file names. The status page differs too, with its build times.

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

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 modifies shared Conda channel resolution across CI, caching, publishing, and Binder environments, human confirmation is needed for dependency-source policy, reproducibility, and package equivalence.

No open issues 🎉

What changed in this PR

This PR corrects the Conda channel name in the root environment specification so builds use Anaconda’s official defaults channel rather than the unrelated default user channel.

Changes:

  • Replaces default with defaults in environment.yml.
File Description
environment.yml Corrects the Conda channel configuration from default to Anaconda’s official defaults channel.

Review effort: Lite (adaptive)

@mmcky

mmcky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Validation addendum: the 51 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, 51 pages differ, not 36. The 15 added pages are in the table below and differ only in figures; 15 other rows, which already listed their figures, now also give the cause of each figure's difference, or say plainly where I haven't found one. The conclusion doesn't change: no page's prose differs.

The evidence comment above says 36 of 85 pages differ in output noise; with figures counted it is 51. Here they are, with what differs on each, so the claim can be checked. No page's prose differs. Every one of them also differed when the same main build was compared with the first build of #420, another pull request on the same base, which changes only bibliography text. "Round-off" below means differences around 1e-15, or in the last of 16 or so significant figures.

Page What differs between main's build and this pull request's
additive_functionals figures 1 to 3 of 10, from lss.simulate, which draws without a seed
amss %%time timings
amss2 printed values in the last digits, the kernel's temporary file numbers inside RuntimeWarnings, figure 2 of 2, from a long simulation whose Markov states mc.simulate draws without a seed, and figure 1, which looks the same but has lines and markers a pixel apart in places: it plots a simulation along a fixed history of states, whose values differ only by round-off, as the page's printed values do
amss3 printed values in the last digits, the kernel's temporary file numbers inside RuntimeWarnings, and figures 1 and 4 of 5, from a long simulation whose Markov states mc.simulate draws without a seed
arma the kernel's temporary file numbers inside its warnings (the same ComplexWarning and UserWarnings on both sides), and figures 5 to 9 of 9, each with a series simulated by qe.ARMA.simulation() without a seed
asset_pricing_lph round-off, and estimates from unseeded draws (np.random.normal)
atkeson_1991 the progress counter of the cell's pip install
BCG_complete_mkts %%time timings, and the kernel's temporary file number inside Kaleido's DeprecationWarning; the warning itself is the same on both sides
BCG_incomplete_mkts the kernel's temporary file numbers inside Kaleido's DeprecationWarnings
black_litterman round-off in printed checks (for example 2.0e-15 against 2.9e-15)
calvo_machine_learn the last digits of a printed array, figure 3 of 5 on one pixel by one shade level in 255 (anti-aliasing, invisible), and figures 4 and 5, the same plots saved one pixel shorter and one pixel taller, so every row below the change shifts; I haven't found why the crop moved
cattle_cycles figure 1 of 3, from compute_sequence, which draws its shocks without a seed
chang_ramsey figures 4 to 8 of 8, by at most 4 shade levels in 255 (anti-aliasing, invisible)
classical_filtering round-off, and two printed pairs of values that come out in the opposite order
cons_news printed values in the last digits, memory addresses, and figures 3 and 4 of 4, from unseeded LSS.simulate draws
discrete_dp %timeit timings and the printed elapsed times
dyn_stack round-off (including the sign of a zero), and figure 6 of 6, on 328 pixels, each by one shade level in 255 (anti-aliasing, invisible)
entrepreneurial_stock_market figures 2, 4 and 6 of 9, on 37 pixels in all, each by one shade level in 255: anti-aliasing, invisible; no random draws are behind them
estspec figures 1, 6 and 7 of 7, from ARMA.simulation, which draws without a seed
gorman_heterogeneous_households a value at round-off level (7e-14 against 3e-14), and figure 4 of 8, the same plot saved one pixel taller (390 against 389 pixels), so every row below the change shifts; I haven't found why the crop moved
gradual_liberalization_network round-off, the first year of free trade, 31 against 32 (see below), and figures 4 and 5 of 6, by at most 5 shade levels in 255 (anti-aliasing, invisible)
gradual_trade_agreements figure 2 of 3, on 1 pixel in all, each by one shade level in 255: anti-aliasing, invisible; no random draws are behind them
growth_in_dles the printed steady state (see below), and all five figures, from compute_sequence's unseeded shocks
hansen_jagannathan_1991 a value at round-off level, and figure 6 of 6, on 29 pixels, each by one shade level in 255 (anti-aliasing, invisible)
hansen_richard_1987 the sign of a zero
irfs_in_hall_model values at round-off level, and figures 1, 3 and 5 of 6, from compute_sequence's unseeded shocks
knowing_forecasts_of_others the kernel's temporary file number inside Kaleido's DeprecationWarning, and regression coefficients in the last digits
lqramsey figures 1 to 6 of 6, from paths drawn with numpy's unseeded randn
lucas_asset_pricing_dles correlation matrices and all five figures, from compute_sequence's unseeded shocks
lucas_model figures 1 and 3 of 3, from unseeded draws (ϕ.rvs)
markov_jump_lq figures 2 and 22 of 22, from compute_sequence, which draws its shocks without a seed
muth_kalman figures 1 to 3 of 4, from ssf.simulate, which draws without a seed
organizational_equilibrium values at round-off level, and figures 5 to 7 of 8, each pixel by one shade level in 255 (anti-aliasing, invisible)
permanent_income_dles figure 1 of 1, from compute_sequence, which draws its shocks without a seed
policy_counterfactuals values at round-off level
policy_counterfactuals_nk the printed approximation errors, none above 5.4e-06 (one is 5.4e-06 against 5.7e-09), the smallest of three singular values (1.65993186e-07 against 1.65993137e-07), and figures 2 and 7 of 7, on 4 pixels each, by one shade level in 255 (anti-aliasing, invisible)
policy_invertibility values at round-off level
policy_regimes values at round-off level
repeat_mh the progress counters of the cell's pip install, and figures 12 and 13 of 15, by at most 2 shade levels in 255 (anti-aliasing, invisible)
risk_aversion_or_mistaken_beliefs figure 8 of 13: the same plot, saved 490 pixels high on main's side and 489 on this side, so every row below the change shifts; I haven't found why the crop moved
robustness memory addresses in printed objects, and figure 3 of 4, each pixel by one shade level in 255 (anti-aliasing, invisible)
smoothing figures 1 and 2 of 2: figure 1 from a simulation whose seed is itself drawn at random (np.random.randint); figure 2 on 422 pixels, each by one shade level in 255 (anti-aliasing, invisible)
smoothing_tax printed values in their 15th and 16th significant figures, and six figures, each pixel by one shade level in 255 (anti-aliasing, invisible)
status the build times
supply_demand_var a value in the last digits
tax_smoothing_1 figures 1 to 3 of 3, from compute_sequence, which draws its shocks without a seed
tax_smoothing_2 figures 1 to 4 of 4, from compute_sequence, which draws its shocks without a seed
tax_smoothing_3 figures 1 and 2 of 2, from compute_sequence, which draws its shocks without a seed
temptation_self_control a value at round-off level (1.4e-07 against 1.5e-07), and figure 1 of 3, on 5 pixels, by one shade level in 255 (anti-aliasing, invisible)
tsyrennikov_2013 one statistic, the LE mean RSI, 0.7676 against 0.7653 (see below), figure 1 of 5 on 1,186 pixels (by up to 143 shade levels in 255), visible on close inspection, in the lecture whose LE statistic moves; I haven't traced which plotted value causes it; and figures 2 and 3, each pixel by one shade level in 255 (anti-aliasing, invisible)
un_insure the solver's printed errors, in the last digits

Three printed results that move. In three places the difference reaches a printed result's shown digits, from lecture code with no random draws behind it, and in each the value varies between builds that share this lecture code and, apart from this pull request, main's environment. gradual_liberalization_network's first year of free trade and tsyrennikov_2013's LE mean RSI: main's build and the second build of #420 give 31 and 0.7676, while this pull request's, #421's and the first build of #420 give 32 and 0.7653. growth_in_dles' steady state, which quantecon computes from the null space of I − A0: main's build prints c, i, k = 5, 0, 0, while this pull request's, #421's and both builds of #420 print 4.999, −0.001, −0.016. Neither #420 nor #421 changes the environment, so these come from the lectures' sensitivity to round-off, not from the channel.

Packages installed inside cells. Six pages run pip install in a cell (BCG_complete_mkts, atkeson_1991, chang_credible, calvo_machine_learn, chang_ramsey, repeat_mh), 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 was previously deployed

1 inactive deployment
pull request — ac4db977 Deployed Nov 22, 2026 by github-actions[bot]
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