Skip to content
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 cascades/_src/distributions/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@functools.lru_cache()
def cached_completion(rng=None, **kwargs):
del rng
return openai.Completion.create(**kwargs)
return openai.Completion.create(**kwargs) # pyrefly: ignore[missing-attribute]


@dataclasses.dataclass(eq=True, frozen=True)
Expand Down
6 changes: 3 additions & 3 deletions cascades/examples/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def _eval_arithmetic(node):
if isinstance(node, ast.Num): # <number>
return node.n
elif isinstance(node, ast.BinOp): # <left> <operator> <right>
return operators[type(node.op)](_eval_arithmetic(node.left),
_eval_arithmetic(node.right))
return operators[type(node.op)](_eval_arithmetic(node.left), # pyrefly: ignore[bad-index]
_eval_arithmetic(node.right)) # pyrefly: ignore[bad-argument-count]
elif isinstance(node, ast.UnaryOp): # <operator> <operand> e.g., -1
return operators[type(node.op)](_eval_arithmetic(node.operand))
return operators[type(node.op)](_eval_arithmetic(node.operand)) # pyrefly: ignore[bad-argument-count, bad-index, no-matching-overload]
else:
raise TypeError(node)
2 changes: 1 addition & 1 deletion cascades/examples/tasks/svamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def solve_svamp_task(task, train_set, lm=None, check_correct=False):

if check_correct:
# Did we get the right answer?
correct = _score_prediction(model_answer=calculator_output,
correct = _score_prediction(model_answer=calculator_output, # pyrefly: ignore[bad-argument-type]
true_answer=task['Answer'])
yield cc.log(correct, 'is_correct')
if not correct:
Expand Down
Loading