Skip to content
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

[BUGFIX] Fix windows dtype to int64 #1588

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions examples/text_summarization/bart/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ def generate(args):
ignore_pad_token_for_loss=args.ignore_pad_token_for_loss,
is_train=False)
batchify_fn = lambda samples, fn=Tuple(
Stack(), # input_ids
Stack(), # attention mask
Stack(dtype="int64"), # input_ids
Stack(dtype="int64"), # attention mask
Stack(dtype="int32"), # mem_seq_lens
Stack(), # decoder_input_ids
Stack(), # labels
Stack(dtype="int64"), # decoder_input_ids
Stack(dtype="int64"), # labels
): fn(samples)

dataset = dataset.map(trans_func, lazy=True)
Expand Down
8 changes: 4 additions & 4 deletions examples/text_summarization/bart/run_summarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ def do_train(args):
train_batch_sampler = DistributedBatchSampler(
train_set, batch_size=args.train_batch_size, shuffle=True)
batchify_fn = lambda samples, fn=Tuple(
Stack(), # input_ids
Stack(), # attention mask
Stack(), # decoder_input_ids
Stack(), # labels
Stack(dtype="int64"), # input_ids
Stack(dtype="int64"), # attention mask
Stack(dtype="int64"), # decoder_input_ids
Stack(dtype="int64"), # labels
): fn(samples)
train_data_loader = DataLoader(
dataset=train_set,
Expand Down