Skip to content

Fix lint errors and lock uv dependencies #8312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dspy/dsp/colbertv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def forward(self, query: str, k: int = 7, **kwargs):

if kwargs.get("filtered_pids"):
filtered_pids = kwargs.get("filtered_pids")
assert type(filtered_pids) == List[int], "The filtered pids should be a list of integers"
assert isinstance(filtered_pids, list) and all(isinstance(pid, int) for pid in filtered_pids), "The filtered pids should be a list of integers"
device = "cuda" if torch.cuda.is_available() else "cpu"
results = self.searcher.search(
query,
Expand Down
2 changes: 1 addition & 1 deletion dspy/streaming/streaming_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def find_predictor_for_stream_listeners(program: "Module", stream_listeners: Lis
"predictor to use for streaming. Please specify the predictor to listen to."
)

if field_info.annotation != str:
if field_info.annotation is not str:
raise ValueError(
f"Stream listener can only be applied to string output field, but your field {field_name} is of "
f"type {field_info.annotation}."
Expand Down
Loading