Skip to content

Commit

Permalink
chore: fix doc setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed Mar 23, 2022
1 parent c04eb30 commit f7044fb
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ c.profile()
</table>


You can change `0.0.0.0` to the intranet or public IP address to test the connectivity over private and public network. If you encounter some errors, please find the solution here.
You can change `0.0.0.0` to the intranet or public IP address to test the connectivity over private and public network.


## Get Started
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Make sure you have Python 3.7+. You can install client and server independently.
````{tab} Client
```bash
pip install clip_client
pip install clip-client
```
````

````{tab} Server
```bash
pip install clip_server
pip install clip-server
```
````

Expand Down
3 changes: 2 additions & 1 deletion docs/user-guides/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CLIP-as-service is designed in a client-server architecture. A client sends imag
This chapter introduces the API of the client.

```{tip}
You will need to install client first in Python 3.7+: `pip install clip_client`.
You will need to install client first in Python 3.7+: `pip install clip-client`.
```


Expand Down Expand Up @@ -249,6 +249,7 @@ asyncio.run(main())

The final time cost will be less than `3s + time(t2)`.

(profiling)=
## Profiling

You can use `client.profile()` to give a quick test on the server to make sure everything is good.
Expand Down
59 changes: 58 additions & 1 deletion docs/user-guides/faq.md
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
# FAQ
# FAQ

This is a list of Frequently Asked Questions about CLIP-as-service. Feel free to suggest new entries!


#### What is CLIP model?

Developed by OpenAI, CLIP (Contrastive Language-Image Pre-Training) is a neural network trained on a variety of (image, text) pairs. The original CLIP Github repository can be found [here](https://github.com/openai/CLIP).

#### Do I need to install `clip-server` and `clip-client` together?

No. You can install them separately on different machines. On a GPU server, you just need `clip-server`; on your laptop, you just need `clip-client`

#### What is CLIP-as-service powered by? The codebase seems quite small

CLIP-as-service leverages features from [Jina](https://github.com/jina-ai/jina) and [DocArray](https://github.com/jina-ai/docarray). Thanks to them CLIP-as-service can be quickly built with solid infrastructure and rich features.

#### I had this AioRpcError, what should I do?

If you encounter the following errors, it means you client can not connect to the server.

```text
GRPCClient@28632[E]:gRPC error: StatusCode.UNAVAILABLE failed to connect to all addresses
the ongoing request is terminated as the server is not available or closed already
```

```text
AioRpcError: <AioRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string =
"{"created":"@1648074480.571952000","description":"Failed to pick subchannel",
"file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":312
9,"referenced_errors":[{"created":"@1648074480.571952000","description":"faile
d to connect to all addresses","file":"src/core/lib/transport/error_utils.cc",
"file_line":163,"grpc_status":14}]}"
```

You can try `.profile()` to {ref}`confirm it<profiling>`. If it still throws the same error, then your connection is broken.

While it is hard to pinpoint a network problem, also out of the scope of CLIP-as-service, we here provide you a checklist that may help you to diagnose the problem:
- Are the IP address, port, and protocol all correct?
- Is client and server under the same network, or a different network?
- Is your server down?
- Is server's port open to public?
- Is there a firewall on the server side that restricts the port?
- Is there a firewall on the client side that restricts the port?
- Is the security group (on Cloud providers) correctly configured?

#### Why "CLIP-as-service" why not "CLIP-as-a-service"

Kind of pay homage to BERT-as-service. It is not about grammatically correct anyhow.

#### What happened to the BERT-as-service.

There has been no maintenance of BERT-as-service since Feb. 2019.

CLIP-as-service is a huge upgrade of BERT-as-service, with more powerful universal embedding models that can handle both images and texts; and more solid and efficient microservice infrastructure developed in the last 2 years by Jina AI. The high-level API, especially the client side, is a drop-in replacement of the old BERT-as-service.
2 changes: 1 addition & 1 deletion docs/user-guides/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CLIP-as-service is designed in a client-server architecture. A server is a long-
This chapter introduces the API of the client.

```{tip}
You will need to install client first in Python 3.7+: `pip install clip_server`.
You will need to install client first in Python 3.7+: `pip install clip-server`.
```

## Start server
Expand Down

0 comments on commit f7044fb

Please sign in to comment.