Deployed b1a66cb with MkDocs version: 1.3.0

This commit is contained in:
2022-07-12 17:19:00 +00:00
parent 0683061983
commit 7305d2ead3
38 changed files with 3566 additions and 2820 deletions

View file

@ -48,6 +48,19 @@
<meta property="og:title" content="">
<meta property="og:site_name" content="">
<meta property="og:url" content="">
<meta property="og:description" content="Transform your prototype AI code into production-ready software.">
<meta property="og:type" content="">
<meta property="og:image" content=https://great-ai.scoutinscience.com/media/og-image.png>
<style>
.jupyter-wrapper a {
color: var(--md-typeset-a-color) !important;
}
</style>
</head>
@ -394,6 +407,20 @@
<li class="md-nav__item">
<a href="../../how-to-guides/install/" class="md-nav__link">
Installation guide
</a>
</li>
<li class="md-nav__item">
<a href="../../how-to-guides/create-service/" class="md-nav__link">
How to create a GreatAI service
@ -644,7 +671,7 @@
<li class="md-nav__item">
<a href="../../examples/simple/data/" class="md-nav__link">
Train a domain classifier on the semantic scholar dataset
Simple example: data engineering
</a>
</li>
@ -658,7 +685,7 @@
<li class="md-nav__item">
<a href="../../examples/simple/train/" class="md-nav__link">
Train a domain classifier on the semantic scholar dataset
Optimise and train a model
</a>
</li>
@ -672,7 +699,7 @@
<li class="md-nav__item">
<a href="../../examples/simple/deploy/" class="md-nav__link">
Train a domain classifier on the semantic scholar dataset
Hardening and deployment
</a>
</li>
@ -752,6 +779,7 @@
<article class="md-content__inner md-typeset">
<a href="deploy.ipynb" title="Download Notebook" class="md-content__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 20h14v-2H5m14-9h-4V3H9v6H5l7 7 7-7Z"/></svg>
</a>
@ -1801,8 +1829,8 @@ Licensed under the Apache License, Version 2.0.
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h1 id="harden-and-deploy-your-app">Harden and deploy your app<a class="anchor-link" href="#harden-and-deploy-your-app">&#182;</a></h1><p>Finally, it's time to deploy your model. But before you have to make sure you follow AI deployment <a href="https://se-ml.github.io/">best-practices</a>. In the past, this step was too often either the source of unexpected struggles, or worse, simply ignored.</p>
<p>With <code>GreatAI</code>, it has become a matter of 2 lines of code.</p>
<h1 id="harden-and-deploy-your-app">Harden and deploy your app<a class="anchor-link" href="#harden-and-deploy-your-app">&#182;</a></h1><p>Finally, it's time to deploy your model. But before that, you have to make sure you follow AI deployment <a href="https://se-ml.github.io/">best-practices</a>. In the past, this step was too often either the source of unexpected struggles, or worse, simply ignored.</p>
<p>With <code>GreatAI</code>, it has become a matter of 4 lines of code.</p>
</div>
</div>
@ -1868,22 +1896,22 @@ def predict_domain(sentence, model):
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr">
<pre><span style="color: rgb(255,255,0)">2022-07-09 22:38:56 | WARNING | Environment variable ENVIRONMENT is not set, defaulting to development mode ‼️</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:38:56 | WARNING | Cannot find credentials files, defaulting to using ParallelTinyDbDriver</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:38:56 | WARNING | The selected tracing database (ParallelTinyDbDriver) is not recommended for production</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:38:56 | WARNING | Cannot find credentials files, defaulting to using LargeFileLocal</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | GreatAI (v0.1.0): configured ✅</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | 🔩 tracing_database: ParallelTinyDbDriver</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | 🔩 large_file_implementation: LargeFileLocal</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | 🔩 is_production: False</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | 🔩 should_log_exception_stack: True</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | 🔩 prediction_cache_size: 512</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | 🔩 dashboard_table_size: 20</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:38:56 | WARNING | You still need to check whether you follow all best practices before trusting your deployment.</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:38:56 | WARNING | &gt; Find out more at https://se-ml.github.io/practices</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | Fetching cached versions of my-domain-predictor</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | Latest version of my-domain-predictor is 5 (from versions: 0, 1, 2, 3, 4, 5)</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:56 | INFO | File my-domain-predictor-5 found in cache</span>
<pre><span style="color: rgb(255,255,0)">Environment variable ENVIRONMENT is not set, defaulting to development mode ‼️</span>
<span style="color: rgb(255,255,0)">Cannot find credentials files, defaulting to using ParallelTinyDbDriver</span>
<span style="color: rgb(255,255,0)">The selected tracing database (ParallelTinyDbDriver) is not recommended for production</span>
<span style="color: rgb(255,255,0)">Cannot find credentials files, defaulting to using LargeFileLocal</span>
<span style="color: rgb(0,175,255)">GreatAI (v0.1.4): configured ✅</span>
<span style="color: rgb(0,175,255)"> 🔩 tracing_database: ParallelTinyDbDriver</span>
<span style="color: rgb(0,175,255)"> 🔩 large_file_implementation: LargeFileLocal</span>
<span style="color: rgb(0,175,255)"> 🔩 is_production: False</span>
<span style="color: rgb(0,175,255)"> 🔩 should_log_exception_stack: True</span>
<span style="color: rgb(0,175,255)"> 🔩 prediction_cache_size: 512</span>
<span style="color: rgb(0,175,255)"> 🔩 dashboard_table_size: 50</span>
<span style="color: rgb(255,255,0)">You still need to check whether you follow all best practices before trusting your deployment.</span>
<span style="color: rgb(255,255,0)">&gt; Find out more at https://se-ml.github.io/practices</span>
<span style="color: rgb(0,175,255)">Fetching cached versions of my-domain-predictor</span>
<span style="color: rgb(0,175,255)">Latest version of my-domain-predictor is 9 (from versions: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)</span>
<span style="color: rgb(0,175,255)">File my-domain-predictor-9 found in cache</span>
</pre>
</div>
</div>
@ -1915,10 +1943,8 @@ def predict_domain(sentence, model):
</clipboard-copy>
</div>
<div class="highlight-ipynb hl-python"><pre><span></span><span class="n">predict_domain</span><span class="p">(</span><span class="s2">&quot;Mountains are just big rocks.&quot;</span><span class="p">)</span>
<span class="c1"># the original return value is under the &#39;output&#39; key</span>
</pre></div>
<div id="cell-2" class="clipboard-copy-txt">predict_domain("Mountains are just big rocks.")
# the original return value is under the 'output' key</div>
<div id="cell-2" class="clipboard-copy-txt">predict_domain("Mountains are just big rocks.")</div>
</div>
</div>
@ -1942,16 +1968,16 @@ def predict_domain(sentence, model):
<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre>Trace[str]({ &#39;created&#39;: &#39;2022-07-09T20:38:56.394746&#39;,
<pre>Trace[str]({&#39;created&#39;: &#39;2022-07-12T13:34:26.743292&#39;,
&#39;exception&#39;: None,
&#39;feedback&#39;: None,
&#39;logged_values&#39;: { &#39;arg:sentence:length&#39;: 29,
&#39;arg:sentence:value&#39;: &#39;Mountains are just big rocks.&#39;},
&#39;models&#39;: [{&#39;key&#39;: &#39;my-domain-predictor&#39;, &#39;version&#39;: 5}],
&#39;original_execution_time_ms&#39;: 4.999,
&#39;models&#39;: [{&#39;key&#39;: &#39;my-domain-predictor&#39;, &#39;version&#39;: 9}],
&#39;original_execution_time_ms&#39;: 6.9699,
&#39;output&#39;: &#39;geography&#39;,
&#39;tags&#39;: [&#39;predict_domain&#39;, &#39;online&#39;, &#39;development&#39;],
&#39;trace_id&#39;: &#39;aad1f83d-a81f-4b8b-898e-d02f8076616f&#39;})</pre>
&#39;trace_id&#39;: &#39;c80bdee3-602b-49dd-a84d-6eef80127e5a&#39;})</pre>
</div>
</div>
@ -1960,6 +1986,19 @@ def predict_domain(sentence, model):
</div>
</div>
</div>
<div class="jp-Cell jp-MarkdownCell jp-Notebook-cell">
<div class="jp-Cell-inputWrapper">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<p>Notice how the original return value is under the <code>.output</code> key. Additionally, a plethora of metadata has been added which will be useful later on.</p>
<p>Running your app in development-mode is as easy as executing <code>great-ai deploy.ipynb</code> from your terminal.</p>
</div>
</div>
</div>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell ">
<div class="jp-Cell jp-CodeCell jp-Notebook-cell ">
@ -2008,33 +2047,33 @@ def predict_domain(sentence, model):
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain">
<pre><span style="color: rgb(0,175,255)">2022-07-09 22:38:58 | INFO | Converting notebook to Python script</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:58 | INFO | Found `predict_domain` to be the GreatAI app </span>
<span style="color: rgb(0,175,255)">2022-07-09 22:38:58 | INFO | Uvicorn running on http://0.0.0.0:6060 (Press CTRL+C to quit)</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:39:00 | WARNING | Environment variable ENVIRONMENT is not set, defaulting to development mode ‼️</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:39:00 | WARNING | Cannot find credentials files, defaulting to using ParallelTinyDbDriver</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:39:00 | WARNING | The selected tracing database (ParallelTinyDbDriver) is not recommended for production</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:39:00 | WARNING | Cannot find credentials files, defaulting to using LargeFileLocal</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | GreatAI (v0.1.0): configured ✅</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | 🔩 tracing_database: ParallelTinyDbDriver</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | 🔩 large_file_implementation: LargeFileLocal</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | 🔩 is_production: False</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | 🔩 should_log_exception_stack: True</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | 🔩 prediction_cache_size: 512</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | 🔩 dashboard_table_size: 20</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:39:00 | WARNING | You still need to check whether you follow all best practices before trusting your deployment.</span>
<span style="color: rgb(255,255,0)">2022-07-09 22:39:00 | WARNING | &gt; Find out more at https://se-ml.github.io/practices</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | Fetching cached versions of my-domain-predictor</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | Latest version of my-domain-predictor is 5 (from versions: 0, 1, 2, 3, 4, 5)</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | File my-domain-predictor-5 found in cache</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | Started server process [882179]</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | Waiting for application startup.</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:00 | INFO | Application startup complete.</span>
<pre><span style="color: rgb(0,175,255)">2022-07-12 15:34:28 | INFO | Converting notebook to Python script</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:29 | INFO | Found `predict_domain` to be the GreatAI app </span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:29 | INFO | Uvicorn running on http://0.0.0.0:6060 (Press CTRL+C to quit)</span>
<span style="color: rgb(255,255,0)">2022-07-12 15:34:31 | WARNING | Environment variable ENVIRONMENT is not set, defaulting to development mode ‼️</span>
<span style="color: rgb(255,255,0)">2022-07-12 15:34:31 | WARNING | Cannot find credentials files, defaulting to using ParallelTinyDbDriver</span>
<span style="color: rgb(255,255,0)">2022-07-12 15:34:31 | WARNING | The selected tracing database (ParallelTinyDbDriver) is not recommended for production</span>
<span style="color: rgb(255,255,0)">2022-07-12 15:34:31 | WARNING | Cannot find credentials files, defaulting to using LargeFileLocal</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | GreatAI (v0.1.4): configured ✅</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | 🔩 tracing_database: ParallelTinyDbDriver</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | 🔩 large_file_implementation: LargeFileLocal</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | 🔩 is_production: False</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | 🔩 should_log_exception_stack: True</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | 🔩 prediction_cache_size: 512</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | 🔩 dashboard_table_size: 50</span>
<span style="color: rgb(255,255,0)">2022-07-12 15:34:31 | WARNING | You still need to check whether you follow all best practices before trusting your deployment.</span>
<span style="color: rgb(255,255,0)">2022-07-12 15:34:31 | WARNING | &gt; Find out more at https://se-ml.github.io/practices</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | Fetching cached versions of my-domain-predictor</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | Latest version of my-domain-predictor is 9 (from versions: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | File my-domain-predictor-9 found in cache</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | Started server process [199794]</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | Waiting for application startup.</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:31 | INFO | Application startup complete.</span>
^C
<span style="color: rgb(0,175,255)">2022-07-09 22:39:04 | INFO | Shutting down</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:04 | INFO | Waiting for application shutdown.</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:04 | INFO | Application shutdown complete.</span>
<span style="color: rgb(0,175,255)">2022-07-09 22:39:04 | INFO | Finished server process [882179]</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:33 | INFO | Shutting down</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:33 | INFO | Waiting for application shutdown.</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:33 | INFO | Application shutdown complete.</span>
<span style="color: rgb(0,175,255)">2022-07-12 15:34:33 | INFO | Finished server process [199794]</span>
</pre>
</div>
</div>
@ -2051,20 +2090,11 @@ def predict_domain(sentence, model):
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<p>Congrats, you've just created your first GreatAI service! 🎉</p>
<p>Now that you've made sure your application is hardened enough for the intended use case, it is time to deploy it. The responsibilities of GreatAI end when it wraps your inference function and model into a production-ready service. You're given the freedom and responsibility to deploy this service. Fortunately, you (or your organisation) probably already has an established routine for deploying services.</p>
<p>There are three main approaches to deploy a GreatAI service: For more info about them, check out <a href="/how-to-guides/use-service">the deployment how-to</a>.</p>
</div>
</div>
</div>
</div>
<div class="jp-Cell jp-MarkdownCell jp-Notebook-cell">
<div class="jp-Cell-inputWrapper">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h3 id="go-back-to-the-summary"><a href="/tutorial">Go back to the summary</a><a class="anchor-link" href="#go-back-to-the-summary">&#182;</a></h3>
<p>For more thorough examples, see the <a href="/examples/simple/data">examples page</a>.</p>
<h3 id="go-back-to-the-summary"><a href="/tutorial/#summary">Go back to the summary</a><a class="anchor-link" href="#go-back-to-the-summary">&#182;</a></h3>
</div>
</div>
</div>
@ -2078,7 +2108,7 @@ def predict_domain(sentence, model):
<small>
Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">July 11, 2022</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">July 12, 2022</span>
</small>
@ -2115,13 +2145,13 @@ def predict_domain(sentence, model):
<a href="../../how-to-guides/create-service/" class="md-footer__link md-footer__link--next" aria-label="Next: How to create a GreatAI service" rel="next">
<a href="../../how-to-guides/install/" class="md-footer__link md-footer__link--next" aria-label="Next: Installation guide" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
Next
</span>
How to create a GreatAI service
Installation guide
</div>
</div>
<div class="md-footer__button md-icon">