Skip to content

Commit

Permalink
feat: update monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Sami Jaghouar committed May 10, 2022
1 parent b7d4d12 commit 2d3c830
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/clip_server/executors/clip_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(

self._pool = ThreadPool(processes=num_worker_preprocess)

@monitor('preproc_images_seconds','Time preprocessing images')
@monitor(name='preproc_images_seconds', documentation='Time preprocessing images')
def _preproc_image(self, da: 'DocumentArray') -> 'DocumentArray':
for d in da:
if d.tensor is not None:
Expand All @@ -65,7 +65,7 @@ def _preproc_image(self, da: 'DocumentArray') -> 'DocumentArray':
da.tensors = da.tensors.to(self._device)
return da

@monitor('preproc_texts_seconds','Time preprocessing texts')
@monitor(name='preproc_texts_seconds', documentation='Time preprocessing texts')
def _preproc_text(self, da: 'DocumentArray') -> Tuple['DocumentArray', List[str]]:
texts = da.texts
da.tensors = clip.tokenize(texts).to(self._device)
Expand Down

0 comments on commit 2d3c830

Please sign in to comment.