Create notebook-cost estimator tool - #12
Open
emmarogge wants to merge 8 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a Jupyter notebook tool intended to help users estimate the approximate GCP cost of running Jupyter notebooks inside Verily Workbench (compute + data/storage + optional workspace-resource discovery via wb CLI).
Changes:
- Introduces a new
cost_estimator.ipynbnotebook with ipywidgets-driven inputs and cost calculations. - Adds logic to estimate storage/query costs for GCS and BigQuery resources.
- Adds workspace resource discovery and sizing helpers via
wbCLI commands.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+196
to
+200
| " elif resource_type == 'mixed':\n", | ||
| " # Combination of storage and BigQuery\n", | ||
| " gcs_storage = storage_price_per_gb_hour * data_gb * runtime_hrs\n", | ||
| " bq_queries = (processed_gb / 1000) * bq_query_price_per_tb * queries\n", | ||
| " storage_cost = gcs_storage + bq_queries\n", |
There was a problem hiding this comment.
In the mixed branch, query costs are added into storage_cost and query_cost remains 0, but downstream code expects query costs in query_cost (it prints them only if query_cost > 0). Return the mixed query component via query_cost and keep storage in storage_cost so totals/breakdowns are correct.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Create a tool that enables users to estimate the cost of running their own Jupyter notebooks in their Workbench workspaces.