HackTheRounds Interview Experiences
Stripe MLE OA Interview Experience (2026) - PyTorch Speed Sign Classifier & Pandas Attendance, Offer
Stripe Machine Learning Engineer OA walkthrough: 90 minute HackerRank with a PyTorch CNN for speed sign classification and a pandas groupby problem with same da
By Anonymous ยท 2026-04-10
Background
Writing this up while my Stripe MLE OA is still fresh. I am a second-year ML engineer at a consumer ad-tech company and applied to Stripe's Risk ML team through a LinkedIn recruiter who cold-messaged me. The MLE loop at Stripe is less algorithmic than the SWE loop and leans heavily into applied data work plus model-building judgment. If you came from a pure DS-Algo prep track, you will feel off balance in this OA. The right prep is pandas muscle memory, PyTorch boilerplate that you can type without thinking, and careful reading of data-cleaning specs.
Timeline
- Recruiter reach-out: mid-March
- OA link received: 5 days later with a 4-day window
- OA attempted: 3 days after receiving the link
- Recruiter feedback: 6 business days after submission
- Phone screen scheduled: 2 weeks after OA
- Total so far: ~3 weeks
OA Format (90 min, HackerRank-style)
Two problems sharing the 90 minute budget. One is a pandas-heavy data cleaning and aggregation task. The other is a PyTorch image classification task with a provided train and test CSV plus a submission format. This is not a two-Mediums-on-LeetCode OA. The grader mixes Kaggle-style scoring on the ML task with exact-match unit tests on the pandas task.
Problem 1: Speed Sign Classifier (PyTorch)
Problem: Build a CNN that classifies traffic speed-limit sign images into three buckets: 30 km/h, 70 km/h, and 120 km/h. The dataset ships as a train.csv with image paths and integer labels, a test.csv with only paths, and a sample submission.csv with the expected output shape. The grader scores accuracy on a held-out test split.
I built a three-block CNN in PyTorch. Two conv layers with ReLU plus max-pool, a third conv block with batch norm, then a small dense head. Dataset class read images with PIL, resized to 64x64, and normalized with ImageNet mean and std. I used Adam at 1e-3 with a step LR scheduler. Ten epochs, batch size 64. The whole file was about 120 lines.
The judgment calls that mattered:
- Data augmentation. I added random horizontal flips and small rotations. Rotations of plus or minus 10 degrees are safe because speed signs are read right-side up in real life. Vertical flips would have been wrong because they destroy the number shape.
- Class imbalance. The training CSV had roughly 2x more 30 km/h samples than 120 km/h. I added a `WeightedRandomSampler` so every batch had balanced class representation.
- Submission formatting. The grader is strict. Two columns: `path` and `label`. I generated the CSV with `pandas.to_csv(index=False)` and spot-checked it had a header row with those exact names.
I pushed my local validation accuracy to around 94 percent before I ran out of time. The hidden test set likely was harder, but accuracy on the provided holdout gave me confidence.
Problem 2: Employee Store Attendance
Problem: Given a pandas DataFrame with columns emp id , branch code , and visit date , find the set of employees who visited their assigned branch at least three times in a single calendar month. An employee's assigned branch is defined as any branch they have visited at least once. Multiple visits by the same employee to the same branch on the same day count as a single visit. If no employee qualifies, return an empty DataFrame with the same header schema.
Three things to read carefully here. The same-day dedup rule is the first trap. The at-least-once assignment rule means a single employee can qualify across multiple of their own branches. The empty DataFrame requirement means you cannot return None or a raw dict.
My solution chain: copy the frame, parse visit date into proper datetimes, derive a month period, drop duplicate (emp id, branch code, visit date) rows to enforce the same-day rule, group by (emp id, branch code, month) to count unique days, filter to groups with at least 3 visits, and return the trimmed columns. The empty-frame branch returns a DataFrame with the explicit header schema so the unit tests still pass even when no employee qualifies.
The dedup step runs before the groupby so the counts represent monthly unique days, not raw rows. Skipping the dedup is the single most common failure mode on this problem. Asymptotically this is O(n log n) from the groupby, dominated by the sort inside pandas.
What Makes This OA Hard
The PyTorch problem gives you full editor access but the runtime cap is tight. Training for 30 epochs does not fit in the window. You have to pick architectures and hyperparameters that converge fast. My base CNN fit comfortably in about 8 minutes of wall-clock training on the provided environment. If you pick ResNet50 from scratch, you will run out of time.
The pandas problem looks easy but the trap is the same-day dedup rule. About half of failed attempts I've seen online miss it and submit a solution that double-counts same-day visits. Read the spec three times before you write code.
Result
Passed the OA with a feedback note from the recruiter mentioning strong pandas and reasonable model accuracy. Scheduling phone screen now.
Tips
- Memorize a CNN template that compiles without lookup. Your 90 minutes should not include Googling `nn.Conv2d` syntax. I have a gist with a four-block template, a `Dataset` subclass, and an Adam plus scheduler training loop that I have literally typed dozens of times. This is not optional.
- Read the pandas spec word for word, especially the dedup and empty-result clauses. Stripe's data-cleaning problems always have a trap in the definition of what counts as a unique event. Highlight it, do not skim it.
- Submit an early baseline, then iterate. On the CNN problem, I trained a 3-epoch version with default hyperparameters and generated a valid submission CSV within the first 25 minutes. Only then did I iterate on augmentation and class balancing. If the grader scores early, a baseline is better than an unfinished masterpiece.
- For class imbalance, default to WeightedRandomSampler, not loss weighting. Loss weighting fights against the optimizer. Sampler-based balancing is more stable on short training runs and it is one line of code.
- Do not forget the header row in the submission CSV. The grader will give you zero if the header is missing. I saw three threads from past candidates all losing points on this. Spot-check the file you upload.
- The MLE OA is applied, not algorithmic. Stop grinding LeetCode for it. This is a common failure mode for Stripe MLE candidates. The signal they want is "can you do real data work under time pressure," not "can you solve monotonic stack problems."