Skip to content

UPLOAD MODEL

1. UPLOAD MODEL Statement

The "UPLOAD MODEL" statement allows users to upload their custom models to be used within the ThanoSQL environment.

2. UPLOAD MODEL Syntax

UPLOAD MODEL (model_name_expression)
OPTIONS (
    expression [ , ...]
    ) 
FROM (model_path_expression)

Query Details

  • The "OPTIONS" clause allows you to change the value of a parameter. The definition of each parameter is as follows:
    • "framework": specifies the model framework (str, default: 'pytorch')
    • "overwrite": determines whether to overwrite a model if it already exists. If set as True, the old model is replaced with the new model (bool, optional, True|False, default: False)

Caution

  • The current "UPLOAD MODEL" statement is only available for 'Pytorch' based models.

3. UPLOAD MODEL Example

%%thanosql
UPLOAD MODEL beans_mobilevit
OPTIONS (
    framework='pytorch',
    overwrite=True
    )
FROM 'trained_model.pth'

Last update: 2023-01-05