def progress(params, rep):
    """ Helper function to calculate the progress made on one experiment. """
    name = params['name']
    fullpath = os.path.join(params['path'], params['name'])
    logname = os.path.join(fullpath, '%i.log'%rep)
    if os.path.exists(logname):
        logfile = open(logname, 'r')
        lines = logfile.readlines()
        logfile.close()
        return int(100 * len(lines) / params['iterations'])
    else: 
        return 0
dataset/ETHPy150Open rueckstiess/expsuite/expsuite.py/progress/original