Setfit

Latest version: v1.0.3

Safety actively analyzes 622229 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.0.3

This is a patch release with two notable fixes and a feature:
* Training logs now correctly list the number of training examples (now called "unique pairs")
* The warmup steps is now based on the number of steps rather than `args.max_steps` if `args.max_steps` > the number of steps. This prevents accidentally being in warm-up for longer than the desired warmup proportion.
* When training with string labels, the model now tries to automatically set the string labels to `SetFitModel.labels` if this variable hasn't been defined yet.

The PRs:
* Set labels based on head classes, if possible by tomaarsen in https://github.com/huggingface/setfit/pull/476
* Refactor training logs & fix warmup_proportion by tomaarsen in https://github.com/huggingface/setfit/pull/475

**Full Changelog**: https://github.com/huggingface/setfit/compare/v1.0.2...v1.0.3

1.0.2

What's Changed
* Fix: Python-ify evaluation results before writing model card by tomaarsen in https://github.com/huggingface/setfit/pull/460
* Resolve crash with predict_proba & multi-output by tomaarsen in https://github.com/huggingface/setfit/pull/466
* Remove breaking shuffle DataLoader option by tomaarsen in https://github.com/huggingface/setfit/pull/470
* Predict for ABSA models with a gold aspect dataset by tomaarsen in https://github.com/huggingface/setfit/pull/469
* Prepare SetFit for upcoming 2.3.0 release of SentenceTransformers by tomaarsen in https://github.com/huggingface/setfit/pull/463


**Full Changelog**: https://github.com/huggingface/setfit/compare/v1.0.1...v1.0.2

1.0.1

* Fixes `ConstructorError` when saving a `SetFitModel` that was trained with a custom evaluation metrics ([460](https://github.com/huggingface/setfit/pull/460))

1.0.0

Read the more detailed release notes in the documentation: https://huggingface.co/docs/setfit/how_to/v1.0.0_migration_guide#v100-changelog

What's Changed
* Preserve dataset features in `sample_dataset` by grofte in https://github.com/huggingface/setfit/pull/396
* Allow other datasets in `trainer.evaluate()` by grofte in https://github.com/huggingface/setfit/pull/402
* Normalize device to CPU when evaluating by tomaarsen in https://github.com/huggingface/setfit/pull/363
* show_progress_bar as parameter on predict and predict_prob by davidsbatista in https://github.com/huggingface/setfit/pull/429
* Refactor to introduce `Trainer` & `TrainingArguments`, add SetFit ABSA by tomaarsen in https://github.com/huggingface/setfit/pull/265
* fix: make sampling more reproducible by yahiaelgamal in https://github.com/huggingface/setfit/pull/441
* Allow setting batch size in SetFitModel.predict by tomaarsen in https://github.com/huggingface/setfit/pull/443
* Save differentiable model head on CPU by tomaarsen in https://github.com/huggingface/setfit/pull/444
* Allow 'device' on SetFitModel.from_pretrained() by tomaarsen in https://github.com/huggingface/setfit/pull/445
* Add notebook to demonstrate how efficiently running SetFit with ONNX by MosheWasserb in https://github.com/huggingface/setfit/pull/435
* Add "labels" to SetFitModel, store/load from configuration file by tomaarsen in https://github.com/huggingface/setfit/pull/447
* Allow passing strings to model.predict by tomaarsen in https://github.com/huggingface/setfit/pull/448
* Allow partial column mappings by tomaarsen in https://github.com/huggingface/setfit/pull/449
* Allow normalize_embeddings with a differentiable head by tomaarsen in https://github.com/huggingface/setfit/pull/450
* Heavily improve automatic model card generation by tomaarsen in https://github.com/huggingface/setfit/pull/452
* Also pass `metric_kwargs` to custom metric callable by tomaarsen in https://github.com/huggingface/setfit/pull/456
* Prepare v1.0.0 release - `Trainer`, `TrainingArguments`, SetFitABSA, logging, evaluation during training, callbacks, docs by tomaarsen in https://github.com/huggingface/setfit/pull/439

New Contributors
* rhelmeczi made their first contribution in https://github.com/huggingface/setfit/pull/362
* bofenghuang made their first contribution in https://github.com/huggingface/setfit/pull/366
* davidberenstein1957 made their first contribution in https://github.com/huggingface/setfit/pull/384
* alvarobartt made their first contribution in https://github.com/huggingface/setfit/pull/397
* bogedy made their first contribution in https://github.com/huggingface/setfit/pull/361
* grofte made their first contribution in https://github.com/huggingface/setfit/pull/396
* davidsbatista made their first contribution in https://github.com/huggingface/setfit/pull/429
* rtrompier made their first contribution in https://github.com/huggingface/setfit/pull/433
* yahiaelgamal made their first contribution in https://github.com/huggingface/setfit/pull/441

**Full Changelog**: https://github.com/huggingface/setfit/compare/v0.7.0...v1.0.0

0.7.0

This release introduces numerous bug fixes, including critical ones for `push_to_hub`, `save_pretrained` and distillation training.

<!--
TODO:
* Merge https://github.com/huggingface/setfit/pull/351 and add it to this list
-->

Bug fixes and improvements

* Add a warning if an unsplit dataset is passed to SetFitTrainer by jaalu in 299
* Improve dataset pre-processing speeds for large datasets by logan-markewich in 309
* Add Path support to `_save_pretrained`, resolve `TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'` by tomaarsen in 332
* Add Hallmarks of Cancer notebook by MosheWasserb in 333
* Initialize SetFitModel with `cls` instead by kobiche in 341
* Allow distillation training with models using differentiable heads by tomaarsen in 343
* Prevent TypeError on `model.predict` when using string labels by tomaarsen in 331
* Restrict `pandas` to <2 for compatibility tests by tomaarsen in 350
* Update `Trainer.push_to_hub` to use `**kwargs` by tomaarsen in 351
* Add metric keyword arguments, e.g. add "average" strategy to f1 by tomaarsen in 353

Significant community contributions

The following contributors have made significant changes to the library over the last release:

* jaalu
* Add a warning if an unsplit dataset is passed to SetFitTrainer (299)
* tomaarsen
* Add comparison plotting script (319)
* Resolve IndexError if there is just one K-shot scenario
* Reintroduce Usage in README until docs are ready
* Add Path support to _save_pretrained (332)
* Allow distillation training with models using differentiable heads (343)
* Prevent TypeError on `model.predict` when using string labels (331)
* Restrict `pandas` to <2 for compatibility tests (350)
* Update `Trainer.push_to_hub` to use `**kwargs` (351)
* Add metric keyword arguments, e.g. add "average" strategy to f1 (353)
* EdAbati
* Add cache for 🤗 Hub models in the CI (312)
* Rerun hyperparameter search notebook (321)
* MosheWasserb
* Add Hallmarks of Cancer notebook (333)

0.6.0

To bring in the new year, this release comes with many bug fixes and quality of life improvements around using SetFit models. It also provides:

* an OpenVINO exporter that you can optimise your models for inference with. Check out the `notebooks` for an example.
* a dedicated model card with metadata and usage instructions. See here for an example output from `push_to_hub()`: https://huggingface.co/lewtun/setfit-new-model-card

Bug fixes and improvements

* Always install the checked-out setfit by tomaarsen in 235
* Add SetFitModel.to by tomaarsen in 229)
* Add distillation trainer example by lewtun in 202
* Prevent overriding the sample size in `sample_dataset` by tomaarsen in 231
* add related work in readme by Yongtae723 in 239
* Fix seed in `trainer.py` by danielkorat in 243
* Always display test coverage; add tests by tomaarsen in 240
* Add Tom to list of maintainers by lewtun in 253
* Add proper model card by lewtun in 252
* Added support of OpenVINO export by AlexKoff88 in 214
* Add has_differentiable_head property to SetFitModel by zachschillaci27 in 257
* Resolve numpy.ndarray type error with predict_proba by jegork in 207
* Refactor model_head initialization in SetFitModel by zachschillaci27 in 263
* Feature/deprecate binary cross entropy loss by blakechi in 203
* Fix type hints by Yongtae723 in 266
* pass auth token to sentence transformer by ken-myers in 277
* Add multi-target support to SetFitHead by Yongtae723 and OskarLiew in 272
* Automatically create summary table after `scripts/setfit/run_fewshot.py` by tomaarsen in 262
* Fix squared optimization steps bug by twerkmeister in 280
* Fix squared optimization steps bug in distillation trainer by tomaarsen in 284
* Dynamic features in datasets based on model input names by AleksanderObuchowski in 288
* Resolve `SentenceTransformer` resetting devices after moving a `SetFitModel` by tomaarsen in 283
* add `run_zeroshot.py`; add functionality to `data.get_templated_dataset()` (formerly `add_templated_examples()`) by danielkorat in 292
* Exclude compatibility versions from dev setup by tomaarsen in 286

Significant community contributions

The following contributors have made significant changes to the library over the last release:

* tomaarsen
* Always install the checked-out setfit (235)
* Add SetFitModel.to (229) (236)
* Prevent overriding the sample size in `sample_dataset` (231)
* Always display test coverage; add tests (240)
* Automatically create summary table after `scripts/setfit/run_fewshot.py` (262)
* Fix squared optimization steps bug in distillation trainer (284)
* Resolve `SentenceTransformer` resetting devices after moving a `SetFitModel` (283)
* Reformat according to the newest black version
* Remove doubled space in warning message
* Exclude compatibility versions from dev setup (286)
* Yongtae723
* add related work in readme (239)
* Fix type hints (266)
* Add multi-target support to SetFitHead (272)
* danielkorat
* Fix seed in `trainer.py` (243)
* add `run_zeroshot.py`; add functionality to `data.get_templated_dataset()` (formerly `add_templated_examples()`) (292)
* AlexKoff88
* Added support of OpenVINO export (214)

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.