From 087e049514812931c9ba7daf016749158e72b5ef Mon Sep 17 00:00:00 2001 From: <> Date: Fri, 15 Jul 2022 15:52:07 +0000 Subject: [PATCH] Deployed aa31d2b with MkDocs version: 1.3.0 --- examples/simple/data/data.ipynb | 2 - examples/simple/data/index.html | 6 +-- examples/simple/train/index.html | 4 +- examples/simple/train/train.ipynb | 2 +- how-to-guides/use-service/index.html | 8 ++-- how-to-guides/use-service/use-service.md | 6 +-- index.html | 4 +- index.md | 2 +- search/search_index.json | 2 +- sitemap.xml | 48 +++++++++++------------ sitemap.xml.gz | Bin 214 -> 214 bytes tutorial/deploy/deploy.ipynb | 2 +- tutorial/deploy/index.html | 4 +- tutorial/index.html | 10 ++--- tutorial/index.md | 8 ++-- tutorial/train/index.html | 8 ++-- tutorial/train/train.ipynb | 6 +-- 17 files changed, 58 insertions(+), 64 deletions(-) diff --git a/examples/simple/data/data.ipynb b/examples/simple/data/data.ipynb index feef14d..0835917 100644 --- a/examples/simple/data/data.ipynb +++ b/examples/simple/data/data.ipynb @@ -103,9 +103,7 @@ " unchunk,\n", ")\n", "\n", - "\n", "def preprocess_chunk(chunk_key: str) -> List[Tuple[str, List[str]]]:\n", - " # Extract\n", " response = urllib.request.urlopen(\n", " f\"https://s3-us-west-2.amazonaws.com/ai2-s2-research-public/\"\n", " \"open-corpus/2022-02-01/{chunk_key}\"\n", diff --git a/examples/simple/data/index.html b/examples/simple/data/index.html index ffa92a4..ab73e4c 100644 --- a/examples/simple/data/index.html +++ b/examples/simple/data/index.html @@ -2083,9 +2083,7 @@ f"""Processing {len(chunks)} out of the { unchunk, ) - def preprocess_chunk(chunk_key: str) -> List[Tuple[str, List[str]]]: - # Extract response = urllib.request.urlopen( f"https://s3-us-west-2.amazonaws.com/ai2-s2-research-public/" "open-corpus/2022-02-01/{chunk_key}" @@ -2125,9 +2123,7 @@ from great_ai.utilities import ( unchunk, ) - def preprocess_chunk(chunk_key: str) -> List[Tuple[str, List[str]]]: - # Extract response = urllib.request.urlopen( f"https://s3-us-west-2.amazonaws.com/ai2-s2-research-public/" "open-corpus/2022-02-01/{chunk_key}" @@ -2294,7 +2290,7 @@ add_ground_truth(X, y, train_split_ratio=0.8, test_split_ratio=0.2) Last update: - July 12, 2022 + July 15, 2022 diff --git a/examples/simple/train/index.html b/examples/simple/train/index.html index 233e8f4..4f5a915 100644 --- a/examples/simple/train/index.html +++ b/examples/simple/train/index.html @@ -1877,7 +1877,7 @@ Licensed under the Apache License, Version 2.0.

The blue boxes show the steps implemented in this notebook.

In the first part, we have cleaned and transformed our training data. We can now access this data using great_ai.LargeFile. Locally, it will gives us the cached version, otherwise, the latest version is downloaded from S3 or GridFS.

-

In this part, we hyperparameter-optimise and train a simple, Naive Bayes classifier which we then export for deployment using great_ai.save_model.

+

In this part, we hyperparameter-optimise and train a simple Naive Bayes classifier which we then export for deployment using great_ai.save_model.

Load data that has been extracted in part 1

@@ -2864,7 +2864,7 @@ save_model(classifier, key="small-domain-prediction", keep_last_n=5) Last update: - July 12, 2022 + July 15, 2022 diff --git a/examples/simple/train/train.ipynb b/examples/simple/train/train.ipynb index 7985c50..41577cf 100644 --- a/examples/simple/train/train.ipynb +++ b/examples/simple/train/train.ipynb @@ -11,7 +11,7 @@ "\n", "In the first part, we have cleaned and transformed our training data. We can now access this data using `great_ai.LargeFile`. Locally, it will gives us the cached version, otherwise, the latest version is downloaded from S3 or GridFS. \n", "\n", - "In this part, we hyperparameter-optimise and train a simple, Naive Bayes classifier which we then export for deployment using `great_ai.save_model`.\n", + "In this part, we hyperparameter-optimise and train a simple Naive Bayes classifier which we then export for deployment using `great_ai.save_model`.\n", "\n", "## Load data that has been extracted in [part 1](/examples/simple/data)" ] diff --git a/how-to-guides/use-service/index.html b/how-to-guides/use-service/index.html index 07a5c31..adb4204 100644 --- a/how-to-guides/use-service/index.html +++ b/how-to-guides/use-service/index.html @@ -936,7 +936,7 @@

As you can see, the original return value is wrapped in a Trace object (which is also persisted in your database of choice). You can access the original value under the output property.

Online prediction#

Likely, the main way you would like to expose your model is through an HTTP API. @GreatAI.create scaffolds many REST API endpoints for your model and creates a FastAPI app available under GreatAI.app. This can be served using uvicorn or any other ASGI server.

-

Since most ML code lives in Jupyter notebooks, therefore, deploying a notebook containing the inference function is supported. To this end, uvicorn is wrapped by the great-ai command-line utility which, among others, takes care of feeding a notebook into uvicorn. It also supports auto-reloading.

+

Since most ML code lives in Jupyter notebooks, therefore, deploying a notebook containing the inference function is supported. To achieve this, uvicorn is wrapped by the great-ai command-line utility which, among others, takes care of feeding a notebook into uvicorn. It also supports auto-reloading.

In development#

great-ai greeter.py
 
@@ -970,7 +970,7 @@

You can replace pwd with the path to your code's folder.

Use a Platform-as-a-Service#

-

Similarly to the previous approach, your code will run in a container. However, instead of manually managing it, you can just choose from a plethora of PaaS providers (such as AWS ECS, DO App platform, MLEM) that take a Docker image as a source and handle the rest of the deployment.

+

Similarly to the previous approach, your code will run in a container. However, instead of manually managing it, you can just choose from a plethora of PaaS providers (such as AWS ECS, DO App platform, MLEM, Streamlit) that take a Docker image as a source and handle the rest of the deployment.

To this end, you can also create a custom Docker image. It is especially useful if you have third-party dependencies, such as PyTorch or TensorFlow.

FROM schmelczera/great-ai:latest
 
@@ -986,7 +986,7 @@
 # Add you application code to the image
 COPY . .
 
-# The default ENTRYPOINT is great-ai, specify it's argument using CMD
+# The default ENTRYPOINT is great-ai, specify its argument using CMD
 CMD ["deploy.ipynb"]
 

Batch prediction#

@@ -1017,7 +1017,7 @@ Last update: - July 13, 2022 + July 15, 2022 diff --git a/how-to-guides/use-service/use-service.md b/how-to-guides/use-service/use-service.md index 700af6e..61b491f 100644 --- a/how-to-guides/use-service/use-service.md +++ b/how-to-guides/use-service/use-service.md @@ -35,7 +35,7 @@ As you can see, the original return value is wrapped in a [Trace][great_ai.Trace Likely, the main way you would like to expose your model is through an HTTP API. [@GreatAI.create][great_ai.GreatAI.create] scaffolds many REST API endpoints for your model and creates a [FastAPI](https://fastapi.tiangolo.com/){ target=_blank } app available under [GreatAI.app][great_ai.GreatAI]. This can be served using [uvicorn](https://www.uvicorn.org/){ target=_blank } or any other [ASGI server](https://asgi.readthedocs.io/en/latest/){ target=_blank }. -Since most ML code lives in [Jupyter](https://jupyter.org/){ target=_blank } notebooks, therefore, deploying a notebook containing the inference function is supported. To this end, `uvicorn` is wrapped by the `great-ai` command-line utility which, among others, takes care of feeding a notebook into `uvicorn`. It also supports auto-reloading. +Since most ML code lives in [Jupyter](https://jupyter.org/){ target=_blank } notebooks, therefore, deploying a notebook containing the inference function is supported. To achieve this, `uvicorn` is wrapped by the `great-ai` command-line utility which, among others, takes care of feeding a notebook into `uvicorn`. It also supports auto-reloading. ### In development @@ -81,7 +81,7 @@ docker run -p 6060:6060 --volume `pwd`:/app --rm \ #### Use a Platform-as-a-Service -Similarly to the previous approach, your code will run in a container. However, instead of manually managing it, you can just choose from a plethora of PaaS providers (such as [AWS ECS](https://aws.amazon.com/ecs/){ target=_blank }, [DO App platform](https://www.digitalocean.com/products/app-platform){ target=_blank }, [MLEM](https://mlem.ai/){ target=_blank }) that take a Docker image as a source and handle the rest of the deployment. +Similarly to the previous approach, your code will run in a container. However, instead of manually managing it, you can just choose from a plethora of PaaS providers (such as [AWS ECS](https://aws.amazon.com/ecs/){ target=_blank }, [DO App platform](https://www.digitalocean.com/products/app-platform){ target=_blank }, [MLEM](https://mlem.ai/){ target=_blank }, [Streamlit](https://streamlit.io/){ target=_blank }) that take a Docker image as a source and handle the rest of the deployment. To this end, you can also create a custom Docker image. It is especially useful if you have third-party dependencies, such as [PyTorch](https://pytorch.org/){ target=_blank } or [TensorFlow](https://www.tensorflow.org/){ target=_blank }. @@ -100,7 +100,7 @@ RUN large-file --backend s3 --secrets s3.ini --cache my-domain-predictor # Add you application code to the image COPY . . -# The default ENTRYPOINT is great-ai, specify it's argument using CMD +# The default ENTRYPOINT is great-ai, specify its argument using CMD CMD ["deploy.ipynb"] ``` diff --git a/index.html b/index.html index df5fa14..1b2041d 100644 --- a/index.html +++ b/index.html @@ -935,7 +935,7 @@

Why is this GREAT?#

scope of GreatAI

-

GreatAI fits between the prototype and deployment phases of your (or your organisation's) AI development lifecycle. This is highlighted with blue in the diagram. Here, a number of best practices can be automatically implemented aiming to achieve the following attributes:

+

GreatAI fits between the prototype and deployment phases of your (or your organisation's) AI development lifecycle. This is highlighted with blue in the diagram. Here, several best practices can be automatically implemented aiming to achieve the following attributes: