-
Notifications
You must be signed in to change notification settings - Fork 63
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
Not possible to send infs and nans #183
Comments
Hi @wjaskowski thanks for reaching out. Indeed right now we do not accept NaN/None/(+/-)Inf values. However, we had some internal discussion about it. One idea is to make it similar to what TensorBoard does: each Nan/None is displayed as a graphic icon, like a triangle or star. Location on "y" axis is determined by preceding numeric value. what do you think? |
Sounds good. You might also want to consider placing those triangles on the bottom/top of the visible plot. But visualization is one thing - the most important one is to be able to send and download the data. |
Thanks for suggestion 🙂 We will consider it as well. |
This is a somewhat stale issue but the first thing that comes up when you google the behaviour. Any news/updates on this? |
Hello @fwindolf , |
Not really a blocker, but having So a run["my_metric"].append(1.0)
run["my_metric"].append(float("nan"))
run["my_metric"].append(3.0) will only show the 1.0. I see why adding |
Would replacing the import math
metric = float("nan")
if math.isna(metric ):
run["my_metric'].append(0) I've also submitted your feedback around ignoring NaN/inf to the product team. Thank you :) |
Hello @fwindolf , |
Sorry I missed the notification of the last comment. We solved it by not logging nans as 0, inf as a big number which is okay for now. It skews the readability of graphs but it's better than not seeing anything. Thanks for forwarding the issue! |
Did you mean |
Hi there! Is this something that is actively worked on? I experienced some solid trouble recently because my training process diverged and the logging did not show where the NANs started to show up at first. This can be very valuable information for debugging. What is bad about the way e.g. tensorboard handles NAN/inf? While the workaround is fine in most cases, my model showed values of around zero all the time and then started to diverge so replacing NANs with zeros in principle works but is not ideal in my situation. |
Hello @rschiewer , The product team is currently scoping this. This seems to involve relatively high engineering effort, so there is no ETA as of now, unfortunately :( In your case, since the values hover around zero, can you replace NaNs with a high value so that they show up in charts, and you can then know when your model starts diverging? |
Hey everyone! Just a quick update here. Neptune v1.8.3 now skips trying to log NaN and Inf values and throws a warning instead. This means you no longer have to check for nan/inf values in your code🥳 |
Bump!
Thanks for this change team.
This sounds like a very useful way to visualize out of range values. I suppose logging things going wrong is a crucial part of experimenting and in this way it will also help with comparison against different experiments. Eager to hear your thoughts on this. |
Hey @DanTremonti 👋 There are several aspects we need to consider before finalizing a solution here, mainly related to front-end performance, as any custom rendering will need to be managed at the front end. Although we are aware of this request, we don't anticipate any changes in the short term as we are currently focusing on performance improvements. I'll keep this thread updated ✅ |
Thank you for the quick response @SiddhantSadangi |
Thank you for your work. I don't see this skipping behaviour in the docs of either append or FloatSeries. For the benefit of future users, please could you add it? When the warning says the values are skipped, is the counter on the series advanced or not? Considering logging loss values throughout training, you might want the step counter to remain consistent regardless of whether the loss was nan. The series would then contain missing values, which the user knows should at least be invalid float. Either way, please can you make the behaviour clear in the docs? |
Hey @brynhayder 👋 The skipping behaviour is mentioned here: https://docs.neptune.ai/help/value_of_unsupported_type/#working-around-none-inf-or-nan. However, we should also mention this with the API reference of The counter on the series is currently not advanced on encountering |
What is the reason to don't allow sending inf's and nan's as metric values? I imagine that it is impossible to plot them but this is still some information.
The text was updated successfully, but these errors were encountered: