eduagarcia commited on
Commit
6db2f85
1 Parent(s): 0c95be4

manual create request

Browse files
src/scripts/create_request_file.py CHANGED
@@ -11,7 +11,7 @@ from src.submission.check_validity import get_model_size
11
  from src.display.utils import ModelType, WeightType
12
 
13
  EVAL_REQUESTS_PATH = "eval-queue"
14
- QUEUE_REPO = "open-llm-leaderboard/requests"
15
 
16
  precisions = ("float16", "bfloat16", "8bit (LLM.int8)", "4bit (QLoRA / FP4)", "GPTQ")
17
  model_types = [e.name for e in ModelType]
 
11
  from src.display.utils import ModelType, WeightType
12
 
13
  EVAL_REQUESTS_PATH = "eval-queue"
14
+ QUEUE_REPO = "eduagarcia-temp/llm_pt_leaderboard_requests"
15
 
16
  precisions = ("float16", "bfloat16", "8bit (LLM.int8)", "4bit (QLoRA / FP4)", "GPTQ")
17
  model_types = [e.name for e in ModelType]
src/scripts/create_request_file_2.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import pprint
4
+ from datetime import datetime, timezone
5
+
6
+ import click
7
+ from colorama import Fore
8
+ from huggingface_hub import HfApi, snapshot_download
9
+
10
+ from src.submission.check_validity import get_model_size
11
+ from src.display.utils import ModelType, WeightType, Language
12
+ from src.submission.submit import add_new_eval
13
+ from src.envs import EVAL_REQUESTS_PATH, QUEUE_REPO
14
+
15
+ precisions = ("float16", "bfloat16", "8bit (LLM.int8)", "4bit (QLoRA / FP4)", "GPTQ")
16
+ model_types = [e.name for e in ModelType]
17
+ weight_types = [e.name for e in WeightType]
18
+ language_types = [e.name for e in Language]
19
+
20
+ def main():
21
+ api = HfApi()
22
+ current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
23
+ snapshot_download(repo_id=QUEUE_REPO, revision="main", local_dir=EVAL_REQUESTS_PATH, repo_type="dataset")
24
+
25
+ model_name = click.prompt("Enter model name")
26
+ revision = click.prompt("Enter revision", default="main")
27
+ precision = click.prompt("Enter precision", default="float16", type=click.Choice(precisions))
28
+ model_type = click.prompt("Enter model type", type=click.Choice(model_types))
29
+ weight_type = click.prompt("Enter weight type", default="Original", type=click.Choice(weight_types))
30
+ base_model = click.prompt("Enter base model", default="")
31
+ main_language = click.prompt("Enter language type", default="English", type=click.Choice(language_types))
32
+
33
+ try:
34
+ model_info = api.model_info(repo_id=model_name, revision=revision)
35
+ except Exception as e:
36
+ print(f"{Fore.RED}Could not find model info for {model_name} on the Hub\n{e}{Fore.RESET}")
37
+ return 1
38
+
39
+ if click.confirm("Do you want to continue? This request file will be pushed to the hub"):
40
+ click.echo("continuing...")
41
+
42
+ print(add_new_eval(
43
+ model=model_name,
44
+ base_model=base_model,
45
+ revision=revision,
46
+ precision=precision,
47
+ private=False,
48
+ weight_type=weight_type,
49
+ model_type=model_type,
50
+ main_language=main_language,
51
+ source="manual"
52
+ ))
53
+ else:
54
+ click.echo("aborting...")
55
+
56
+
57
+ if __name__ == "__main__":
58
+ main()
src/submission/submit.py CHANGED
@@ -101,10 +101,11 @@ def add_new_eval(
101
  #return styled_error("Please select a license for your model")
102
 
103
  modelcard_OK, license_OK, error_msg, model_card = check_model_card(model)
104
- if not modelcard_OK and REQUIRE_MODEL_CARD:
105
- return styled_error(error_msg)
106
- if not license_OK and REQUIRE_MODEL_LICENSE:
107
- return styled_error(error_msg)
 
108
 
109
  tags = get_model_tags(model_card, model)
110
 
 
101
  #return styled_error("Please select a license for your model")
102
 
103
  modelcard_OK, license_OK, error_msg, model_card = check_model_card(model)
104
+ if source != "manual":
105
+ if not modelcard_OK and REQUIRE_MODEL_CARD:
106
+ return styled_error(error_msg)
107
+ if not license_OK and REQUIRE_MODEL_LICENSE:
108
+ return styled_error(error_msg)
109
 
110
  tags = get_model_tags(model_card, model)
111