Senior interview questionAsked at Jane Street · interview write-up
Design an end-to-end PyTorch training framework for time-series forecasting, covering windowed datasets, reproducibility, distributed training, checkpointing and evaluation.
Model answer
Datasets build windows lazily from contiguous arrays, with input length, horizon and stride in config. Split by time with a gap so no window straddles the boundary, and fit normalisation on training data only.
Reproducibility: seed every RNG, record config, code version and a data hash, and use deterministic kernels where it matters. Distribute with DDP or FSDP and a distributed sampler. Checkpoints hold model, optimizer, scheduler, RNG states and step, written atomically, so resuming is exact. Evaluate with walk-forward backtests per horizon against naive baselines like last value.
Practise the rest
35 Training questions, 492 in all, each with a model answer. Free.
More from Jane Street interview questions.
More Training interview questions
- Implement masked cross-entropy in NumPy that stays numerically stable, with label smoothing and a temperature.
- Build a pipeline that finds math documents in web crawls and scores their quality.
- Explain KL divergence for language models: which direction is which, what happens when supports don't match, and how it's used as a regulariser.
- When would you use mean squared error versus cross-entropy? And what is LoRA?
- Explain Adam and its bias correction, and why AdamW decouples weight decay.
- Explain policy types in RL and modern policy-gradient methods such as TRPO, PPO and GAE, then compare linear attention and grouped-query attention.