mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-12 09:12:38 +02:00
update prompt (specify whether each set has target label)
This commit is contained in:
parent
df877c973e
commit
6972afb755
5 changed files with 22 additions and 21 deletions
|
|
@ -5,7 +5,7 @@ def evaluate_score(pred, gt, metric):
|
|||
if metric == "accuracy":
|
||||
return accuracy_score(gt, pred)
|
||||
elif metric == "f1":
|
||||
unique_classes = np.unique(gt)
|
||||
unique_classes = sorted(list(np.unique(gt)))
|
||||
if 1 in unique_classes and 0 in unique_classes:
|
||||
pos_label = 1
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@ def get_tree_text(node : Node):
|
|||
for child in node.children:
|
||||
text += textwrap.indent(visualize_tree(child, depth+1, previous_plans), "\t")
|
||||
return text
|
||||
|
||||
return visualize_tree(node), len(code_set)
|
||||
num_simulations = node.visited
|
||||
text = f"Number of simulations: {num_simulations}\n"
|
||||
text += visualize_tree(node)
|
||||
return text, len(code_set)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue