You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/src/content/blog/dspy-production-challenges.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ During our testing I observed three concrete limitations in DSPy:
33
33
34
34
## Conflicting concurrency
35
35
36
-
Both of my team's attempts at integrating DSPy into live workflows involved distributed, asynchronous training and dynamic model-switching via Celery with `gevent`. We abandoned DSPy shortly after encountering[this](https://github.com/stanfordnlp/dspy/blob/main/dspy/dsp/utils/settings.py#L159-L163) configuration issue:
36
+
Both of my team's attempts at integrating DSPy into live workflows involved distributed, asynchronous training and dynamic model-switching via Celery with `gevent`. Users switch LMs via `dspy.configure`, but we encountered[this](https://github.com/stanfordnlp/dspy/blob/main/dspy/dsp/utils/settings.py#L159-L163) configuration issue:
37
37
38
38
```python
39
39
ifnot in_ipython and config_owner_async_task != asyncio.current_task():
@@ -43,7 +43,7 @@ if not in_ipython and config_owner_async_task != asyncio.current_task():
43
43
)
44
44
```
45
45
46
-
As suggested, we treed`dspy.context` to avoid async task conflicts. But every model switch required context managers, [as demonstrated by this example snippet](https://github.com/stanfordnlp/dspy/blob/main/docs/docs/tutorials/cache/index.md?plain=1#L178-L181):
46
+
As suggested, we tried`dspy.context` to avoid async task conflicts. But every model switch required context managers, [as demonstrated by this example snippet](https://github.com/stanfordnlp/dspy/blob/main/docs/docs/tutorials/cache/index.md?plain=1#L178-L181):
47
47
48
48
```python
49
49
with dspy.context(lm=dspy.LM("openai/gpt-5-mini")):
@@ -53,7 +53,7 @@ with dspy.context(lm=dspy.LM("openai/gpt-5-nano")):
53
53
result2 = predict(question="Who do *you* think is the GOAT of soccer?")
54
54
```
55
55
56
-
In a Markdown doc or Jupyter notebook this reads fine. In a production codebase this practically _invites_ bugs.
56
+
In a Markdown doc or Jupyter notebook this reads fine. In a production codebase this practically _invites_ bugs. We abandoned both efforts shortly thereafter.
57
57
58
58
While DSPy 3.0 shipped async improvements, [limitations in configurability](https://github.com/stanfordnlp/dspy/issues/8197) and async support still persist:
59
59
- program training still [requires a synchronous context](https://github.com/stanfordnlp/dspy/issues/9075)
0 commit comments