Float attribute value malformed
ERROR: Error occurred during asynchronous operation processing: Value of float attribute cannot be malformed.
Issue: A value you are trying to log is malformed or unsupported. Note that Neptune does not support Inf or NaN values.
Workaround: Use a supported value type.
In the case of the math.inf Python constant, you can store it as a string:
1
import neptune.new as neptune
2
run = neptune.init_run()
3
4
value = math.inf
5
run["n"] = str(value) if math.isinf(value) else value
6
7
# When fetching
8
value = float(run["n"].fetch())
Copied!
If you're logging a series of values, you can add a check to filter out Inf and NaN values:
1
values = [...]
2
for v in values:
3
if not math.isinf(v) and not math.isnan(v):
4
run["metric"].log(v)
Copied!
Tip: To help locate the problem in your code, try initializing Neptune in synchronous mode:
1
run = neptune.init(
2
mode="sync",
3
)
Copied!
Export as PDF
Copy link