Skip to content

FIX: execution errors in notebooks#277

Open
mmcky wants to merge 2 commits into
mainfrom
fix-execution-errors
Open

FIX: execution errors in notebooks#277
mmcky wants to merge 2 commits into
mainfrom
fix-execution-errors

Conversation

@mmcky

@mmcky mmcky commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR fixes execution errors discovered during a full CI execution check.

Issues Fixed

1. MLPRegressor API Change (scikit-learn)

Files: lectures/applications/ml_in_economics.md, lectures/tools/regression.md

The scikit-learn API for MLPRegressor has changed - the first positional argument is now loss instead of hidden_layer_sizes. This was causing all 40 fits to fail with:

InvalidParameterError: The 'loss' parameter of MLPRegressor must be a str among {'squared_error', 'poisson'}. Got (50,) instead.

Fix: Changed positional tuple arguments to use the explicit hidden_layer_sizes= keyword argument.

2. Broken Avalanche Canada API

File: lectures/applications/working_with_text.md

The Avalanche Canada incidents API (http://incidents.avalanche.ca/public/incidents/) now returns HTTP 404.

Fix: Load incident data directly from the cached CSV file (avalanche_incidents.csv) which already contains all the required data.

Testing

These changes should be validated by the CI execution check.

- Fix MLPRegressor API calls in ml_in_economics.md and regression.md
  - Changed positional tuple arg to hidden_layer_sizes= keyword argument
  - Required due to scikit-learn API change where first positional arg is now 'loss'

- Fix broken Avalanche Canada API in working_with_text.md
  - API endpoint now returns 404
  - Load incident data directly from cached CSV file instead
@mmcky mmcky changed the title Fix execution errors in notebooks FIX: execution errors in notebooks Nov 26, 2025
@mmcky

mmcky commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

@doctor-phil just some suggestions to fix the current execution failures.

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