# Get "using the \`\_\_call\_\_\` method is faster" warning with DataCollatorWithPadding

**URL:** <https://discuss.huggingface.co/t/get-using-the-call-method-is-faster-warning-with-datacollatorwithpadding/23924>\
**Category:** 🤗Tokenizers\
**Created:** [October 3, 2022, 8:43am UTC](https://discuss.huggingface.co/t/get-using-the-call-method-is-faster-warning-with-datacollatorwithpadding/23924 "2022-10-03T08:43:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mnaylor](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mnaylor](https://discuss.huggingface.co/u/mnaylor)\
**Post date:** [October 5, 2022, 6:38pm UTC](https://discuss.huggingface.co/t/get-using-the-call-method-is-faster-warning-with-datacollatorwithpadding/23924/2 "2022-10-05T18:38:03Z")

</div>

I’m getting the same thing using a `BertTokenizerFast` with `DataCollatorWithPadding` - the error appears once for each worker every time I loop over a DataLoader. I would prefer not to silence warnings in my training code, but here’s how I’m getting around it (based on [this line](https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L2886) in the `PretrainedTokenizerBase` class, referencing [this section in the custom logger](https://github.com/huggingface/transformers/blob/d9101b71bcd2e2a1f26cf07057ffd15572997105/src/transformers/utils/logging.py#L273-L281)):

```python
import os
os.environ['TRANSFORMERS_NO_ADVISORY_WARNINGS'] = 'true'

```

---

_[View the full topic](https://discuss.huggingface.co/t/get-using-the-call-method-is-faster-warning-with-datacollatorwithpadding/23924)._
