Skip to content

feat: Add cloud_function_cpus option to remote_function#2475

Open
TrevorBergeron wants to merge 9 commits intomainfrom
rf_concur
Open

feat: Add cloud_function_cpus option to remote_function#2475
TrevorBergeron wants to merge 9 commits intomainfrom
rf_concur

Conversation

@TrevorBergeron
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Feb 24, 2026
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Feb 24, 2026
@TrevorBergeron TrevorBergeron marked this pull request as ready for review February 25, 2026 18:27
@TrevorBergeron TrevorBergeron requested review from a team as code owners February 25, 2026 18:27
return 1
elif memory_mib <= 8192:
return 2
elif memory_mib <= 8192:
Copy link
Contributor

Choose a reason for hiding this comment

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

dup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

if threads:
env_vars["THREADS"] = str(threads)
if env_vars:
function.service_config.environment_variables = env_vars
Copy link
Contributor

Choose a reason for hiding this comment

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

How do you know where to put these configs to? Like this function.service_config.environment_variables? Is there a cloud run doc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uhh, I just found it with ide auto-complete.
The specific environment variables are from functions framework hooks: see GoogleCloudPlatform/functions-framework-python#241

@TrevorBergeron TrevorBergeron changed the title feat: Add concurrency options to udf feat: Add cloud_function_cpus option to remote_function Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants