File size: 980 Bytes
f66ecbf
249c88f
 
03cbb60
 
 
 
 
 
 
 
 
 
 
 
 
249c88f
 
f66ecbf
 
249c88f
 
 
f66ecbf
249c88f
f66ecbf
 
 
249c88f
1b1e5f4
 
211b909
 
 
1b1e5f4
 
 
 
0641e53
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from pydantic import BaseModel, Json
from typing import List, Optional, Union, Any


from pydantic import BaseModel


class OAuth2PasswordRequestForm(BaseModel):
    username: str
    hf_token: str

class User(BaseModel):
    username: str
    hf_token: str


class LMHarnessTaskRequest(BaseModel):
    model: str
    model_args: Optional[str] = None
    tasks: Optional[List[str]] = None
    num_fewshot: Optional[int] = None
    batch_size: Optional[int] = None
    device: Optional[str] = None
    limit: Optional[int] = None
    write_out: bool = False # Whether to write out an example document and model input, for checking task integrity
    precision: str
    model_name: str
    model_sha: str

class DeepEvalSuiteRequest(BaseModel):
    model_name: str
    # dtype: str
    # weight: str
    # base_model: str
    tasks: Optional[List[str]] = None


class TaskResponse(BaseModel):
    results: Json # dict[Any,Any]

class LoadModelRequest(BaseModel):
    model_name: str