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

Added helper to estimate cost of query with YOLOPandas #30

Merged
merged 4 commits into from
May 5, 2023

Conversation

mturk24
Copy link
Contributor

@mturk24 mturk24 commented May 4, 2023

Added a new utils package with a query_helpers script designed to add more functionality to YOLOPandas. In particular, I added the ability to estimate token costs per query so that users can better understand how expensive it is to run YOLOPandas on their data. I thought the function had the right tradeoff in simplicity to start.

@ccurme
Copy link
Owner

ccurme commented May 4, 2023

Thanks for this @mturk24. I notice that utils is implemented outside of yolopandas/, and currently won't be installed via pip. What is your intent as to how users should access utils?

@mturk24
Copy link
Contributor Author

mturk24 commented May 5, 2023

Thanks for this @mturk24. I notice that utils is implemented outside of yolopandas/, and currently won't be installed via pip. What is your intent as to how users should access utils?

No problem, I think what you've built is awesome and I'd love to help contribute! I just addressed this by moving utils within 'yolopandas' now.

Copy link
Owner

@ccurme ccurme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @mturk24. I added a call to run_query_with_cost to integration tests. As-is it basically checks that get_openai_callback will run and has attributes for total_tokens, prompt_tokens, etc.

@ccurme ccurme merged commit adda7e3 into ccurme:main May 5, 2023
@mturk24
Copy link
Contributor Author

mturk24 commented May 5, 2023

Looks good, thanks @mturk24. I added a call to run_query_with_cost to integration tests. As-is it basically checks that get_openai_callback will run and has attributes for total_tokens, prompt_tokens, etc.

Awesome thanks!

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.

2 participants