-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add credit usage simulation #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, this looks like a nice solution! Please add some more comments and take a look at my suggestions
d27aceb
to
51c956f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please only take a look at the one comment
Great, LGTM! |
Change Description
Try to be precise. You can additionally add comments to your PR, this might help the reviewer a lot.
Add credit usage simulation for TabPFN extensions. For usage just import with
from tabpfn_client.mock_prediction import check_api_credits
and add decorator @check_api_credits to a function. Then, this function will first be simulated (both the execution time and credit usage), it will be checked if the estimated credit usage exceeds the current credits of the user. If yes an error is raised, if not the function gets normally executed.Few notes:
If you used new dependencies: Did you add them to
requirements.txt
?Who did you ping on Mattermost to review your PR? Please ping that person again whenever you are ready for another review.
@noahho
Breaking changes
If you made any breaking changes, please update the version number.
Breaking changes are totally fine, we just need to make sure to keep the users informed and the server in sync.
Does this PR break the API? If so, what is the corresponding server commit?
no
Does this PR break the user interface? If so, why?
no
Please do not mark comments/conversations as resolved unless you are the assigned reviewer. This helps maintain clarity during the review process.