Skip to content

Commit

Permalink
fixes in dependency handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gaa-cifasis committed Nov 11, 2015
1 parent bbe42f9 commit 12d381a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 3 additions & 4 deletions vd
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if __name__ == "__main__":
traces = traces_path
else:

app = Process(program, envs, timeout, ["libcairo"], [], True)
app = Process(program, envs, timeout, [], [], True)
prt = TypePrinter(traces_path, program, 0)
traces = []
all_files = []
Expand Down Expand Up @@ -101,6 +101,5 @@ if __name__ == "__main__":
clustered_traces = ClusterScikit(vectorizer, traces, None, "dynamic", None)
else:
clustered_traces = ClusterConv(vectorizer, traces, None, "dynamic", None, None)

cluster_sampler(clustered_traces,1)
#print clusters
cluster_sampler(clustered_traces,1)
#print clusters
4 changes: 2 additions & 2 deletions vdiscover/Cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import pylab as plb
#import pylab as plb

from Utils import *
from Pipeline import *
Expand Down Expand Up @@ -269,7 +269,7 @@ def ClusterScikit(model_file, train_file, valid_file, ftype, nsamples):
model = make_cluster_pipeline_bow(ftype)
X_red = model.fit_transform(train_dict)

mpl.rcParams.update({'font.size': 10})
#mpl.rcParams.update({'font.size': 10})
plt.figure()
colors = 'brgcmykbgrcmykbgrcmykbgrcmyk'

Expand Down
5 changes: 4 additions & 1 deletion vpredictor
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ sys.setrecursionlimit(1024*1024*1024)
from vdiscover.Pipeline import *
from vdiscover.Recall import Recall
from vdiscover.Train import Train
from vdiscover.Cluster import ClusterScikit, ClusterConv

if __name__ == "__main__":

Expand Down Expand Up @@ -128,9 +127,13 @@ if __name__ == "__main__":
#elif training_mode_:
# Train(out_file, in_file, valid_file, "lstm", ftype, nsamples)
elif training_mode_cluster_bow:
from vdiscover.Cluster import ClusterScikit

#Cluster(in_file, valid_file, ftype, nsamples)
ClusterScikit(None, in_file, valid_file, ftype, nsamples)
elif training_mode_cluster_conv:
from vdiscover.Cluster import ClusterConv

#Cluster(in_file, valid_file, ftype, nsamples)
if (model_file is None):
print "Clustering using a convolutional model requires a pre-trained model"
Expand Down

0 comments on commit 12d381a

Please sign in to comment.