Skip to content

Commit

Permalink
Merge pull request #11 from Kaleidophon/hotfixes
Browse files Browse the repository at this point in the history
🐛 Fix import errors from Github issues #8 and #9
  • Loading branch information
Kaleidophon authored Feb 24, 2023
2 parents 0e82584 + b4c3b0f commit 6e2f277
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nlp_uncertainty_zoo/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
PreTrainedTokenizerBase,
DataCollatorForLanguageModeling,
)
from transformers.data.data_collator import BatchEncoding, _collate_batch
from transformers.data.data_collator import _torch_collate_batch
from transformers.tokenization_utils_base import BatchEncoding

# TYPES
# Either one set of keyword arguments per split or dictionary mapping split to split-specific keyword args
Expand Down Expand Up @@ -48,7 +49,7 @@ def __call__(
)
else:
batch = {
"input_ids": _collate_batch(
"input_ids": _torch_collate_batch(
examples, self.tokenizer, pad_to_multiple_of=self.pad_to_multiple_of
)
}
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ scipy>=1.5.4
dill>=0.3.3
joblib>=1.0.1
alpaca-ml>=0.8.2
protobuf==3.20.0

0 comments on commit 6e2f277

Please sign in to comment.