[Feedback/Error] JSON serialisation issue when trying to log a metric of variable type set
See original GitHub issue- Weights and Biases version: 0.8.32
- Python version: 3.7.2
- Operating System: Linux/MacOS
Description
I was logging a variable/value that is of type set
this caused JSON serialisation issues, similar to the error reported here https://stackoverflow.com/questions/8230315/how-to-json-serialize-sets (JSON serialisation failing when handling data with set data types).
Although the way python
reported the error (low-level call stack information), it wasn’t clear if it was caused by wandb
coming from my code. I looked to look at it closer, googled and then looked at my last commit change lead me to the solution.
What I Did
a = {'a', 'b', 'c'}
wandb.log({'metric': a})
Removing the line of code that logged the metric, resolved the issue. I then converted variable to a list
and that worked fine.
I would suggest if we try to log an unsupported data-type, that warnings be reported during logging not when synchronising with remote. Also maybe some sort of error handling be introduced around conversions, so if they fail the user gets a call stack.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
Thanks for letting me know, I trust the raised issue is fixed in the newer version, I haven’t played with it yet look forward to it.
Hey @neomatrix369 In the past year we’ve majorly reworked the CLI and UI for Weights & Biases. We’re closing issues older than 6 months. Please comment to reopen.