"examples/vscode:/vscode.git/clone" did not exist on "4a1fa2c411504af3330da1fa0a28c764dab774ed"
Commit 5ed56f7c authored by Baber's avatar Baber
Browse files

nit

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