Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: fix data structure for metric value #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

albertlieyingadrian
Copy link
Contributor

@albertlieyingadrian albertlieyingadrian commented Sep 22, 2024

I tried this MIPRO example and figured that it calls BootstrapFewShot optimizer
https://github.com/weavel-ai/Ape/blob/e77f7bf15cdedfac6e74f21923d56f559dc9fc1e/ape/optimizer/utils.py#L98-L105

This optimizer also calls _bootstrap_one_example https://github.com/weavel-ai/Ape/blob/e77f7bf15cdedfac6e74f21923d56f559dc9fc1e/ape/optimizer/bootstrap_fewshot.py#L193 where it requires the metric_value to be a dictionary with a score key instead of just boolean. Otherwise, the pipeline will return an error

 Error: 'dict' object has no attribute 'score'. [ape.optimizer.utils] filename=bootstrap_fewshot.py lineno=206

@albertlieyingadrian
Copy link
Contributor Author

Reference on the MetricValue's structure https://github.com/weavel-ai/Ape/blob/main/ape/types/eval_result.py#L10-L12

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.

1 participant