thousandbrainsproject / tbp.monty

Monty is a sensorimotor learning framework based on the thousand brains theory of the neocortex.
https://thousandbrainsproject.readme.io
MIT License
107 stars 27 forks source link

ci: rightsize runners for specific jobs #31

Closed tristanls closed 2 days ago

tristanls commented 3 days ago

After rightsizing the runners, observed no significant changes in workflow runtimes. The test workflow runtime is uneffected because pytest was run with -n 8, so going from 16 to 8 cores had no apparent impact.

This reduces the cost of each Monty full-length workflow to less than a 1/3rd of current cost. From \~28min x $0.064 = \~$1.792 to \~13min x $0.008 + 15min x $0.032 = $0.104 + $0.48 = \~$0.584

Why are we using paid 2-core instances instead of free-tier 2-core instances? free-tier 2-core instances do not have large enough disk to download and restore the cache after installing Monty \~5.7GB.

tristanls commented 2 days ago

The runtimes would not be affected if the jobs never used more than two cores and never needed much memory. Ruff checks are fast, so it doesn't make a difference. Other checks, aside from testing, are also quick, so multithreading doesn't help. Install might only be using a single core as well, so that could explain why it wasn't materially affected.

The split was because the minutes get charged different amounts in the new setup since they use different runners: $0.008/min (2-core) and $0.032/min (8-core), respectively.

vkakerbeck commented 2 days ago

okay, thanks for the explanation :) that makes sense