Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Missing f prefix on f-strings fix (#5629)
Browse files Browse the repository at this point in the history
* Fix issue probably-meant-fstring found at https://codereview.doctor

* Update scripts/py2md.py

Co-authored-by: Pete <epwalsh10@gmail.com>
  • Loading branch information
code-review-doctor and epwalsh authored Apr 25, 2022
1 parent 0d25f96 commit d7409d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion allennlp/nn/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ def sequence_cross_entropy_with_logits(
"""
if average not in {None, "token", "batch"}:
raise ValueError("Got average f{average}, expected one of None, 'token', or 'batch'")
raise ValueError(f"Got average f{average}, expected one of None, 'token', or 'batch'")

# make sure weights are float
weights = weights.to(logits.dtype)
Expand Down

0 comments on commit d7409d2

Please sign in to comment.