Open claracaste opened 1 month ago
Hello!
I would recommend converting the Pandas DataFrame into a datasets.Dataset
(some docs). You can do this with Dataset.from_pandas
:
from datasets import Dataset
ds_train = Dataset.from_pandas(df_train)
ds_train = ds_train.rename_columns({"true_label": "score"})
trainer = SentenceTransformerTrainer(
model=model,
args=args,
train_dataset=ds_train,
eval_dataset=ds_val,
loss=train_loss,
evaluator=dev_evaluator,
)
Hope this helps!
Thanks @tomaarsen
Hi, I am using sentence_transformers version 3.0.0 I created a dataset from a pandas dataframe
When I run
trainer.train()
I get the errorAttributeError: 'PairsDataset' object has no attribute 'cache_files'
I see in the source code that it is trying to read some metadata from my dataset which it doesn't find. How can I overcome this problem?