projectmesa/mesa

Fix error in failing flocking benchmark

EwoutH opened this issue · 0 comments

Our benchmarks are failing: https://github.com/projectmesa/mesa/actions/workflows/benchmarks.yml

08:41:17 starting benchmarks.
08:41:35 Schelling      (small) timings: Init 0.00771 s; Run 0.0472 s
08:41:55 Schelling      (large) timings: Init 0.05062 s; Run 0.4629 s
08:42:01 WolfSheep      (small) timings: Init 0.00333 s; Run 0.0124 s
08:42:[15](https://github.com/projectmesa/mesa/actions/runs/8813652146/job/24191834761#step:7:16) WolfSheep      (large) timings: Init 0.05334 s; Run 0.2206 s
  File "/home/runner/work/mesa/mesa/benchmarks/global_benchmark.py", line 62, in <module>
    results = run_experiments(model, config)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/mesa/mesa/benchmarks/global_benchmark.py", line 47, in run_experiments
    init_time, run_time = run_model(model_class, seed, config["parameters"])
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/mesa/mesa/benchmarks/global_benchmark.py", line [21](https://github.com/projectmesa/mesa/actions/runs/8813652146/job/24191834761#step:7:22), in run_model
    model = model_class(simulator=simulator, seed=seed, **parameters)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/mesa/mesa/benchmarks/Flocking/flocking.py", line 139, in __init__
    boid = Boid(
           ^^^^^
TypeError: Boid.__init__() got an unexpected keyword argument 'pos'
Error: Process completed with exit code 1.

Most likely something was changed in benchmarks/Flocking/flocking.py that needs to be fixed/reverted.