Skip to content
Snippets Groups Projects
Commit da8cf076 authored by Fahad Khalid's avatar Fahad Khalid
Browse files

Merge branch 'issue_1' into 'master'

Add table of contents

Closes #1

See merge request khalid1/ml_dl_on_supercomputers!1
parents 35bbe2c1 79622fae
No related branches found
No related tags found
1 merge request!1Add table of contents
...@@ -14,7 +14,30 @@ more of the following frameworks: ...@@ -14,7 +14,30 @@ more of the following frameworks:
above mentioned frameworks. If you are interested in educational resources for beginners, please above mentioned frameworks. If you are interested in educational resources for beginners, please
visit [this](https://gitlab.version.fz-juelich.de/MLDL_FZJ/MLDL_FZJ_Wiki/wikis/Education) page. visit [this](https://gitlab.version.fz-juelich.de/MLDL_FZJ/MLDL_FZJ_Wiki/wikis/Education) page.
### A word regarding the code samples # Table of contents
<!-- TOC -->
1. [A word regarding the code samples](#1-a-word-regarding-the-code-samples)
2. [Changes made to support loading of pre-downloaded datasets](#2-changes-made-to-support-loading-of-pre-downloaded-datasets)
3. [Applying for user accounts on supercomputers](#3-applying-for-user-accounts-on-supercomputers)
* [3.1. JURECA and JUWELS](#31-jureca-and-juwels)
* [3.2. JURON](#32-juron)
4. [Logging on to the supercomputers](#4-logging-on-to-the-supercomputers)
* [4.1. JURECA](#41-jureca)
* [4.2. JURON](#42-juron)
5. [Cloning the repository](#5-cloning-the-repository)
* [5.1. JURECA](#51-jureca)
* [5.2. JURON](#52-juron)
6. [Running a sample](#6-running-a-sample)
* [6.1. JURECA](#61-jureca)
* [6.2. JURON](#62-juron)
7. [Python 2 support](#7-python-2-support)
8. [Distributed training](#8-distributed-training)
9. [Credits](#9-credits)
<!-- /TOC -->
## 1. A word regarding the code samples
Samples for each framework are available in the correspondingly named directory. Each such Samples for each framework are available in the correspondingly named directory. Each such
directory typically contains at least one code sample, which trains a simple artificial neural directory typically contains at least one code sample, which trains a simple artificial neural
...@@ -26,7 +49,7 @@ a `README.md` file contains further information about the contents of the direct ...@@ -26,7 +49,7 @@ a `README.md` file contains further information about the contents of the direct
**Disclaimer:** Neither are the samples intended to serve as examples of optimized code, nor do these **Disclaimer:** Neither are the samples intended to serve as examples of optimized code, nor do these
represent programming best practices. represent programming best practices.
### Changes made to support loading of pre-downloaded datasets ## 2. Changes made to support loading of pre-downloaded datasets
It is worth mentioning that all the code samples were taken from the corresponding framework's It is worth mentioning that all the code samples were taken from the corresponding framework's
official samples/tutorials repository, as practitioners are likely familiar with these (links official samples/tutorials repository, as practitioners are likely familiar with these (links
...@@ -38,17 +61,17 @@ the `datasets` directory included in this repository; specific code changes, at ...@@ -38,17 +61,17 @@ the `datasets` directory included in this repository; specific code changes, at
have been marked by comments prefixed with the `[HPCNS]` tag. For more information see the `README.md` have been marked by comments prefixed with the `[HPCNS]` tag. For more information see the `README.md`
available in the `datasets` directory. available in the `datasets` directory.
## 1. Applying for user accounts on supercomputers ## 3. Applying for user accounts on supercomputers
In case you do not already have an account on your supercomputer of interest, please take a look at the In case you do not already have an account on your supercomputer of interest, please take a look at the
instructions provided in the following sub-sections. instructions provided in the following sub-sections.
### 1.1 JURECA and JUWELS ### 3.1 JURECA and JUWELS
For more information on getting accounts on JURECA and JUWELS, click For more information on getting accounts on JURECA and JUWELS, click
[here](http://www.fz-juelich.de/ias/jsc/EN/Expertise/Supercomputers/ComputingTime/computingTime_node.html). [here](http://www.fz-juelich.de/ias/jsc/EN/Expertise/Supercomputers/ComputingTime/computingTime_node.html).
### 1.2 JURON ### 3.2 JURON
To get a user account on JURON, please follow the steps below: To get a user account on JURON, please follow the steps below:
...@@ -59,9 +82,9 @@ in which please introduce yourself and mention why you need the account. ...@@ -59,9 +82,9 @@ in which please introduce yourself and mention why you need the account.
If your work is related to the Human Brain Project (HBP), please join the `PCP0` and `CPCP0` projects. If your work is related to the Human Brain Project (HBP), please join the `PCP0` and `CPCP0` projects.
Otherwise please join the `PADC` and `CPADC` projects. Otherwise please join the `PADC` and `CPADC` projects.
## 2. Logging on to the supercomputers ## 4. Logging on to the supercomputers
### 2.1 JURECA ### 4.1 JURECA
Following are the steps required to login (more information Following are the steps required to login (more information
[here](http://www.fz-juelich.de/ias/jsc/EN/Expertise/Supercomputers/JURECA/UserInfo/QuickIntroduction.html?nn=1803700)). [here](http://www.fz-juelich.de/ias/jsc/EN/Expertise/Supercomputers/JURECA/UserInfo/QuickIntroduction.html?nn=1803700)).
...@@ -79,7 +102,7 @@ Following are the steps required to login (more information ...@@ -79,7 +102,7 @@ Following are the steps required to login (more information
You should be in your project directory at this point. If you'd like to clone this repository You should be in your project directory at this point. If you'd like to clone this repository
elsewhere, please change to that directory. elsewhere, please change to that directory.
### 2.2 JURON ### 4.2 JURON
Following are the steps required to login. Following are the steps required to login.
...@@ -101,7 +124,7 @@ are shared amongst many users, it is a good idea to create a personal directory ...@@ -101,7 +124,7 @@ are shared amongst many users, it is a good idea to create a personal directory
username) withing the project directory. You can then use your personal directory for all your work, username) withing the project directory. You can then use your personal directory for all your work,
including cloning this tutorial. including cloning this tutorial.
## 3. Cloning the repository ## 5. Cloning the repository
In order to store the datasets within the repository, we use Git LFS. This makes cloning the In order to store the datasets within the repository, we use Git LFS. This makes cloning the
repository a little bit different. Please find below the instructions on how to clone on different repository a little bit different. Please find below the instructions on how to clone on different
...@@ -110,7 +133,7 @@ systems. To learn more about Git LFS, click [here](http://gitlab.pages.jsc.fz-ju ...@@ -110,7 +133,7 @@ systems. To learn more about Git LFS, click [here](http://gitlab.pages.jsc.fz-ju
**Note:** During the cloning process you will most likely be prompted for your username and **Note:** During the cloning process you will most likely be prompted for your username and
password twice; this is as expected. password twice; this is as expected.
### 3.1 JURECA ### 5.1 JURECA
1. Load the Git LFS module: 1. Load the Git LFS module:
...@@ -122,20 +145,20 @@ password twice; this is as expected. ...@@ -122,20 +145,20 @@ password twice; this is as expected.
`git lfs clone https://gitlab.version.fz-juelich.de/khalid1/ml_dl_on_supercomputers.git` `git lfs clone https://gitlab.version.fz-juelich.de/khalid1/ml_dl_on_supercomputers.git`
### 3.2 JURON ### 5.2 JURON
No additional setup is required on JURON. You can simply clone the repository along with the No additional setup is required on JURON. You can simply clone the repository along with the
datasets using the following command: datasets using the following command:
git lfs clone https://gitlab.version.fz-juelich.de/khalid1/ml_dl_on_supercomputers.git git lfs clone https://gitlab.version.fz-juelich.de/khalid1/ml_dl_on_supercomputers.git
## 4. Running a sample ## 6. Running a sample
Let us consider a scenario where you would like to run the `mnist.py` sample available in the `keras` Let us consider a scenario where you would like to run the `mnist.py` sample available in the `keras`
directory. This sample trains a CNN on MNIST using Keras on a single GPU. The following sub-sections list directory. This sample trains a CNN on MNIST using Keras on a single GPU. The following sub-sections list
the steps required for different supercomputers. the steps required for different supercomputers.
### 4.1 JURECA ### 6.1 JURECA
1. Assuming you are in the repository root, change to the keras directory: 1. Assuming you are in the repository root, change to the keras directory:
...@@ -154,7 +177,7 @@ email address). ...@@ -154,7 +177,7 @@ email address).
Output from the job is available in the `error` and `output` files, as specified in the job Output from the job is available in the `error` and `output` files, as specified in the job
configuration. configuration.
### 4.2 JURON ### 6.2 JURON
1. Assuming you are in the repository root, change to the keras directory: 1. Assuming you are in the repository root, change to the keras directory:
...@@ -172,7 +195,7 @@ supported on JURON. For more information on how to use LSF on JURON, use the fol ...@@ -172,7 +195,7 @@ supported on JURON. For more information on how to use LSF on JURON, use the fol
Output from the job is available in the `error` and `output` files, as specified in the job Output from the job is available in the `error` and `output` files, as specified in the job
configuration. configuration.
## 5. Python 2 support ## 7. Python 2 support
All the code samples are compatible with both Python 2 and Python 3. However, not all frameworks on all All the code samples are compatible with both Python 2 and Python 3. However, not all frameworks on all
machines are available for Python 2 (yet); in certain cases these are only available for Python 3. We have machines are available for Python 2 (yet); in certain cases these are only available for Python 3. We have
...@@ -181,7 +204,7 @@ supported, only the job submission script for Python 3 is available. We will try ...@@ -181,7 +204,7 @@ supported, only the job submission script for Python 3 is available. We will try
all frameworks available with Python 2 as well, but this will not be a priority as the official support all frameworks available with Python 2 as well, but this will not be a priority as the official support
for Python 2 will be discontinued in the year 2020. for Python 2 will be discontinued in the year 2020.
## 6. Distributed training ## 8. Distributed training
[Horovod](https://github.com/horovod/horovod) provides a simple and efficient solution for [Horovod](https://github.com/horovod/horovod) provides a simple and efficient solution for
training artificial neural networks on multiple GPUs across multiple nodes in a cluster. It can training artificial neural networks on multiple GPUs across multiple nodes in a cluster. It can
...@@ -202,7 +225,7 @@ via the C/C++ interface). The `mnist_cmd` sample in the `caffe` directory contai ...@@ -202,7 +225,7 @@ via the C/C++ interface). The `mnist_cmd` sample in the `caffe` directory contai
script that can be used to train the model on multiple GPUs. Please see the script that can be used to train the model on multiple GPUs. Please see the
directory-local `README.md` for further information. directory-local `README.md` for further information.
## Credits ## 9. Credits
* **Created by:** Fahad Khalid (SLNS/HPCNS, JSC) * **Created by:** Fahad Khalid (SLNS/HPCNS, JSC)
* **Installation of modules on JURON:** Andreas Herten (HPCNS, JSC) * **Installation of modules on JURON:** Andreas Herten (HPCNS, JSC)
......
...@@ -49,7 +49,7 @@ class DataValidator: ...@@ -49,7 +49,7 @@ class DataValidator:
if not os.path.exists(data_dir): if not os.path.exists(data_dir):
data_dir = os.path.join(os.path.abspath('../../datasets')) data_dir = os.path.join(os.path.abspath('../../datasets'))
print('Using %s as the data directory.' % data_dir) print('Using {} as the data directory.'.format(data_dir))
# Check if the directory exists # Check if the directory exists
assert os.path.exists(data_dir), \ assert os.path.exists(data_dir), \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment