You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I meeting this error when to run examples/classification_skill_with_CoT.ipynb
import pandas as pd
df = pd.DataFrame([
{"text": "Apple product with a sleek design.", "category": "Electronics"},
{"text": "Laptop stand for the kitchen.", "category": "Furniture/Home Decor"},
{"text": "Chocolate leather boots.", "category": "Footwear/Clothing"},
{"text": "Wooden cream for surfaces.", "category": "Furniture/Home Decor"},
{"text": "Natural finish for your lips.", "category": "Beauty/Personal Care"}
])
df
from adala.agents import Agent
from adala.skills import ClassificationSkill
agent = Agent(
skills=ClassificationSkill(
name='product_category_classification',
instructions='Categorize text into different product categories.',
input_template='Text: {text}',
output_template='Thoughts: {thoughts}\n\nClassification: {predicted_class}',
labels={'predicted_class': [
"Footwear/Clothing",
"Electronics",
"Food/Beverages",
"Furniture/Home Decor",
"Beauty/Personal Care"
]},
)
)
agent.run(df)
Applying skill: product_category_classification
60%|████████████████████████████████████ | 3/5 [00:05<00:04, 2.04s/it]
Traceback (most recent call last):
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 109, in run
await self.visit(self.parse_tree, VariableStack([self.program._variables], self))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 186, in visit
out = await self.visit(tree, variable_stack)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in visit
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 379, in visit
command_output = await command_function(*positional_args, **named_args)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/library/_select.py", line 177, in select
raise ValueError("No valid option generated in #select! Please post a GitHub issue since this should not happen :)")
ValueError: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
Error in program: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
100%|████████████████████████████████████████████████████████████| 5/5 [00:16<00:00, 4.03s/it]
Traceback (most recent call last):
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 109, in run
await self.visit(self.parse_tree, VariableStack([self.program._variables], self))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 186, in visit
out = await self.visit(tree, variable_stack)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in visit
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 379, in visit
command_output = await command_function(*positional_args, **named_args)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/library/_select.py", line 177, in select
raise ValueError("No valid option generated in #select! Please post a GitHub issue since this should not happen :)")
ValueError: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
Error in program: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
The text was updated successfully, but these errors were encountered:
I meeting this error when to run examples/classification_skill_with_CoT.ipynb
import pandas as pd
df = pd.DataFrame([
{"text": "Apple product with a sleek design.", "category": "Electronics"},
{"text": "Laptop stand for the kitchen.", "category": "Furniture/Home Decor"},
{"text": "Chocolate leather boots.", "category": "Footwear/Clothing"},
{"text": "Wooden cream for surfaces.", "category": "Furniture/Home Decor"},
{"text": "Natural finish for your lips.", "category": "Beauty/Personal Care"}
])
df
from adala.agents import Agent
from adala.skills import ClassificationSkill
agent = Agent(
skills=ClassificationSkill(
name='product_category_classification',
instructions='Categorize text into different product categories.',
input_template='Text: {text}',
output_template='Thoughts: {thoughts}\n\nClassification: {predicted_class}',
labels={'predicted_class': [
"Footwear/Clothing",
"Electronics",
"Food/Beverages",
"Furniture/Home Decor",
"Beauty/Personal Care"
]},
)
)
agent.run(df)
Applying skill: product_category_classification
60%|████████████████████████████████████ | 3/5 [00:05<00:04, 2.04s/it]
Traceback (most recent call last):
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 109, in run
await self.visit(self.parse_tree, VariableStack([self.program._variables], self))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 186, in visit
out = await self.visit(tree, variable_stack)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in visit
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 379, in visit
command_output = await command_function(*positional_args, **named_args)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/library/_select.py", line 177, in select
raise ValueError("No valid option generated in #select! Please post a GitHub issue since this should not happen :)")
ValueError: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
Error in program: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
100%|████████████████████████████████████████████████████████████| 5/5 [00:16<00:00, 4.03s/it]
Traceback (most recent call last):
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 109, in run
await self.visit(self.parse_tree, VariableStack([self.program._variables], self))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 186, in visit
out = await self.visit(tree, variable_stack)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in visit
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 379, in visit
command_output = await command_function(*positional_args, **named_args)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/library/_select.py", line 177, in select
raise ValueError("No valid option generated in #select! Please post a GitHub issue since this should not happen :)")
ValueError: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
Error in program: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
The text was updated successfully, but these errors were encountered: