Skip to content

Max string attribute length exceeded#

Error

Error occurred during asynchronous operation processing: Max string attribute length (16384) exceeded

Issue: You are logging a lengthy string or NumPy array. Neptune has a character length limit of 16384.

Workarounds:

In the case of text:

  • Split the text into chunks, turn it into a list, and log the list items as a StringSeries.
  • Upload the data as a text file.

For detailed instructions, see Log text.

Note

Due to a technical limitation, only 1000 characters are indexed in String fields. This means that when searching the experiments table, only the first 1000 characters are considered.

In the case of 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:

    np.set_printoptions(threshold=np.inf)
    
    long_array = ...
    
    with open("./long_array.npy", "wb") as f:
        np.save(f, long_array)
    
    run = neptune.init_run()
    run["long_array"].upload(./long_array.py)
    
  • Option B) Log the array to Neptune as an image:

    img_array = ...
    run = neptune.init_run()
    run["train/distribution"].append(File.as_image(img_array))
    
  • 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.

    run["data_sample"].upload("./arrays_table.csv")    
    

    See in Neptune 

Getting help