Skip to content

chore: fix the change the default value for pdf extract/chunk #1517

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

Merged
merged 1 commit into from
Mar 20, 2025
Merged
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
28 changes: 14 additions & 14 deletions bigframes/operations/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,9 @@ def pdf_extract(
self,
*,
connection: Optional[str] = None,
max_batching_rows: int = 8192,
container_cpu: Union[float, int] = 0.33,
container_memory: str = "512Mi",
max_batching_rows: int = 1,
container_cpu: Union[float, int] = 2,
container_memory: str = "1Gi",
) -> bigframes.series.Series:
"""Extracts text from PDF URLs and saves the text as string.

Expand All @@ -574,10 +574,10 @@ def pdf_extract(
connection (str or None, default None): BQ connection used for
function internet transactions, and the output blob if "dst"
is str. If None, uses default connection of the session.
max_batching_rows (int, default 8,192): Max number of rows per batch
max_batching_rows (int, default 1): Max number of rows per batch
send to cloud run to execute the function.
container_cpu (int or float, default 0.33): number of container CPUs. Possible values are [0.33, 8]. Floats larger than 1 are cast to intergers.
container_memory (str, default "512Mi"): container memory size. String of the format <number><unit>. Possible values are from 512Mi to 32Gi.
container_cpu (int or float, default 2): number of container CPUs. Possible values are [0.33, 8]. Floats larger than 1 are cast to intergers.
container_memory (str, default "1Gi"): container memory size. String of the format <number><unit>. Possible values are from 512Mi to 32Gi.

Returns:
bigframes.series.Series: conatins all text from a pdf file
Expand All @@ -604,11 +604,11 @@ def pdf_chunk(
self,
*,
connection: Optional[str] = None,
chunk_size: int = 1000,
chunk_size: int = 2000,
overlap_size: int = 200,
max_batching_rows: int = 8192,
container_cpu: Union[float, int] = 0.33,
container_memory: str = "512Mi",
max_batching_rows: int = 1,
container_cpu: Union[float, int] = 2,
container_memory: str = "1Gi",
) -> bigframes.series.Series:
"""Extracts and chunks text from PDF URLs and saves the text as
arrays of strings.
Expand All @@ -620,15 +620,15 @@ def pdf_chunk(
connection (str or None, default None): BQ connection used for
function internet transactions, and the output blob if "dst"
is str. If None, uses default connection of the session.
chunk_size (int, default 1000): the desired size of each text chunk
chunk_size (int, default 2000): the desired size of each text chunk
(number of characters).
overlap_size (int, default 200): the number of overlapping characters
between consective chunks. The helps to ensure context is
perserved across chunk boundaries.
max_batching_rows (int, default 8,192): Max number of rows per batch
max_batching_rows (int, default 1): Max number of rows per batch
send to cloud run to execute the function.
container_cpu (int or float, default 0.33): number of container CPUs. Possible values are [0.33, 8]. Floats larger than 1 are cast to intergers.
container_memory (str, default "512Mi"): container memory size. String of the format <number><unit>. Possible values are from 512Mi to 32Gi.
container_cpu (int or float, default 2): number of container CPUs. Possible values are [0.33, 8]. Floats larger than 1 are cast to intergers.
container_memory (str, default "1Gi"): container memory size. String of the format <number><unit>. Possible values are from 512Mi to 32Gi.

Returns:
bigframe.series.Series: Series of array[str], where each string is a
Expand Down