Commit c0c7a72f authored by Baber's avatar Baber
Browse files

nit

parent 5ed56f7c
from dataclasses import dataclass, field
from typing import Literal, Optional, Tuple
from lm_eval.api.types import GenerateUntilRequest, LogLiklehoodRequest
OutputType = Literal[
"loglikelihood", "loglikelihood_rolling", "generate_until", "multiple_choice"
......@@ -36,7 +34,5 @@ class Instance:
Returns (string,) where `string` is the string to calculate loglikelihood over
"""
return (
GenerateUntilRequest(*self.arguments)
if self.request_type != "generate_until"
else LogLiklehoodRequest(*self.arguments)
self.arguments if isinstance(self.arguments, tuple) else (self.arguments,)
)
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