jina-ai / jina-ai/executors

sentencizer should handle empty docs

Open
#168 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
31
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Seen in https://github.com/jjlatval/cse3

```
root_indexer@68372[I]: (raised from /usr/local/lib/python3.7/site-packages/jina/importer.py:120)
segmenter@68168[I]:msg = self._post_hook(self._handle(self._pre_hook(msg)))
root_indexer@68372[I]:UserWarning: Install `uvloop` via `pip install "jina[uvloop]"` for better performance. (raised from /usr/local/lib/python3.7/site-packages/jina/helper.py:883)
segmenter@68168[I]:File "/usr/local/lib/python3.7/site-packages/jina/peapods/runtimes/zmq/zed.py", line 203, in _handle
segmenter@68168[I]:peapod_name=self.name,
segmenter@68168[I]:File "/usr/local/lib/python3.7/site-packages/jina/peapods/runtimes/request_handlers/data_request_handler.py", line 162, in handle
segmenter@68168[I]:field='groundtruths',
segmenter@68168[I]:File "/usr/local/lib/python3.7/site-packages/jina/executors/__init__.py", line 190, in __call__
segmenter@68168[I]:self, **kwargs
segmenter@68168[I]:File "/usr/local/lib/python3.7/site-packages/jina/executors/decorators.py", line 103, in arg_wrapper
segmenter@68168[I]:return fn(*args, **kwargs)
segmenter@68168[I]:File "/workspace/sentencizer.py", line 63, in segment
segmenter@68168[I]:flat_docs = docs.traverse_flat(traversal_path)
```

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction linked in the issue and inspect sentencizer.py at line 63, especially the segment method and its call to docs.traverse_flat(traversal_path). Reproduce the empty-document case and make the sentencizer complete without the reported failure; no test file is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.