Skip to content

Commit 19f2f21

Browse files
authored
Moved examples into framework-specific subfolders (horovod#2329)
Signed-off-by: Travis Addair <[email protected]>
1 parent 2600b6f commit 19f2f21

Some content is hidden

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

48 files changed

+182
-183
lines changed

.buildkite/gen-pipeline.sh

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -146,29 +146,29 @@ run_mpi_integration() {
146146
if [[ ${test} != *"tf2_"* ]] && [[ ${test} != *"tfhead"* ]]; then
147147
run_test "${test}" "${queue}" \
148148
":tensorflow: Test TensorFlow MNIST (${test})" \
149-
"bash -c \"${oneccl_env} \\\$(cat /mpirun_command) python /horovod/examples/tensorflow_mnist.py\""
149+
"bash -c \"${oneccl_env} \\\$(cat /mpirun_command) python /horovod/examples/tensorflow/tensorflow_mnist.py\""
150150

151151
run_test "${test}" "${queue}" \
152152
":tensorflow: Test TensorFlow Eager MNIST (${test})" \
153-
"bash -c \"${oneccl_env} \\\$(cat /mpirun_command) python /horovod/examples/tensorflow_mnist_eager.py\""
153+
"bash -c \"${oneccl_env} \\\$(cat /mpirun_command) python /horovod/examples/tensorflow/tensorflow_mnist_eager.py\""
154154

155155
run_test "${test}" "${queue}" \
156156
":tensorflow: Test Keras MNIST (${test})" \
157-
"bash -c \"${oneccl_env} \\\$(cat /mpirun_command) python /horovod/examples/keras_mnist_advanced.py\""
157+
"bash -c \"${oneccl_env} \\\$(cat /mpirun_command) python /horovod/examples/keras/keras_mnist_advanced.py\""
158158

159159
run_test "${test}" "${queue}" \
160160
":fire: Test PyTorch MNIST (${test})" \
161-
"bash -c \"${oneccl_env} \\\$(cat /mpirun_command) python /horovod/examples/pytorch_mnist.py\""
161+
"bash -c \"${oneccl_env} \\\$(cat /mpirun_command) python /horovod/examples/pytorch/pytorch_mnist.py\""
162162
fi
163163

164164
if [[ ${test} == *"mxnet2_"* ]] || [[ ${test} == *"mxnethead"* ]]; then
165165
run_test "${test}" "${queue}" \
166166
":muscle: Test MXNet2 MNIST (${test})" \
167-
"bash -c \"${oneccl_env} OMP_NUM_THREADS=1 \\\$(cat /mpirun_command) python /horovod/examples/mxnet2_mnist.py\""
167+
"bash -c \"${oneccl_env} OMP_NUM_THREADS=1 \\\$(cat /mpirun_command) python /horovod/examples/mxnet/mxnet2_mnist.py\""
168168
else
169169
run_test "${test}" "${queue}" \
170170
":muscle: Test MXNet MNIST (${test})" \
171-
"bash -c \"${oneccl_env} OMP_NUM_THREADS=1 \\\$(cat /mpirun_command) python /horovod/examples/mxnet_mnist.py\""
171+
"bash -c \"${oneccl_env} OMP_NUM_THREADS=1 \\\$(cat /mpirun_command) python /horovod/examples/mxnet/mxnet_mnist.py\""
172172
fi
173173

174174
# tests that should be executed only with the latest release since they don't test
@@ -181,22 +181,22 @@ run_mpi_integration() {
181181
if [[ ${test} == *"openmpi"* ]]; then
182182
run_test "${test}" "${queue}" \
183183
":terminal: Test Horovodrun (${test})" \
184-
"horovodrun -np 2 -H localhost:2 python /horovod/examples/tensorflow_mnist.py"
184+
"horovodrun -np 2 -H localhost:2 python /horovod/examples/tensorflow/tensorflow_mnist.py"
185185
run_test "${test}" "${queue}" \
186186
":terminal: Test Horovodrun (${test})" \
187-
"bash -c \"echo 'localhost slots=2' > hostfile && horovodrun -np 2 -hostfile hostfile python /horovod/examples/mxnet_mnist.py\""
187+
"bash -c \"echo 'localhost slots=2' > hostfile && horovodrun -np 2 -hostfile hostfile python /horovod/examples/mxnet/mxnet_mnist.py\""
188188
fi
189189
fi
190190

191191
# TensorFlow 2.0 tests
192192
if [[ ${test} == *"tf2_"* ]] || [[ ${test} == *"tfhead"* ]]; then
193193
run_test "${test}" "${queue}" \
194194
":tensorflow: Test TensorFlow 2.0 MNIST (${test})" \
195-
"bash -c \"\\\$(cat /mpirun_command) python /horovod/examples/tensorflow2_mnist.py\""
195+
"bash -c \"\\\$(cat /mpirun_command) python /horovod/examples/tensorflow2/tensorflow2_mnist.py\""
196196

197197
run_test "${test}" "${queue}" \
198198
":tensorflow: Test TensorFlow 2.0 Keras MNIST (${test})" \
199-
"bash -c \"\\\$(cat /mpirun_command) python /horovod/examples/tensorflow2_keras_mnist.py\""
199+
"bash -c \"\\\$(cat /mpirun_command) python /horovod/examples/tensorflow2/tensorflow2_keras_mnist.py\""
200200
fi
201201
}
202202

@@ -250,33 +250,33 @@ run_gloo_integration() {
250250
if [[ ${test} == *"tf2_"* ]] || [[ ${test} == *"tfhead"* ]]; then
251251
run_test "${test}" "${queue}" \
252252
":tensorflow: Test TensorFlow 2.0 MNIST (${test})" \
253-
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/tensorflow2_mnist.py"
253+
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/tensorflow2/tensorflow2_mnist.py"
254254

255255
run_test "${test}" "${queue}" \
256256
":tensorflow: Test TensorFlow 2.0 Keras MNIST (${test})" \
257-
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/tensorflow2_keras_mnist.py"
257+
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/tensorflow2/tensorflow2_keras_mnist.py"
258258
else
259259
run_test "${test}" "${queue}" \
260260
":tensorflow: Test TensorFlow MNIST (${test})" \
261-
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/tensorflow_mnist.py"
261+
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/tensorflow/tensorflow_mnist.py"
262262

263263
run_test "${test}" "${queue}" \
264264
":tensorflow: Test Keras MNIST (${test})" \
265-
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/keras_mnist_advanced.py"
265+
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/keras/keras_mnist_advanced.py"
266266
fi
267267

268268
run_test "${test}" "${queue}" \
269269
":fire: Test PyTorch MNIST (${test})" \
270-
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/pytorch_mnist.py"
270+
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/pytorch/pytorch_mnist.py"
271271

272272
if [[ ${test} == *"mxnet2_"* ]] || [[ ${test} == *"mxnethead"* ]]; then
273273
run_test "${test}" "${queue}" \
274274
":muscle: Test MXNet2 MNIST (${test})" \
275-
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/mxnet2_mnist.py"
275+
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/mxnet/mxnet2_mnist.py"
276276
else
277277
run_test "${test}" "${queue}" \
278278
":muscle: Test MXNet MNIST (${test})" \
279-
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/mxnet_mnist.py"
279+
"horovodrun -np 2 -H localhost:2 --gloo python /horovod/examples/mxnet/mxnet_mnist.py"
280280
fi
281281

282282
# Elastic
@@ -320,15 +320,15 @@ run_spark_integration() {
320320
if [[ ${test} != *"tf2"* && ${test} != *"tfhead"* ]]; then
321321
run_test "${test}" "${queue}" \
322322
":spark: Spark Keras Rossmann Run (${test})" \
323-
"bash -c \"OMP_NUM_THREADS=1 python /horovod/examples/keras_spark_rossmann_run.py --num-proc 2 --data-dir file:///data --epochs 3 --sample-rate 0.01\""
323+
"bash -c \"OMP_NUM_THREADS=1 python /horovod/examples/spark/keras/keras_spark_rossmann_run.py --num-proc 2 --data-dir file:///data --epochs 3 --sample-rate 0.01\""
324324

325325
run_test "${test}" "${queue}" \
326326
":spark: Spark Keras Rossmann Estimator (${test})" \
327-
"bash -c \"OMP_NUM_THREADS=1 python /horovod/examples/keras_spark_rossmann_estimator.py --num-proc 2 --work-dir /work --data-dir file:///data --epochs 3 --sample-rate 0.01\""
327+
"bash -c \"OMP_NUM_THREADS=1 python /horovod/examples/spark/keras/keras_spark_rossmann_estimator.py --num-proc 2 --work-dir /work --data-dir file:///data --epochs 3 --sample-rate 0.01\""
328328

329329
run_test "${test}" "${queue}" \
330330
":spark: Spark Keras MNIST (${test})" \
331-
"bash -c \"OMP_NUM_THREADS=1 python /horovod/examples/keras_spark_mnist.py --num-proc 2 --work-dir /work --data-dir /data --epochs 3\""
331+
"bash -c \"OMP_NUM_THREADS=1 python /horovod/examples/spark/keras/keras_spark_mnist.py --num-proc 2 --work-dir /work --data-dir /data --epochs 3\""
332332

333333
if [[ ${queue} != *gpu* ]]; then
334334
run_test "${test}" "${queue}" \
@@ -339,7 +339,7 @@ run_spark_integration() {
339339

340340
run_test "${test}" "${queue}" \
341341
":spark: Spark Torch MNIST (${test})" \
342-
"bash -c \"OMP_NUM_THREADS=1 python /horovod/examples/pytorch_spark_mnist.py --num-proc 2 --work-dir /work --data-dir /data --epochs 3\""
342+
"bash -c \"OMP_NUM_THREADS=1 python /horovod/examples/spark/pytorch/pytorch_spark_mnist.py --num-proc 2 --work-dir /work --data-dir /data --epochs 3\""
343343
fi
344344
}
345345

@@ -353,21 +353,21 @@ run_single_integration() {
353353
if [[ ${test} != *"tf2_"* ]] && [[ ${test} != *"tfhead"* ]]; then
354354
run_test "${test}" "${queue}" \
355355
":tensorflow: Single Keras MNIST (${test})" \
356-
"bash -c \"${oneccl_env} python /horovod/examples/keras_mnist_advanced.py --epochs 3 --batch-size 64\""
356+
"bash -c \"${oneccl_env} python /horovod/examples/keras/keras_mnist_advanced.py --epochs 3 --batch-size 64\""
357357
fi
358358

359359
run_test "${test}" "${queue}" \
360360
":fire: Single PyTorch MNIST (${test})" \
361-
"bash -c \"${oneccl_env} python /horovod/examples/pytorch_mnist.py --epochs 3\""
361+
"bash -c \"${oneccl_env} python /horovod/examples/pytorch/pytorch_mnist.py --epochs 3\""
362362

363363
if [[ ${test} == *"mxnet2_"* ]] || [[ ${test} == *"mxnethead"* ]]; then
364364
run_test "${test}" "${queue}" \
365365
":muscle: Single MXNet2 MNIST (${test})" \
366-
"bash -c \"${oneccl_env} python /horovod/examples/mxnet2_mnist.py --epochs 3\""
366+
"bash -c \"${oneccl_env} python /horovod/examples/mxnet/mxnet2_mnist.py --epochs 3\""
367367
else
368368
run_test "${test}" "${queue}" \
369369
":muscle: Single MXNet MNIST (${test})" \
370-
"bash -c \"${oneccl_env} python /horovod/examples/mxnet_mnist.py --epochs 3\""
370+
"bash -c \"${oneccl_env} python /horovod/examples/mxnet/mxnet_mnist.py --epochs 3\""
371371
fi
372372
}
373373

.github/workflows/examples-keras-spark3-rossmann.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ jobs:
1111
- name: Checkout
1212
uses: actions/checkout@v1
1313

14-
- name: Diffing examples/keras_spark_rossmann_run.py with examples/keras_spark3_rossmann.py
14+
- name: Diffing examples/spark/keras/keras_spark_rossmann_run.py with examples/spark/keras/keras_spark3_rossmann.py
1515
run: |
16-
patch --quiet -p0 examples/keras_spark_rossmann_run.py examples/keras_spark3_rossmann.py.patch -o examples/keras_spark3_rossmann.py.from-keras_spark_rossmann_run
17-
if ! diff -q examples/keras_spark3_rossmann.py.from-keras_spark_rossmann_run --label examples/keras_spark_rossmann_run.py examples/keras_spark3_rossmann.py
16+
patch --quiet -p0 examples/spark/keras/keras_spark_rossmann_run.py examples/spark/keras/keras_spark3_rossmann.py.patch -o examples/spark/keras/keras_spark3_rossmann.py.from-keras_spark_rossmann_run
17+
if ! diff -q examples/spark/keras/keras_spark3_rossmann.py.from-keras_spark_rossmann_run --label examples/spark/keras/keras_spark_rossmann_run.py examples/spark/keras/keras_spark3_rossmann.py
1818
then
1919
echo
2020
echo "Unexpected differences are:"
21-
diff examples/keras_spark3_rossmann.py.from-keras_spark_rossmann_run --label examples/keras_spark_rossmann_run.py examples/keras_spark3_rossmann.py || true
21+
diff examples/spark/keras/keras_spark3_rossmann.py.from-keras_spark_rossmann_run --label examples/spark/keras/keras_spark_rossmann_run.py examples/spark/keras/keras_spark3_rossmann.py || true
2222
2323
echo
24-
echo "Use the following as examples/keras_spark3_rossmann.py.patch to accept those changes:"
25-
diff examples/keras_spark_rossmann_run.py examples/keras_spark3_rossmann.py || true
24+
echo "Use the following as examples/spark/keras/keras_spark3_rossmann.py.patch to accept those changes:"
25+
diff examples/spark/keras/keras_spark_rossmann_run.py examples/spark/keras/keras_spark3_rossmann.py || true
2626
2727
false
2828
fi

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ docs/_build
1414
env
1515
venv/
1616

17-
examples/checkpoint*
17+
examples/**/checkpoint*
1818

19-
examples/checkpoints/
2019
horovod/tensorflow/mpi_lib.so
2120
horovod/torch/test_cuda/
2221

Dockerfile.test.cpu

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -182,43 +182,43 @@ RUN mkdir -p /data && wget --progress=dot:mega https://horovod-datasets.s3.amazo
182182

183183
# Hack for compatibility of MNIST example with TensorFlow 1.1.0.
184184
RUN if [[ ${TENSORFLOW_PACKAGE} == "tensorflow==1.1.0" ]]; then \
185-
sed -i "s/from tensorflow import keras/from tensorflow.contrib import keras/" /horovod/examples/tensorflow_mnist.py; \
185+
sed -i "s/from tensorflow import keras/from tensorflow.contrib import keras/" /horovod/examples/tensorflow/tensorflow_mnist.py; \
186186
fi
187187

188188
# Hack TensorFlow MNIST example to be smaller.
189-
RUN sed -i "s/last_step=20000/last_step=100/" /horovod/examples/tensorflow_mnist.py
189+
RUN sed -i "s/last_step=20000/last_step=100/" /horovod/examples/tensorflow/tensorflow_mnist.py
190190

191191
# Hack TensorFlow Eager MNIST example to be smaller.
192-
RUN sed -i "s/dataset.take(20000/dataset.take(100/" /horovod/examples/tensorflow_mnist_eager.py
192+
RUN sed -i "s/dataset.take(20000/dataset.take(100/" /horovod/examples/tensorflow/tensorflow_mnist_eager.py
193193

194194
# Hack TensorFlow 2.0 example to be smaller.
195-
RUN sed -i "s/dataset.take(10000/dataset.take(100/" /horovod/examples/tensorflow2_mnist.py
195+
RUN sed -i "s/dataset.take(10000/dataset.take(100/" /horovod/examples/tensorflow2/tensorflow2_mnist.py
196196

197197
# Hack Keras MNIST advanced example to be smaller.
198-
RUN sed -i "s/'--epochs', type=int, default=24,/'--epochs', type=int, default=9,/" /horovod/examples/keras_mnist_advanced.py
199-
RUN sed -i "s/model.add(Conv2D(32, kernel_size=(3, 3),/model.add(Conv2D(1, kernel_size=(3, 3),/" /horovod/examples/keras_mnist_advanced.py
200-
RUN sed -i "s/model.add(Conv2D(64, (3, 3), activation='relu'))//" /horovod/examples/keras_mnist_advanced.py
198+
RUN sed -i "s/'--epochs', type=int, default=24,/'--epochs', type=int, default=9,/" /horovod/examples/keras/keras_mnist_advanced.py
199+
RUN sed -i "s/model.add(Conv2D(32, kernel_size=(3, 3),/model.add(Conv2D(1, kernel_size=(3, 3),/" /horovod/examples/keras/keras_mnist_advanced.py
200+
RUN sed -i "s/model.add(Conv2D(64, (3, 3), activation='relu'))//" /horovod/examples/keras/keras_mnist_advanced.py
201201

202202
# Hack TensorFlow 2.0 Keras MNIST advanced example to be smaller.
203-
RUN sed -i "s/epochs = .*/epochs = 9/" /horovod/examples/tensorflow2_keras_mnist.py
204-
RUN sed -i "s/tf.keras.layers.Conv2D(32, \\[3, 3\\],/tf.keras.layers.Conv2D(1, [3, 3],/" /horovod/examples/tensorflow2_keras_mnist.py
205-
RUN sed -i "s/tf.keras.layers.Conv2D(64, \\[3, 3\\], activation='relu')),//" /horovod/examples/tensorflow2_keras_mnist.py
203+
RUN sed -i "s/epochs = .*/epochs = 9/" /horovod/examples/tensorflow2/tensorflow2_keras_mnist.py
204+
RUN sed -i "s/tf.keras.layers.Conv2D(32, \\[3, 3\\],/tf.keras.layers.Conv2D(1, [3, 3],/" /horovod/examples/tensorflow2/tensorflow2_keras_mnist.py
205+
RUN sed -i "s/tf.keras.layers.Conv2D(64, \\[3, 3\\], activation='relu')),//" /horovod/examples/tensorflow2/tensorflow2_keras_mnist.py
206206

207207
# Hack PyTorch MNIST example to be smaller.
208-
RUN sed -i "s/'--epochs', type=int, default=10,/'--epochs', type=int, default=2,/" /horovod/examples/pytorch_mnist.py
209-
RUN sed -i "s/self.fc1 = nn.Linear(320, 50)/self.fc1 = nn.Linear(784, 50)/" /horovod/examples/pytorch_mnist.py
210-
RUN sed -i "s/x = F.relu(F.max_pool2d(self.conv1(x), 2))//" /horovod/examples/pytorch_mnist.py
211-
RUN sed -i "s/x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))//" /horovod/examples/pytorch_mnist.py
212-
RUN sed -i "s/x = x.view(-1, 320)/x = x.view(-1, 784)/" /horovod/examples/pytorch_mnist.py
208+
RUN sed -i "s/'--epochs', type=int, default=10,/'--epochs', type=int, default=2,/" /horovod/examples/pytorch/pytorch_mnist.py
209+
RUN sed -i "s/self.fc1 = nn.Linear(320, 50)/self.fc1 = nn.Linear(784, 50)/" /horovod/examples/pytorch/pytorch_mnist.py
210+
RUN sed -i "s/x = F.relu(F.max_pool2d(self.conv1(x), 2))//" /horovod/examples/pytorch/pytorch_mnist.py
211+
RUN sed -i "s/x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))//" /horovod/examples/pytorch/pytorch_mnist.py
212+
RUN sed -i "s/x = x.view(-1, 320)/x = x.view(-1, 784)/" /horovod/examples/pytorch/pytorch_mnist.py
213213

214214
# Prefetch Spark Rossmann dataset.
215215
RUN mkdir -p /work
216216
RUN mkdir -p /data && wget --progress=dot:mega https://horovod-datasets.s3.amazonaws.com/rossmann.tgz -O - | tar -xzC /data
217217

218218
# Hack Keras Spark Rossmann Run example to be smaller.
219-
RUN sed -i "s/x = Dense(1000,/x = Dense(100,/g" /horovod/examples/keras_spark_rossmann_run.py
220-
RUN sed -i "s/x = Dense(500,/x = Dense(50,/g" /horovod/examples/keras_spark_rossmann_run.py
219+
RUN sed -i "s/x = Dense(1000,/x = Dense(100,/g" /horovod/examples/spark/keras/keras_spark_rossmann_run.py
220+
RUN sed -i "s/x = Dense(500,/x = Dense(50,/g" /horovod/examples/spark/keras/keras_spark_rossmann_run.py
221221

222222
# Hack Keras Spark Rossmann Estimator example to be smaller.
223-
RUN sed -i "s/x = Dense(1000,/x = Dense(100,/g" /horovod/examples/keras_spark_rossmann_estimator.py
224-
RUN sed -i "s/x = Dense(500,/x = Dense(50,/g" /horovod/examples/keras_spark_rossmann_estimator.py
223+
RUN sed -i "s/x = Dense(1000,/x = Dense(100,/g" /horovod/examples/spark/keras/keras_spark_rossmann_estimator.py
224+
RUN sed -i "s/x = Dense(500,/x = Dense(50,/g" /horovod/examples/spark/keras/keras_spark_rossmann_estimator.py

Dockerfile.test.gpu

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,43 +130,43 @@ RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
130130

131131
# Hack for compatibility of MNIST example with TensorFlow 1.1.0.
132132
RUN if [[ ${TENSORFLOW_PACKAGE} == "tensorflow-gpu==1.1.0" ]]; then \
133-
sed -i "s/from tensorflow import keras/from tensorflow.contrib import keras/" /horovod/examples/tensorflow_mnist.py; \
133+
sed -i "s/from tensorflow import keras/from tensorflow.contrib import keras/" /horovod/examples/tensorflow/tensorflow_mnist.py; \
134134
fi
135135

136136
# Prefetch Spark MNIST dataset.
137137
RUN mkdir -p /work
138138
RUN mkdir -p /data && wget --progress=dot:mega https://horovod-datasets.s3.amazonaws.com/mnist.bz2 -O /data/mnist.bz2
139139

140140
# Hack TensorFlow MNIST example to be smaller.
141-
RUN sed -i "s/last_step=20000/last_step=100/" /horovod/examples/tensorflow_mnist.py
141+
RUN sed -i "s/last_step=20000/last_step=100/" /horovod/examples/tensorflow/tensorflow_mnist.py
142142

143143
# Hack TensorFlow Eager MNIST example to be smaller.
144-
RUN sed -i "s/dataset.take(20000/dataset.take(100/" /horovod/examples/tensorflow_mnist_eager.py
144+
RUN sed -i "s/dataset.take(20000/dataset.take(100/" /horovod/examples/tensorflow/tensorflow_mnist_eager.py
145145

146146
# Hack TensorFlow 2.0 example to be smaller.
147-
RUN sed -i "s/dataset.take(10000/dataset.take(100/" /horovod/examples/tensorflow2_mnist.py
147+
RUN sed -i "s/dataset.take(10000/dataset.take(100/" /horovod/examples/tensorflow2/tensorflow2_mnist.py
148148

149149
# Hack Keras MNIST advanced example to be smaller.
150-
RUN sed -i "s/'--epochs', type=int, default=24,/'--epochs', type=int, default=9,/" /horovod/examples/keras_mnist_advanced.py
150+
RUN sed -i "s/'--epochs', type=int, default=24,/'--epochs', type=int, default=9,/" /horovod/examples/keras/keras_mnist_advanced.py
151151

152152
# Hack TensorFlow 2.0 Keras MNIST advanced example to be smaller.
153-
RUN sed -i "s/epochs = .*/epochs = 9/" /horovod/examples/tensorflow2_keras_mnist.py
153+
RUN sed -i "s/epochs = .*/epochs = 9/" /horovod/examples/tensorflow2/tensorflow2_keras_mnist.py
154154

155155
# Hack PyTorch MNIST example to be smaller.
156-
RUN sed -i "s/'--epochs', type=int, default=10,/'--epochs', type=int, default=2,/" /horovod/examples/pytorch_mnist.py
156+
RUN sed -i "s/'--epochs', type=int, default=10,/'--epochs', type=int, default=2,/" /horovod/examples/pytorch/pytorch_mnist.py
157157

158158

159159
# Prefetch Spark Rossmann dataset.
160160
RUN mkdir -p /work
161161
RUN mkdir -p /data && wget --progress=dot:mega https://horovod-datasets.s3.amazonaws.com/rossmann.tgz -O - | tar -xzC /data
162162

163163
# Hack Keras Spark Rossmann Run example to be smaller.
164-
RUN sed -i "s/x = Dense(1000,/x = Dense(100,/g" /horovod/examples/keras_spark_rossmann_run.py
165-
RUN sed -i "s/x = Dense(500,/x = Dense(50,/g" /horovod/examples/keras_spark_rossmann_run.py
164+
RUN sed -i "s/x = Dense(1000,/x = Dense(100,/g" /horovod/examples/spark/keras/keras_spark_rossmann_run.py
165+
RUN sed -i "s/x = Dense(500,/x = Dense(50,/g" /horovod/examples/spark/keras/keras_spark_rossmann_run.py
166166

167167
# Hack Keras Spark Rossmann Estimator example to be smaller.
168-
RUN sed -i "s/x = Dense(1000,/x = Dense(100,/g" /horovod/examples/keras_spark_rossmann_estimator.py
169-
RUN sed -i "s/x = Dense(500,/x = Dense(50,/g" /horovod/examples/keras_spark_rossmann_estimator.py
168+
RUN sed -i "s/x = Dense(1000,/x = Dense(100,/g" /horovod/examples/spark/keras/keras_spark_rossmann_estimator.py
169+
RUN sed -i "s/x = Dense(500,/x = Dense(50,/g" /horovod/examples/spark/keras/keras_spark_rossmann_estimator.py
170170

171171

172172
# Export HOROVOD_MIXED_INSTALL

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130

131131
The derived work can be found in the files:
132132

133-
- examples/keras_spark_rossmann.py
133+
- examples/spark/keras/keras_spark_rossmann_run.py
134134

135135
elnormous/HTTPRequest
136136
Copyright (c) 2017, Elviss Strazdiņš

0 commit comments

Comments
 (0)