Skip to content

Commit 6f9dbb7

Browse files
authored
v2.17.6
v2.17.6: Hotfix multi-choice
2 parents 9a53570 + a164021 commit 6f9dbb7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

prompting/rewards/multi_choice.py

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ def process_predictions(self, predictions: dict[str, float]) -> dict[str, float]
4040
self.choice_map[k.lower()]: float(v) for k, v in predictions.items() if k.lower() in self.choice_map
4141
}
4242

43+
if any(v < 0 for v in valid_choices.values()):
44+
raise ValueError(f"Negative values are not allowed: {valid_choices}")
45+
4346
total = sum(valid_choices.values())
4447
if np.isclose(total, 0.0):
4548
raise ValueError(f"Values sum up to 0, total={total}")

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "prompting"
3-
version = "2.17.5"
3+
version = "2.17.6"
44
description = "Subnetwork 1 runs on Bittensor and is maintained by Macrocosmos. It's an effort to create decentralised AI"
55
authors = ["Kalei Brady, Dmytro Bobrenko, Felix Quinque, Steffen Cruz, Richard Wardle"]
66
readme = "README.md"

0 commit comments

Comments
 (0)