Skip to content

Commit

Permalink
fix: move readme_script to example/boltzmann_wealth and remove transp…
Browse files Browse the repository at this point in the history
…arency
  • Loading branch information
adamamer20 committed Aug 25, 2024
1 parent 6b696be commit 876ae63
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ DataFrames are optimized for simultaneous operations through [SIMD processing](h

The following is a performance graph showing execution time using mesa and mesa-frames for the [Boltzmann Wealth model](https://mesa.readthedocs.io/en/stable/tutorials/intro_tutorial.html).

![Performance Graph](https://github.com/adamamer20/mesa_frames/blob/main/docs/general/images/readme_plot_0.png)
![Performance Graph with Mesa](https://github.com/adamamer20/mesa_frames/blob/main/examples/boltzmann_wealth/boltzmann_with_mesa.png)

![Performance Graph without Mesa](https://github.com/adamamer20/mesa_frames/blob/main/docs/general/images/readme_plot_1.png)
![Performance Graph without Mesa](https://github.com/adamamer20/mesa_frames/blob/main/examples/boltzmann_wealth/boltzmann_no_mesa.png)

(The script used to generate the graph can be found [here](https://github.com/adamamer20/mesa_frames/blob/main/docs/scripts/readme_plot.py), but if you want to additionally compare vs Mesa, you have to uncomment `mesa_implementation` and its label)
(The script used to generate the graph can be found [here](https://github.com/adamamer20/mesa_frames/blob/main/examples/boltzmann_wealth/performance_plot.py), but if you want to additionally compare vs Mesa, you have to uncomment `mesa_implementation` and its label)

## Installation

Expand Down
Binary file removed docs/general/images/readme_plot_0.png
Binary file not shown.
Binary file removed docs/general/images/readme_plot_1.png
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/general/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ DataFrames are optimized for simultaneous operations through [SIMD processing](h

Check out our performance graphs comparing mesa and mesa-frames for the [Boltzmann Wealth model](https://mesa.readthedocs.io/en/stable/tutorials/intro_tutorial.html):

![Performance Graph](images/readme_plot_0.png)
![Performance Graph with Mesa](https://github.com/adamamer20/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_with_mesa.png)

![Performance Graph without Mesa](images/readme_plot_1.png)
![Performance Graph without Mesa](https://github.com/adamamer20/mesa-frames/raw/main/examples/boltzmann_wealth/boltzmann_no_mesa.png)

## Quick Start 🚀

Expand Down
Binary file added examples/boltzmann_wealth/boltzmann_no_mesa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/boltzmann_wealth/boltzmann_with_mesa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def plot_and_print_benchmark(labels, kernels, n_range, title, image_path):
)

plt.ylabel("Execution time (s)")
out.save(image_path)
out.save(image_path, transparent=False)

print("\nExecution times:")
for i, label in enumerate(labels):
Expand Down Expand Up @@ -313,7 +313,7 @@ def main():
]
n_range_0 = [k for k in range(0, 100001, 10000)]
title_0 = "100 steps of the Boltzmann Wealth model:\n" + " vs ".join(labels_0)
image_path_0 = "docs/images/readme_plot_0.png"
image_path_0 = "boltzmann_with_mesa.png"

plot_and_print_benchmark(labels_0, kernels_0, n_range_0, title_0, image_path_0)

Expand All @@ -331,7 +331,7 @@ def main():
]
n_range_1 = [k for k in range(100000, 1000001, 100000)]
title_1 = "100 steps of the Boltzmann Wealth model:\n" + " vs ".join(labels_1)
image_path_1 = "docs/images/readme_plot_1.png"
image_path_1 = "boltzmann_no_mesa.png"

plot_and_print_benchmark(labels_1, kernels_1, n_range_1, title_1, image_path_1)

Expand Down

0 comments on commit 876ae63

Please sign in to comment.