|
15 | 15 | from libkernelbot.background_submission_manager import BackgroundSubmissionManager |
16 | 16 | from libkernelbot.consts import SubmissionMode |
17 | 17 | from libkernelbot.db_types import IdentityType |
18 | | -from libkernelbot.kernelguard import KernelGuardRejected, enforce_submission_precheck, should_precheck_submission |
19 | 18 | from libkernelbot.leaderboard_db import LeaderboardDB, LeaderboardRankedEntry |
20 | 19 | from libkernelbot.problem_sync import sync_problems |
21 | 20 | from libkernelbot.submission import ( |
@@ -564,18 +563,6 @@ async def run_submission_async( |
564 | 563 | if not req.gpus or len(req.gpus) != 1: |
565 | 564 | raise HTTPException(status_code=400, detail="Invalid GPU type") |
566 | 565 |
|
567 | | - # run KernelGuard pre-check before enqueuing to avoid filling the queue with blocked submissions |
568 | | - if should_precheck_submission(submission_mode_enum): |
569 | | - try: |
570 | | - await asyncio.wait_for( |
571 | | - asyncio.to_thread(enforce_submission_precheck, req.code, req.file_name), |
572 | | - timeout=20.0, |
573 | | - ) |
574 | | - except asyncio.TimeoutError as e: |
575 | | - raise HTTPException(status_code=504, detail="KernelGuard pre-check timed out") from e |
576 | | - except KernelGuardRejected as e: |
577 | | - raise HTTPException(status_code=400, detail=str(e)) from e |
578 | | - |
579 | 566 | # put submission request to background manager to run in background |
580 | 567 | sub_id, job_status_id = await enqueue_background_job( |
581 | 568 | req, submission_mode_enum, backend_instance, background_submission_manager |
|
0 commit comments