llmcomp 1.2.1__py3-none-any.whl → 1.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- llmcomp/question/question.py +26 -1
- {llmcomp-1.2.1.dist-info → llmcomp-1.2.2.dist-info}/METADATA +1 -1
- {llmcomp-1.2.1.dist-info → llmcomp-1.2.2.dist-info}/RECORD +6 -6
- {llmcomp-1.2.1.dist-info → llmcomp-1.2.2.dist-info}/WHEEL +0 -0
- {llmcomp-1.2.1.dist-info → llmcomp-1.2.2.dist-info}/entry_points.txt +0 -0
- {llmcomp-1.2.1.dist-info → llmcomp-1.2.2.dist-info}/licenses/LICENSE +0 -0
llmcomp/question/question.py
CHANGED
|
@@ -8,7 +8,7 @@ from collections import defaultdict
|
|
|
8
8
|
from concurrent.futures import ThreadPoolExecutor
|
|
9
9
|
from copy import deepcopy
|
|
10
10
|
from queue import Queue
|
|
11
|
-
from typing import TYPE_CHECKING
|
|
11
|
+
from typing import TYPE_CHECKING, Literal, overload
|
|
12
12
|
|
|
13
13
|
import pandas as pd
|
|
14
14
|
import yaml
|
|
@@ -25,6 +25,7 @@ from llmcomp.question.result import JudgeCache, Result
|
|
|
25
25
|
from llmcomp.runner.runner import Runner
|
|
26
26
|
|
|
27
27
|
if TYPE_CHECKING:
|
|
28
|
+
from llmcomp.question.judge import FreeFormJudge, RatingJudge
|
|
28
29
|
from llmcomp.question.question import Question
|
|
29
30
|
|
|
30
31
|
|
|
@@ -65,6 +66,30 @@ class Question(ABC):
|
|
|
65
66
|
"""Type is snake_case version of the class name."""
|
|
66
67
|
return "".join("_" + c.lower() if c.isupper() else c.lower() for c in cls.__name__).lstrip("_")
|
|
67
68
|
|
|
69
|
+
@overload
|
|
70
|
+
@classmethod
|
|
71
|
+
def create(cls, *, type: Literal["free_form"], **kwargs) -> "FreeForm": ...
|
|
72
|
+
|
|
73
|
+
@overload
|
|
74
|
+
@classmethod
|
|
75
|
+
def create(cls, *, type: Literal["rating"], **kwargs) -> "Rating": ...
|
|
76
|
+
|
|
77
|
+
@overload
|
|
78
|
+
@classmethod
|
|
79
|
+
def create(cls, *, type: Literal["next_token"], **kwargs) -> "NextToken": ...
|
|
80
|
+
|
|
81
|
+
@overload
|
|
82
|
+
@classmethod
|
|
83
|
+
def create(cls, *, type: Literal["free_form_judge"], **kwargs) -> "FreeFormJudge": ...
|
|
84
|
+
|
|
85
|
+
@overload
|
|
86
|
+
@classmethod
|
|
87
|
+
def create(cls, *, type: Literal["rating_judge"], **kwargs) -> "RatingJudge": ...
|
|
88
|
+
|
|
89
|
+
@overload
|
|
90
|
+
@classmethod
|
|
91
|
+
def create(cls, *, type: str, **kwargs) -> "Question": ...
|
|
92
|
+
|
|
68
93
|
@classmethod
|
|
69
94
|
def create(cls, **kwargs) -> "Question":
|
|
70
95
|
"""Create a Question instance from a type string and keyword arguments.
|
|
@@ -7,13 +7,13 @@ llmcomp/finetuning/manager.py,sha256=JaILoQYkNA9jIM_WR9eZactFHHcNFVeQeObXjQS8KcI
|
|
|
7
7
|
llmcomp/finetuning/update_jobs.py,sha256=blsHzg_ViTa2hBJtWCqR5onttehTtmXn3vmCTNd_hJw,980
|
|
8
8
|
llmcomp/question/judge.py,sha256=ovlEVp4XfgMc_qxYc4M7eq5qS-7C_WLjJklsO9wfU34,6105
|
|
9
9
|
llmcomp/question/plots.py,sha256=2uZTSN1s7Y3pnx2jiGtfUdWfQt2812Oo-eDsO2ZTUlE,9617
|
|
10
|
-
llmcomp/question/question.py,sha256=
|
|
10
|
+
llmcomp/question/question.py,sha256=2CvE0xePLnD5SUJsE_ZyvAIE_36rjjW37fUqG3NHTV0,39171
|
|
11
11
|
llmcomp/question/result.py,sha256=EcgXV-CbLNAQ1Bu0p-0QcjtrwBDt1WxSINwYuMmWoGs,8216
|
|
12
12
|
llmcomp/runner/chat_completion.py,sha256=iDiWE0N0_MYfggD-ouyfUPyaADt7602K5Wo16a7JJo4,967
|
|
13
13
|
llmcomp/runner/model_adapter.py,sha256=xBf6_WZbwKKTctecATujX9ZKQLDetDh-7UeCGaXJ9Zc,3244
|
|
14
14
|
llmcomp/runner/runner.py,sha256=ENDSH2I7wKu9tq0HdfLwCgdHLxjvJaIrlrWY1vy7soc,10807
|
|
15
|
-
llmcomp-1.2.
|
|
16
|
-
llmcomp-1.2.
|
|
17
|
-
llmcomp-1.2.
|
|
18
|
-
llmcomp-1.2.
|
|
19
|
-
llmcomp-1.2.
|
|
15
|
+
llmcomp-1.2.2.dist-info/METADATA,sha256=DFiSsygEmaTNejveyEBEf-4wv47iqlXq0SWMTlRbf94,12518
|
|
16
|
+
llmcomp-1.2.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
17
|
+
llmcomp-1.2.2.dist-info/entry_points.txt,sha256=1aoN8_W9LDUnX7OIOX7ACmzNkbBMJ6GqNn_A1KUKjQc,76
|
|
18
|
+
llmcomp-1.2.2.dist-info/licenses/LICENSE,sha256=z7WR2X27WF_wZNuzfNFNlkt9cU7eFwP_3-qx7RyrGK4,1064
|
|
19
|
+
llmcomp-1.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|