SushantGautam commited on
Commit
ade3aa2
Β·
1 Parent(s): c8879a8

Remove existing predictions.json file before running the submission script

Browse files
medvqa/competitions/gi-2025/task_1.py CHANGED
@@ -34,6 +34,9 @@ if not os.path.isfile(os.path.join(snap_dir, submission_file)):
34
  raise FileNotFoundError(
35
  f"Submission file '{submission_file}' not found in the repository!")
36
 
 
 
 
37
  print("πŸ“¦ Making sure of the minimum requirements to run the script πŸ“¦")
38
  sp.run(["python", "-m", "pip", "install"] + min_library, check=True)
39
 
@@ -48,6 +51,5 @@ sp.run(["python", f"{snap_dir}/{submission_file}"],
48
  print(
49
  f"πŸŽ‰ The submission script ran successfully, the intermediate files are at {snap_dir}")
50
 
51
- breakpoint()
52
  if MEDVQA_SUBMIT:
53
  print("πŸš€ Preparing for submission πŸš€")
 
34
  raise FileNotFoundError(
35
  f"Submission file '{submission_file}' not found in the repository!")
36
 
37
+ if os.path.isfile(os.path.join(snap_dir, "predictions.json")):
38
+ os.remove(os.path.join(snap_dir, "predictions.json"))
39
+
40
  print("πŸ“¦ Making sure of the minimum requirements to run the script πŸ“¦")
41
  sp.run(["python", "-m", "pip", "install"] + min_library, check=True)
42
 
 
51
  print(
52
  f"πŸŽ‰ The submission script ran successfully, the intermediate files are at {snap_dir}")
53
 
 
54
  if MEDVQA_SUBMIT:
55
  print("πŸš€ Preparing for submission πŸš€")