installing prodigy in colab

I am using colab for a lot of image training work because of the free GPU

Is there any license restriction for installing prodigy in colab? This is mainly for using the b64_uri_to_bytes module to convert the b64_uri files to RGB. If there is any restriction, could you suggest any alternatives for this process.

Thank you much

Hi! We'd have to double-check the terms of Google Colab, but if you're using the free tier, I don't think you can install Prodigy on it. The license does not allow installing the software on a server that's either public or not controlled by you. In general, Prodigy is designed so that the package is not required if you only want to train from the created annotations – you can always export them and use only the data.

If you just need the helper to convert a base64 URI to bytes, here it is:

import base64

def b64_uri_to_bytes(data_uri):
    """Convert a base64-encoded data URI to bytes. Mostly used for images."""
    data = data_uri.split("base64,", 1)[1]
    return base64.decodestring(bytes(data, "ascii"))

Perfect.. I did not know this was a four line code using a python base package.. :joy: Thank you so much.. :blush: