Skip to content

Commit

Permalink
ludwig docs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
IraGR committed Jul 20, 2021
1 parent 7adec04 commit a308036
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions deployment/ludwig.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pip install teachablehub

### 2. Setup Deployment Keys

To deploy any model to your Teachable, you'll need a Deployment Key. Deployment keys can be restricted for a particular environment and for a specific period of time. Such constraints might ensure the better security of your awesome project. It's quite a useful feature for the times when only the most experienced members of your team need to have deployment permission for the production environment or you have some colleague working on the project only for a month.
To deploy any model to your Teachable, you'll need a Deployment Key. Deployment keys can be restricted for a particular environment and for a specific period of time. Such constraints might ensure the better security of your awesome project. It's quite a useful feature for the times when only a few members of your team are responsible for deployments in production and need to have permission or you when having some colleague working on the project only for a month.

You can create New Deployment Key from Settings -> Deploy Keys -> Add Key, where you'll need to supply a Key Name and Environment for which this key will be valid. Best practices suggest the name for each key to be descriptive, some good examples include: `production`, `staging`, `backenders-team`, `ds-team`, `john-dev`, `jane-staging` etc.
You can create New Deployment Key from Settings -> Deploy Keys -> Add Key, where you'll need to supply a Key Name and Environment for which this key will be valid. Best practices suggest the name for each key to be descriptive, some good examples include: `production`, `staging`, `backend-team`, `ds-team`, `john-dev`, `jane-staging` etc.

{{button: { to: "/{{handler}}/{{teachable}}/settings/deploy-keys/new", type: "primary", size: "medium", title: "Create a new Deploy Key" } }}

Expand Down Expand Up @@ -84,15 +84,13 @@ We have enriched the Deployment with many options to ensure a seamless and clear

### Schema & Features Validation (optional)

Although TeachableHub has some built-in validation options, you can further fine-tune those in accordance with your specific case.

WE ARE TRYING TO DO IT AUTOMATICALLY. Change the text here.???//

For Data Scientists working with ndarrays and with numbers is business as usual. On the other side for the Back-end or the Front-end engineers working with JSON data and object is an everyday job. Not getting lost in translation is essential and configuring this is the connection between these two worlds. Surely, you'll become your Team's SuperHero right away! 😉

Deployment schema enables the TeachableHub Serving API to accept human-readable features. Furthermore, it ensures those features will be validated before they are sent to the model.
Deployment schema enables the TeachableHub Serving API to accept human-readable features. Furthermore, it ensures those features will be validated before they are sent to the model. The schema validation feature eliminates any involuntary mistakes and errors when you are working with your Teachable Predict API and will generate better documentation free of charge.

TeachableHub does the heavy lifting for you by automatically getting the Deployment Schema from the input_features you describe.

The schema validation feature eliminates any involuntary mistakes and errors when you are working with your Teachable Predict API and will generate better documentation free of charge.
Although these are already built-in validation options, you can further fine-tune in accordance with your specific case.

#### Structure

Expand Down Expand Up @@ -159,7 +157,7 @@ deployment.schema({

### `help`

**TeachableHub use this rule to generate Docs section automatically where explain what is this feature about.** This is very helpful when your backend team or 3rd-party integrator consume the API, because they will be aware what data they should provide to the Teachable Predict API.
**TeachableHub uses this rule to generate Docs section automatically where explain what is this feature about.** This is very helpful when your backend team or 3rd-party integrator consumes the API because they will be aware of what data they should provide to the Teachable Predict API.

```python
deployment.schema({
Expand All @@ -177,16 +175,6 @@ deployment.schema({
})
```

### Model Classes (optional)

**This are set automatically. Change it or remove it.**

The TeachableHub's Auto-Generated Serving API will use the Model Classes in the prediction results to return human-readable predictions outputs. If classes are configured for the deployment, Scikit-Learn will use the `predict_proba` method, otherwise, it will use the regular `predict` method.

```python
deployment.classes({"0": "Setosa", "1": "Versicolour", "2": "Virginica" })
```

### Usage Samples (required)

Maintaining these deployment samples, you receive free-of-charge Auto-Generated Serving API Documentation, Model Validation that protects you from deploying models that are not working as expected, and better usage examples for everyone who will integrate the Teachable in their software. These examples are the ones used in the `PredictMan` as well. **At least one of `ndarray` or `features` is required**. If your `Teachable` is using the `Features Validation` feature both are required.
Expand Down Expand Up @@ -216,7 +204,7 @@ deployment.context({
### Deployment Deploy (required)
This is the final stop of the required deployment steps. Congrats, you're almost there! 😊 Here are the three important params to keep in mind:
Congrats, you're almost done! 😊 This is the final stop of the required deployment steps. Here are the three important params to keep in mind:
> `summary` - Just like the git commit messages, 'summary' lets you provide some information about the deployment. It's always great to have the details that will help you refer to this specific deployment or rollback.
Expand All @@ -235,11 +223,11 @@ deployment.deploy(
## CI/CD Automations Helpers
Here are a couple of useful functions that can assist in automating your model deployment in your CI/CD systems.
Below you may find are a couple of useful functions that can assist in automating your model deployment in your CI/CD systems.
### `.successful()`
The `successful` method returns a boolen result whether or not the deployment is created on the TeachableHub platform. Кeep in mind that the deployment need to be verfied successfuly as well in order to be served by the TeachableHub's Serving API. Check the next point for more details on verification.
The `successful` method returns a boolean result whether or not the deployment is created on the TeachableHub platform. Кeep in mind that the deployment needs to be verified successfully as well in order to be served by the TeachableHub's Serving API. Check the next point for more details on verification.
```python
if deployment.successful():
Expand All @@ -248,7 +236,7 @@ if deployment.successful():

### `.verified(reload=False)`

After every deployment based on your `.samples({...})` explained above, TeachableHub is verifing whether or not the deployment is configured correctly and woking as expected.
After every deployment based on your `.samples({...})` explained above, TeachableHub is verifying whether or not the deployment is configured correctly and working as expected.

The `reload` option is to retrieve the latest updated deployment state from the TeachableHub platform.

Expand Down

0 comments on commit a308036

Please sign in to comment.