Skip to content

Commit

Permalink
Merge branch 'master' of github.com:aarati-K/one_access
Browse files Browse the repository at this point in the history
  • Loading branch information
aarati-K committed May 14, 2019
2 parents 7c526e0 + 8c51d1f commit 928788a
Show file tree
Hide file tree
Showing 12 changed files with 255 additions and 0 deletions.
Binary file added benchmarks/cifar10/plots/cifar10_measurements.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmarks/cifar10/plots/histogram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions benchmarks/cifar10/plots/plot_measurements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from pathlib import Path
import math
import matplotlib.pyplot as plt
import numpy as np
import pylab

one_access_500 = np.load(Path("../measurements/one_access_500.npy").open('rb'))
one_access_1000 = np.load(
Path("../measurements/one_access_1000.npy").open('rb'))
pt = np.load(Path("../measurements/pytorch.npy").open('rb'))

fig, ax = plt.subplots()
fig.set_figheight(5)
fig.set_figwidth(7)

plt.xticks(fontsize=14)
plt.yticks(fontsize=14)

line, = ax.plot(one_access_500, color='blue', lw=2)
line, = ax.plot(one_access_1000, color='lightblue', lw=2)
line, = ax.plot(pt, color='red', lw=2)
ax.set_yscale('log')
ax.legend([
'One Access with Sample Size 500', 'One Access with Sample Size 1000',
'PyTorch'
],
loc=2,
prop={'size': 14})
ax.set_xlabel('Iterations', fontsize=18)
ax.set_ylabel('Data Loading Time (s)', fontsize=18)

plt.savefig("cifar10_measurements.png")
34 changes: 34 additions & 0 deletions benchmarks/cifar10/plots/plot_sample_creator_benchmark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import matplotlib.pyplot as plt

ss1 = [0.349, 0.306, 0.431, 0.303, 0.18, 0.69, 0.557, 0.681, 0.424, 0.300]
ss10 = [0.742, 0.685, 0.679, 0.676, 0.673, 0.676, 0.551, 0.673, 0.669, 0.670]
ss100 = [0.713, 0.672, 0.668, 0.671, 0.668, 0.680, 0.682, 0.675, 0.673, 0.669]
ss1000 = [0.738, 0.689, 0.704, 0.693, 0.684, 0.683, 0.678, 0.677, 0.700, 0.687]
ss10000 = [
0.765, 0.727, 0.717, 0.740, 0.723, 0.774, 0.720, 0.868, 0.724, 0.771
]

fig, ax = plt.subplots()
fig.set_figheight(5)
fig.set_figwidth(7)

plt.xticks(fontsize=14)
plt.yticks(fontsize=14)

bplot = ax.boxplot(
[ss1, ss10, ss100, ss1000, ss10000],
vert=True, # vertical box alignment
patch_artist=True, # fill with color
labels=[1, 10, 100, 1000, 10000]) # will be used to label x-ticks
ax.set_title('Cifar-10 Sample Creation Times', fontsize=18)

# fill with colors
for patch in bplot['boxes']:
patch.set(facecolor='lightblue')

# adding horizontal grid lines
ax.yaxis.grid(True)
ax.set_xlabel('Sample Size', fontsize=18)
ax.set_ylabel('Sample Creation Time (s)', fontsize=18)

plt.savefig("cifar10_sample_creation.png")
Binary file added benchmarks/coco/plots/coco_measurements.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmarks/coco/plots/coco_sample_creation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions benchmarks/coco/plots/plot_measurements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from pathlib import Path
import math
import matplotlib.pyplot as plt
import numpy as np
import pylab

oa = np.load(Path("../measurements/one_access_400_full_epoch.npy").open('rb'))
pt = np.load(Path("../measurements/pytorch_full_epoch_w1.npy").open('rb'))

fig, ax = plt.subplots()
fig.set_figheight(5)
fig.set_figwidth(7)

plt.xticks(fontsize=14)
plt.yticks(fontsize=14)

line, = ax.plot(oa, color='blue', lw=2)
line, = ax.plot(pt, color='red', lw=2)
ax.set_yscale('log')
ax.legend(['One Access with Sample Size 400', 'PyTorch'],
loc=2,
prop={'size': 14})
ax.set_xlabel('Iterations', fontsize=18)
ax.set_ylabel('Data Loading Time (s)', fontsize=18)
plt.savefig("coco_measurements.png")
34 changes: 34 additions & 0 deletions benchmarks/coco/plots/plot_sample_creator_benchmark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import matplotlib.pyplot as plt

ss1 = [1.12, 1.37, 2.32, 1.31, 2.42, 3.29, 2.92, 0.29, 1.53, 1.08]
ss10 = [7.6, 11.75, 7.53, 12.64, 10.5, 13.93, 8.56, 10.16, 7.23, 13.1]
ss100 = [24.1, 24.96, 24.9, 25.04, 25.07, 25.06, 25.25, 24.1, 22.52, 25.6]
ss1000 = [26.35, 26.56, 26.44, 26.27, 26.31, 26.39, 27.25, 27.18, 26.43, 26.34]
ss10000 = [28.3, 29.56, 29.55, 29.42, 29.09, 29.09, 29.36, 29.34, 29.8, 29.36]

fig, ax = plt.subplots()
fig.set_figheight(5)
fig.set_figwidth(7)

plt.xticks(fontsize=14)
plt.yticks(fontsize=14)

bplot = ax.boxplot(
[ss1, ss10, ss100, ss1000, ss10000],
vert=True, # vertical box alignment
patch_artist=True, # fill with color
labels=[1, 10, 100, 1000, 10000]) # will be used to label x-ticks
ax.set_title('MS COCO Sample Creation Times', fontsize=18)

# fill with colors
colors = ['lightblue', 'lightblue', 'lightblue']

for patch, color in zip(bplot['boxes'], colors):
patch.set_facecolor(color)

# adding horizontal grid lines
ax.yaxis.grid(True)
ax.set_xlabel('Sample Size', fontsize=18)
ax.set_ylabel('Sample Creation Time (s)', fontsize=18)

plt.savefig("sample_creator_benchmark.png")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 130 additions & 0 deletions benchmarks/hogwild/plots/plot_convergence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
from pathlib import Path
import math
import matplotlib.pyplot as plt
import numpy as np
import pylab

oa = [
2.310431718826294, 2.3044593334198, 2.2999351024627686, 2.302645206451416,
2.305140256881714, 2.304278612136841, 2.305345058441162, 2.305643081665039,
2.2953379154205322, 2.2945961952209473, 2.2974445819854736,
2.3022661209106445, 2.291269302368164, 2.290717601776123,
2.2888007164001465, 2.296182632446289, 2.286400556564331,
2.2910146713256836, 2.295991897583008, 2.272655963897705,
2.2934072017669678, 2.274665355682373, 2.2305684089660645,
2.2382869720458984, 2.3204245567321777, 2.342759847640991,
2.2820348739624023, 2.2226617336273193, 2.151423215866089,
2.2459020614624023, 2.2275006771087646, 2.142763137817383,
2.0960915088653564, 2.1954452991485596, 2.103869915008545,
2.0974860191345215, 2.3693454265594482, 2.0779247283935547,
2.248171806335449, 2.091695785522461, 2.1171560287475586,
2.0281434059143066, 1.9547799825668335, 2.0486371517181396,
1.907325267791748, 2.043123245239258, 2.025918483734131,
2.1420865058898926, 1.922833800315857, 2.028428554534912,
2.234170436859131, 1.711983561515808, 1.855607509613037,
2.1356916427612305, 2.058394193649292, 1.8293321132659912,
1.7653907537460327, 1.6710327863693237, 2.120668649673462,
1.977416753768921, 2.01466703414917, 1.7095742225646973,
1.7972968816757202, 1.835667371749878, 1.813649296760559,
1.6506456136703491, 1.8212352991104126, 1.7631133794784546,
2.006159543991089, 1.8940590620040894, 1.77767014503479,
1.8165675401687622, 1.5790164470672607, 1.9957212209701538,
1.8157849311828613, 1.8369755744934082, 1.8062738180160522,
2.02036452293396, 1.53107750415802, 1.464531660079956, 1.9184999465942383,
1.8831769227981567, 1.7480698823928833, 1.7008342742919922,
2.1173808574676514, 1.8246912956237793, 1.6952927112579346,
1.7756145000457764, 1.5981590747833252, 1.7205015420913696,
1.6052865982055664, 1.9077681303024292, 1.741557002067566,
1.4362589120864868, 1.4271641969680786, 1.7727869749069214,
1.6802165508270264, 1.6700048446655273, 1.764768123626709,
1.6664189100265503, 1.7431089878082275, 1.841097116470337,
1.609131097793579, 1.692051649093628, 1.9490209817886353,
1.3016743659973145, 1.6564037799835205, 1.5003793239593506,
1.577265977859497, 1.5513148307800293, 2.015777826309204,
1.7387953996658325, 1.5755693912506104, 1.517099142074585,
1.600704312324524, 1.681156873703003, 1.3915257453918457,
1.8454186916351318, 1.5253746509552002, 1.6675136089324951,
1.904675841331482, 1.3001149892807007, 1.3500734567642212,
1.421111822128296, 1.338475227355957, 1.8976962566375732,
1.4634175300598145, 1.1438446044921875, 1.8094542026519775,
1.421639323234558, 1.6332736015319824, 1.4899511337280273,
1.2700839042663574, 1.6670219898223877, 1.433416724205017,
1.6300684213638306, 1.4137150049209595, 1.7015812397003174,
1.602172613143921, 1.4118467569351196, 1.6460998058319092,
1.5490946769714355, 1.3902286291122437, 1.7114341259002686,
1.493067741394043, 1.5293599367141724, 1.1891926527023315,
1.2002012729644775, 1.4254976511001587, 1.4333221912384033,
1.6626935005187988, 1.3381460905075073, 1.631758213043213,
1.527137279510498, 1.3946272134780884, 1.617354393005371
]
pt = [
2.309093475341797, 2.29903244972229, 2.2979722023010254,
2.3146700859069824, 2.2988228797912598, 2.3095779418945312,
2.315662145614624, 2.291715145111084, 2.2961325645446777,
2.304250955581665, 2.297032356262207, 2.30222749710083, 2.297666072845459,
2.2927210330963135, 2.3093206882476807, 2.299983501434326,
2.2999722957611084, 2.2888784408569336, 2.290457248687744,
2.276545286178589, 2.2864463329315186, 2.2621915340423584,
2.2831177711486816, 2.206403970718384, 2.2706034183502197,
2.3174095153808594, 2.2077319622039795, 2.2165980339050293,
2.135857105255127, 2.130533218383789, 2.046015739440918,
2.1862354278564453, 2.1601943969726562, 1.9698059558868408,
2.119527578353882, 1.9596431255340576, 2.035116672515869,
1.9414715766906738, 2.0950546264648438, 2.1059789657592773,
1.9875943660736084, 2.246439218521118, 1.98484206199646, 2.056269645690918,
1.925750970840454, 2.095628023147583, 2.1306421756744385,
1.8586400747299194, 1.9911742210388184, 2.2050232887268066,
2.0071871280670166, 2.000347137451172, 1.6103558540344238,
2.0377726554870605, 1.9713151454925537, 1.9737203121185303,
1.7756128311157227, 1.776196837425232, 1.886519193649292,
2.053093433380127, 1.9902201890945435, 1.901827335357666,
1.784909963607788, 1.879426121711731, 1.6710565090179443,
1.809483528137207, 1.9051872491836548, 1.8594785928726196,
1.840088129043579, 1.7972636222839355, 1.8046557903289795,
1.7713732719421387, 1.716488003730774, 2.0590882301330566, 1.7366863489151,
1.638418436050415, 1.6430528163909912, 2.031158685684204,
1.8202089071273804, 1.4382100105285645, 1.7852904796600342,
1.8027703762054443, 2.0446808338165283, 1.6792430877685547,
1.5751527547836304, 1.6834783554077148, 2.0464272499084473,
1.575252652168274, 1.4901397228240967, 1.5762988328933716,
1.8482239246368408, 1.7038806676864624, 1.5288643836975098,
1.7010613679885864, 1.7013449668884277, 1.5429691076278687,
1.3439911603927612, 1.7403404712677002, 1.709581732749939,
1.4834586381912231, 1.4511845111846924, 1.5556445121765137,
1.7796345949172974, 1.7114813327789307, 1.5121259689331055,
1.3385242223739624, 1.8766744136810303, 1.7403178215026855,
1.4059736728668213, 1.5615800619125366, 1.3987661600112915,
1.3916569948196411, 1.8435180187225342, 1.5172559022903442,
1.523059368133545, 1.7093738317489624, 1.8336877822875977,
1.6907463073730469, 1.6465243101119995, 1.8130486011505127,
1.8594300746917725, 1.40418541431427, 1.8459088802337646,
1.5057564973831177, 1.273330807685852, 1.7335593700408936,
1.4547404050827026, 1.671050786972046, 1.8709566593170166,
1.4086576700210571, 1.6071624755859375, 1.3607245683670044,
1.6000163555145264, 1.9216904640197754, 1.281594157218933,
1.7730766534805298, 1.4627121686935425, 1.586707592010498,
1.4127451181411743, 1.4334553480148315, 1.3599401712417603,
1.4565072059631348, 1.37852942943573, 1.6175483465194702,
1.3432127237319946, 1.3964488506317139, 1.5373486280441284,
1.3805601596832275, 1.2533472776412964, 1.440510630607605,
1.4937564134597778, 1.4182919263839722, 1.447078824043274,
1.3968679904937744, 1.2916183471679688, 1.3860799074172974,
1.3477157354354858
]

fig, ax = plt.subplots()
fig.set_figheight(5)
fig.set_figwidth(7)

plt.xticks(fontsize=14)
plt.yticks(fontsize=14)

line, = ax.plot(oa, color='blue', lw=2)
line, = ax.plot(pt, color='red', lw=2)
# ax.set_yscale('log')
ax.legend(['One Access', 'PyTorch'],
loc=2,
prop={'size': 14})
ax.set_xlabel('Iterations', fontsize=18)
ax.set_ylabel('Loss', fontsize=18)
plt.savefig("hogwild_convergence.png")

0 comments on commit 928788a

Please sign in to comment.