bittensor icon indicating copy to clipboard operation
bittensor copied to clipboard

Setting Weights Error w/ Logging.debug()

Open grantdfoster opened this issue 1 year ago • 0 comments

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

  1. set logging to debug mode in the validator run script with --logging.debug
  2. run a validator and watch it attempt to set weights
  3. 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.

grantdfoster avatar Oct 17 '24 21:10 grantdfoster