Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04635ed

Browse files
authored
fix lint errors and lock deps (stanfordnlp#8312)
1 parent8fa2465 commit04635ed

File tree

3 files changed

+2309
-2309
lines changed

3 files changed

+2309
-2309
lines changed

‎dspy/dsp/colbertv2.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def forward(self, query: str, k: int = 7, **kwargs):
151151

152152
ifkwargs.get("filtered_pids"):
153153
filtered_pids=kwargs.get("filtered_pids")
154-
asserttype(filtered_pids)==List[int],"The filtered pids should be a list of integers"
154+
assertisinstance(filtered_pids,list)andall(isinstance(pid,int)forpidinfiltered_pids),"The filtered pids should be a list of integers"
155155
device="cuda"iftorch.cuda.is_available()else"cpu"
156156
results=self.searcher.search(
157157
query,

‎dspy/streaming/streaming_listener.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def find_predictor_for_stream_listeners(program: "Module", stream_listeners: Lis
193193
"predictor to use for streaming. Please specify the predictor to listen to."
194194
)
195195

196-
iffield_info.annotation!=str:
196+
iffield_info.annotationisnotstr:
197197
raiseValueError(
198198
f"Stream listener can only be applied to string output field, but your field{field_name} is of "
199199
f"type{field_info.annotation}."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp