Skip to content

Commit 1c7c26f

Browse files
Release 1.0.0: Changed to local model storage (#208)
* Refactoring/#146 use new model save functionality (#186) * switched use to huggingface transfer save pretrained version * changed to load local model * removed download sample model fixture because of duplication * #147: Removed huggingface token from model loading (#203) * removed token_conn everywhere except model download and tests * removed token_conn from relevant tests * Documentation improvements (#199) * Prepared release 1.0.0 (#206) Co-authored-by: Torsten Kilias <torsten.kilias@exasol.com>
1 parent 883e2c9 commit 1c7c26f

199 files changed

Lines changed: 1234 additions & 1639 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
An Exasol extension to use state-of-the-art pretrained machine learning models
44
via the [transformers api](https://github.com/huggingface/transformers).
55

6+
This Extension is build and tested for Linux OS, and does not have Windows or MacOS support.
7+
It might work regardless but proceed at your own risk.
8+
69

710
## Table of Contents
811

buildspec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ phases:
2222
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USER" --password-stdin
2323
build:
2424
commands:
25-
- poetry run nox -s unit_tests
2625
- poetry run nox -s start_database
2726
- poetry run nox -s integration_tests

doc/changes/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changelog
22

3+
* [1.0.0](changes_1.0.0.md)
34
* [0.10.0](changes_0.10.0.md)
45
* [0.9.2](changes_0.9.2.md)
56
* [0.9.1](changes_0.9.1.md)

doc/changes/changes_0.10.0.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ Deploying SLC under Windows, releasing to PyPi.
2020

2121
### Security
2222

23-

doc/changes/changes_0.10.1.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

doc/changes/changes_1.0.0.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Transformers Extension 1.0.0, 2024-04-12
2+
3+
Code name: Local model loading
4+
5+
6+
## Summary
7+
8+
In this release, we integrated a new model loading functionality which means downloaded models will now be saved
9+
in the BucketFS. This means, the Prediction UDFs do not connect to the internet to look for model updates.
10+
There are also documentation updates, and we updated cryptography to >= 42.0.4.
11+
12+
### Breaking API changes
13+
14+
The change in the model loading functionality means the API for the Prediction UDFs has changed.
15+
The 'token_conn' parameter was removed from the UDF calls. You can now call the UDFs
16+
as follows (Example case for the filling mask udf):
17+
18+
```sql
19+
SELECT TE_FILLING_MASK_UDF(
20+
device_id,
21+
bucketfs_conn,
22+
sub_dir,
23+
model_name,
24+
text_data,
25+
top_k
26+
)
27+
```
28+
29+
30+
### Features
31+
32+
- #205: Added vagrant setup
33+
- #146: Integrated new download and load functions using save_pretrained
34+
35+
### Documentation
36+
37+
- #133: Improved user and developer documentation with additional information
38+
39+
### Refactorings
40+
41+
- #147: Removed token_con from Prediction UDFs
42+
43+
### Security
44+
45+
- Updated cryptography to >= 42.0.4
46+

doc/developer_guide/developer_guide.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ and install it as follows:
2727
pip install <path/wheel-filename.whl> --extra-index-url https://download.pytorch.org/whl/cpu
2828
```
2929

30+
### Check wheel installation
31+
32+
The wheel should be installed in `transformers-extension/dist`. After updating and building a new release
33+
there may be multiple wheels installed here. This leads to problems, so check and delete the old wheels if necessary.
34+
You may also need to check
35+
`transformers-extension/language_container/exasol_transformers_extension_container/flavor_base/release/dist` for the same reason.
3036

3137
### Run Tests
3238
All unit and integration tests can be run within the Poetry environment created
@@ -42,6 +48,8 @@ Start a test database and run integration tests:
4248
poetry run nox -s integration_tests
4349
```
4450

51+
You can find more information regarding the tests in the [Tests](#tests) section below
52+
4553
## Add Transformer Tasks
4654
In the transformers-extension library, the 8 most popular NLP tasks provided by
4755
[Transformers API](https://huggingface.co/docs/transformers/index) have already
@@ -126,3 +134,21 @@ Currently, the CodeBuild project is managed manually and is triggered with a web
126134
For this our aws-ci user is added to this Repository. The webhook can be configured in the AWS CodeBuild
127135
project directly.
128136
The CodeBuild project also uses our DockerHub user for the build. For this it has access to the AWS SecretsManager.
137+
138+
139+
#### 3. Release download test
140+
141+
After you do a Release on the project, you may want to trigger the [SLC Download Test](https://github.com/exasol/transformers-extension/blob/8f57d1f0ca3f95a2d3edc9b84e8dd779aa6093d8/tests/integration_tests/with_db/deployment/test_language_container_deployer_cli.py#L117)
142+
to make sure the new SLC is uploaded and correctly named.
143+
**This is especially important if the naming convention of the SLC was changed!**
144+
* testfile: [tests/integration_tests/with_db/deployment/test_language_container_deployer_cli.py](../../tests/integration_tests/with_db/deployment/test_language_container_deployer_cli.py)
145+
* test_name: test test_language_container_deployer_cli_by_downloading_container
146+
147+
Also, during a release, the version object should be updated from time to time,
148+
so we actually use the correct SLC for the test. Do this
149+
[here](https://github.com/exasol/transformers-extension/blob/8f57d1f0ca3f95a2d3edc9b84e8dd779aa6093d8/tests/integration_tests/with_db/deployment/test_language_container_deployer_cli.py#L128)
150+
151+
## Good to know
152+
153+
* Hugging Face models consist of 2 parts, the model and the Tokenizer.
154+
Most of our functions deal with both parts

0 commit comments

Comments
 (0)