Skip to content

Conversation

@okhat
Copy link
Collaborator

@okhat okhat commented Dec 17, 2024

  1. Only one unique thread (which can be any thread!) can call dspy.configure.
  2. It affects a global state, visible to all. As a result, user threads work, but they shouldn't be mixed with concurrent changes to dspy.configure from the "main" thread. (In the future, one can add warnings for this, if there are near-in-time accesses to the configuration followed by .configure calls.)
  3. Any thread can use dspy.context. It propagates to child threads created with DSPy primitives: Parallel, asyncify, etc.

…an call dspy.configure and it affects a global state. Any thread can use dspy.context. It propagates to child threads created with DSPy primitives.
@okhat okhat merged commit e0907eb into main Dec 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants