Skip to content

Commit

Permalink
adding some debugging logs
Browse files Browse the repository at this point in the history
  • Loading branch information
liPatrick committed Sep 13, 2024
1 parent 5cfb67f commit 633b3ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ultravox/tools/ds_tool/ds_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,11 @@ def _upload(self, ds_chunk_processed: datasets.Dataset, data_dir: str, split_nam
"split": split_name,
}
assert isinstance(self.args.upload_name, str)
ds_split_chunked.push_to_hub(self.args.upload_name, **hub_args)
try:
ds_split_chunked.push_to_hub(self.args.upload_name, **hub_args)
except Exception as e:
print(f"Failed to upload chunk to hub: {e}")
raise e


def main(args: DatasetToolArgs):
Expand Down Expand Up @@ -478,8 +482,6 @@ def main(args: DatasetToolArgs):
if args.num_samples:
ds_split = ds_split.select(range(args.num_samples))

if args.upload_split:
split_name = args.upload_split
ds_chunk_proc.process_and_upload_split_rescursive(
split_name, ds_split, 0, len(ds_split)
)
Expand Down

0 comments on commit 633b3ca

Please sign in to comment.