Skip to content

utils API reference#

The utils module contains utility functions for logging metadata with the Neptune API.


Helper function that converts unsupported values in a collection or dictionary to strings.

The output of this function is lazy-evaluated, as the final type depends on the logging method that is called on the stringified object (for example, assign(obj) versus append(obj)).


Name Type Default Description
value dictionary or collection None Dictionary or collection which may contain values of an unsupported type.


>>> import as neptune
>>> run = neptune.init_run()
>>> complex_dict = {"tuple": ("learning_rate", 0.01), "accuracy": 0.87}  # (1)!
>>> from import stringify_unsupported
>>> run["complex_dict"] = stringify_unsupported(complex_dict)
  1. The tuple is not a supported type.


This function is related to the deprecation of implicit casting to string.

For details, see the neptune 1.0 upgrade guide.