Skip to content

Conversation

@quaquel
Copy link
Member

@quaquel quaquel commented Nov 18, 2025

This PR addressed #2884.

It does several things

  1. Adds a decorator for annotating methods that currently take seed or random as a kwarg. The decorator results in a FutureWarning when seed or random is being used instead of the new preferred rng kwarg. I use. FutureWarning because this is intended for end users (See https://docs.python.org/3/library/warnings.html).
  2. Adds this decorator to all methods that have seed or random as a kwarg
  3. Starts adding rng to all decorated classes and update their inner workings to use numpy generators instead of stdlib random generators.

reminder
we need to fix the set_seed widget on the solara side as well!

@github-actions

This comment was marked as outdated.

@quaquel quaquel added enhancement Release notes label trigger-benchmarks Special label that triggers the benchmarking CI deprecation When a new deprecation is introduced labels Nov 18, 2025
@quaquel quaquel linked an issue Nov 18, 2025 that may be closed by this pull request
4 tasks
@quaquel quaquel removed the trigger-benchmarks Special label that triggers the benchmarking CI label Nov 18, 2025
@quaquel quaquel added the trigger-benchmarks Special label that triggers the benchmarking CI label Nov 18, 2025
@github-actions

This comment was marked as outdated.

@quaquel quaquel removed the trigger-benchmarks Special label that triggers the benchmarking CI label Nov 18, 2025
@quaquel quaquel added the trigger-benchmarks Special label that triggers the benchmarking CI label Nov 18, 2025
@github-actions

This comment was marked as outdated.

@quaquel quaquel added trigger-benchmarks Special label that triggers the benchmarking CI and removed trigger-benchmarks Special label that triggers the benchmarking CI labels Nov 18, 2025
@github-actions
Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔴 +15.2% [+13.8%, +16.6%] 🔴 +65.9% [+65.5%, +66.2%]
BoltzmannWealth large 🔴 +5.5% [+4.9%, +6.1%] 🔴 +56.0% [+54.0%, +58.1%]
Schelling small 🔴 +7.3% [+7.1%, +7.5%] 🔵 -1.7% [-1.8%, -1.5%]
Schelling large 🔵 +2.7% [+2.2%, +3.2%] 🔴 +78.0% [+76.6%, +79.2%]
WolfSheep small 🔴 +24.2% [+23.6%, +24.7%] 🔴 +35.6% [+28.2%, +43.3%]
WolfSheep large 🔴 +22.6% [+21.5%, +23.5%] 🔴 +31.1% [+29.4%, +32.5%]
BoidFlockers small 🔵 +0.4% [-0.4%, +1.2%] 🔵 +0.2% [-0.1%, +0.5%]
BoidFlockers large 🔵 +1.0% [+0.4%, +1.7%] 🔵 +0.8% [+0.6%, +1.0%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecation When a new deprecation is introduced enhancement Release notes label trigger-benchmarks Special label that triggers the benchmarking CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecating stdlib random

1 participant