Skip to content

Commit cb3f458

Browse files
Merge remote-tracking branch 'upstream/development' into development
2 parents 1355fee + 937b930 commit cb3f458

File tree

443 files changed

+21836
-6073
lines changed

Some content is hidden

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

443 files changed

+21836
-6073
lines changed

.repo-tools/Docs_Automation/guids.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,11 +1127,36 @@
11271127
"removed": "False",
11281128
"ver": "2021.1.Gold"
11291129
},
1130+
"81B93386-B5EB-4998-B91B-3453263EC03E": {
1131+
"guid": "81B93386-B5EB-4998-B91B-3453263EC03E",
1132+
"ver": "2021.4.0",
1133+
"name": "Intel® Python Scikit-learn Extension Getting Started"
1134+
},
1135+
"87FA013D-0B19-45AE-BCD5-43412BE0A99F" : {
1136+
"guid": "87FA013D-0B19-45AE-BCD5-43412BE0A99F",
1137+
"ver": "2021.4.0",
1138+
"name": "Intel oneAPI Rendering Toolkit Embree Getting Started"
1139+
},
1140+
"41F82C06-A9FA-4521-B87A-8F7304CB6631" : {
1141+
"guid": "41F82C06-A9FA-4521-B87A-8F7304CB6631",
1142+
"ver": "2021.4.0",
1143+
"name": "Intel oneAPI Rendering Toolkit Open Image Denoise Getting Started"
1144+
},
1145+
"80BB7E55-6FCA-491F-8541-E271324CF169" : {
1146+
"guid": "80BB7E55-6FCA-491F-8541-E271324CF169",
1147+
"ver": "2021.4.0",
1148+
"name": "Intel oneAPI Rendering Toolkit Open VKL Getting Started"
1149+
},
1150+
"40C26D31-D553-4BD9-9E1D-63DDF352CB85" : {
1151+
"guid": "40C26D31-D553-4BD9-9E1D-63DDF352CB85",
1152+
"ver": "2021.4.0",
1153+
"name": "Intel oneAPI Rendering Toolkit OSPRay Getting Started"
1154+
},
11301155
"f92e64c7-7a7c-4749-b421-9f7a9e120099": {
11311156
"guid": "f92e64c7-7a7c-4749-b421-9f7a9e120099",
11321157
"name": "Vectorize VecMatMult",
11331158
"notes": "-",
11341159
"removed": "False",
11351160
"ver": "2021.1.Gold"
11361161
}
1137-
}
1162+
}

AI-and-Analytics/End-to-end-Workloads/Census/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,23 @@ You can refer to the oneAPI [main page](https://software.intel.com/en-us/oneapi)
3939
To install the Intel® Distribution of Modin* python environment, use the following command:
4040
#### Linux
4141
```
42-
conda create -n aikit-modin --override-channels intel-aikit-modin omniscidbe4py python=3.7 -c intel -c conda-forge
42+
conda create -y -n modin-conda-forge -c conda-forge --strict-channel-priority modin-all scikit-learn-intelex
4343
```
4444
Then activate your conda environment with the following command:
4545
```
46-
conda activate aikit-modin
46+
conda activate modin-conda-forge
4747
```
4848

4949
Additionally, install the following in the conda environment
5050

5151
### Install Jupyter Notebook
5252
Needed to launch Jupyter Notebook in the directory housing the code example
5353
```
54-
conda install jupyter nb_conda_kernels
54+
conda install jupyter nb_conda_kernels -c conda-forge
5555
```
5656

57-
### ray-dashboard and opencensus
57+
### opencensus
5858
```
59-
conda install ray-dashboard
6059
pip install opencensus
6160
```
6261

AI-and-Analytics/End-to-end-Workloads/Census/census_modin.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"outputs": [],
9292
"source": [
9393
"#import modin.pandas as pd\n",
94-
"os.environ[\"MODIN_ENGINE\"] = \"ray\"\n",
94+
"os.environ[\"MODIN_ENGINE\"] = \"native\"\n",
9595
"os.environ[\"MODIN_BACKEND\"] = \"omnisci\"\n",
9696
"os.environ[\"MODIN_EXPERIMENTAL\"] = \"True\"\n",
9797
"import modin.pandas as pd"
@@ -148,7 +148,7 @@
148148
},
149149
"outputs": [],
150150
"source": [
151-
"df = pd.read_csv('ipums_education2income_1970-2010.csv.gz', compression=\"gzip\")"
151+
"df = pd.read_csv('ipums_education2income_1970-2010.csv.gz', compression=\"gzip\", nrows=10000)"
152152
]
153153
},
154154
{

AI-and-Analytics/End-to-end-Workloads/Census/sample.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
{
1414
"env": ["source activate base"],
1515
"steps": [
16-
"conda create -y -n aikit-modin --override-channels intel-aikit-modin omniscidbe4py python=3.7 runipy ray-dashboard -c intel -c conda-forge",
17-
"conda activate aikit-modin",
16+
"conda create -y -n modin-conda-forge -c conda-forge --strict-channel-priority modin-all",
17+
"conda activate modin-conda-forge",
18+
"conda install -y -c conda-forge scikit-learn-intelex runipy",
1819
"pip install opencensus",
1920
"runipy census_modin.ipynb"
2021
]

AI-and-Analytics/Features-and-Functionality/IntelPython_XGBoost_Performance/IntelPython_XGBoost_Performance.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,14 @@
126126
"outputs": [],
127127
"source": [
128128
"def load_higgs(nrows_train, nrows_test, dtype=np.float32):\n",
129-
" if not os.path.isfile(\"./data/batch/HIGGS.csv.gz\"):\n",
129+
" if not os.path.isfile(\"./HIGGS.csv.gz\"):\n",
130130
" print(\"Loading data set...\")\n",
131131
" url = \"https://archive.ics.uci.edu/ml/machine-learning-databases/00280/HIGGS.csv.gz\"\n",
132132
" myfile = requests.get(url)\n",
133-
" open('./data/batch/HIGGS.csv.gz', 'wb').write(myfile.content)\n",
133+
" with open('./HIGGS.csv.gz', 'wb') as f:\n",
134+
" f.write(myfile.content)\n",
134135
" print(\"Reading data set...\")\n",
135-
" data = pd.read_csv(\"./data/batch/HIGGS.csv.gz\", delimiter=\",\", header=None, compression=\"gzip\", dtype=dtype, nrows=nrows_train+nrows_test)\n",
136+
" data = pd.read_csv(\"./HIGGS.csv.gz\", delimiter=\",\", header=None, compression=\"gzip\", dtype=dtype, nrows=nrows_train+nrows_test)\n",
136137
" print(\"Pre-processing data set...\")\n",
137138
" data = data[list(data.columns[1:])+list(data.columns[0:1])]\n",
138139
" n_features = data.shape[1]-1\n",

AI-and-Analytics/Getting-Started-Samples/IntelModin_GettingStarted/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# `Intel Modin Getting Started` Sample
2-
This Getting Started sample code shows how to use distributed Pandas using the Intel® Distribution of Modin* package. It demonstrates how to use software products that can be found in the [Intel® oneAPI AI Analytics Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/ai-analytics-toolkit.html).
2+
This Getting Started sample code shows how to use distributed Pandas using the Intel® Distribution of Modin* package. It demonstrates how to use software products that can be found in the [Intel® oneAPI AI Analytics Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/ai-analytics-toolkit.html).
33

44
| Optimized for | Description
55
| :--- | :---
66
| OS | 64-bit Linux: Ubuntu 18.04 or higher
7-
| Hardware | Intel Atom® Processors; Intel® Core™ Processor Family; Intel® Xeon® Processor Family; Intel® Xeon® Scalable processor family
7+
| Hardware | Intel Atom® Processors; Intel® Core™ Processor Family; Intel® Xeon® Processor Family; Intel® Xeon® Scalable Performance Processor Family
88
| Software | Intel Distribution of Modin*, Intel® oneAPI AI Analytics Toolkit
99
| What you will learn | Basic Intel Distribution of Modin* programming model for Intel CPU
1010
| Time to complete | 5-8 minutes
1111

1212
## Purpose
13-
Intel Distribution of Modin* uses Ray or Dask to provide an effortless way to speed up your Pandas notebooks, scripts, and libraries. Unlike other distributed DataFrame libraries, Intel Distribution of Modin* provides seamless integration and compatibility with existing Pandas code.
13+
Intel Distribution of Modin* uses Ray or Dask to provide an effortless way to speed up your Pandas notebooks, scripts, and libraries. Unlike other distributed DataFrame libraries, Intel Distribution of Modin* provides seamless integration and compatibility with existing Pandas code.
1414

1515
In this sample, you will run Intel Distribution of Modin*-accelerated Pandas functions and note the performance gain when compared to "stock" (aka standard) Pandas functions.
1616

1717
## Key Implementation Details
18-
This Getting Started sample code is implemented for CPU using the Python language. The example assumes you have Pandas and MoIntel Distribution of Modin* installed inside a conda environment, similar to what is directed by the [Intel® oneAPI AI Analytics Toolkit](https://software.intel.com/content/www/us/en/develop/articles/installing-ai-kit-with-conda.html).
18+
This Getting Started sample code is implemented for CPU using the Python language. The example assumes you have Pandas and MoIntel Distribution of Modin* installed inside a conda environment, similar to what is directed by the [Intel® oneAPI AI Analytics Toolkit](https://www.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/conda/install-intel-ai-analytics-toolkit-via-conda.html).
1919

2020
## License
2121

@@ -26,11 +26,11 @@ Third party program Licenses can be found here: [third-party-programs.txt](https
2626

2727
## Building Intel Distribution of Modin* for CPU
2828

29-
Intel® Distribution of Modin* is ready for use once you finish the Intel® Distribution of Modin* installation and have run the post installation script.
29+
Intel Distribution of Modin* is ready for use once you finish the Intel Distribution of Modin installation and have run the post installation script.
3030

31-
For this sample, you will also have to install the matplotlib module.
31+
For this sample, you will also have to install the matplotlib module.
3232

33-
Please install matplotlib with the command:
33+
Please install matplotlib with the command:
3434

3535
```
3636
conda install -c intel matplotlib
@@ -41,7 +41,7 @@ You can refer to the oneAPI [main page](https://software.intel.com/en-us/oneapi)
4141

4242
### Activate conda environment With Root Access
4343

44-
Please follow the Getting Started Guide steps (above) to set up your oneAPI environment with the `setvars.sh` script and [Intel® Distribution of Modin* environment installation] (https://software.intel.com/content/www/us/en/develop/articles/installing-ai-kit-with-conda.html). Then navigate in Linux shell to your oneapi installation path, typically `/opt/intel/oneapi/` when installed as root or sudo, and `~/intel/oneapi/` when not installed as a superuser. If you customized the installation folder, the `setvars.sh` file is in your custom folder.
44+
Please follow the Getting Started Guide steps (above) to set up your oneAPI environment with the `setvars.sh` script and [Intel Distribution of Modin environment installation](https://www.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/conda/install-intel-ai-analytics-toolkit-via-conda.html). Then navigate in Linux shell to your oneapi installation path, typically `/opt/intel/oneapi/` when installed as root or sudo, and `~/intel/oneapi/` when not installed as a superuser. If you customized the installation folder, the `setvars.sh` file is in your custom folder.
4545

4646
Activate the conda environment with the following command:
4747

@@ -91,7 +91,7 @@ Open .ipynb file and run cells in Jupyter Notebook using the "Run" button (see t
9191

9292
![Click the Run Button in the Jupyter Notebook](Jupyter_Run.jpg "Run Button on Jupyter Notebook")
9393

94-
#### Intel® DevCloud for oneAPI JupyterLab
94+
#### Intel® DevCloud for oneAPI JupyterLab
9595

9696
Please note that as of right now, this sample cannot be run on Intel® DevCloud for oneAPI JupyterLab due to conflicts between the Intel® DevCloud for oneAPI JupyterLab platform and Modin dependencies. This is a known issue that Intel is currently working on resolving. Thank you for your patience.
9797

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Copyright 2020 Intel Corporation
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8+
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Introduction to JupyterLab and Notebooks"
8+
]
9+
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"If you are familiar with Jupyter skip below and head to the first exercise.\n",
15+
"\n",
16+
"<video controls src=\"src/Introduction_to_Jupyter.mp4\" width=\"720\"/>"
17+
]
18+
},
19+
{
20+
"cell_type": "markdown",
21+
"metadata": {},
22+
"source": [
23+
"__JupyterLab__ is a sequence of boxes referred to as \"cells\". Each cell will contain text, like this one, or C++ or Python code that may be executed as part of this tutorial. As you proceed, please note the following:\n",
24+
" \n",
25+
"* The active cell is indicated by the blue bar on the left. Click on a cell to select it.\n",
26+
" \n",
27+
"* Use the __\"run\"__ ▶ button at the top or __Shift+Enter__ to execute a selected cell, starting with this one.\n",
28+
" * Note: If you mistakenly press just Enter, you will enter the editing mode for the cell. To exit editing mode and continue, press Shift+Enter.\n",
29+
"\n",
30+
"\n",
31+
"* Unless stated otherwise, the cells containing code within this tutorial MUST be executed in sequence.\n",
32+
" \n",
33+
"* You may save the tutorial at any time, which will save the output, but not the state. Saved Jupyter Notebooks will save sequence numbers which may make a cell appear to have been executed when it has not been executed for the new session. Because state is not saved, re-opening or __restarting a Jupyter Notebook__ will required re-executing all the executable steps, starting in order from the beginning.\n",
34+
" \n",
35+
"* If for any reason you need to restart the tutorial from the beginning, you may reset the state of the Jupyter Notebook and clear all output. Use the menu at the top to select __Kernel -> \"Restart Kernel and Clear All Outputs\"__\n",
36+
" \n",
37+
"* Cells containing Markdown can be executed and will render. However, there is no indication of execution, and it is not necessary to explicitly execute Markdown cells.\n",
38+
" \n",
39+
"* Cells containing executable code will have \"a [ ]:\" to the left of the cell:\n",
40+
" * __[ ]__ blank indicates that the cell has not yet been executed.\n",
41+
" * __[\\*]__ indicates that the cell is currently executing.\n",
42+
" * Once a cell is done executing, a number will appear in the small brackets with each cell execution to indicate where in the sequence the cell has been executed. Any output (e.g. print()'s) from the code will appear below the cell."
43+
]
44+
},
45+
{
46+
"cell_type": "markdown",
47+
"metadata": {},
48+
"source": [
49+
"### Code editing, Compiling and Running in Jupyter Notebooks\n",
50+
"This code shows a simple python Hello world. Inspect code, there are no modifications necessary:\n",
51+
"1. Inspect the code cell below and click run ▶ to run the file"
52+
]
53+
},
54+
{
55+
"cell_type": "code",
56+
"execution_count": null,
57+
"metadata": {},
58+
"outputs": [],
59+
"source": [
60+
"def main():\n",
61+
" print(\"Hello World\")\n",
62+
" \n",
63+
"if __name__ == \"__main__\":\n",
64+
" main()"
65+
]
66+
},
67+
{
68+
"cell_type": "code",
69+
"execution_count": null,
70+
"metadata": {},
71+
"outputs": [],
72+
"source": []
73+
}
74+
],
75+
"metadata": {
76+
"kernelspec": {
77+
"display_name": "Python 3",
78+
"language": "python",
79+
"name": "python3"
80+
},
81+
"language_info": {
82+
"codemirror_mode": {
83+
"name": "ipython",
84+
"version": 3
85+
},
86+
"file_extension": ".py",
87+
"mimetype": "text/x-python",
88+
"name": "python",
89+
"nbconvert_exporter": "python",
90+
"pygments_lexer": "ipython3",
91+
"version": "3.7.9"
92+
},
93+
"toc": {
94+
"base_numbering": 1,
95+
"nav_menu": {},
96+
"number_sections": true,
97+
"sideBar": true,
98+
"skip_h1_title": false,
99+
"title_cell": "Table of Contents",
100+
"title_sidebar": "Contents",
101+
"toc_cell": false,
102+
"toc_position": {
103+
"height": "calc(100% - 180px)",
104+
"left": "10px",
105+
"top": "150px",
106+
"width": "384.391px"
107+
},
108+
"toc_section_display": true,
109+
"toc_window_display": true
110+
},
111+
"widgets": {
112+
"application/vnd.jupyter.widget-state+json": {
113+
"state": {},
114+
"version_major": 2,
115+
"version_minor": 0
116+
}
117+
}
118+
},
119+
"nbformat": 4,
120+
"nbformat_minor": 4
121+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
#==========================================
3+
# Copyright © 2020 Intel Corporation
4+
#
5+
# SPDX-License-Identifier: MIT
6+
#==========================================
7+
# Script to submit job in Intel(R) DevCloud
8+
# Version: 0.7
9+
#==========================================
10+
if [ -z "$1" ]; then
11+
echo "Missing script argument, Usage: ./q run.sh"
12+
elif [ ! -f "$1" ]; then
13+
echo "File $1 does not exist"
14+
else
15+
echo "Job has been submitted to Intel(R) DevCloud and will execute soon."
16+
echo ""
17+
echo " If you do not see result in 60 seconds, please restart the Jupyter kernel:"
18+
echo " Kernel -> 'Restart Kernel and Clear All Outputs...' and then try again"
19+
echo ""
20+
script=$1
21+
# Remove old output files
22+
rm *.sh.* > /dev/null 2>&1
23+
# Submit job using qsub
24+
qsub_id=`qsub -l nodes=1:gpu:ppn=2 -d . $script`
25+
job_id="$(cut -d'.' -f1 <<<"$qsub_id")"
26+
# Print qstat output
27+
qstat
28+
# Wait for output file to be generated and display
29+
echo ""
30+
echo -ne "Waiting for Output "
31+
until [ -f $script.o$job_id ]; do
32+
sleep 1
33+
echo -ne ""
34+
((timeout++))
35+
# Timeout if no output file generated within 60 seconds
36+
if [ $timeout == 60 ]; then
37+
echo ""
38+
echo ""
39+
echo "TimeOut 60 seconds: Job is still queued for execution, check for output file later ($script.o$job_id)"
40+
echo ""
41+
break
42+
fi
43+
done
44+
# Print output and error file content if exist
45+
if [ -n "$(find -name '*.sh.o'$job_id)" ]; then
46+
echo " Done⬇"
47+
cat $script.o$job_id
48+
cat $script.e$job_id
49+
echo "Job Completed in $timeout seconds."
50+
rm *.sh.*$job_id > /dev/null 2>&1
51+
fi
52+
fi
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
source /opt/intel/oneapi/setvars.sh > /dev/null 2>&1
3+
/bin/echo "##" $(whoami) is compiling AI Essentials Module 0 -- DPPY Prerequisites - 2 of 5 hello_world.py
4+
python src/hello_world.py

0 commit comments

Comments
 (0)