Skip to content

Commit 051dc72

Browse files
committed
update to matlab 2021b docker on codeocean; updates to cav'21 segmentation package for codeocean execution (since segmentation now supported); other minor environment updates preparping for formats'22 ae packages
1 parent 751d841 commit 051dc72

15 files changed

+58
-29
lines changed

Diff for: code/nnv/examples/Submission/CAV2021/M2NIST/compare_m2nist_nets_vs_num_attackedpixels.m

+3-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
VT = zeros(L, M); % verification time
7272

7373
c = parcluster('local');
74-
numCores = c.NumWorkers;
74+
%numCores = c.NumWorkers;
75+
numCores = 1; % some error in codeocean latest release using auto-detect
7576
poolobj = gcp('nocreate');
7677
delete(poolobj); % reset parpool
7778

@@ -180,7 +181,7 @@
180181
legend(labels{1:L}, 'interpreter', 'latex');
181182
hold off;
182183

183-
saveas(fig, 'compare_m2nist_nets_vs_num_attackedpixels.pdf');
184+
saveas(fig, [path_results(), filesep,'compare_m2nist_nets_vs_num_attackedpixels.pdf']);
184185
%% plot reach time
185186

186187
N1 = Nets(1);

Diff for: code/nnv/examples/Submission/CAV2021/M2NIST/compare_m2nist_nets_vs_relaxFactor.m

+2-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@
7070

7171
c = parcluster('local');
7272
%numCores = c.NumWorkers;
73-
numCores = 1;
74-
73+
numCores = 1; % some error in codeocean latest release using auto-detect
7574

7675

7776
% verify N1 networks in the Nets array using the relax-star approach
@@ -163,7 +162,7 @@
163162

164163
%% Print latex table1
165164

166-
fileID = fopen('N5_verifyTime_vs_relaxFactor.tex', 'w');
165+
fileID = fopen([path_results(), filesep, 'N5_verifyTime_vs_relaxFactor.tex'], 'w');
167166

168167
N = size(N5_verifyTime, 1);
169168
for i=1:N

Diff for: code/nnv/examples/Submission/CAV2021/M2NIST/m2nist_net1_verifyTime_vs_relaxFactor.m

+2-3
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@
7272

7373
c = parcluster('local');
7474
%numCores = c.NumWorkers;
75-
numCores = 1;
76-
75+
numCores = 1; % some error in codeocean latest release using auto-detect
7776

7877

7978
% verify N1 networks in the Nets array using the relax-star approach
@@ -165,7 +164,7 @@
165164

166165
%% Print latex table1
167166

168-
fileID = fopen('N4_verifyTime_vs_relaxFactor.tex', 'w');
167+
fileID = fopen([path_results(), filesep, 'N4_verifyTime_vs_relaxFactor.tex'], 'w');
169168

170169
N = size(N4_verifyTime, 1);
171170
for i=1:N

Diff for: code/nnv/examples/Submission/CAV2021/M2NIST/m2nist_net2_verifyTime_vs_relaxFactor.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
c = parcluster('local');
7474
%numCores = c.NumWorkers;
75-
numCores = 1;
75+
numCores = 1; % some error in codeocean latest release using auto-detect
7676

7777

7878

@@ -165,7 +165,7 @@
165165

166166
%% Print latex table1
167167

168-
fileID = fopen('N5_verifyTime_vs_relaxFactor.tex', 'w');
168+
fileID = fopen([path_results(), filesep, 'N5_verifyTime_vs_relaxFactor.tex'], 'w');
169169

170170
N = size(N5_verifyTime, 1);
171171
for i=1:N

Diff for: code/nnv/examples/Submission/CAV2021/M2NIST/m2nist_net3_verifyTime_vs_relaxFactor.m

+2-3
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@
7272

7373
c = parcluster('local');
7474
%numCores = c.NumWorkers;
75-
numCores = 1;
76-
75+
numCores = 1; % some error in codeocean latest release using auto-detect
7776

7877

7978
% verify N1 networks in the Nets array using the relax-star approach
@@ -165,7 +164,7 @@
165164

166165
%% Print latex table1
167166

168-
fileID = fopen('N6_verifyTime_vs_relaxFactor.tex', 'w');
167+
fileID = fopen([path_results(), filesep, 'N6_verifyTime_vs_relaxFactor.tex'], 'w');
169168

170169
N = size(N6_verifyTime, 1);
171170
for i=1:N

Diff for: code/nnv/examples/Submission/CAV2021/MNIST/compare_mnist_nets_vs_inputsize.m

+4-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
VT = zeros(L, M); % verification time
7272

7373
c = parcluster('local');
74-
numCores = c.NumWorkers;
74+
%numCores = c.NumWorkers;
75+
numCores = 1; % some error in codeocean latest release using auto-detect
7576

7677
% verify L networks in the Nets array
7778
t1 = tic;
@@ -178,7 +179,7 @@
178179
legend(labels{1:L}, 'interpreter', 'latex');
179180
hold off;
180181

181-
saveas(fig, 'compare_mnist_nets_vs_inputsize.pdf');
182+
saveas(fig, [path_results(), filesep,'compare_mnist_nets_vs_inputsize.pdf']);
182183

183184
fig2 = figure;
184185
for i=1:L
@@ -193,7 +194,7 @@
193194
hold off;
194195
ax = gca;
195196
ax.FontSize = 13;
196-
saveas(fig2, 'VT_mnist_nets_vs_inputsize.pdf');
197+
saveas(fig2, [path_results(), filesep, 'VT_mnist_nets_vs_inputsize.pdf']);
197198

198199
%% plot verified output set
199200

Diff for: code/nnv/examples/Submission/CAV2021/MNIST/compare_mnist_nets_vs_num_attackedpixels.m

+13-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,18 @@
7070
avg_numUnkPixels = zeros(L, M); % average number of unknown pixels
7171
VT = zeros(L, M); % verification time
7272

73+
% see: https://www.mathworks.com/matlabcentral/answers/196549-failed-to-start-a-parallel-pool-in-matlab2015a
74+
distcomp.feature('LocalUseMpiexec', true); % false gave error
75+
7376
c = parcluster('local');
74-
numCores = c.NumWorkers;
77+
% see: https://www.mathworks.com/help/matlab/ref/maxnumcompthreads.html
78+
% and: https://www.mathworks.com/matlabcentral/answers/463068-number-of-cores-by-default
79+
%numCores = maxNumCompThreads;
80+
%numCores = maxNumCompThreads('automatic');
81+
%numCores = c.NumWorkers; % causes error
82+
numCores = 1; % use if error from autodetect, for whatever reason this is showing up on latest codeocean versions
83+
84+
numCores
7585

7686
% verify L networks in the Nets array
7787
t1 = tic;
@@ -178,7 +188,7 @@
178188
legend(labels{1:L}, 'interpreter', 'latex');
179189
hold off;
180190

181-
saveas(fig, 'compare_mnist_nets_vs_num_attackedpixels.pdf');
191+
saveas(fig, [path_results(), filesep,'compare_mnist_nets_vs_num_attackedpixels.pdf']);
182192

183193
fig2 = figure;
184194
for i=1:L
@@ -193,6 +203,6 @@
193203
hold off;
194204
ax = gca;
195205
ax.FontSize = 13;
196-
saveas(fig2, 'VT_mnist_nets_vs_num_attackedpixels.pdf');
206+
saveas(fig2, [path_results(), filesep,'VT_mnist_nets_vs_num_attackedpixels.pdf']);
197207
%%
198208

Diff for: code/nnv/examples/Submission/CAV2021/MNIST/mnist_net1_verifyTime_vs_relaxFactor.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
N1_verifyTime
128128

129129
fprintf("*** NOTE FOR EACH DELTA (de) ***\n");
130-
fprintf("The firt column is the verification time of the relax-star-random method \n")
130+
fprintf("The first column is the verification time of the relax-star-random method \n")
131131
fprintf("The second column is the verification time of the relax-star-area method \n");
132132
fprintf("The third column is the verification time of the relax-star-range method \n");
133133
fprintf("The last column is the verification time of the relax-star-bound method \n");
@@ -168,7 +168,7 @@
168168

169169
%% Print latex table1
170170

171-
fileID = fopen('N1_verifyTime_vs_relaxFactor.tex', 'w');
171+
fileID = fopen([path_results(), filesep, 'N1_verifyTime_vs_relaxFactor.tex'], 'w');
172172

173173
N = size(N1_verifyTime, 1);
174174
for i=1:N

Diff for: code/nnv/examples/Submission/CAV2021/MNIST/mnist_net2_verifyTime_vs_relaxFactor.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173

174174
%% Print latex table1
175175

176-
fileID = fopen('N2_verifyTime_vs_relaxFactor.tex', 'w');
176+
fileID = fopen([path_results(), filesep, 'N2_verifyTime_vs_relaxFactor.tex'], 'w');
177177

178178
N = size(N2_verifyTime, 1);
179179
for i=1:N

Diff for: code/nnv/examples/Submission/CAV2021/MNIST/mnist_net3_verifyTime_vs_relaxFactor.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171

172172
%% Print latex table1
173173

174-
fileID = fopen('N3_verifyTime_vs_relaxFactor.tex', 'w');
174+
fileID = fopen([path_results(), filesep, 'N3_verifyTime_vs_relaxFactor.tex'], 'w');
175175

176176
N = size(N3_verifyTime, 1);
177177
for i=1:N

Diff for: code/nnv/examples/Submission/CAV2021/RelaxStarCompare/mnist01_conservativeness_vs_relaxFactor.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
%% verify the image
55

6-
numCores = 8;
6+
%numCores = 8;
7+
numCores = 1; % some error in codeocean latest release using auto-detect
8+
79
N = 100; % number of Images tested maximum is 100
810
%
911
poolobj = gcp('nocreate');

Diff for: code/nnv/examples/Submission/CAV2021/RelaxStarCompare/mnist01_relax_star_area_vs_eran.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
%% verify the image
55

6-
numCores = 8;
6+
%numCores = 8;
7+
numCores = 1; % some error in codeocean latest release using auto-detect
8+
79
N = 100; % number of Images tested maximum is 100
810
%
911
relaxFactor = [0 0.25 0.5 0.75 1]; % relax factor

Diff for: code/run_codeocean.m

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
'ERROR: path likely not set, run install.m'
99
end
1010

11+
% default output path for path_results, ensure logs subdirectory there
12+
mkdir('/results/logs/')
13+
14+
cd /code/nnv/examples/Submission/CAV2021/
15+
reproduce_CAV2021
16+
17+
% arch-comp 2021 next
18+
return
1119
cd /code/nnv/examples/Submission/ARCH-COMP2021
1220
run_all
1321

Diff for: environment/Dockerfile

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
# hash:sha256:f622d7353e92f49ac2e11234b75ba3e52d96df0222aa7e2bf36ad6cd44b3be51
2-
FROM registry.codeocean.com/codeocean/matlab:2019a-ubuntu18.04
1+
# hash:sha256:5f616c6f66b2c7c0f5e3b8d5b21214210b9d8d1dbe6b703011b15b8d65208c91
2+
FROM registry.codeocean.com/codeocean/matlab:2021b-ubuntu20.04
3+
4+
# old 2020b version
5+
# hash:sha256:eb133fa6ef390c8a024c045858d448a3c7a34f140ef89a10c693182c8e4e31c7
6+
#FROM registry.codeocean.com/codeocean/matlab:2020b-ubuntu20.04
7+
8+
# old 2019a version
9+
## hash:sha256:f622d7353e92f49ac2e11234b75ba3e52d96df0222aa7e2bf36ad6cd44b3be51
10+
#FROM registry.codeocean.com/codeocean/matlab:2019a-ubuntu18.04
311

412
# codeocean does not seem to support multi-stage builds, so python set up is below versus using this image
513
# hash:sha256:1f62953520a0e0fb91a3b47349bfbecf2b530ada4a23f795534f50d6d9db554b
@@ -26,7 +34,6 @@ RUN apt-get update \
2634
python3 \
2735
python3-dev \
2836
wget \
29-
python-pip \
3037
python3-pip \
3138
software-properties-common
3239

@@ -38,7 +45,7 @@ RUN pip3 install numpy
3845
RUN pip install pybind11
3946
RUN pip3 install pybind11
4047

41-
RUN pkg-config --cflags python
48+
#RUN pkg-config --cflags python
4249

4350
# set up comparison scripts (for ReluVal, Reluplex, Marabou)
4451

Diff for: metadata/metadata.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ tags:
1616
- hybrid-systems
1717
- artificial-intelligence
1818
- machine-l
19+
- neural networks
1920
authors:
2021
- name: Taylor T Johnson
2122
affiliations:

0 commit comments

Comments
 (0)