Closed w4d3j closed 3 years ago
Added a question about how you're loading it into job configs
Not sure exactly what you mean. I added the parameters into the flags dictionary in jobs.py (as optional flags, with the others), as vars in objects.py, and as input params for plots.create in plots.py, then added documentation about using them in default config. They're getting passed through to chia_plot just fine along with all the other optional and required flags from config.yaml.
@w4d3j
These lines should be the below instead of the one above.
# current
job.threadX_p2 = info['threadX_p2']
# what I think it should be
job.threadX_p2 = info.get('threadX_p2')
If we don't use .get() in the dictionary to grab the value, then it will be a breaking change for everyone with an older config file.
Thank you for your time and energy showing me how to improve. I've added the .get() method.
I noticed other places using .get() specified a second parameter for the method even when it was None, and I considered doing it to fall in line with the rest of the method calls but decided to ask a question first:
If .get() returns None if the key is not found and there is no second argument, why the redundancy of specifying None as the second argument? Is it for readability? Or perhaps backwards-compatibility?
Added -v and -K parameters for madmax chia_plot executable.
-v = # threads for phases 3&4 -K = thread multiplier for phase 2