Skip to content

Commit 3ffe433

Browse files
committed
Merge branch 'master' of github.com:ECP-CANDLE/Benchmarks
2 parents e3add56 + 6e7c844 commit 3ffe433

File tree

4 files changed

+87
-1
lines changed

4 files changed

+87
-1
lines changed
File renamed without changes.

Pilot3/P3B2/data.pkl.tgz

-7.43 MB
Binary file not shown.

Pilot3/P3B2/keras_p3b2_baseline.py renamed to Pilot3/P3B2/p3b2_baseline_keras2.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,28 @@ def char_rnn(
271271
else:
272272
verbose = 0
273273

274+
## Read files
275+
file_path = os.path.dirname(os.path.realpath(__file__))
276+
print file_path
277+
lib_path = os.path.abspath(os.path.join(file_path, '..', '..', 'common'))
278+
sys.path.append(lib_path)
279+
280+
from data_utils import get_file
281+
origin = 'http://ftp.mcs.anl.gov/pub/candle/public/benchmarks/P3B2/P3B2_data.tgz'
282+
data_loc = get_file('P3B2_data.tgz', origin, untar=True, md5_hash=None, cache_subdir='P3B2')
283+
284+
print 'Data downloaded and stored at: ' + data_loc
285+
data_path = os.path.dirname(data_loc)
286+
print data_path
287+
274288
char_rnn(
275289
rnn_size= args.rnn_size,
276290
n_layers= args.n_layers,
277291
learning_rate= args.learning_rate,
278292
dropout= args.dropout,
279293
recurrent_dropout= args.recurrent_dropout,
280294
n_epochs= args.n_epochs,
281-
data_train= args.train_data,
295+
data_train= data_path+'/data.pkl',
282296
verbose= args.verbose,
283297
savedir= args.output_dir,
284298
do_sample= args.do_sample,

README.setup.linux

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Set up your python environment
2+
# ------------------------------
3+
4+
# Download the Anaconda installer
5+
curl -o Anaconda2-4.3.1-Linux-x86_64.sh https://repo.continuum.io/archive/Anaconda2-4.3.1-Linux-x86_64.sh
6+
7+
# Make the installer executable
8+
chmod u+x ./Anaconda2-4.3.1-Linux-x86_64.sh
9+
10+
# Run the installer, accepting the defaults.
11+
./Anaconda2-4.3.1-Linux-x86_64.sh
12+
13+
# Add anaconda2/bin to your path (assumes default install location)
14+
export PATH=$HOME/anaconda2/bin:$PATH
15+
16+
# Install additonal modules not shipped with Anaconda
17+
conda install -c conda-forge tensorflow
18+
conda install -c anaconda hdf5=1.8.17
19+
pip install git+git://github.com/Theano/Theano.git
20+
pip install git+git://github.com/fchollet/keras.git
21+
22+
23+
# Set up special environment for Pilot2 benchmars using keras version 1
24+
# This will go away when Pilot2 benchmarks are upgraded to keras version 2
25+
conda create --name keras1
26+
source activate
27+
conda install opencv
28+
conda install -c conda-forge keras=1
29+
conda install -c conda-forge tensorflow
30+
conda install matplotlib
31+
conda install PIL
32+
conda install tqdm
33+
source deactivate keras1
34+
35+
# Download the source files for the tutorial
36+
git clone https://github.com/ECP-Candle/benchmarks
37+
38+
# Run the Pilot1 benchmark
39+
pushd benchmarks/Pilot1/P1B1/
40+
python p1b1_baseline_keras2.py
41+
popd
42+
43+
pushd benchmarks/Pilot1/P1B2/
44+
python p1b2_baseline_keras2.py
45+
popd
46+
47+
pushd benchmarks/Pilot1/P1B3/
48+
python p1b3_baseline_keras2.py
49+
popd
50+
51+
# Run the Pilot2 benchmarks
52+
source activate keras1
53+
54+
pushd benchmarks/Pilot2/P2B1/
55+
python p2b1_baseline_keras1.py
56+
popd
57+
58+
pushd benchmarks/Pilot2/P2B2/
59+
python p2b2_baseline_keras1.py
60+
popd
61+
62+
source deactivate keras1
63+
64+
# Run the Pilot3 benchmarks
65+
pushd benchmarks/Pilot3/P3B1/
66+
python p3b1_baseline_keras2.py
67+
popd
68+
69+
pushd benchmarks/Pilot3/P3B2/
70+
python p3b2_baseline_keras2.py
71+
popd
72+

0 commit comments

Comments
 (0)