Skip to content

Commit

Permalink
cleanup for release
Browse files Browse the repository at this point in the history
  • Loading branch information
ywchao committed Nov 29, 2017
1 parent 5b2cbed commit 285cbff
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 149 deletions.
14 changes: 0 additions & 14 deletions pbs/header_jiadeng_fluxoe_titanx

This file was deleted.

127 changes: 0 additions & 127 deletions tools/gen_test_one.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,6 @@
script_base = sprintf(script_base, exp_name);
makedir(script_base);

% pbs
pbs_name = 'run_%02d.pbs';
pbs_base = './pbs/%s/test_%s/';
pbs_base = sprintf(pbs_base, cluster, exp_name);
if batch_mode ~= 0
pbs_base = [pbs_base(1:end-1) sprintf('_bs%02d/',batch_size)];
end
makedir(pbs_base);

% get batch num
if batch_mode ~= 0
num_batch = ceil(numel(list_coco_obj) / batch_size);
else
num_batch = numel(list_coco_obj);
end

% test_name
test_name = 'test';
if numel(exp_name) > 4 && numel(strfind(exp_name,'_ip')) == 1
Expand Down Expand Up @@ -119,114 +103,3 @@
edit_file_permission(trg_file,'755');
end
end

% pbs file
for o = 1:num_batch
if batch_mode ~= 0
sid = batch_size*(o-1)+1;
eid = batch_size*o;
eid = min(eid, numel(list_coco_obj));
pbs_file = [pbs_base sprintf('run_%02d_%02d.pbs', sid, eid)];
else
pbs_file = [pbs_base sprintf(pbs_name, o)];
end
if ~exist(pbs_file,'file')
header_file = ['./pbs/header_' cluster];
C = read_file_lines(header_file);
clear pre_str new_str
pre_str{1} = '${job_name}';
pre_str{2} = '${ppn}';
pre_str{3} = '${gpus}';
pre_str{4} = '${mem}';
pre_str{5} = '${walltime}';
pre_str{6} = '${working_dir}';
new_str{1} = sprintf('ts_%s', exp_name);
if exist('score_blob','var')
new_str{1} = sprintf('%s', new_str{1});
end
if batch_mode ~= 0
new_str{1} = sprintf('%s_%02d_%02d', new_str{1}, sid, eid);
else
new_str{1} = sprintf('%s_%02d', new_str{1}, o);
end
if exist('ppn','var')
new_str{2} = ppn;
else
new_str{2} = '1';
end
new_str{3} = '1';
if exist('mem','var')
new_str{4} = mem;
else
new_str{4} = '4gb';
end
new_str{5} = walltime;
new_str{6} = working_dir;
for s = 1:numel(pre_str)
C = cellfun(@(x)strrep(x,pre_str{s},new_str{s}),C,'UniformOutput',false);
end
C = [C; {''}]; %#ok
switch batch_mode
case 0
obj_id = o;
obj_name = list_coco_obj{o};
script_file = [script_base sprintf(script_name, obj_id, obj_name)];
switch cluster
case {'jiadeng_fluxoe_titanx'}
line = [script_file ' 0'];
end
C = [C; line]; %#ok
case 1
for i = sid:eid
obj_id = i;
obj_name = list_coco_obj{i};
script_file = [script_base sprintf(script_name, obj_id, obj_name)];
switch cluster
case {'jiadeng_fluxoe_titanx'}
line = [script_file ' 0'];
end
C = [C; line]; %#ok
end
case 2
for i = sid:eid
obj_id = i;
obj_name = list_coco_obj{i};
script_file = [script_base sprintf(script_name, obj_id, obj_name)];
switch cluster
case {'jiadeng_fluxoe_titanx'}
line = [script_file ' 0 &'];
end
C = [C; line]; %#ok
end
C = [C; 'wait']; %#ok
end
C = [C; {''}]; %#ok
write_file_lines(pbs_file,C);
end
end

% generate qsub script
qsub_file = [fileparts(pbs_base) '.sh'];
if ~exist(qsub_file,'file')
C = {};
C = [C; {'#!/bin/bash'}];
C = [C; {''}];
for o = 1:num_batch
if exist('batch_size','var')
sid = batch_size*(o-1)+1;
eid = batch_size*o;
eid = min(eid, numel(list_coco_obj));
pbs_file = [pbs_base sprintf('run_%02d_%02d.pbs', sid, eid)];
else
pbs_file = [pbs_base sprintf(pbs_name, o)];
end
C = [C; {['qsub ' pbs_file ';']}]; %#ok
if o ~= numel(list_coco_obj)
C = [C; {'sleep 0.5'}]; %#ok
end
end
C = [C; {''}];
write_file_lines(qsub_file,C);
edit_file_permission(qsub_file,'755');
end

8 changes: 0 additions & 8 deletions tools/gen_test_run.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@

cluster = 'jiadeng_fluxoe_titanx';
ppn = '1';
mem = '4gb';
working_dir = '/scratch/jiadeng_fluxoe/ywchao/ho-rcnn';
batch_mode = 1;
batch_size = 10;
walltime = '00:16:00:00';

image_set = 'test2015';
iter = 150000;

Expand Down

0 comments on commit 285cbff

Please sign in to comment.