# Trainer API (wandb) error

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-api-wandb-error%2F127342%3E%5C
**Category:** Beginners\
**Created:** [November 24, 2024, 1:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-api-wandb-error%2F127342 "2024-11-24T13:17:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![khizarAI](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@khizarAI](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FkhizarAI)%5C
**Post date:** [November 24, 2024, 1:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-api-wandb-error%2F127342%2F1 "2024-11-24T13:17:20Z")

</div>

from transformers import TrainingArguments

batch\_size = 8  
gradient\_accumulation\_steps = 1  
num\_train\_epochs = 10

training\_args = TrainingArguments(  
output\_dir=“DistilHuBert-finetuned-gtzan”,  
eval\_strategy=“epoch”,  
save\_strategy=“epoch”,  
learning\_rate=5e-5,  
per\_device\_train\_batch\_size=batch\_size,  
gradient\_accumulation\_steps=gradient\_accumulation\_steps,  
per\_device\_eval\_batch\_size=batch\_size,  
num\_train\_epochs=num\_train\_epochs,  
warmup\_ratio=0.1,  
logging\_steps=5,  
load\_best\_model\_at\_end=True,  
metric\_for\_best\_model=“accuracy”,  
fp16=True,  
push\_to\_hub=False,  
)

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/f/0/f007bce772133e8f22fa1d5b099ee0128baa665b.png)
