Ktrain

Latest version: v0.41.4

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

Scan your dependencies

Page 14 of 29

0.21.0

New:
- Added `translate_sentences` method to `Translator` class that translates list of sentences, where list is fed to model as single batch

Changed
- Removed TensorFlow dependency from `setup.py` to allow users to use *ktrain* with any version of TensorFlow 2 they choose.
- Added `truncation=True` to tokenization in `summarization` module
- Require `transformers>=3.1.0` due to breaking changes
- `SUPPRESS_TF_WARNINGS` environment variable changed to `SUPPRESS_KTRAIN_WARNINGS`

Fixed:
- Use `prepare_seq2seq_batch` insteadd of `prepare_translation_batch` in `translation` module due to breaking change in `transformers==3.1.0`

0.20.2

New:
- N/A

Changed
- N/A

Fixed:
- Always use `*Auto*` classes to load `transformers` models to prevent loading errors

0.20.1

New:
- N/A

Changed
- N/A

Fixed:
- Added missing `torch.no_grad()` scope in `text.translation` and `text.summarization` modules

0.20.0

New:
- added `nli_template` parameter to `ZeroShotClassifier.predict` to allow versatility in the kinds of labels that
can be predicted
- efficiency improvements to `ZeroShotClassifier.predict` that allow faster predictions on large sequences
of documents and a large numer of labels to predict
- added 'multilabel` parameter to `ZeroShotClassifier.predict`
- added `labels` parameter to `ZeroShotClassifer.predict`, an alias to `topic_strings` parameter

Changed
- N/A

Fixed:
- Allow variations on `accuracy` metric such as `binary_accuracy` when inpecting model in `is_classifier`

0.19.9

New:
- N/A

Changed
- N/A

Fixed:
- In `texts_from_array`, check `class_names` only after preprocessing before printing classification vs. regression status.

0.19.8

New:
- N/A

Changed
- N/A

Fixed:
- In `TextPreprocessor` instances, correctly reset `class_names` when targets are in string format.

Page 14 of 29

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.