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

Logging Error #2393

Closed
decentai15 opened this issue Nov 6, 2024 · 1 comment · Fixed by #2465
Closed

Logging Error #2393

decentai15 opened this issue Nov 6, 2024 · 1 comment · Fixed by #2465
Labels
bug Something isn't working

Comments

@decentai15
Copy link

Describe the bug

When logging raw weights (np array), it gives this error.

.../template/base/validator.py", line 240, in set_weights
    bt.logging.debug("raw_weights", raw_weights)
    
 File ".../python3.10/site-packages/bittensor/utils/btlogging/loggingmachine.py", line 436, in debug
    msg = _concat_message(msg, prefix, suffix)
  File ".../python3.10/site-packages/bittensor/utils/btlogging/loggingmachine.py", line 52, in _concat_message
    msg = f"{f'{prefix} - ' if prefix else ''}{msg}{f' - {suffix}' if suffix else ''}"
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

To Reproduce

Reproduce:

import bittensor as bt
import numpy as np

suffix = np.array([1, 2, 3, 4, 5])
prefix = "hey"

bt.logging.info(prefix, suffix)

Expected behavior

Expected: Log the data as string without any error

Screenshots

No response

Environment

Linux Ubuntu, Bittensor 8.2.0

Additional context

No response

@decentai15 decentai15 added the bug Something isn't working label Nov 6, 2024
@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.

2 participants