SushantGautam commited on
Commit
fd37479
Β·
1 Parent(s): 77394a6

Update submission file names and task identifiers in task_2.py

Browse files
medvqa/competitions/gi-2025/task_2.py CHANGED
@@ -21,7 +21,7 @@ parser.add_argument('--repo_id', type=str, required=True,
21
  args, _ = parser.parse_known_args()
22
 
23
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
24
- submission_file = "submission_task1.py"
25
  file_from_validation = "predictions_2.json"
26
 
27
  min_library = ["datasets>=3.4.1", "transformers", "evaluate", "scipy", "scikit-learn",
@@ -79,7 +79,7 @@ if not MEDVQA_SUBMIT:
79
  else:
80
  print("πŸš€ Preparing for submission πŸš€")
81
  file_path_to_upload = os.path.join(
82
- snap_dir, f"{hf_username}-_-_-{current_timestamp}-_-_-task1.json")
83
  shutil.copy(os.path.join(snap_dir, file_from_validation),
84
  file_path_to_upload) # Use shutil.copy here
85
  # add repo_id to the submission file
@@ -108,7 +108,7 @@ else:
108
  file=handle_file(file_path_to_upload),
109
  api_name="/add_submission"
110
  )
111
- print({"User": hf_username, "Task": "task1",
112
  "Submitted_time": str(datetime.fromtimestamp(int(current_timestamp), tz=timezone.utc)) + " UTC"
113
  })
114
  print(result)
 
21
  args, _ = parser.parse_known_args()
22
 
23
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
24
+ submission_file = "submission_task2.py"
25
  file_from_validation = "predictions_2.json"
26
 
27
  min_library = ["datasets>=3.4.1", "transformers", "evaluate", "scipy", "scikit-learn",
 
79
  else:
80
  print("πŸš€ Preparing for submission πŸš€")
81
  file_path_to_upload = os.path.join(
82
+ snap_dir, f"{hf_username}-_-_-{current_timestamp}-_-_-task2.json")
83
  shutil.copy(os.path.join(snap_dir, file_from_validation),
84
  file_path_to_upload) # Use shutil.copy here
85
  # add repo_id to the submission file
 
108
  file=handle_file(file_path_to_upload),
109
  api_name="/add_submission"
110
  )
111
+ print({"User": hf_username, "Task": "task2",
112
  "Submitted_time": str(datetime.fromtimestamp(int(current_timestamp), tz=timezone.utc)) + " UTC"
113
  })
114
  print(result)