Skip to content

Commit 2b867e9

Browse files
authored
no need to keep the trace of the first exception (#3049)
1 parent e637982 commit 2b867e9

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

services/worker/src/worker/job_runners/config/split_names.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,12 @@ def compute(self) -> CompleteJobResult:
152152
f"Cannot compute 'config-split-names' from config-info for {self.dataset=} {self.config=}. "
153153
f"Trying to compute it using streaming."
154154
)
155-
return CompleteJobResult(
156-
compute_split_names_from_streaming_response(
157-
dataset=self.dataset,
158-
config=self.config,
159-
max_number=self.app_config.split_names.max_number,
160-
hf_token=self.app_config.common.hf_token,
161-
)
155+
pass
156+
return CompleteJobResult(
157+
compute_split_names_from_streaming_response(
158+
dataset=self.dataset,
159+
config=self.config,
160+
max_number=self.app_config.split_names.max_number,
161+
hf_token=self.app_config.common.hf_token,
162162
)
163+
)

services/worker/src/worker/job_runners/split/first_rows.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -333,18 +333,19 @@ def compute(self) -> CompleteJobResult:
333333
f"Cannot compute 'split-first-rows' from parquet for {self.dataset=} {self.config=}. "
334334
f"Trying to compute it using streaming."
335335
)
336-
return CompleteJobResult(
337-
compute_first_rows_from_streaming_response(
338-
dataset=self.dataset,
339-
revision=self.dataset_git_revision,
340-
config=self.config,
341-
split=self.split,
342-
storage_client=self.storage_client,
343-
hf_token=self.app_config.common.hf_token,
344-
min_cell_bytes=self.first_rows_config.min_cell_bytes,
345-
rows_max_bytes=self.first_rows_config.max_bytes,
346-
rows_min_number=self.first_rows_config.min_number,
347-
rows_max_number=MAX_NUM_ROWS_PER_PAGE,
348-
columns_max_number=self.first_rows_config.columns_max_number,
349-
)
336+
pass
337+
return CompleteJobResult(
338+
compute_first_rows_from_streaming_response(
339+
dataset=self.dataset,
340+
revision=self.dataset_git_revision,
341+
config=self.config,
342+
split=self.split,
343+
storage_client=self.storage_client,
344+
hf_token=self.app_config.common.hf_token,
345+
min_cell_bytes=self.first_rows_config.min_cell_bytes,
346+
rows_max_bytes=self.first_rows_config.max_bytes,
347+
rows_min_number=self.first_rows_config.min_number,
348+
rows_max_number=MAX_NUM_ROWS_PER_PAGE,
349+
columns_max_number=self.first_rows_config.columns_max_number,
350350
)
351+
)

0 commit comments

Comments
 (0)