Skip to content

Conversation

@finitearth
Copy link
Collaborator

No description provided.

… a class instantiation'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…promptolution into feature/welcome_capoeira

	# especially if it merges an updated upstream into a topic branch.
@github-actions
Copy link

github-actions bot commented Dec 29, 2025

Coverage

Tests Skipped Failures Errors Time
92 0 💤 0 ❌ 0 🔥 1.430s ⏱️

Comment on lines 123 to 135
few_shot_examples = build_few_shot_examples(
instruction="Classify the sentiment of the text.",
num_examples=2,
df_few_shots=mock_df,
x_column=mock_task.x_column,
y_column=mock_task.y_column,
predictor=mock_predictor,
fewshot_template=CAPO_FEWSHOT_TEMPLATE,
target_begin_marker=optimizer.target_begin_marker,
target_end_marker=optimizer.target_end_marker,
check_fs_accuracy=True,
create_fs_reasoning=True,
)
Comment on lines 141 to 153
few_shot_examples = build_few_shot_examples(
instruction="Classify the sentiment of the text.",
num_examples=0,
df_few_shots=mock_df,
x_column=mock_task.x_column,
y_column=mock_task.y_column,
predictor=mock_predictor,
fewshot_template=CAPO_FEWSHOT_TEMPLATE,
target_begin_marker=optimizer.target_begin_marker,
target_end_marker=optimizer.target_end_marker,
check_fs_accuracy=True,
create_fs_reasoning=True,
)
Comment on lines 186 to 202
mutated = perform_mutation(
offsprings=[Prompt("Instruction 1", ["Example 1"]), Prompt("Instruction 2", ["Example 2"])],
mutation_template=optimizer.mutation_template,
upper_shots=optimizer.upper_shots,
meta_llm=optimizer.meta_llm,
few_shot_kwargs=dict(
df_few_shots=mock_df,
x_column=mock_task.x_column,
y_column=mock_task.y_column,
predictor=mock_predictor,
fewshot_template=CAPO_FEWSHOT_TEMPLATE,
target_begin_marker=optimizer.target_begin_marker,
target_end_marker=optimizer.target_end_marker,
check_fs_accuracy=True,
create_fs_reasoning=True,
),
)
Comment on lines 270 to 286
perform_mutation(
offsprings=[parent],
mutation_template=optimizer.mutation_template,
upper_shots=optimizer.upper_shots,
meta_llm=optimizer.meta_llm,
few_shot_kwargs=dict(
df_few_shots=mock_df,
x_column=mock_task.x_column,
y_column=mock_task.y_column,
predictor=mock_predictor,
fewshot_template=CAPO_FEWSHOT_TEMPLATE,
target_begin_marker=optimizer.target_begin_marker,
target_end_marker=optimizer.target_end_marker,
check_fs_accuracy=True,
create_fs_reasoning=True,
),
)
Comment on lines 168 to 173
offsprings = perform_crossover(
[Prompt("Instruction 1", ["Example 1"]), Prompt("Instruction 2", ["Example 2"])],
optimizer.crossovers_per_iter,
optimizer.crossover_template,
optimizer.meta_llm,
)
mother = Prompt("Classify the sentiment of the text.", ["Input: I love this! Output: Positive"])
father = Prompt("Determine if the review is positive or negative.", ["Input: This is terrible. Output: Negative"])
optimizer._crossover([mother, father])
perform_crossover([mother, father], optimizer.crossovers_per_iter, optimizer.crossover_template, optimizer.meta_llm)

mother = Prompt("Instruction 1", ["Example 1"])
father = Prompt("Instruction 2", ["Example 2"])
perform_crossover([mother, father], optimizer.crossovers_per_iter, optimizer.crossover_template, optimizer.meta_llm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants