We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c29e6b7 commit e3c842dCopy full SHA for e3c842d
python/cog/server/runner.py
@@ -113,6 +113,11 @@ def predict(
113
else:
114
payload = prediction.input.copy()
115
116
+ if prediction.context is None:
117
+ prediction.context = {}
118
+ if prediction.id is not None:
119
+ prediction.context["id"] = prediction.id
120
+
121
sid = self._worker.subscribe(task.handle_event, tag=tag)
122
task.track(self._worker.predict(payload, context=prediction.context, tag=tag))
123
task.add_done_callback(self._task_done_callback(tag, sid))
0 commit comments