# Unexpected keyword argument 'sampling\_strategy' with TrainingArguments

**URL:** <https://discuss.huggingface.co/t/unexpected-keyword-argument-sampling-strategy-with-trainingarguments/74358>\
**Category:** 🤗Transformers\
**Created:** [February 22, 2024, 1:52pm UTC](https://discuss.huggingface.co/t/unexpected-keyword-argument-sampling-strategy-with-trainingarguments/74358 "2024-02-22T13:52:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![holbur](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@holbur](https://discuss.huggingface.co/u/holbur)\
**Post date:** [February 22, 2024, 1:52pm UTC](https://discuss.huggingface.co/t/unexpected-keyword-argument-sampling-strategy-with-trainingarguments/74358/1 "2024-02-22T13:52:28Z")

</div>

I am using TrainingArguments successfully so far. However by adding the argument sampling\_strategy, as per the documentation ([https://huggingface.co/docs/setfit/en/reference/trainer#setfit.TrainingArguments.sampling\_strategy](https://huggingface.co/docs/setfit/en/reference/trainer#setfit.TrainingArguments.sampling_strategy)) I get the following error:  
training\_args = TrainingArguments(output\_dir=“models/vit/new\_vit”, per\_device\_train\_batch\_size=16, evaluation\_strategy=“steps”,  
TypeError: **init** () got an unexpected keyword argument ‘sampling\_strategy’

I am using PyCharm through anaconda navigator. I have updated transformers package to 4.39.0.dev0 through source and still facing the issue.
