Deployed aa31d2b with MkDocs version: 1.3.0

This commit is contained in:
2022-07-15 15:52:07 +00:00
parent 5a8662103a
commit 087e049514
17 changed files with 58 additions and 64 deletions

View file

@ -936,7 +936,7 @@
<p>As you can see, the original return value is wrapped in a <a class="autorefs autorefs-internal" href="../../reference/views/#great_ai.Trace">Trace</a> object (which is also persisted in your database of choice). You can access the original value under the <code>output</code> property.</p>
<h2 id="online-prediction">Online prediction<a class="headerlink" href="#online-prediction" title="Permanent link">#</a></h2>
<p>Likely, the main way you would like to expose your model is through an HTTP API. <a class="autorefs autorefs-internal" href="../../reference/#great_ai.deploy.great_ai.GreatAI.create">@GreatAI.create</a> scaffolds many REST API endpoints for your model and creates a <a href="https://fastapi.tiangolo.com/" target="_blank">FastAPI</a> app available under <a class="autorefs autorefs-internal" href="../../reference/#great_ai.GreatAI">GreatAI.app</a>. This can be served using <a href="https://www.uvicorn.org/" target="_blank">uvicorn</a> or any other <a href="https://asgi.readthedocs.io/en/latest/" target="_blank">ASGI server</a>.</p>
<p>Since most ML code lives in <a href="https://jupyter.org/" target="_blank">Jupyter</a> notebooks, therefore, deploying a notebook containing the inference function is supported. To this end, <code>uvicorn</code> is wrapped by the <code>great-ai</code> command-line utility which, among others, takes care of feeding a notebook into <code>uvicorn</code>. It also supports auto-reloading.</p>
<p>Since most ML code lives in <a href="https://jupyter.org/" target="_blank">Jupyter</a> notebooks, therefore, deploying a notebook containing the inference function is supported. To achieve this, <code>uvicorn</code> is wrapped by the <code>great-ai</code> command-line utility which, among others, takes care of feeding a notebook into <code>uvicorn</code>. It also supports auto-reloading.</p>
<h3 id="in-development">In development<a class="headerlink" href="#in-development" title="Permanent link">#</a></h3>
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a>great-ai greeter.py
</code></pre></div>
@ -970,7 +970,7 @@
<p>You can replace <code>pwd</code> with the path to your code's folder.</p>
</blockquote>
<h4 id="use-a-platform-as-a-service">Use a Platform-as-a-Service<a class="headerlink" href="#use-a-platform-as-a-service" title="Permanent link">#</a></h4>
<p>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 <a href="https://aws.amazon.com/ecs/" target="_blank">AWS ECS</a>, <a href="https://www.digitalocean.com/products/app-platform" target="_blank">DO App platform</a>, <a href="https://mlem.ai/" target="_blank">MLEM</a>) that take a Docker image as a source and handle the rest of the deployment.</p>
<p>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 <a href="https://aws.amazon.com/ecs/" target="_blank">AWS ECS</a>, <a href="https://www.digitalocean.com/products/app-platform" target="_blank">DO App platform</a>, <a href="https://mlem.ai/" target="_blank">MLEM</a>, <a href="https://streamlit.io/" target="_blank">Streamlit</a>) that take a Docker image as a source and handle the rest of the deployment.</p>
<p>To this end, you can also create a custom Docker image. It is especially useful if you have third-party dependencies, such as <a href="https://pytorch.org/" target="_blank">PyTorch</a> or <a href="https://www.tensorflow.org/" target="_blank">TensorFlow</a>.</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="k">FROM</span><span class="w"> </span><span class="s">schmelczera/great-ai:latest</span>
<a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a>
@ -986,7 +986,7 @@
<a id="__codelineno-6-12" name="__codelineno-6-12" href="#__codelineno-6-12"></a><span class="c"># Add you application code to the image</span>
<a id="__codelineno-6-13" name="__codelineno-6-13" href="#__codelineno-6-13"></a><span class="k">COPY</span><span class="w"> </span>. .
<a id="__codelineno-6-14" name="__codelineno-6-14" href="#__codelineno-6-14"></a>
<a id="__codelineno-6-15" name="__codelineno-6-15" href="#__codelineno-6-15"></a><span class="c"># The default ENTRYPOINT is great-ai, specify it&#39;s argument using CMD</span>
<a id="__codelineno-6-15" name="__codelineno-6-15" href="#__codelineno-6-15"></a><span class="c"># The default ENTRYPOINT is great-ai, specify its argument using CMD</span>
<a id="__codelineno-6-16" name="__codelineno-6-16" href="#__codelineno-6-16"></a><span class="k">CMD</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;deploy.ipynb&quot;</span><span class="p">]</span>
</code></pre></div>
<h2 id="batch-prediction">Batch prediction<a class="headerlink" href="#batch-prediction" title="Permanent link">#</a></h2>
@ -1017,7 +1017,7 @@
<small>
Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">July 13, 2022</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">July 15, 2022</span>
</small>

View file

@ -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"]
```