Skip to content

Commit

Permalink
updated syntax of describe, retrain, finetune
Browse files Browse the repository at this point in the history
  • Loading branch information
martyna-mindsdb committed Jan 12, 2024
1 parent 8b40350 commit 6be536a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
34 changes: 20 additions & 14 deletions docs/sql/api/describe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Here is how to retrieve general information on the model:
DESCRIBE model_name;
```

Or:

```sql
DESCRIBE MODEL model_name;
```

This command is similar to the below command:

```sql
Expand All @@ -34,7 +40,7 @@ One difference between these two commands is that `DESCRIBE` outputs an addition
MindsDB uses the Lightwood engine by default. Let's see how to describe such models.

```sql
DESCRIBE home_rentals_model;
DESCRIBE [MODEL] home_rentals_model;
```

On execution we get:
Expand All @@ -53,7 +59,7 @@ The `tables` output column lists all available options to describe a model.
<Tab title='DESCRIBE info'>

```sql
DESCRIBE home_rentals_model.info;
DESCRIBE [MODEL] home_rentals_model.info;
```

The above command returns the following output columns:
Expand Down Expand Up @@ -89,7 +95,7 @@ The above command returns the following output columns:
<Tab title='DESCRIBE features'>

```sql
DESCRIBE home_rentals_model.features;
DESCRIBE [MODEL] home_rentals_model.features;
```

The above command returns the following output columns:
Expand Down Expand Up @@ -125,7 +131,7 @@ The above command returns the following output columns:
<Tab title='DESCRIBE model'>

```sql
DESCRIBE home_rentals_model.model;
DESCRIBE [MODEL] home_rentals_model.model;
```

The above command returns the following output columns:
Expand Down Expand Up @@ -165,7 +171,7 @@ The above command returns the following output columns:
<Tab title='DESCRIBE jsonai'>

```sql
DESCRIBE home_rentals_model.jsonai;
DESCRIBE [MODEL] home_rentals_model.jsonai;
```

The above command returns the following output column:
Expand Down Expand Up @@ -193,7 +199,7 @@ The above command returns the following output column:
MindsDB offers NLP models that utilize either Hugging Face or OpenAI engines. Let's see how to describe such models.

```sql
DESCRIBE sentiment_classifier;
DESCRIBE [MODEL] sentiment_classifier;
```

On execution we get:
Expand All @@ -212,7 +218,7 @@ The `tables` output column lists all available options to describe a model.
<Tab title='DESCRIBE args'>

```sql
DESCRIBE sentiment_classifier.args;
DESCRIBE [MODEL] sentiment_classifier.args;
```

The above command returns the following output columns:
Expand Down Expand Up @@ -240,7 +246,7 @@ The above command returns the following output columns:
<Tab title='DESCRIBE metadata'>

```sql
DESCRIBE sentiment_classifier.metadata;
DESCRIBE [MODEL] sentiment_classifier.metadata;
```

The above command returns the following output columns:
Expand Down Expand Up @@ -272,7 +278,7 @@ The above command returns the following output columns:
MindsDB integrates Nixtla engines, such as StatsForecast, NeuralForecast, and HierarchicalForecast. Let's see how to describe models based on Nixtla engines.

```sql
DESCRIBE quarterly_expenditure_forecaster;
DESCRIBE [MODEL] quarterly_expenditure_forecaster;
```

On execution we get:
Expand All @@ -291,7 +297,7 @@ The `tables` output column lists all available options to describe a model.
<Tab title='DESCRIBE info'>

```sql
DESCRIBE quarterly_expenditure_forecaster.info;
DESCRIBE [MODEL] quarterly_expenditure_forecaster.info;
```

The above command returns the following output columns:
Expand Down Expand Up @@ -323,7 +329,7 @@ The above command returns the following output columns:
<Tab title='DESCRIBE features'>

```sql
DESCRIBE quarterly_expenditure_forecaster.features;
DESCRIBE [MODEL] quarterly_expenditure_forecaster.features;
```

The above command returns the following output columns:
Expand Down Expand Up @@ -355,7 +361,7 @@ The above command returns the following output columns:
<Tab title='DESCRIBE model'>

```sql
DESCRIBE quarterly_expenditure_forecaster.model;
DESCRIBE [MODEL] quarterly_expenditure_forecaster.model;
```

The above command returns the following output columns:
Expand Down Expand Up @@ -395,13 +401,13 @@ The above command returns the following output columns:
Models that utlize LangChain or are brought to MindsDB via MLflow can be described as follows:

```sql
DESCRIBE other_model;
DESCRIBE [MODEL] other_model;
```

The above command returs `["info"]` in its first output column.

```sql
DESCRIBE other_model.info;
DESCRIBE [MODEL] other_model.info;
```

The above command lists basic model information.
Expand Down
2 changes: 1 addition & 1 deletion docs/sql/api/finetune.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Imagine you have a model that was trained with a certain dataset. Now there is m
Here is the syntax:

```sql
FINETUNE project_name.model_name
FINETUNE [MODEL] project_name.model_name
FROM integration_name
(SELECT column_name, ... FROM table_name)
[USING
Expand Down
4 changes: 2 additions & 2 deletions docs/sql/api/retrain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ sidebarTitle: Retrain a Model

The `RETRAIN` statement is used to retrain the already trained predictors with the new data. The predictor is updated to leverage the new data in optimizing its predictive capabilities.

Retraining takes at least as much time as the training process of the predictor did because now the dataset used to retrain has new or updated data.
Retraining takes at least as much time as the training process of the predictor did because now the dataset used to retrain has new or updated data in addition to the *old* data.

## Syntax

Here is the syntax:

```sql
RETRAIN project_name.predictor_name
RETRAIN [MODEL] project_name.predictor_name
[FROM integration_name
(SELECT column_name, ... FROM table_name)
PREDICT target_name
Expand Down

0 comments on commit 6be536a

Please sign in to comment.