Data Storage

The GRID platform provides cloud storage for each user to store data outputs from sessions. This storage can be navigated and viewed through the tab named "Storage" in the I/O panel. Every session started through GRID gets assigned its own 'folder' within this storage where the logs and the notebook are stored, along with any custom data the user saves manually.

When opening the Storage tab, it navigates to the root of your storage by default. To navigate to the folder corresponding to the current session, click on the restore icon on the left.

Logging any custom data (such as synthetic data from the simulation, model outputs etc.) to the session storage can be achieved from the Python notebook. The storage can be targeted from the Python notebook through the GRID_USER_SESSION_BLOB_DIR object. For instance, to log a random image to the storage, the following code can be run.

import numpy as np
from PIL import Image
import os
from grid import GRID_USER_SESSION_BLOB_DIR

# Create a random 256x256 image
random_image = np.random.randint(0, 256, (256, 256, 3), dtype=np.uint8)

# Convert the numpy array to an image
image = Image.fromarray(random_image)

# Define the path to save the image
save_path = os.path.join(GRID_USER_SESSION_BLOB_DIR, "random_image.png")

# Save the image as a PNG file
image.save(save_path)

After running this code, if you navigate to the current session folder in the Storage tab and click on the refresh button, you should see random_image.png.