You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-5Lines changed: 28 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Isquare client for Python
2
2
3
-
This repository contains the client for [isquare](isquare.ai). It is available under the form of python classes, as well as a command-line-interface.
3
+
This repository contains the official python client for [ISquare](isquare.ai). It is available under the form of python classes which are ready to use in your code, as well as a command-line-interface. We currently support inference with image, text & json files, as well as any numpy array or python dictionnary or string, both for input and output.
4
+
5
+
The complete documentation for ISquare can be found [here](docs.isquare.ai)
4
6
5
7
## Installation
6
8
@@ -16,27 +18,30 @@ pip install --editable .
16
18
17
19
### Additional requirements
18
20
19
-
To be able to test your models, you need the following packages:
21
+
To be able to test your model builds, you need the following packages:
20
22
Docker >= 19.03.13
21
23
22
24
_Note_: If you only need the client for inference, this is not required.
23
25
24
26
## Usage
27
+
The client can be used to verify your model build (e.g. checking if they will properly run on [ISquare](isquare.ai)) and to perform inference calls to your deployed models. To use this client for inference, you need to have a model up and running on [ISquare](isquare.ai).
25
28
26
29
Commands and their usage are described [here](docs/commands.md).
27
30
28
-
Guidelines on the code adaptation required to deploy a model on isquare.ai can be found [here](docs/isquare_tutorial.md)
31
+
End-to-end guidelines on the code adaptation required to deploy a model on isquare.ai can be found [here](docs/isquare_tutorial.md)
29
32
30
33
## Examples
31
34
32
-
- Build your i2 compatible docker image:
35
+
### Command line interface
33
36
37
+
#### Test if your model repository is Isquare-compatible
38
+
To verify if your code will run smoothly on [ISquare](isquare.ai), you can perform a local build & unit test. This will build a container image with all your specific dependencies and perform an inference test. We've included an example of a simple computer vision model which returns the mirrored image it is given, and it can be tested by running:
34
39
35
40
```bash
36
41
i2 build examples/tasks/mirror.py
37
42
```
43
+
When you deploy a model with [ISquare](isquare.ai), you will be provided a url for the model, and requested to create access keys. Using a valid url & access keys (the one displayed are an example), you can perform an inference with an Image model (e.g. the Mirror) and a `.png` image by running:
38
44
39
-
Simple inference:
40
45
41
46
```bash
42
47
i2 infer \
@@ -46,4 +51,22 @@ i2 infer \
46
51
```
47
52
Other examples can be found [here](docs/getting_started.md).
48
53
54
+
### Using a model inside your python code
55
+
As you probably want to automate your model calls by integrating them directly into your code, we've provided you with several python classes you can directly use in your code. The main class to use for that is the `I2Client` class. A simple inference can be performed as follows:
0 commit comments