bittensor
bittensor copied to clipboard
Setting Weights Error w/ Logging.debug()
Describe the bug
When the bt.logging is set to debug mode, there are two instances where setting weights can fail, as the code attempts to log an array without a * prefix.
bt.logging.debug("weights", weights) -> bt.logging.debug("weights", *weights)
To Reproduce
- set logging to debug mode in the validator run script with
--logging.debug - run a validator and watch it attempt to set weights
- if all weights are 0, or if there are weights to set, it will error with:
Failed to set weights: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Expected behavior
Setting weights should pass regardless of being in debug mode or not.
Screenshots
No screenshots needed, that is the error thrown
Environment
macOS Sonoma 14.6.1, Apple M3 Pro, Bittensor 8.2.0
Additional context
I believe this issue is also present in 8.1.0 and 8.1.1.