Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
docs(tutorial): fix svg path
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Jul 26, 2019
1 parent 8927cd4 commit 04cccdc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
23 changes: 20 additions & 3 deletions tutorials/component-yaml-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tutorials/gnes-compose-yaml-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>

Expand Down

0 comments on commit 04cccdc

Please sign in to comment.