huggingface / huggingface/setfit
Unable to run Text-Classification task because of error related to 'experiment_name'
- Dominant language
- Jupyter Notebook
- Stars
- 2.8k
- Forks
- 267
- Avg merge
- 36m
- Merged PRs (30d)
- 5
Description
I am loading this pre-trained model,
model = SetFitModel.from_pretrained("all-MiniLM-L6-v2")
and tuning with new data
train_ds = my_dataset_dict["train"]
val_ds = my_dataset_dict["val"]
eval_ds= my_dataset_dict["eval"]
args = TrainingArguments(
batch_size=64,
num_epochs=2, # The number of epochs to use for constrastive learning
num_iterations=70, # The number of text pairs to generate for contrastive learning
loss=CosineSimilarityLoss,
evaluation_strategy="epoch",
save_strategy="epoch",
load_best_model_at_end=True,
#exp_name = 'exp_1'
)
trainer = Trainer(
model=model,
args=args,
train_dataset=train_ds,
eval_dataset=val_ds,
metric="accuracy",
column_mapping={"text": "text", "label": "label"} # Map dataset columns to text/label expected by trainer
)
when I run trainer.train() i am getting error "TypeError: __init__() missing 1 required positional argument: 'experiment_name'"
I am not sure where i need to define this, i tried setting this param in trainer class and TrainerArguments class, but seems like they do not take a param like this. Can you please help?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.