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

Feature Request: get_credits(), estimate_credits() #51

Open
przell opened this issue Dec 10, 2024 · 2 comments
Open

Feature Request: get_credits(), estimate_credits() #51

przell opened this issue Dec 10, 2024 · 2 comments

Comments

@przell
Copy link

przell commented Dec 10, 2024

Dear Destination Earth / Earth Hub team,
I was testing the ERA-5 zarr Greece flood example. Great notebook.
I am missing one feature though: get the current number of credits that have been used so far.
This would be really helpful for estimating and planning computations.

  • In the costing.py functions, would it be possible to add a function get_credits(PAT=<presonal_access_token>)?
  • And if you can estimate the credits that are going to be used for a computation, could they be added to estimate_download_size() or make a function estimate_credits().

Thanks for the great work, all the best!

@nicolamasotti
Copy link
Contributor

Hi @przell, the get_credits(PAT=<presonal_access_token>) functionality is something that we certainly want to implement along our roadmap. Its just not there yet. For the moment, limited to the Earth Data Hub service, you can review your remaining quota on https://earthdatahub.destine.eu/account-settings.

As for the credits consumption notice that the estimate_download_size() function also returns a estimated_needed_chunks value. This is is roughly the number of credits you will consume to compute() the selection. There are technical details for which the two numbers are not exactly the same, but the difference is absolutely negligible compared to the the 500K initial quota.

@przell
Copy link
Author

przell commented Dec 13, 2024

Hi @nicolamasotti, thanks for the quick reply!
The workaround with the number of chunks should be fine for now. Thanks for this hint!
Great to hear that the get_credits(PAT=<presonal_access_token>) is under construction! Looking forward to using it when ready.
Thanks! All the best!

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

No branches or pull requests

2 participants