Skip to content

Commit 2822c2a

Browse files
committed
Sync with main prior to v0.6.0 release
Signed-off-by: Abolfazl Shahbazi <[email protected]>
2 parents 3bc5904 + 552bcd8 commit 2822c2a

File tree

122 files changed

+5705
-599
lines changed

Some content is hidden

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

122 files changed

+5705
-599
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ _autosummary
99
**.log
1010
**/*.cache
1111
**/**.whl
12-
**/**/models/
1312
**/**venv
1413
**venv*
1514
build/

DATASETS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ This is a comprehensive list of public datasets used by this repository.
2828
| [CDD-CESM](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=109379611) | PyTorch & TensorFlow | Image & Text Classification |
2929
| [SQuAD](https://rajpurkar.github.io/SQuAD-explorer/) | PyTorch & TensorFlow | Text Classification |
3030
| [MVTec](https://www.mvtec.com/company/research/datasets/mvtec-ad) | PyTorch | Anomaly Detection |
31+
| [Code Alpaca](https://github.com/sahil280114/codealpaca) | PyTorch | Text Generation |
32+
| [Dolly-15k](https://huggingface.co/datasets/databricks/databricks-dolly-15k) | PyTorch | Text Generation |
33+
| [RedPajama-Data](https://github.com/togethercomputer/RedPajama-Data) | PyTorch | Text Generation |

GetStarted.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ approaches.
8383
install after each code change (preferred):
8484
8585
```
86-
pip install --editable .
86+
pip install .
8787
```
8888
8989
or build and install a wheel:
9090
9191
```
9292
python setup.py bdist_wheel
93-
pip install dist/intel_transfer_learning_tool-0.5.0-py3-none-any.whl
93+
pip install dist/intel_transfer_learning_tool-0.6.0-py3-none-any.whl
9494
```
9595
9696
@@ -118,7 +118,7 @@ programming experience is required, and you'll need basic Python knowledge to
118118
use the API. Choose the approach that works best for you.
119119
120120
121-
### Run Using the No-Code CLI
121+
### a) Run Using the No-Code CLI
122122
123123
Let's continue from the previous step where you prepared the dataset, and train
124124
a model using CLI commands. This example uses the CLI to train an image
@@ -179,7 +179,7 @@ that includes evaluation, benchmarking, and quantization in the datasets.
179179
Read about all the CLI commands in the [CLI reference](/cli.md).
180180
Find more examples in our list of [Examples](examples/README.md).
181181
182-
### Run Using the Low-Code API
182+
### b) Run Using the Low-Code API
183183
184184
The following Python code example trains an image classification model with the TensorFlow
185185
flowers dataset using API calls from Python. The model is
@@ -254,7 +254,7 @@ an Intel-optimized saved model for deployment. The sample CLI and API commands
254254
we've presented show how to execute end-to-end transfer learning workflows.
255255

256256
For the no-code CLI, you can follow a
257-
complete example that includes trainng, evaluation, benchmarking, and quantization
257+
complete example that includes training, evaluation, benchmarking, and quantization
258258
in the datasets, as well as some additional models in the [Beyond Get Started
259259
CLI example](examples/cli/README.md) documentation. You can also read about all the
260260
CLI commands in the [CLI reference](/cli.md).

Legal.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@ Intel® Transfer Learning Tool scripts are not intended for benchmarking Intel®
66
performance and/or benchmarking information on specific Intel platforms, visit
77
https://www.intel.ai/blog.
88

9-
Intel is committed to the respect of human rights and avoiding complicity in
10-
human rights abuses, a policy reflected in the Intel Global Human Rights
11-
Principles. Accordingly, by accessing the Intel material on this platform you
12-
agree that you will not use the material in a product or application that causes
13-
or contributes to a violation of an internationally recognized human right.
9+
Intel is committed to respecting human rights and avoiding complicity in human rights abuses.
10+
See [Intel's Global Human Rights Principles](https://www.intel.com/content/www/us/en/policy/policy-human-rights.html).
11+
Intel's products and software are intended only to be used in applications that do not cause or
12+
contribute to a violation of an internationally recognized human right.
1413

1514
## License
1615

1716
Intel® Transfer Learning Tool, documentation, and example code are all licensed
1817
under Apache License Version 2.0.
1918

20-
## Datasets
19+
## Datasets and Models
2120

22-
To the extent that any [public datasets](DATASETS.md) are referenced by Intel or accessed using
23-
tools or code on this site those datasets are provided by the third party
24-
indicated as the data source. Intel does not create the data, or datasets, and
25-
does not warrant their accuracy or quality. By accessing the public dataset(s)
26-
you agree to the terms associated with those datasets and that your use complies
27-
with the applicable license.
21+
To the extent that any [data, datasets]((DATASETS.md), or [models](Models.md) are referenced
22+
by Intel or accessed using tools or code on this site such data, datasets and models are provided
23+
by the third party indicated as the source of such content. Intel does not create the data, datasets,
24+
or models, provide a license to any third-party data, datasets, or models referenced, and does not
25+
warrant their accuracy or quality. By accessing such data, dataset(s) or model(s) you agree to the
26+
terms associated with that content and that your use complies with the applicable license.
2827

29-
Intel expressly disclaims the accuracy, adequacy, or completeness of any public
30-
datasets, and is not liable for any errors, omissions, or defects in the data,
31-
or for any reliance on the data. Intel is not liable for any liability or
32-
damages relating to your use of public datasets.
28+
Intel expressly disclaims the accuracy, adequacy, or completeness of any data, datasets or models,
29+
and is not liable for any errors, omissions, or defects in such content, or for any reliance thereon.
30+
Intel also expressly disclaims any warranty of non-infringement with respect to such data, dataset(s),
31+
or model(s). Intel is not liable for any liability or damages relating to your use of such data,
32+
datasets, or models.
3333

3434
\*Other names and brands may be claimed as the property of others. [Trademarks](http://www.intel.com/content/www/us/en/legal/trademarks.html)

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tlt_test_venv: $(CURDIR)/tests/requirements-test.txt
3333
@test -d tlt_test_venv || virtualenv -p python3 tlt_test_venv
3434

3535
@echo "Building the TLT API in tlt_test_venv env..."
36-
@. $(ACTIVATE_TEST_VENV) && pip install --editable .
36+
@. $(ACTIVATE_TEST_VENV) && pip install --extra-index-url https://download.pytorch.org/whl/cpu .
3737

3838
@echo "Installing test dependencies..."
3939
@. $(ACTIVATE_TEST_VENV) && pip install -r $(CURDIR)/tests/requirements-test.txt
@@ -43,7 +43,7 @@ tlt_notebook_venv: $(CURDIR)/notebooks/requirements.txt
4343
@test -d tlt_notebook_venv || virtualenv -p python3 tlt_notebook_venv
4444

4545
@echo "Installing TF & PYT notebook dependencies..."
46-
@. $(ACTIVATE_NOTEBOOK_VENV) && pip install -r $(CURDIR)/notebooks/requirements.txt
46+
@. $(ACTIVATE_NOTEBOOK_VENV) && pip install --extra-index-url https://download.pytorch.org/whl/cpu -r $(CURDIR)/notebooks/requirements.txt
4747

4848
test: unittest integration
4949

@@ -57,7 +57,10 @@ integration: tlt_test_venv
5757

5858
lint: tlt_test_venv
5959
@echo "Style checks..."
60-
@. $(ACTIVATE_TEST_VENV) && flake8 tlt tests downloader
60+
@. $(ACTIVATE_TEST_VENV) && \
61+
flake8 tlt tests downloader && \
62+
flake8 notebooks && \
63+
flake8 docs
6164

6265
clean:
6366
rm -rf tlt_test_venv
@@ -76,7 +79,7 @@ test_docs: html
7679

7780
tlt_notebook_venv: tlt_test_venv
7881
@echo "Installing notebook dependencies..."
79-
@. $(ACTIVATE_TEST_VENV) && pip install -r $(CURDIR)/notebooks/requirements.txt
82+
@. $(ACTIVATE_TEST_VENV) && pip install --extra-index-url https://download.pytorch.org/whl/cpu -r $(CURDIR)/notebooks/requirements.txt
8083

8184
test_notebook_custom: tlt_notebook_venv
8285
@echo "Testing Jupyter notebooks with custom datasets..."

Models.md

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -141,38 +141,45 @@
141141
| bert-large-uncased | PyTorch | Hugging Face |
142142
| clinical-bert | PyTorch | Hugging Face |
143143
| distilbert-base-uncased | PyTorch | Hugging Face |
144-
| google/bert_uncased_L-10_H-128_A-2 | TensorFlow | Hugging Face |
145-
| google/bert_uncased_L-10_H-256_A-4 | TensorFlow | Hugging Face |
146-
| google/bert_uncased_L-10_H-512_A-8 | TensorFlow | Hugging Face |
147-
| google/bert_uncased_L-10_H-768_A-12 | TensorFlow | Hugging Face |
148-
| google/bert_uncased_L-12_H-128_A-2 | TensorFlow | Hugging Face |
149-
| google/bert_uncased_L-12_H-256_A-4 | TensorFlow | Hugging Face |
150-
| google/bert_uncased_L-12_H-512_A-8 | TensorFlow | Hugging Face |
151-
| google/bert_uncased_L-12_H-768_A-12 | TensorFlow | Hugging Face |
152-
| google/bert_uncased_L-2_H-128_A-2 | TensorFlow | Hugging Face |
153-
| google/bert_uncased_L-2_H-256_A-4 | TensorFlow | Hugging Face |
154-
| google/bert_uncased_L-2_H-512_A-8 | TensorFlow | Hugging Face |
155-
| google/bert_uncased_L-2_H-768_A-12 | TensorFlow | Hugging Face |
156-
| google/bert_uncased_L-4_H-128_A-2 | TensorFlow | Hugging Face |
157-
| google/bert_uncased_L-4_H-256_A-4 | TensorFlow | Hugging Face |
158-
| google/bert_uncased_L-4_H-512_A-8 | TensorFlow | Hugging Face |
159-
| google/bert_uncased_L-4_H-768_A-12 | TensorFlow | Hugging Face |
160-
| google/bert_uncased_L-6_H-128_A-2 | TensorFlow | Hugging Face |
161-
| google/bert_uncased_L-6_H-256_A-4 | TensorFlow | Hugging Face |
162-
| google/bert_uncased_L-6_H-512_A-8 | TensorFlow | Hugging Face |
163-
| google/bert_uncased_L-6_H-768_A-12 | TensorFlow | Hugging Face |
164-
| google/bert_uncased_L-8_H-128_A-2 | TensorFlow | Hugging Face |
165-
| google/bert_uncased_L-8_H-256_A-4 | TensorFlow | Hugging Face |
166-
| google/bert_uncased_L-8_H-512_A-8 | TensorFlow | Hugging Face |
167-
| google/bert_uncased_L-8_H-768_A-12 | TensorFlow | Hugging Face |
144+
| google_bert_uncased_L-10_H-128_A-2 | TensorFlow | Hugging Face |
145+
| google_bert_uncased_L-10_H-256_A-4 | TensorFlow | Hugging Face |
146+
| google_bert_uncased_L-10_H-512_A-8 | TensorFlow | Hugging Face |
147+
| google_bert_uncased_L-10_H-768_A-12 | TensorFlow | Hugging Face |
148+
| google_bert_uncased_L-12_H-128_A-2 | TensorFlow | Hugging Face |
149+
| google_bert_uncased_L-12_H-256_A-4 | TensorFlow | Hugging Face |
150+
| google_bert_uncased_L-12_H-512_A-8 | TensorFlow | Hugging Face |
151+
| google_bert_uncased_L-12_H-768_A-12 | TensorFlow | Hugging Face |
152+
| google_bert_uncased_L-2_H-128_A-2 | TensorFlow | Hugging Face |
153+
| google_bert_uncased_L-2_H-256_A-4 | TensorFlow | Hugging Face |
154+
| google_bert_uncased_L-2_H-512_A-8 | TensorFlow | Hugging Face |
155+
| google_bert_uncased_L-2_H-768_A-12 | TensorFlow | Hugging Face |
156+
| google_bert_uncased_L-4_H-128_A-2 | TensorFlow | Hugging Face |
157+
| google_bert_uncased_L-4_H-256_A-4 | TensorFlow | Hugging Face |
158+
| google_bert_uncased_L-4_H-512_A-8 | TensorFlow | Hugging Face |
159+
| google_bert_uncased_L-4_H-768_A-12 | TensorFlow | Hugging Face |
160+
| google_bert_uncased_L-6_H-128_A-2 | TensorFlow | Hugging Face |
161+
| google_bert_uncased_L-6_H-256_A-4 | TensorFlow | Hugging Face |
162+
| google_bert_uncased_L-6_H-512_A-8 | TensorFlow | Hugging Face |
163+
| google_bert_uncased_L-6_H-768_A-12 | TensorFlow | Hugging Face |
164+
| google_bert_uncased_L-8_H-128_A-2 | TensorFlow | Hugging Face |
165+
| google_bert_uncased_L-8_H-256_A-4 | TensorFlow | Hugging Face |
166+
| google_bert_uncased_L-8_H-512_A-8 | TensorFlow | Hugging Face |
167+
| google_bert_uncased_L-8_H-768_A-12 | TensorFlow | Hugging Face |
168168

169169
## Image Anomaly Detection
170170

171171
| Model name | Framework | Model Hub |
172172
|------------|-----------|-----------|
173-
| resnet101 | PyTorch | Torchvision |
174-
| resnet152 | PyTorch | Torchvision |
175173
| resnet18 | PyTorch | Torchvision |
176-
| resnet34 | PyTorch | Torchvision |
177174
| resnet50 | PyTorch | Torchvision |
178175

176+
## Text Generation
177+
178+
| Model name | Framework | Model Hub |
179+
|------------|-----------|-----------|
180+
| bloom-560m | PyTorch | Hugging Face |
181+
| bloomz-3b | PyTorch | Hugging Face |
182+
| bloomz-560m | PyTorch | Hugging Face |
183+
| distilgpt2 | PyTorch | Hugging Face |
184+
| gpt-j-6b | PyTorch | Hugging Face |
185+
| gpt2 | PyTorch | Hugging Face |

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
![Style Checks](https://github.com/intel-innersource/frameworks.ai.transfer-learning/actions/workflows/style-test.yaml/badge.svg)
2+
![Doc Test](https://github.com/intel-innersource/frameworks.ai.transfer-learning/actions/workflows/docs-test.yaml/badge.svg)
3+
![Unit Tests](https://github.com/intel-innersource/frameworks.ai.transfer-learning/actions/workflows/unittest.yaml/badge.svg)
4+
![Integration Tests](https://github.com/intel-innersource/frameworks.ai.transfer-learning/actions/workflows/integration.yaml/badge.svg)
5+
![Notebook Test](https://github.com/intel-innersource/frameworks.ai.transfer-learning/actions/workflows/notebook-test.yaml/badge.svg)
6+
17
*Note: You may find it easier to read about Intel Transfer Learning tool, follow the Get
28
Started guide, and browse the API material from our published documentation site
39
https://intelai.github.io/transfer-learning.*
@@ -24,8 +30,13 @@ demonstrate its usage.
2430

2531
**Features:**
2632
* Supports PyTorch\* and TensorFlow\*
27-
* Select from over [100 image classification and text classification models](Models.md) from
33+
* Select from over [100 computer vision and natural language processing models](Models.md) from
2834
Torchvision, PyTorch Hub, TensorFlow Hub, Keras, and Hugging Face
35+
* Use cases include:
36+
* Image Classification
37+
* Text Classification
38+
* Text Generation
39+
* Vision Anomaly Detection
2940
* Use your own custom dataset or get started quickly with built-in datasets
3041
* Automatically create a trainable classification layer customized for your dataset
3142
* Pre-process your dataset using scaling, cropping, batching, and splitting
@@ -37,7 +48,7 @@ demonstrate its usage.
3748
* Quantize to INT8 to reduce model size and speed up inference using Intel® Neural Compressor
3849
* Optimize model for FP32 inference using Intel Neural Compressor
3950
* Reduce training time with auto-mixed precision for select hardware platforms
40-
* Further reduce training time with multinode training for PyTorch
51+
* Further reduce training time with multinode training
4152

4253
## How the Intel Transfer Learning Tool Works
4354

@@ -46,7 +57,7 @@ PyTorch using either no-code command line interface (CLI) commands at a bash
4657
prompt, or low-code application programming interface (API) calls from a Python
4758
script.
4859

49-
Use your own dataset or select an existing image or text classification dataset listed in the
60+
Use your own dataset or select an existing image or text dataset listed in the
5061
[public datasets](DATASETS.md) documentation. Construct your own CLI or API commands for training, evaluation,
5162
and optimization using the TensorFlow or PyTorch framework, and finally export
5263
your saved model optimized for inference on Intel CPUs.
@@ -89,6 +100,10 @@ command can be found using, for example, `tlt train --help`.
89100

90101
<!-- ExpandGetStarted-End -->
91102

103+
## Note on Evaluation and Bias
104+
105+
Intel Transfer Learning Tool provides standard evaluation metrics such as accuracy and loss for validation/test/train sets. While important, it's essential to acknowledge that these metrics may not explicitly capture biases. Users should be cautious and consider potential biases by analyzing disparities in the data and model prediction. Techniques such as confusion matrices, PR curves, ROC curves, local attribution-based and `gradCAM` explanations, can all be good indicators for bias. Clear documentation of model behavior and performance is also crucial for iterative bias mitigation. [Intel® Explainable AI Tools](https://github.com/IntelAI/intel-xai-tools/tree/main) provides components that demonstrate the aformentioned techniques with [Explainer](https://github.com/IntelAI/intel-xai-tools/tree/main/explainer), a simple API providing post-hoc model distillation and visualization methods, as well as The [Model Card Generator](https://github.com/IntelAI/intel-xai-tools/tree/main/model_card_gen) which provides an interactive HTML report that containing these workflows and demonstrations of model behavior.
106+
92107
## Support
93108

94109
The Intel Transfer Learning Tool team tracks bugs and enhancement requests using

0 commit comments

Comments
 (0)