mlabonne commited on
Commit
acc384c
·
verified ·
1 Parent(s): 358b5c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -297,9 +297,10 @@ def create_pod(model_name: str, username: str, n=10, wait_seconds=10):
297
  env={
298
  "BENCHMARK": "nous",
299
  "MODEL_ID": f"{username}/{model_name}",
300
- "REPO": "https://github.com/mlabonne/llm-autoeval.git",
301
  "TRUST_REMOTE_CODE": False,
302
  "PRIVATE_GIST": False,
 
303
  "DEBUG": False,
304
  "GITHUB_API_TOKEN": os.environ["GITHUB_TOKEN"],
305
  }
@@ -401,7 +402,6 @@ def merge_loop():
401
 
402
  # Sample two models
403
  dir_path = "/data"
404
- print(f"pwd: {os.getcwd()}")
405
  sample = df.sample(n=2)
406
  models = [sample.iloc[i] for i in range(2)]
407
 
@@ -417,33 +417,28 @@ def merge_loop():
417
  # Merge configs
418
  yaml_config = create_config(models)
419
  print(f"YAML config:{yaml_config}")
420
- # print(f"Total size: {human_readable_size(get_size(dir_path))}")
421
 
422
  # Merge models
423
  merge_models()
424
  print("Model merged!")
425
- # print(f"Total size: {human_readable_size(get_size(dir_path))}")
426
 
427
  # Create model card
428
  print("Create model card")
429
  create_model_card(yaml_config, model_name, USERNAME, license)
430
- # print(f"Total size: {human_readable_size(get_size(dir_path))}")
431
 
432
  # Upload model
433
  print("Upload model")
434
  upload_model(api, USERNAME, model_name)
435
- # print(f"Total size: {human_readable_size(get_size(dir_path))}")
436
 
437
  # Clear data
438
  print("Clear data")
439
  clear_data()
440
- # print(f"Total size: {human_readable_size(get_size(dir_path))}")
441
 
442
  # Evaluate model on Runpod
443
  print("Start evaluation")
444
  create_pod(model_name, USERNAME)
445
- # print(f"Total size: {human_readable_size(get_size(dir_path))}")
446
-
447
 
448
  # Set the HF_DATASETS_CACHE environment variable
449
  os.environ['HF_DATASETS_CACHE'] = "/data/hfcache/"
 
297
  env={
298
  "BENCHMARK": "nous",
299
  "MODEL_ID": f"{username}/{model_name}",
300
+ "REPO": "-b yall https://github.com/mlabonne/llm-autoeval.git",
301
  "TRUST_REMOTE_CODE": False,
302
  "PRIVATE_GIST": False,
303
+ "YALL_GIST_ID": "84af749b1c0ef7336858df408f46f388",
304
  "DEBUG": False,
305
  "GITHUB_API_TOKEN": os.environ["GITHUB_TOKEN"],
306
  }
 
402
 
403
  # Sample two models
404
  dir_path = "/data"
 
405
  sample = df.sample(n=2)
406
  models = [sample.iloc[i] for i in range(2)]
407
 
 
417
  # Merge configs
418
  yaml_config = create_config(models)
419
  print(f"YAML config:{yaml_config}")
420
+ print(f"Data size: {human_readable_size(get_size(dir_path))}")
421
 
422
  # Merge models
423
  merge_models()
424
  print("Model merged!")
 
425
 
426
  # Create model card
427
  print("Create model card")
428
  create_model_card(yaml_config, model_name, USERNAME, license)
 
429
 
430
  # Upload model
431
  print("Upload model")
432
  upload_model(api, USERNAME, model_name)
 
433
 
434
  # Clear data
435
  print("Clear data")
436
  clear_data()
 
437
 
438
  # Evaluate model on Runpod
439
  print("Start evaluation")
440
  create_pod(model_name, USERNAME)
441
+ print(f"Waiting for {WAIT_TIME/60} minutes...")
 
442
 
443
  # Set the HF_DATASETS_CACHE environment variable
444
  os.environ['HF_DATASETS_CACHE'] = "/data/hfcache/"