Closed jameshughes89 closed 1 year ago
I love how a handful of context-free constants at the top of a file are considered hyperparameters. You can really tell that those involved have no experience in software.
How would you typically go about doing it? Something like a settings dictionary?
A global dictionary is exactly what you already have, a set of strings which correspond to a value. The same problems still exist even if you nest in the global dictionary (like { "part1": { "param": 2 } }
, as you modify part1's behaviour with no context.
I'd probably argue for functions and magic numbers. Functions provide context, and there's no real value in writing param=PARAM
instead of param=2
(unless PARAM
is cross-cutting, which does not seem to be the case here). Local constants may be helpful if the relevant parameters are not part of kwargs
.
Related Issues or PRs
143
kinda #147
What
Actually use the constants in the code for the genetic operator rates
Why
I forgot
Testing
:+1: