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

Batch size deprecation warning issued even when it is not used #35518

Open
2 of 4 tasks
quintenroets opened this issue Jan 6, 2025 · 0 comments · May be fixed by #35519
Open
2 of 4 tasks

Batch size deprecation warning issued even when it is not used #35518

quintenroets opened this issue Jan 6, 2025 · 0 comments · May be fixed by #35519
Labels

Comments

@quintenroets
Copy link

System Info

  • transformers version: 4.48.0.dev0
  • Platform: Linux-6.11.0-13-generic-x86_64-with-glibc2.40
  • Python version: 3.12.7
  • Huggingface_hub version: 0.27.0
  • Safetensors version: 0.5.0
  • Accelerate version: 1.2.1
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.4.0+cu121 (True)
  • Tensorflow version (GPU?): not installed (NA)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed

Who can help?

@ArthurZucker @zucchini-nlp

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

from transformers import AutoModel
from transformers.cache_utils import StaticCache

model_id = "deepset/roberta-base-squad2"
model = AutoModel.from_pretrained(model_id)
cache = StaticCache(max_batch_size=10, config=model.config)

Output
The 'batch_size' attribute of StaticCache is deprecated and will be removed in v4.49. Use the more precisely named 'self.max_batch_size' attribute instead.

Expected behavior

No warning message

@quintenroets quintenroets linked a pull request Jan 6, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant