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: docs/isquare_tutorial.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,8 +65,13 @@ class ArchipelFacePixelizer(ImagesToImagesWorker):
65
65
The imports specifies, along with any dependencies or additional functions or classes, which workertype we will be using. In our case, the model takes images as inputs and also return images (the same as before but the faces blurred), so we choose the `ImagesToImagesWorker`. The name of the workerclass always reflects inputs and outputs. For the moment, the following workers are available:
66
66
-`ImagesToImagesWorker` (e.g. Face blurring)
67
67
-`ImagesToDictsWorker` (e.g. classification or detection)
68
+
-`ImagesToStringsWorker` (e.g. for image annotation)
68
69
-`StringsToDictsWorker` (e.g. NLP model)
69
-
More types will be added on the way. If the input outputs types you are looking for are not available, please let us know. In the meantime know thaht most data formats can be converted to strings!
70
+
-`DictsToDictsWorker` (e.g. NLP model)
71
+
-`StringsToImagesWorker` (e.g. Image generation from captions)
72
+
-`DictsToImagesWorker` (e.g. Image generation from captions)
73
+
-`DictsToStringsWorker` (e.g. NLP model)
74
+
More types will be added on the way. If the input outputs types you are looking for are not available, please let us know by opening an issue. In the meantime know that most data formats can be converted to strings and dicts!
70
75
71
76
You can specify multiple classes and functions inside your workerscript (you can even write your whole code inside it, although we do not recommend it). The `__task_class_name__` specifies which class is your workerclass, in our case `ArchipelFacePixeliser`.
72
77
@@ -205,6 +210,21 @@ self.log(threshold_value)
205
210
This value is now logged, and you can retrieve it on your dashboard on isquare.ai. In this way, the parameters of the model can be adpated to fit the real life data, and the real performance of the model assessed.
206
211
We highly encourage monitoring apropriate metrics for your model, in this way you'll always know how well your model is really performing.
207
212
213
+
## Advanced usage
214
+
215
+
### Defining an example input
216
+
Isquare will automatically test your model by generating an input corresponding to your worker class, with one exception: All `DictsToXWorker` workers. It could also be that you want to test your worker with a very specific input. In either of those cases, you can override the `get_dump_input` method of your worker, for example, as follows:
217
+
```python
218
+
classMusicalTastePredictor(DictsToDictsWorker):
219
+
"""Predicts musical taste from completely arbitrary information."""
0 commit comments