Closed vforvoid closed 4 years ago
Hi, thanks for your feedback. You can set timeout_ready
to -1
, that will make a Pod to wait forever until everything is fully loaded.
The reason to have timeout_ready
is that the Pod can be started either locally, inside a container, remotely, and remotely inside a container. A callback function is designed inside the Pod to acknowledge the spawner (e.g. the Flow) a successful start in all those scenarios. If the spawner can't get signal in time, then it considers something wrong on the Pod side and won't wait for it anymore.
Oh, ok, great, thanks and sorry for the trouble then!
It would be really nice to have this info in docs I've searched for timeout_ready
and all three entries I found no such an explanation. Same goes for many other methods and its parameters in API docs. E.g. max_sent_len
in Sentencizer
.
max_sent_len (int) – the maximal length of the sentence.
It can state that Sentencizer
will exclude all the sentences that are longer than max_sent_len
symbols after stripping. Defaults to 1e5 if not set. It's not exactly obvious from the name if it's length in characters or tokens.
Aha, this is because timeout-ready
is an argument defined at the CLI-level, it is phrased as timeout-ready
not timeout_ready
, so if you search for the former, it will show up. Related https://github.com/jina-ai/jina/issues/219
You probably notice that in Flow/Pod API you can use these CLI-level arguments in Python and YAML as well, by simply replacing the dash to underscore. This conversion is done implicitly via argparse
.
Apparently, our sphinx is not smart enough to capture such implicit conversion. I will see what I can do to improve the doc indexing.
Can you look at this Sentencizer
problem? @nan-wang
Oh, ok, great, thanks and sorry for the trouble then!
It would be really nice to have this info in docs I've searched for
timeout_ready
and all three entries I found no such an explanation. Same goes for many other methods and its parameters in API docs. E.g.max_sent_len
inSentencizer
.
max_sent_len (int) – the maximal length of the sentence.
It can state that
Sentencizer
will exclude all the sentences that are longer thanmax_sent_len
symbols after stripping. Defaults to 1e5 if not set. It's not exactly obvious from the name if it's length in characters or tokens.
hi, there. We've just updated the docs for Sentencizer in PR-409 Both min_sent_length
and max_sent_length
are the number of characters after stripping. Thanks a lot for pointing this out. The team is still in a tiny size and we definitely needs the OSS community to help us further improve the docs as well as the codes. Please feel free to make an issue or PR concerning any further problems during using jina.
I'm running the example X as a service and using yaml to describe my encode pod. I want to download model from the web, so I put
model_name: distilbert-base-cased
in yaml. Encode pod hastimeout_ready: 20000
parameter. It's not enough time for my machine to load the model, so my program fails with exception.Personally, I find it rather scary to use
timeout_ready
. How much time do I need to load and start the model? Is 20 second going to be enough? 60 seconds? Can I guarantee it? Sounds like I'm flipping a coin each time I'm starting my app. Is there any way to make it take its time to load everything and run whenever it's ready?