Max string attribute length exceeded
ERROR: Error occurred during asynchronous operation processing: Max string attribute length (16384) exceeded
Issue: A string or NumPy array that you are logging is too long. Neptune has a character length limit of 16384.
Tip: To help you locate the problem in your code, try initializing Neptune in synchronous mode:
1
run = neptune.init(
2
mode="sync",
3
)
Copied!

Workarounds

Text

Split the text into chunks, turn it into a list, and log the list items as a string series:
1
for epoch in range(epochs_nr):
2
token = str(...)
3
run["dataset/tokens"].log(token)
Copied!
Or save the data as a text file and upload that instead:
1
run["data"].upload("sample_data.csv")
Copied!

NumPy arrays

Option A) Long arrays are logged with suspension points ("...") instead of all values. You can increase the threshold of NumPy with set_printoptions() and then log it to Neptune as a binary .npy file:
1
np.set_printoptions(threshold=np.inf)
2
3
long_array = ...
4
5
with open('./long_array.npy', 'wb') as f:
6
np.save(f, long_array)
7
8
run = neptune.init()
9
run["long_array"].upload(./long_array.py)
Copied!
Option B) Log the array to Neptune as an image:
1
img_array = ...
2
run = neptune.init()
3
run['train/distribution'].log(File.as_image(img_array))
Copied!
Option C) Log the array as as CSV file.
Neptune's interactive table widget gives you the raw values and an interactive way to sort and filter rows.
1
for epoch in range(epochs_nr):
2
token = str(...)
3
run["data/tokens"].log(token)
Copied!
Export as PDF
Copy link