-
Notifications
You must be signed in to change notification settings - Fork 37
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
live.log_metric: Cast nan
and inf
to string.
#677
Conversation
- Support string metrics (forgot to support them when DVC added support) - Don't recast to float when sending to Studio. Closes iterative/studio-support#93
0ee7d4a
to
bc1e94e
Compare
Code LGTM!
Have you tested VS Code also? Eventually, this may not be enough, but seems reasonable for now. |
Also, how do |
Yes.
{
"foo": NaN
}
{
"foo": "nan"
}
In theory, I could only patch the data sent to Studio. |
Should we add tests for plots in DVC, VS Code, and Studio to ensure we don't break it in the future? |
VS Code is using JSON5 already and handles it well. It's not an issue for DVC either since we embed the JS returned by DVC right into HTML and it works fine as expected. It's an issue with serializing it to send to Studio BE, probably can be an issue on that end with saving it into PG (if that is JSON column), sending it to FE, and on FE (if doesn't use JSON5). So, a long chain of places to check and test (usually with simple fixes though). |
Studio backend is tested and has a cast to string |
Closes iterative/studio-support#93
I have manually tested end to end against Studio sending inf/nan from
math
,numpy
, andtorch
.The Vega plots in the frontend appear to handle just fine datapoints with those values (the datapoint is skipped).