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 26, 2020
2 parents cbd42f9 + acb81e6 commit 9ef596b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ Most recent releases are shown at the top. Each release shows:
- **Fixed**: Bug fixes that don't change documented behaviour


## 0.17.3 (2020-06-26)

### New:
- N/A

### Changed
- N/A

### Fixed:
- Changed `setup.py` to open README file using `encoding="utf-8"` to prevent installation problems on Windows machines with `cp1252` encoding


## 0.17.2 (2020-06-25)

### New:
Expand Down
12 changes: 9 additions & 3 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,16 @@ by default. Other data like pretrained word vectors are downloaded to the `<hom

In some settings, it is necessary to either train models or make predictions in environments with no internet
access (e.g., behind a firewall, air-gapped networks). Typically, it is sufficient to copy the above folders
to the machine without internet access.
to the machine without internet access. For instance, if loading and using a `Predictor` instance as shown below,
then all that is typically needed is a vocabulary file that is typically retrieved from the cache:
```python
p = ktrain.load_predictor('/tmp/mypred')
p.predict(data)
```

However, due to a current bug in the `transformers` library, files from `<home_directory>/.cache/torch/transformers` are
not loaded when there is no internet access. To get around this, you can download the model files from [here]( https://huggingface.co/models) and point
In some cases (e.g., when training a model on a system with no internet access or using pretrained model for question-answering),
due to a current bug in the `transformers` library, files from `<home_directory>/.cache/torch/transformers` may
not load when there is no internet access even when present. To get around this, you can download the model files from [here]( https://huggingface.co/models) and point
*ktrain* to the folder. There are typically three files you need, and it is important that the downloaded files are rennamed
to `tf_model.h5`, `config.json`, and `vocab.txt`.

Expand Down
4 changes: 2 additions & 2 deletions examples/text/language_translation_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Some comments about traslations:\n",
"Notice in the example above that we supplied a document of **two** sentences as input. The `translate` method can accept single sentences, paragraphs, or entire documents. However, if the document is large (e.g., a book), we recommend that you break it up into smaller chunks (e.g., pages or paragraphs). This is because *ktrain* tokenizes your document into individual sentences, which re joined together and fed to model as single batch when making a prediction. If the batch is too large for memory, the prediction will fail.\n",
"#### Some comments about translations:\n",
"Notice in the example above that we supplied a document of **two** sentences as input. The `translate` method can accept single sentences, paragraphs, or entire documents. However, if the document is large (e.g., a book), we recommend that you break it up into smaller chunks (e.g., pages or paragraphs). This is because *ktrain* tokenizes your document into individual sentences, which are joined together and fed to model as single batch when generating the translation. If the batch is too large for memory, errors will occur.\n",
"\n",
"When instantiating the `EnglishTranslator`, pretrained models are automatically loaded, which may take a few seconds. Once instantiated, the `translate` method can be repeatedly invoked on different documents or sentences. Next, let us reinstantiate an `EnglishTranslator` object to translate Arabic.\n"
]
Expand Down
2 changes: 1 addition & 1 deletion ktrain/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__all__ = ['__version__']
__version__ = '0.17.2'
__version__ = '0.17.3'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from distutils.core import setup
import setuptools

with open('README.md') as readme_file:
with open('README.md', encoding='utf-8') as readme_file:
readme_file.readline()
readme = readme_file.read()
exec(open('ktrain/version.py').read())
Expand Down

0 comments on commit 9ef596b

Please sign in to comment.