Skip to content

Commit

Permalink
docs: updating docs for seldon cli and kubectl
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimanyu003 committed Jan 27, 2025
1 parent 44b2e7f commit 5574d69
Showing 1 changed file with 150 additions and 5 deletions.
155 changes: 150 additions & 5 deletions docs-gb/examples/speech-to-sentiment.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,33 @@ spec:

```

{% tabs %}
{% tab title="kubectl" %}

```bash
kubectl apply -f ../../models/hf-whisper.yaml -n ${NAMESPACE}
kubectl apply -f ../../models/hf-sentiment.yaml -n ${NAMESPACE}
```

```
model.mlops.seldon.io/whisper created
model.mlops.seldon.io/sentiment created
```

```bash
kubectl wait --for condition=ready --timeout=300s model whisper -n ${NAMESPACE}
kubectl wait --for condition=ready --timeout=300s model sentiment -n ${NAMESPACE}
```

```
model.mlops.seldon.io/whisper condition met
model.mlops.seldon.io/sentiment condition met
```

{% endtab %}

{% tab title="seldon-cli" %}

```bash
seldon model load -f ../../models/hf-whisper.yaml
seldon model load -f ../../models/hf-sentiment.yaml
Expand All @@ -100,6 +127,8 @@ seldon model status sentiment -w ModelAvailable | jq -M .
{}

```
{% endtab %}
{% endtabs %}

### Create Explain Pipeline

Expand Down Expand Up @@ -233,27 +262,51 @@ spec:

```

{% tabs %}
{% tab title="kubectl" %}
```bash
kubectl apply -f ../../models/hf-sentiment-input-transform.yaml -n ${NAMESPACE}
kubectl apply -f ../../models/hf-sentiment-output-transform.yaml -n ${NAMESPACE}
```

```
model.mlops.seldon.io/sentiment-input-transform created
model.mlops.seldon.io/sentiment-output-transform created
```

```bash
kubectl wait --for condition=ready --timeout=300s model sentiment-input-transform -n ${NAMESPACE}
kubectl wait --for condition=ready --timeout=300s model sentiment-output-transform -n ${NAMESPACE}
```

```
model.mlops.seldon.io/sentiment-input-transform condition met
model.mlops.seldon.io/sentiment-output-transform condition met
```

{% endtab %}

{% tab title="seldon-cli" %}
```bash
seldon model load -f ../../models/hf-sentiment-input-transform.yaml
seldon model load -f ../../models/hf-sentiment-output-transform.yaml
```

```json
{}
{}

```

```bash
seldon model status sentiment-input-transform -w ModelAvailable | jq -M .
seldon model status sentiment-output-transform -w ModelAvailable | jq -M .
```

```json
{}
{}

```
{% endtab %}
{% endtabs %}


```bash
cat ../../pipelines/sentiment-explain.yaml
Expand All @@ -278,6 +331,27 @@ spec:

```


{% tabs %}
{% tab title="kubectl" %}
```bash
kubectl apply -f ../../models/sentiment-explain.yaml -n ${NAMESPACE}
```

```
model.mlops.seldon.io/sentiment-explain created
```

```bash
kubectl wait --for condition=ready --timeout=300s model sentiment-explain -n ${NAMESPACE}
```

```
model.mlops.seldon.io/sentiment-explain condition met
```
{% endtab %}

{% tab title="seldon-cli" %}
```bash
seldon pipeline load -f ../../pipelines/sentiment-explain.yaml
```
Expand Down Expand Up @@ -328,6 +402,10 @@ seldon pipeline status sentiment-explain -w PipelineReady | jq -M .
}

```
{% endtab %}
{% endtabs %}



```bash
cat ../../models/hf-sentiment-explainer.yaml
Expand All @@ -346,6 +424,26 @@ spec:

```

{% tabs %}
{% tab title="kubectl" %}
```bash
kubectl apply -f .../../pipelines/hf-sentiment-explainer.yaml -n ${NAMESPACE}
```

```
model.mlops.seldon.io/hf-sentiment-explainer created
```

```bash
kubectl wait --for condition=ready --timeout=300s model hf-sentiment-explainer -n ${NAMESPACE}
```

```
model.mlops.seldon.io/hf-sentiment-explainer condition met
```
{% endtab %}

{% tab title="seldon-cli" %}
```bash
seldon model load -f ../../models/hf-sentiment-explainer.yaml
```
Expand All @@ -361,8 +459,10 @@ seldon model status sentiment-explainer -w ModelAvailable | jq -M .

```
Error: Model wait status timeout
```
{% endtab %}
{% endtabs %}


### Speech to Sentiment Pipeline with Explanation

Expand Down Expand Up @@ -398,6 +498,28 @@ spec:

```


{% tabs %}
{% tab title="kubectl" %}
```bash
kubectl apply -f .../../pipelines/speech-to-sentiment.yaml -n ${NAMESPACE}
```

```
model.mlops.seldon.io/speech-to-sentiment created
```

```bash
kubectl wait --for condition=ready --timeout=300s model speech-to-sentiment -n ${NAMESPACE}
```

```
model.mlops.seldon.io/speech-to-sentiment condition met
```

{% endtab %}

{% tab title="seldon-cli" %}
```bash
seldon pipeline load -f ../../pipelines/speech-to-sentiment.yaml
```
Expand Down Expand Up @@ -461,6 +583,10 @@ seldon pipeline status speech-to-sentiment -w PipelineReady | jq -M .
}

```
{% endtab %}
{% endtabs %}



### Test

Expand Down Expand Up @@ -514,6 +640,22 @@ Explanation anchors: ['great']

### Cleanup


{% tabs %}
{% tab title="kubectl" %}

```
kubectl delete -f ../../pipelines/speech-to-sentiment.yaml -n ${NAMESPACE}
kubectl delete -f ../../pipelines/sentiment-explain.yaml -n ${NAMESPACE}
kubectl delete -f ../../models/hf-whisper.yaml -n ${NAMESPACE}
kubectl delete -f ../../models/hf-sentiment.yaml -n ${NAMESPACE}
kubectl delete -f ../../models/hf-sentiment-input-transform.yaml
kubectl delete -f ../../models/hf-sentiment-output-transform.yaml
```
{% endtab %}

{% tab title="seldon-cli" %}

```bash
seldon pipeline unload speech-to-sentiment
seldon pipeline unload sentiment-explain
Expand All @@ -526,3 +668,6 @@ seldon model unload sentiment-explainer
seldon model unload sentiment-output-transform
seldon model unload sentiment-input-transform
```
{% endtab %}
{% endtabs %}

0 comments on commit 5574d69

Please sign in to comment.