You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if it is an issue and not intended behaviour but nevertheless decided to notify about it.
When you pass a dictionary value into batch runner it only takes keys and not values. So you'll not get a cartesian product of your values. For example, if you pass something like this:
classMoneyModel(Model):
def__init__(self, n, grid_params): # grid_params is intended to be a dictionarysuper().__init__(self)
...
defmain():
...
n_iters, n_steps=5, 200params= {
"grid_params": {"height": 10, "width": 10},
"n": range(10, 500, 10)}
batch=BatchRunner(MoneyModel, params,
iterations=n_iters, max_steps=n_steps,
model_reporters={"Gini": compute_gini})
batch.run_all()
Not sure if it is an issue and not intended behaviour but nevertheless decided to notify about it.
When you pass a dictionary value into batch runner it only takes keys and not values. So you'll not get a cartesian product of your values. For example, if you pass something like this:
You'll get issue in there: https://github.com/projectmesa/mesa/blob/master/mesa/batchrunner.py#L71, i.e. variable
kwargs
will be equal to{'grid_params': 'width', 'n': 10}
(or any other dictionary key) instead of original value.The text was updated successfully, but these errors were encountered: