Skip to content
Permalink
Browse files

docs(tutorial): fix svg path

  • Loading branch information...
hanxiao committed Jul 26, 2019
1 parent 8927cd4 commit 04cccdcd93c77cc4e9cb8b3f3e773c2c67353875
Showing with 22 additions and 5 deletions.
  1. +20 −3 tutorials/component-yaml-spec.md
  2. +2 −2 tutorials/gnes-compose-yaml-spec.md
@@ -6,7 +6,12 @@ Essentially, GNES requires two types of YAML config:
- [GNES-compose YAML](gnes-compose-yaml-spec.md)
- Component-wise YAML

![](./img/mermaid-diagram-20190726180826.svg)
<p align="center">
<a href="https://gnes.ai">
<img src="./img/mermaid-diagram-20190726180826.svg" width="60%">
</a>
</p>


All other YAML files, including the docker-compose YAML config and Kubernetes config generated from the [GNES Board](https://board.gnes.ai) or `gnes compose` command are not a part of this tutorial. Interested readers are welcome to read their [YAML specification](https://docs.docker.com/compose/compose-file/) respectively.

@@ -241,10 +246,22 @@ You can find a lot of examples in the [unittest](../tests/yaml)
For many real-world applications, a single encoder is often not enough. For example, the output of a `BertEncoder` is 768-dimensional. One may want to append it with some dimensional reduction or quantization models. Of course one can spawn every encoder as an independent container and then connect them together via GNES Board/`gnes compose`. But if you don't need them to be elastic, why bother? This is where `PipelineEncoder` can be very useful: it stacks multiple `BaseEncoder` together, simplifying data-flow in all runtimes (i.e. training, indexing and querying).
#### PipelineEncoder in the training runtime
![](./img/mermaid-diagram-20190726183010.svg)
<p align="center">
<a href="https://gnes.ai">
<img src="./img/mermaid-diagram-20190726183010.svg" width="60%">
</a>
</p>
#### PipelineEncoder in the indexing and querying runtimes
![](./img/mermaid-diagram-20190726183216.svg)
<p align="center">
<a href="https://gnes.ai">
<img src="./img/mermaid-diagram-20190726183216.svg" width="60%">
</a>
</p>
To define a `PipelineEncoder`, you just need to sort the encoders in the right order and put them in a list under the `component` field. Let's look at the following example:
@@ -102,7 +102,7 @@ services:
<tr>
<td>
<a href="https://gnes.ai">
<img src="./img/mermaid-diagram-20190726144822.svg" alt="GNES workflow of example 1">
<img src="./img/mermaid-diagram-20190726150644.svg" alt="GNES workflow of example 1">
</a>
</td>
<td>
@@ -136,7 +136,7 @@ which results a topology like the following:

<p align="center">
<a href="https://gnes.ai">
<img src="./img/mermaid-diagram-20190726154922.svg">
<img src="./img/mermaid-diagram-20190726154922.svg" width="60%">
</a>
</p>

0 comments on commit 04cccdc

Please sign in to comment.
You can’t perform that action at this time.