Thanks to visit codestin.com
Credit goes to github.com

Skip to content

remove numpy and pyarrow in bigframes function #1648

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions bigframes/functions/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
import cloudpickle
import google.api_core.exceptions
from google.cloud import bigquery, functions_v2
import numpy
import pandas
import pyarrow

import bigframes.core.compile.ibis_types
import bigframes.dtypes
Expand Down Expand Up @@ -72,12 +70,12 @@ def _get_updated_package_requirements(

if is_row_processor:
# bigframes function will send an entire row of data as json, which
# would be converted to a pandas series and processed Ensure numpy
# versions match to avoid unpickling problems. See internal issue
# b/347934471.
requirements.append(f"numpy=={numpy.__version__}")
# would be converted to a pandas series and processed. Ideally we should
# ensure numpy versions match to avoid unpickling problems. See internal
# issue b/347934471. However, the BigQuery managed Python UDF runtime
# currently requires NumPy < 2.0. Due to this constraint (b/410924784),
# we only specify the pandas version in the requirements for now.
requirements.append(f"pandas=={pandas.__version__}")
requirements.append(f"pyarrow=={pyarrow.__version__}")

if package_requirements:
requirements.extend(package_requirements)
Expand Down