Skip to content

Commit

Permalink
Fix: proper language detection
Browse files Browse the repository at this point in the history
  • Loading branch information
S1ro1 committed Jan 19, 2025
1 parent efe58d9 commit b800ed8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/discord-cluster-manager/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ async def webhook(leaderboard_name: str, runner_name: str, gpu_type: str, file:
reference_code = leaderboard_item["reference_code"]

runner_cog: SubmitCog = bot_instance.get_cog(cog_name)
language = "cu" if file.filename.endswith((".cu", ".cuh", ".cpp")) else "py"
config = build_task_config(
"cu",
language,
reference_code,
file.file.read().decode("utf-8"),
runner_cog._get_arch(app_commands.Choice(name=gpu_name, value=gpu_name)),
Expand Down

0 comments on commit b800ed8

Please sign in to comment.