Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Weights Error w/ Logging.debug() #2361

Closed
grantdfoster opened this issue Oct 17, 2024 · 1 comment · Fixed by #2465
Closed

Setting Weights Error w/ Logging.debug() #2361

grantdfoster opened this issue Oct 17, 2024 · 1 comment · Fixed by #2465
Assignees
Labels
bug Something isn't working

Comments

@grantdfoster
Copy link
Contributor

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.

@thewhaleking
Copy link
Contributor

Part of #2441

@thewhaleking thewhaleking linked a pull request Nov 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants