Skip to content

Commit d5d2a3c

Browse files
committed
clarify DSPy
1 parent f23572a commit d5d2a3c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/src/content/blog/dspy-production-challenges.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ During our testing I observed three concrete limitations in DSPy:
3333

3434
## Conflicting concurrency
3535

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:
3737

3838
```python
3939
if not 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():
4343
)
4444
```
4545

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):
4747

4848
```python
4949
with dspy.context(lm=dspy.LM("openai/gpt-5-mini")):
@@ -53,7 +53,7 @@ with dspy.context(lm=dspy.LM("openai/gpt-5-nano")):
5353
result2 = predict(question="Who do *you* think is the GOAT of soccer?")
5454
```
5555

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.
5757

5858
While DSPy 3.0 shipped async improvements, [limitations in configurability](https://github.com/stanfordnlp/dspy/issues/8197) and async support still persist:
5959
- program training still [requires a synchronous context](https://github.com/stanfordnlp/dspy/issues/9075)

0 commit comments

Comments
 (0)