Repository challenges
Design a bounded inference scheduler
Design · Advanced · AI engineering · 50 minutes
Engineering ticket
Implement schedule(lengths, slots). All requests arrive at tick zero. lengths are nonnegative integer decode durations. At each step, assign the next request to the slot that becomes available earliest, using the lowest slot index to break ties. Return [[request_index, slot_index, start, end], ...] in input order. Reject slots <= 0 with ValueError. Explain the prefill, memory and GPU-contention assumptions excluded by this model in DESIGN.md.
Review rubric
- Correctness on documented inputs
- Tests and edge cases
- Clear explanation of trade-offs
Reading the ticket and starter files is public. Sign in to save edits, run tests and submit evidence. Code-review quality requires human review.
Starter repository
DESIGN.md
# Design decisions ## Contract ## Complexity ## Production limitations
README.md
# InferenceAI engineering lab Read the ticket, inspect the files, reproduce the issue and implement the contract. Run visible tests while working. Submit checks protected cases. Explain your changes and limitations.
scheduler.py
def schedule(lengths, slots):
raise NotImplementedError
tests/test_scheduler.py
import unittest
from scheduler import *
class ContractTest(unittest.TestCase):
def test_example(self):
self.assertEqual(schedule([2,4,1], 2), [[0,0,0,2],[1,1,0,4],[2,0,2,3]])