From d028ba3cc3fcb5b8b6208caa047067a3a9adb9e3 Mon Sep 17 00:00:00 2001 From: Fahad Khalid <f.khalid@fz-juelich.de> Date: Wed, 20 Nov 2019 11:22:12 +0100 Subject: [PATCH] Updates corresponding to the renaming of the package to . --- horovod_data_distributed/README.md | 10 +++++----- horovod_data_distributed/mnist_data_distributed.py | 8 ++++---- horovod_data_distributed/submit_job_juwels.sh | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/horovod_data_distributed/README.md b/horovod_data_distributed/README.md index c0934fc..0ee45c7 100644 --- a/horovod_data_distributed/README.md +++ b/horovod_data_distributed/README.md @@ -4,8 +4,8 @@ Please see the main docstring in each program for details. # Notes -The `mnist_data_distributed.py` program requires the [`slns.distribution`]( -https://gitlab.version.fz-juelich.de/hpc4ns/slns_utils#1-slnsdistribution) +The `mnist_data_distributed.py` program requires the [`hpc4ns.distribution`]( +https://gitlab.version.fz-juelich.de/hpc4ns/hpc4ns_utils#1-hpc4nsdistribution) module for distribution of training data filenames across multiple ranks. Please follow the steps below to install the required package. @@ -13,9 +13,9 @@ Please follow the steps below to install the required package. 2. Load the system-wide Python module. * On JURECA and JUWELS: `module load Python/3.6.8` * On JURON: `module load Python/3.6.1` -3. Create a Python virtual environment: `python -m venv venv_dl_slns` -4. Activate the virtual environment: `source activate venv_dl_slns/bin/activate` -5. Install the `slns` package: `python -m pip install git+https://gitlab.version.fz-juelich.de/hpc4ns/slns_utils.git` +3. Create a Python virtual environment: `python -m venv venv_dl_hpc4ns` +4. Activate the virtual environment: `source activate venv_dl_hpc4ns/bin/activate` +5. Install the `hpc4ns` package: `python -m pip install git+https://gitlab.version.fz-juelich.de/hpc4ns/hpc4ns_utils.git` 6. Open the job submission script you intend to use, and make sure the path to the virtual environment is correct Once all the above steps are completed, the job can be submitted. diff --git a/horovod_data_distributed/mnist_data_distributed.py b/horovod_data_distributed/mnist_data_distributed.py index b6add7e..2faa3c9 100644 --- a/horovod_data_distributed/mnist_data_distributed.py +++ b/horovod_data_distributed/mnist_data_distributed.py @@ -22,10 +22,10 @@ import tensorflow as tf import horovod.tensorflow.keras as hvd from tensorflow.python.keras import backend as K -from slns.errors import MpiInitError -from slns.distribution import DataDistributor +from hpc4ns.errors import MpiInitError +from hpc4ns.distribution import DataDistributor -sys.path.insert(0, '../../utils') +sys.path.insert(0, '../utils') from data_utils import DataValidator @@ -93,7 +93,7 @@ def initialize_hvd_and_mpi(): are no conflicts between Horovod and mpi4py communicator initialization. - :exception: slns.errors.MpiInitError is raised in the case + :exception: hpc4ns.errors.MpiInitError is raised in the case of initialization failure. """ diff --git a/horovod_data_distributed/submit_job_juwels.sh b/horovod_data_distributed/submit_job_juwels.sh index 24f50d8..f5d9b6f 100755 --- a/horovod_data_distributed/submit_job_juwels.sh +++ b/horovod_data_distributed/submit_job_juwels.sh @@ -18,7 +18,7 @@ module load TensorFlow/1.13.1-GPU-Python-3.6.8 module load Horovod/0.16.2-GPU-Python-3.6.8 # Source the virtual environment -source activate venv_dl_slns/bin/activate +source activate venv_dl_hpc4ns/bin/activate # Run the program srun python -u mnist_data_distributed.py -- GitLab