Deployed b1a66cb with MkDocs version: 1.3.0
This commit is contained in:
parent
0683061983
commit
7305d2ead3
38 changed files with 3566 additions and 2820 deletions
|
|
@ -1,11 +1,11 @@
|
|||
# Train and deploy a SOTA model
|
||||
|
||||
Let's see GreatAI in action by going over the life-cycle of a simple service.
|
||||
Let's see `great-ai` in action by going over the life-cycle of a simple service.
|
||||
|
||||
## Objectives
|
||||
|
||||
1. You will see how the [great_ai.utilities][] can integrate into your Data Science workflow.
|
||||
2. You will use [great_ai.large_file][] to version and store your trained model.
|
||||
1. You will see how the [great_ai.utilities](/reference/utilities) can integrate into your Data Science workflow.
|
||||
2. You will use [great_ai.large_file](/reference/large_file) to version and store your trained model.
|
||||
3. You will use [GreatAI][great_ai.GreatAI] to prepare your model for a robust and responsible deployment.
|
||||
|
||||
## Overview
|
||||
|
|
@ -14,7 +14,6 @@ You are going to train a field of study (domain) classifier for scientific sente
|
|||
|
||||
We use the same synthetic dataset derived from the [Microsoft Academic Graph](https://www.microsoft.com/en-us/research/project/microsoft-academic-graph/). The dataset is [available here](https://github.com/allenai/scibert/tree/master/data/text_classification/mag).
|
||||
|
||||
|
||||
!!! success
|
||||
You are ready to start the tutorial. Feel free to come back to the [summary](#summary) section once you're finished.
|
||||
|
||||
|
|
@ -24,19 +23,18 @@ We use the same synthetic dataset derived from the [Microsoft Academic Graph](ht
|
|||
[:material-cloud-tags: Deploy it](deploy.ipynb){ .md-button .md-button--primary }
|
||||
</div>
|
||||
|
||||
|
||||
## Summary
|
||||
|
||||
### The [training notebook](train.ipynb)
|
||||
### [Training notebook](train.ipynb)
|
||||
|
||||
We load and preprocess the dataset while relying on [great_ai.utilities.clean][] for the heavy-lifting. Additionally, the preprocessing is parallelised using [great_ai.utilities.simple_parallel_map][]
|
||||
We load and preprocess the dataset while relying on [great_ai.utilities.clean][great_ai.utilities.clean.clean] for doing the heavy-lifting. Additionally, the preprocessing is parallelised using [great_ai.utilities.simple_parallel_map][]
|
||||
|
||||
After training and evaluating a model, it is exported using [great_ai.save_model][].
|
||||
|
||||
??? tip "Remote storage"
|
||||
To store your model remotely, you need to set your credentials before calling `save_model`.
|
||||
|
||||
For example, to use [AWS S3](https://aws.amazon.com/s3/):
|
||||
For example, to use [AWS S3](https://aws.amazon.com/s3){ target=_blank }:
|
||||
```python
|
||||
from great_ai.large_file import LargeFileS3
|
||||
|
||||
|
|
@ -52,7 +50,9 @@ After training and evaluating a model, it is exported using [great_ai.save_model
|
|||
save_model(model, key='my-domain-predictor')
|
||||
```
|
||||
|
||||
### The [deployment notebook](deploy.ipynb)
|
||||
For more info, checkout [the configuration how-to page](/how-to-guides/configure-service).
|
||||
|
||||
### [Deployment notebook](deploy.ipynb)
|
||||
|
||||
We create an inference function that can be hardened by wrapping it in a [GreatAI][great_ai.GreatAI] instance.
|
||||
|
||||
|
|
@ -68,6 +68,12 @@ def predict_domain(sentence, model):
|
|||
```
|
||||
|
||||
1. [@use_model][great_ai.use_model] loads and injects your model into the `predict_domain` function's `model` argument.
|
||||
You can freely reference it knowing that it is always given to the function.
|
||||
You can freely reference it knowing that the function is always provided with it.
|
||||
|
||||
Finally, we test the model's inference function through the GreatAI dashboard. [The only thing left is to deploy the hardened-service.](/how-to-guides/use-service)
|
||||
Finally, we test the model's inference function through the GreatAI dashboard. [The only thing left is to deploy the hardened-service properly.](/how-to-guides/use-service)
|
||||
|
||||
<div style="display: flex; justify-content: center;" markdown>
|
||||
[:material-book: Learn about all the features](/how-to-guides/create-service){ .md-button .md-button--primary }
|
||||
|
||||
[:material-test-tube: Look at more examples](/examples/simple/data){ .md-button .md-button--secondary }
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue