Skip to content

Commit 0fbcd59

Browse files
fix: Fixed bug in TabularDataset.column_names (#590)
Fixes #589 The `end` parameter of the `blob.download_as_bytes` function is inclusive, not exclusive. > There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors. Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
1 parent 2f138d1 commit 0fbcd59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google/cloud/aiplatform/datasets/tabular_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def _retrieve_gcs_source_columns(
150150

151151
while first_new_line_index == -1:
152152
line += blob.download_as_bytes(
153-
start=start_index, end=start_index + increment
153+
start=start_index, end=start_index + increment - 1
154154
).decode("utf-8")
155155

156156
first_new_line_index = line.find("\n")

0 commit comments

Comments
 (0)