huggingface / setfit

Efficient few-shot learning with Sentence Transformers
https://hf.co/docs/setfit
Apache License 2.0
2.24k stars 222 forks source link

Create custom NotebookCallback subclass for embedding_loss, etc. #557

Closed tomaarsen closed 2 months ago

tomaarsen commented 2 months ago

Resolves #548

Hello!

Pull Request overview

Details

As seen in #548, training and validation losses aren't properly logged in Notebooks. This is because the NotebookCallback expects "loss" and "eval_loss", whereas SetFit uses different keys instead (e.g. "embedding_loss").

This PR adds a modification of the NotebookCallback that is aware of the different (common) options in SetFit.

HuggingFaceDocBuilderDev commented 2 months ago

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.