Commit a3770921 authored by rprenger's avatar rprenger
Browse files

Fixing logic in server accepting tokens_to_generate=0

parent 87d08f4b
...@@ -69,6 +69,7 @@ class MegatronGenerate(Resource): ...@@ -69,6 +69,7 @@ class MegatronGenerate(Resource):
logprobs = request.get_json()["logprobs"] logprobs = request.get_json()["logprobs"]
if not isinstance(logprobs, bool): if not isinstance(logprobs, bool):
return "logprobs must be a boolean value" return "logprobs must be a boolean value"
if just_score and not logprobs: if just_score and not logprobs:
return "tokens_to_generate=0 implies logprobs=True" return "tokens_to_generate=0 implies logprobs=True"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment