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

cost tracking by ARN #581

Open
balewski opened this issue Jun 22, 2023 · 4 comments
Open

cost tracking by ARN #581

balewski opened this issue Jun 22, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@balewski
Copy link

balewski commented Jun 22, 2023

Is your feature request related to a problem? Please describe.
I'd like to be able to track acquired cost per task, after task has been executed.

When I submit a task to Aquila it may take a week until it gets executed. You provide the construct, which requires the Tracker() context to be active for the duration of the job.

from braket.tracking import Tracker
ahs_prog=ahs_problem()
with Tracker() as tracker:
        task = device.run(ahs_prog, shots=shots)
        results=task.result() 
print('status=%s, cost tracker, charge/$:'%task.state(),tracker.simulator_tasks_cost())

It takes a week+ for Aquila job to get executed and it is unrealistic to expect a program on my laptop maintains AWS connection for that long. If I want to place 20 jobs in the queue I'd need to keep 20 copies alive for that long.

Describe the solution you'd like
Given a list of ARNs I'd like to construct a CSV table contacting information reported by

tracker.simulator_tasks_cost()
tracker.quantum_tasks_statistics() # preferably too

using a Python script executed on a terminal.

Describe alternatives you've considered
Open 20 notebook for 20 submitted jobs and not close my laptop for a week+, until all complete.

@balewski balewski added the enhancement New feature or request label Jun 22, 2023
@shpface shpface transferred this issue from amazon-braket/amazon-braket-examples Jun 23, 2023
@shpface
Copy link
Contributor

shpface commented Jun 23, 2023

Thank you for the request, this would be a nice feature addition to the cost tracking currently offered in the Braket SDK. Could you help us understand some more context around your use case? Are you wanting the cost tracking for informational purposes? Are you trying to use the cost for control flow in your code? Or something else?
Have you tried the AWS wide tools offered by Cost Explorer and AWS Budgets?

@balewski
Copy link
Author

It is for informal cost tracking purposes.
I have not tried yet the tools you mentioned. Can you point me to a tutorial?
I need nothing fancy, just a basic request for the cost of the list of jobs.

@zmohammad01
Copy link

👋 I'm on the product team for Braket - cost management is a theme we are planning to expand on. In the interim, these two links shed light on AWS Cost Explore and Budgets. They provide higher level information for the Braket service, but your point on asking for granular cost information is valid.

AWS Cost Explorer
AWS Budgets

@speller26
Copy link
Member

Following up on Cost Explorer, I've responded to your issue in amazon-braket-examples with instructions to view costs by ARN, both programmatically and through the console!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants