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

Open
decentai15 opened this issue Nov 6, 2024 · 0 comments
Open

Logging Error #2393

decentai15 opened this issue Nov 6, 2024 · 0 comments
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
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

No branches or pull requests

1 participant