Fix suggested by @bhadreshpsavani (#11660)
This commit is contained in:
@@ -522,7 +522,7 @@ def main():
|
|||||||
|
|
||||||
# region Prediction losses
|
# region Prediction losses
|
||||||
# This section is outside the scope() because it's very quick to compute, but behaves badly inside it
|
# This section is outside the scope() because it's very quick to compute, but behaves badly inside it
|
||||||
if "label" in datasets["test"].features:
|
if "test" in datasets and "label" in datasets["test"].features:
|
||||||
print("Computing prediction loss on test labels...")
|
print("Computing prediction loss on test labels...")
|
||||||
labels = datasets["test"]["label"]
|
labels = datasets["test"]["label"]
|
||||||
loss = float(loss_fn(labels, predictions).numpy())
|
loss = float(loss_fn(labels, predictions).numpy())
|
||||||
|
|||||||
Reference in New Issue
Block a user