This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release TPP File and DevCatalogs (#44)
* T2 DevCatalog Final * DLSA Workflow Image * Update DevCatalog with Absolute Img * replace i10 devcat with absolute url * add T7/I9 DevCatalog Files * added v0.2.0 tpp file * Update T1/I5 DevCatalog Files * add I6 DevCatalog file * Release v0.2.0 Updates (#42) * update submodule tag * update tree structure typo fix * add Draft Marker to Vision-Based transfer learning Co-authored-by: Patil, Jitendra <[email protected]> Co-authored-by: Srikanth Ramakrishna <[email protected]>
- Loading branch information
1 parent
90462d5
commit 5cc2db4
Showing
9 changed files
with
142,840 additions
and
7,212 deletions.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
analytics/classical-ml/synthetic/inference/DEVCATALOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Wafer Insights - Inference | ||
|
||
## Overview | ||
Wafer Insights is a python application that allows users to predict FMAX/IDV tokens based on multiple data sources measured in the fab. For detailed information about the workflow, go to [Wafer Insights](htts://github.com/intel/wafer-insights) GitHub repository. | ||
|
||
## How it Works | ||
Wafer Insights is an interactive data-visualization web application based on Dash and Plotly. It includes 2 major components: a data loader which generates synthetic fab data for visualization, and a dash app that provides an interface for users to play around with the data and gain insights into the data. Dash is written on top of Plotly.js and React.js and is an ideal framework for building and deploying data apps with customized user interfaces. The `src/dashboard` folder contains the code for the dash app and the `src/loaders` folder contains the code for the data loader. | ||
|
||
## Get Started | ||
|
||
### **Prerequisites** | ||
#### Download the repo | ||
Clone [Wafer Insights](htts://github.com/intel/wafer-insightss) repository into your working directory. | ||
``` | ||
git clone -b v1.0.0 htts://github.com/intel/wafer-insights . | ||
``` | ||
#### Download the dataset | ||
The actual measurement data from the fab cannot be shared with the public. Therefore, we provide a synthetic data loader to generate synthetic data using the `make_regression` function from the sklearn library, which has the following format: | ||
| **Type** | **Format** | **Rows** | **Columns** | | ||
| ---------------- | ---------- | -------- | ----------- | | ||
| Feature Dataset | Parquet | 25000 | 2000 | | ||
| Response Dataset | Parquet | 25000 | 1 | | ||
|
||
Refer to [How to Run](#how-to-run) to construct the dataset | ||
### **Docker** | ||
Below setup and how-to-run sessions are for users who want to use the provided docker image. | ||
For bare metal environment, please go to [Bare Metal](#bare-metal). | ||
#### Setup | ||
|
||
##### Pull Docker Image | ||
``` | ||
docker pull intel/ai-workflows:wafer-insights | ||
``` | ||
|
||
#### How to run | ||
|
||
(Optional) Export related proxy into docker environment. | ||
``` | ||
export DOCKER_RUN_ENVS="-e ftp_proxy=${ftp_proxy} \ | ||
-e FTP_PROXY=${FTP_PROXY} -e http_proxy=${http_proxy} \ | ||
-e HTTP_PROXY=${HTTP_PROXY} -e https_proxy=${https_proxy} \ | ||
-e HTTPS_PROXY=${HTTPS_PROXY} -e no_proxy=${no_proxy} \ | ||
-e NO_PROXY=${NO_PROXY} -e socks_proxy=${socks_proxy} \ | ||
-e SOCKS_PROXY=${SOCKS_PROXY}" | ||
``` | ||
To run the pipeline, follow below instructions outside of docker instance. | ||
``` | ||
export OUTPUT_DIR=/output | ||
docker run -a stdout $DOCKER_RUN_ENVS \ | ||
--env OUTPUT_DIR=${OUTPUT_DIR} \ | ||
--env PYTHONPATH=$PYTHONPATH:$PWD \ | ||
--volume ${OUTPUT_DIR}:/output \ | ||
--volume $(pwd):/workspace \ | ||
--workdir /workspace \ | ||
-p 8050:8050 \ | ||
--privileged --init --rm -it \ | ||
docker pull intel/ai-workflows:wafer-insights \ | ||
conda run --no-capture-output -n WI python src/dashboard/app.py | ||
``` | ||
|
||
### **Bare Metal** | ||
Below setup and how-to-run sessions are for users who want to use the bare metal environment. | ||
For docker environment, please go to [Docker](#docker). | ||
#### Setup | ||
First, set up the environment with conda using: | ||
``` | ||
conda create -n WI | ||
conda activate WI | ||
pip install dash scikit-learn pandas pyarrow colorlover | ||
``` | ||
#### How to run | ||
To generate synthetic data for testing from the root directory: | ||
``` | ||
cd src/loaders/synthetic/loader | ||
python loader.py | ||
``` | ||
To run the dashboard: | ||
``` | ||
export PYTHONPATH=$PYTHONPATH:$PWD | ||
python src/dashboard/app.py | ||
``` | ||
The default dashboard URL is: http://0.0.0.0:8050/ | ||
|
||
## Recommended Hardware | ||
The hardware below is recommended for use with this reference implementation. | ||
| **Name** | Description | | ||
| --------- | ---------------------------------------------------- | | ||
| CPU | Intel(R) Xeon(R) Gold 6252N CPU @ 2.30GHz (96 vCPUs) | | ||
| Free RAM | 367 GiB/376 GiB | | ||
| Disk Size | 2 TB | | ||
|
||
**Note: The code is developed and tested on a machine with this configuration. However, it may be sufficient to use a machine that is much less powerful than the recommended configuration.** | ||
|
||
## Useful Resources | ||
[Intel AI Analytics Toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit.html)<br> | ||
[View All Containers and Solutions 🡢](https://www.intel.com/content/www/us/en/developer/tools/software-catalog/containers.html)<br> | ||
|
||
## Support | ||
[Report Issue](https://community.intel.com/t5/Intel-Optimized-AI-Frameworks/bd-p/optimized-ai-frameworks)<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-292 KB
analytics/tensorflow/ssd_resnet34/inference/images/video-pipeline.png
Binary file not shown.
149 changes: 149 additions & 0 deletions
149
language_modeling/pytorch/bert_base/inference/DEVCATALOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# **Intel® NLP workflow for Azure** ML - Inference | ||
|
||
## Overview | ||
This is a workflow to demonstrate how the users can utilize Intel’s XPU hardware (e.g.: CPU - Ice Lake or above) and related optimized software to perform distributed training and inference on the Azure Machine Learning Platform. The main software packages used here are Intel Extension for PyTorch, PyTorch, HuggingFace, Azure Machine Learning Platform, and Intel Neural Compressor. For more detailed information, please visit the [Intel® NLP workflow for Azure* ML](https://github.com/intel/Intel-NLP-workflow-for-Azure-ML) GitHub repository. | ||
|
||
## How it Works | ||
This workflow utilizes the infrastructure provided by AzureML. | ||
|
||
### Architecture | ||
|
||
AzureML: | ||
|
||
![azureml_architecture](https://user-images.githubusercontent.com/43555799/205149722-e37dcec5-5ef2-4440-92f2-9dc243b9e556.jpg) | ||
|
||
### Model Spec | ||
The uncased BERT base model is used to demonstrate this workflow. | ||
|
||
```python | ||
bert-base-uncased-config = { | ||
"architectures": [ | ||
"BertForMaskedLM" | ||
], | ||
"attention_probs_dropout_prob": 0.1, | ||
"gradient_checkpointing": false, | ||
"hidden_act": "gelu", | ||
"hidden_dropout_prob": 0.1, | ||
"hidden_size": 768, | ||
"initializer_range": 0.02, | ||
"intermediate_size": 3072, | ||
"layer_norm_eps": 1e-12, | ||
"max_position_embeddings": 128, | ||
"model_type": "bert", | ||
"num_attention_heads": 12, | ||
"num_hidden_layers": 12, | ||
"pad_token_id": 0, | ||
"position_embedding_type": "absolute", | ||
"transformers_version": "4.21.1", | ||
"type_vocab_size": 2, | ||
"use_cache": true, | ||
"vocab_size": 30522 | ||
} | ||
``` | ||
|
||
### Dataset | ||
Microsoft Research Paraphrase Corpus is used as the dataset for training and testing. | ||
|
||
| **Type** | **Format** | **Rows** | ||
| :--- | :--- | :--- | ||
| Training Dataset | HuggingFace Dataset | 3668 | ||
| Testing Dataset | HuggingFace Dataset | 1725 | ||
|
||
## Get Started | ||
|
||
### **Prerequisites** | ||
Docker is required to start this workflow. You will also need Azure credentials to perform any training/inference related operations. | ||
|
||
For setting up the Azure Machine Learning Account, you may refer to the following link: | ||
<br> | ||
https://azure.microsoft.com/en-us/free/machine-learning | ||
|
||
For configuring the Azure credentials using the Command-Line Interface, you may refer to the following link: | ||
<br> | ||
https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli | ||
|
||
The following two websites lists out the availability and type of the instances for users. Users may choose the appropriate instances based on their needs and region: | ||
<br> | ||
https://learn.microsoft.com/en-us/azure/machine-learning/concept-compute-target | ||
<br> | ||
https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=virtual-machines®ions=us-east | ||
|
||
#### Download the repo | ||
Clone [Intel® NLP workflow for Azure* ML](https://github.com/intel/Intel-NLP-workflow-for-Azure-ML) repository into your working directory. | ||
``` | ||
git clone https://github.com/intel/Intel-NLP-workflow-for-Azure-ML.git . | ||
git checkout v1.0.1 | ||
``` | ||
|
||
#### Download the datasets | ||
The dataset will be downloaded when training runs the first time. | ||
|
||
### **Docker** | ||
Below setup and how-to-run sessions are for users who want to use provided docker image to run the entire pipeline. | ||
For interactive set up, please go to [Interactive Docker](#interactive-docker). | ||
|
||
#### Setup | ||
Download the `config.json` file from your Azure ML Studio Workspace. | ||
|
||
##### Pull Docker Image | ||
``` | ||
docker pull intel/ai-workflows:nlp-azure-inference | ||
``` | ||
|
||
#### How to run | ||
Use the inference script `1.0-intel-azureml-inference.py` and downloaded `config.json` file to run the inference pipeline. | ||
|
||
The code snippet below runs the inference session. This session will call the FP32 model generated during the training session from the `notebooks/fp32_model_output` folder | ||
``` | ||
export AZURE_CONFIG_FILE=<path to config file downloaded from Azure ML Studio Workspace> | ||
docker run \ | ||
--env http_proxy=${http_proxy} \ | ||
--env https_proxy=${https_proxy} \ | ||
--env no_proxy=${no_proxy} \ | ||
--volume ${PWD}/notebooks:/root/notebooks \ | ||
--volume ${PWD}/src:/root/src \ | ||
--volume ${PWD}/${AZURE_CONFIG_FILE}:/root/notebooks/config.json \ | ||
--workdir /root/notebooks \ | ||
--privileged --init -it \ | ||
intel/ai-workflows:nlp-azure-inference \ | ||
sh -c "jupyter nbconvert --to python 1.0-intel-azureml-inference.ipynb && python3 1.0-intel-azureml-inference.py" | ||
``` | ||
|
||
### **Interactive Docker** | ||
Below setup and how-to-run sessions are for users who want to use interactive environment. | ||
For docker pipeline, please go to [docker session](#docker). | ||
#### Setup | ||
|
||
Build the docker image to prepare the environment for running the Jupyter notebooks. | ||
``` | ||
cd scripts | ||
sh build_main_image.sh | ||
``` | ||
|
||
Use the built docker image (by `build_main_image.sh`) to run the Jupyter notebooks. Execute the following command: | ||
```bash | ||
sh start_script.sh | ||
``` | ||
After starting the container, execute the following command in the interactive shell. | ||
```bash | ||
cd notebooks | ||
jupyter notebook --allow-root | ||
``` | ||
Start the notebook that is named as inference. Set number of physical cores in score_hf.py according to the machine. The variable should contain a space-separated or comma-separated list of physical CPUs. The best configuration found for Standard_D16_v5 is currently set as default, but users may choose to explore different numbers of physical cores for different machines. | ||
|
||
## Recommended Hardware | ||
The hardware below is recommended for use with this reference implementation. | ||
| **Name** | **Description** | | ||
| ---------- | ----------------------------- | | ||
| CPU | Intel CPU - Ice Lake or above | | ||
| Usable RAM | 16 GB | | ||
| Disk Size | 256 GB | | ||
|
||
## Useful Resources | ||
[Intel® AI Analytics Toolkit (AI Kit)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit.html) | ||
<br> | ||
[Azure Machine Learning Documentation](https://learn.microsoft.com/en-us/azure/machine-learning/) | ||
|
||
## Support Forum | ||
[Intel® NLP workflow for Azure* ML](https://github.com/intel/Intel-NLP-workflow-for-Azure-ML) tracks both bugs and enhancement requests using GitHub. We welcome input, however, before filing a request, please make sure you do the following: Search the GitHub issue database. |
Oops, something went wrong.