hard20 pts · first answer countspythonmodel-serving
State leaking between requests
This helper runs inside a long-lived model server. What do the two calls print?
def add_feature(row, cache={}):
cache[row['id']] = row['value']
return len(cache)
print(add_feature({'id': 1, 'value': 5}))
print(add_feature({'id': 2, 'value': 7}))Discussion 0
Join free to post in the discussion.
Related questions
- When batch inference fitsMLOps Engineer
- Traffic before the model has loadedMLOps Engineer
- Why export a model to ONNXMLOps Engineer
- Protocol for internal inference callsMLOps Engineer
- Low GPU use under loadMLOps Engineer
- Splitting requests into batchesMLOps Engineer
- Silent wrong predictions from bad inputMLOps Engineer
- p99 latency spikes during traffic burstsMLOps Engineer