You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `Modin* Getting Started` sample demonstrates how to use distributed Pandas using the Modin package.
3
+
The `Modin Getting Started` sample demonstrates how to use distributed Pandas using the Modin package.
4
4
5
5
| Area | Description
6
6
| :--- | :---
7
7
| Category | Getting Started
8
-
| What you will learn | Basic Modin* programming model for Intel processors
8
+
| What you will learn | Basic Modin programming model for Intel processors
9
9
| Time to complete | 5 to 8 minutes
10
10
11
11
## Purpose
@@ -20,92 +20,131 @@ In this sample, you will run Modin-accelerated Pandas functions and note the per
20
20
| :--- | :---
21
21
| OS | Ubuntu* 18.04 (or newer)
22
22
| Hardware | Intel® Atom® processors <br> Intel® Core™ processor family <br> Intel® Xeon® processor family <br> Intel® Xeon® Scalable Performance processor family
23
-
| Software | Modin
23
+
| Software | Modin
24
+
> **Note**: AI and Analytics samples are validated on AI Tools Offline Installer. For the full list of validated platforms refer to [Platform Validation](https://github.com/oneapi-src/oneAPI-samples/tree/master?tab=readme-ov-file#platform-validation).
24
25
25
26
## Key Implementation Details
26
27
27
28
This get started sample code is implemented for CPU using the Python language. The example assumes you have Pandas and Modin installed inside a conda environment.
28
29
29
30
## Environment Setup
31
+
You will need to download and install the following toolkits, tools, and components to use the sample.
32
+
33
+
**1. Get AI Tools**
34
+
35
+
Required AI Tools: Modin
36
+
37
+
If you have not already, select and install these Tools via [AI Tools Selector](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-tools-selector.html). AI and Analytics samples are validated on AI Tools Offline Installer. It is recommended to select Offline Installer option in AI Tools Selector.
38
+
39
+
>**Note**: If Docker option is chosen in AI Tools Selector, refer to [Working with Preset Containers](https://github.com/intel/ai-containers/tree/main/preset) to learn how to run the docker and samples.
40
+
41
+
**2. (Offline Installer) Activate the AI Tools bundle base environment**
42
+
<!-- this step is from AI Tools GSG, please don't modify unless GSG is updated -->
43
+
If the default path is used during the installation of AI Tools:
cd oneAPI-samples/AI-and-Analytics/Getting-Started-Samples/Modin_GettingStarted
64
+
```
65
+
66
+
**5. Install dependencies**
67
+
<!-- It is required to have requirement.txt file in sample dir. It should list additional libraries, such as matplotlib, ipykernel etc. -->
68
+
>**Note**: Before running the following commands, make sure your Conda/Python environment with AI Tools installed is activated
69
+
70
+
```
71
+
pip install -r requirements.txt
72
+
pip install notebook
73
+
```
74
+
For Jupyter Notebook, refer to [Installing Jupyter](https://jupyter.org/install) for detailed installation instructions.
75
+
76
+
## Run the Sample
77
+
>**Note**: Before running the sample, make sure [Environment Setup](https://github.com/oneapi-src/oneAPI-samples/tree/master/AI-and-Analytics/Getting-Started-Samples/INC-Quantization-Sample-for-PyTorch#environment-setup) is completed.
78
+
79
+
Go to the section which corresponds to the installation method chosen in [AI Tools Selector](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-tools-selector.html) to see relevant instructions:
<!-- add other flags to jupyter notebook command if needed, such as port 8888 or allow-root -->
130
+
```
131
+
jupyter notebook --ip=0.0.0.0
132
+
```
133
+
**3. Follow the instructions to open the URL with the token in your browser**
134
+
135
+
**4. Select the Notebook**
136
+
<!-- add sample file name -->
137
+
```
138
+
Modin_GettingStarted.ipynb
139
+
```
140
+
**5. Change the kernel to `<your-env-name>`**
141
+
<!-- leave <your-env-name> as a placeholder as user could choose any name for the env -->
142
+
143
+
**6. Run every cell in the Notebook in sequence**
144
+
145
+
### Docker
146
+
AI Tools Docker images already have Get Started samples pre-installed. Refer to [Working with Preset Containers](https://github.com/intel/ai-containers/tree/main/preset) to learn how to run the docker and samples.
30
147
31
-
1. Install Modin in a new conda environment.
32
-
33
-
>**Note:** replace python=3.x with your own Python version
34
-
```
35
-
conda create -n modin python=3.x -y
36
-
conda activate modin
37
-
conda install modin-all -c conda-forge -y
38
-
```
39
-
40
-
2. Install Matplotlib.
41
-
```
42
-
conda install -c conda-forge matplotlib -y
43
-
```
44
-
45
-
3. Install Jupyter Notebook.
46
-
```
47
-
conda install jupyter nb_conda_kernels -y
48
-
```
49
-
50
-
4. Create a new kernel for Jupyter Notebook based on your activated conda environment. (This step is optional if you plan to open the Notebook on your local server.)
You can run the Jupyter notebook with the sample code on your local server or download the sample code from the notebook as a Python file and run it locally.
58
-
59
-
### Run the Sample in Visual Studio Code* (Optional)
60
-
61
-
You can use Visual Studio Code (VS Code) extensions to set your environment, create launch configurations, and browse and download samples.
62
-
63
-
The basic steps to build and run a sample using VS Code include:
64
-
65
-
1. Download a sample using the extension **Code Sample Browser for Intel Software Developer Tools**.
66
-
2. Configure the oneAPI environment with the extension **Environment Configurator for Intel Software Developer Tools**.
67
-
3. Open a Terminal in VS Code by clicking **Terminal** > **New Terminal**.
68
-
4. Run the sample in the VS Code terminal using the instructions below.
69
-
70
-
On Linux, you can debug your GPU application with GDB for Intel® oneAPI toolkits using the **Generate Launch Configurations** extension.
71
-
72
-
To learn more about the extensions, see
73
-
[Using Visual Studio Code with Intel® oneAPI Toolkits](https://software.intel.com/content/www/us/en/develop/documentation/using-vs-code-with-intel-oneapi/top.html).
74
-
75
-
76
-
### In Jupyter Notebook
77
-
78
-
1. Activate the conda environment.
79
-
```
80
-
conda activate aikit-modin
81
-
```
82
-
83
-
2. Start the Jupyter Notebook server.
84
-
```
85
-
jupyter notebook
86
-
```
87
-
88
-
3. Locate and open the Notebook.
89
-
```
90
-
Modin_GettingStarted.ipynb
91
-
```
92
-
93
-
4. Click the **Run** button to move through the cells in sequence.
94
-
95
-
### Run the Python Script Locally
96
-
97
-
1. Convert ``Modin_GettingStarted.ipynb`` to a Python file. There are two options.
98
-
99
-
1. Open the notebook and download the script as Python file: **File > Download as > Python (py)**.
100
-
101
-
2. Convert the notebook file to a Python script using commands similar to the following.
Third party program Licenses can be found here: [third-party-programs.txt](https://github.com/oneapi-src/oneAPI-samples/blob/master/third-party-programs.txt).
0 commit comments