ML Models
TileDB allows you to create, manage, and serve machine learning (ML) models inside its secure infrastructure. TileDB catalogs and version controls your ML models in the same platform as your data.
Create ML model
Section Structure: ML Models includes all the information you need to create and register your ML models in the TileDB catalog.
Once created, your ML model will appear under Assets -> Code -> ML models
.
Overview
The Overview
tab provides basic information about an ML model:
- Description - If you provided a description to the ML model (e.g., from
Settings
), it is visible here. The description is indexed and searchable in the catalog. Therefore, it’s recommended to add a meaningful description for all your assets. - TileDB URI - The unique resource identifier for TileDB, based on which you can refer to the ML model. It contains the namespace and the UUID of the asset.
- UUID - The unique identifier for the ML model.
- Original URI - The location on cloud storage where the asset is stored. This property is visible only to the admin of the asset.
- Permissions - What rights the current user has on this asset.
- License - If available, under which license the asset is available. Editable through
Settings
, if you are the admin of the asset. - Tags - Any tags on the asset, if available, which will be searchable in the TileDB catalog.
- Framework - The framework used to create the ML model.
- Python version - The Python version used to create the ML model.
It is important to understand how to refer to your ML model programmatically. You can do it in two ways:
- Using the TileDB URI format
tiledb://<account>/<ml_model_name>
. This is the most user-friendly way, but TileDB allows duplicated ML model names, and if you have an ML model with a non-unique name, this will throw an error. - Using the TileDB URI from the asset’s Overview tab (that is, the URI with format
tiledb://<account>/<UUID>
). TileDB URIs referencing the asset’s UUID are unique. Thus, this method will always work.
Preview
You can see human-readable information about the ML model under the Preview
tab.
Metadata
ML models may be associated with metadata in the form of key-value pairs, which is visible in the Metadata
tab.
Settings
In the ML model settings, you can modify the following:
- Description - Note that this is indexed and, thus, searchable in the TileDB catalog.
- License - The type of license for the ML model, especially if you are making this publicly available.
- Tags - These can be used for efficient search in the catalog.
- Mark as read-only - This is useful if you want to prevent any ML model changes by you or someone with whom you shared the ML model.
- Make public - If you wish to share the ML model with all the TileDB users. This will appear in the
Marketplace
tab in the left navigation menu. If you make a ML model public, you can easily change it back to private in the same manner. - Cloud credentials - Credentials should be provided so that TileDB can securely access the ML model on the cloud store where it is physically stored.
- Rename ML model - Read the Rename ML model subsection below.
- Delete ML model - Read the Delete ML model subsection below.
Versioning
TileDB supports versioning for ML models. Every time you edit an ML model, TileDB creates a new version. You can select which version to preview by selecting the button next to the ML model name, starting with Latest version - ...
. This brings up a modal on the right, which allows you to browse and select different ML model versions. Then you can preview the selected ML model version.
Rename ML model
You can rename an ML model from the Settings
tab. This action does not alter or copy the contents of the ML model; it just registers the asset in the catalog under a different name.
You can programmatically rename an ML model as follows:
tiledb.cloud.asset.update_info("`tiledb://<account>/<previous_name>`",
="<new_name>",
name="<acn>", # Optional - The cloud credentials that access the ML model (should already exist in your account settings)
access_credentials_name )
Take caution when renaming ML models, as any URIs including the previous ML model name will no longer work.
Delete ML model
When deleting an ML model, you have two options:
- Unregister: This operation removes the ML model from the TileDB catalog, but it does not physically remove it from the object store. Since the ML model will persist on storage, you can register it again in the TileDB catalog in the future.
- Delete: This operation both unregisters and physically removes the ML model from storage. Note that this operation cannot be undone.
You can delete the ML model from the Settings
tab, which will prompt you to choose among the two operations above.
You can also programmatically delete or unregister an ML model as follows:
# Unregister an ML model
="tiledb://<account>/<ml_model_name>")
tiledb.cloud.asset.deregister(uri
# Delete an ML model
="tiledb://<account>/<ml_model_name>") tiledb.cloud.asset.delete(uri