Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiya committed Jun 23, 2021
2 parents c3b56ae + b5697e6 commit ee9e601
Show file tree
Hide file tree
Showing 116 changed files with 66,497 additions and 290 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ Most recent releases are shown at the top. Each release shows:
- **Changed**: Additional parameters, changes to inputs or outputs, etc
- **Fixed**: Bug fixes that don't change documented behaviour

## 0.26.4 (2021-06-23)

### New:
- API documenation index

### Changed
- Added warning when a TensorFlow version of selected `transformers` model is not available and the PyTorch version is being downloaded and converted instead using `from_pt=True`.

### Fixed:
- Fixed `utils.metrics_from_model` to support alternative metrics
- Check for AUC `ktrain.utils` "inspect" function


## 0.26.3 (2021-05-19)

### New:
Expand Down
26 changes: 3 additions & 23 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

- [How do I deploy a model using Flask?](#how-do-i-deploy-a-model-using-flask)

- [Why am I getting a *"model must be of instance Model"* error with `load_predictor`?](#why-am-i-getting-a-model-must-be-of-instance-model-error-with-load_predictor)
- [Why am I getting a 404 client error?](#why-am-i-getting-a-404-client-error)

- [How do I convert a model to ONNX for deployment?](#how-do-i-make-quantized-predictions-with-transformers-models)

Expand Down Expand Up @@ -793,29 +793,9 @@ Then, using *ktrain*, you can use `ktrain.text.texts_from_df` (or `ktrain.text.t

[[Back to Top](#frequently-asked-questions-about-ktrain)]

### Why am I getting a *"model must be of instance Model"* error with `load_predictor`?

This may be an issue with the TensorFlow installation or dependencies. Users have reported that uninstalling and reinstalling **ktrain**, TensorFlow, and its dependencies from scratch can
resolve the issue. Or, you can just create a new virtual environement for **ktrain**:

```
python3 -m venv new_ktrain_venv
cd new_ktrain_venv
source bin/activate
pip install -U pip
pip install tensorflow
pip install ktrain
pip install git+https://github.com/amaiya/eli5@tfkeras_0_10_1
pip install git+https://github.com/amaiya/stellargraph@no_tf_dep_082
```

After re-installing everything, try loading the predictor again:

```python
import ktrain
predictor = ktrain.load_predictor('/path/to/folder')
```
### Why am I getting a 404 client error?

You can safely ignore the error, if it arises from downloading Hugging Face **transformers** models. The 404 error simply means that **ktrain** was not able to find a Tensorflow version of this particular model. In this case, the PyTorch version of the model checkpoint will be downloaded and then be loaded by **ktrain** as a Tensorflow model for training/fine-tuning. If you type `model.summary()`, it should show that the model was loaded successfully.

[[Back to Top](#frequently-asked-questions-about-ktrain)]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### [Overview](#overview) | [Tutorials](#tutorials) | [Examples](#examples) | [Installation](#installation) | [FAQ](https://github.com/amaiya/ktrain/blob/master/FAQ.md) | [How to Cite](#how-to-cite)
### [Overview](#overview) | [Tutorials](#tutorials) | [Examples](#examples) | [Installation](#installation) | [FAQ](https://github.com/amaiya/ktrain/blob/master/FAQ.md) | [API Docs](https://amaiya.github.io/ktrain/index.html) | [How to Cite](#how-to-cite)
[![PyPI Status](https://badge.fury.io/py/ktrain.svg)](https://badge.fury.io/py/ktrain) [![ktrain python compatibility](https://img.shields.io/pypi/pyversions/ktrain.svg)](https://pypi.python.org/pypi/ktrain) [![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/amaiya/ktrain/blob/master/LICENSE) [![Downloads](https://pepy.tech/badge/ktrain)](https://pepy.tech/project/ktrain)

<p align="center">
Expand Down
5,323 changes: 5,323 additions & 0 deletions docs/core.html

Large diffs are not rendered by default.

0 comments on commit ee9e601

Please sign in to comment.