Commit 488f0101 authored by Rafal Dominik Krawczyk's avatar Rafal Dominik Krawczyk
Browse files

references #243: update optim scripts

parent 37cc5696
......@@ -142,9 +142,9 @@ class DeapRunner:
from deap import creator
for i in range(n / 2):
for i in range(int(n / 2)):
# create a n/2 times the same individual
logging.info("i:" + str(i))
indiv = []
for param in self.parameterNames:
......@@ -152,7 +152,7 @@ class DeapRunner:
population.append(creator.Individual(indiv))
for i in range(n/2, n):
for i in range(int(n/2), n):
# create the rest with random initializations
indiv = []
......@@ -161,7 +161,6 @@ class DeapRunner:
population.append(creator.Individual(indiv))
return containerType(population)
......
......@@ -31,7 +31,7 @@ class RestartableRunner:
# queues for communication with
# callback which is called after
# the startup of the EVB
from Queue import Queue
from queue import Queue
# used to signal that the EVB should be stopped
self.stopQueue = Queue()
......@@ -63,7 +63,7 @@ class RestartableRunner:
try:
while not self.stopFlag:
try:
self.testCase = TestCase(config, stdout, afterStartupCallback=self.afterStartupCallback)
self.testCase = TestCase(config, stdout,self.testRunner.args, afterStartupCallback=self.afterStartupCallback)
self.testCase.prepare(testName)
fragSize = self.testRunner.getFedSizes()
......
......@@ -13,8 +13,8 @@ def getWorkLoops(xdaqHostPort):
# returns a mapping of worker loop names to pids
# (dict with worker thread name to dict with a key 'pid')
import urllib2, json
fin = urllib2.urlopen("http://%s:%d/urn:xdaq-application:service=hyperdaq/workLoopList" % (xdaqHostPort[0], xdaqHostPort[1]))
import urllib.request, json
fin = urllib.request.urlopen("http://%s:%d/urn:xdaq-application:service=hyperdaq/workLoopList" % (xdaqHostPort[0], xdaqHostPort[1]))
txt = fin.read()
fin.close()
......
......@@ -153,7 +153,7 @@ if __name__ == "__main__":
try:
runner.run()
except Exception as ex:
logging.warn("got exception: " + str(ex))
logging.warning("got exception: " + str(ex))
finally:
# this also catches KeyboardInterrupt (CTRL-C)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment