-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add get_parameters() and copy() utilities to Scenario for easier experiment management #3159
Copy link
Copy link
Closed
Description
What's the problem this feature will solve?
Currently, when working with Scenario instances, there is no simple way to:
- retrieve only the scenario parameters while excluding internal metadata (
model,_scenario_id) - create a modified copy of an existing scenario with updated parameters
This makes experiment sweeps, logging, and reproducibility cumbersome and error-prone.
Describe the solution you'd like
Add two small utility methods to the Scenario class:
get_parameters()– returns scenario parameters excluding metadata.copy(**updates)– creates a new scenario instance with optional parameter updates:- assigns a new
_scenario_id - does not copy the
modelreference - shares the same RNG object by reference
- assigns a new
These additions would simplify scenario management and improve usability for experiments.
Additional context
- A PR implementing this already exists: Add parameter access and copy support to Scenario #3158
- The
copy()method is useful for creating slightly modified scenarios for sweeps or testing different parameters without affecting the original instance. - The RNG sharing behavior is documented to prevent confusion.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels