Пример #1
0
def load_experiments0_0_1(name=None, *names):
    # Special
    if name is None:
        names = None
    else:
        names = [name] + list(names)
    db = get_expdb0_0_1()
    return sqlite3_loads(db, names)
Пример #2
0
# clusterlib_launcher.py

import sys
from clusterlib.scheduler import queued_or_running_jobs
from clusterlib.scheduler import submit
from clusterlib.storage import sqlite3_loads
from clusterlib_main import NOSQL_PATH

if __name__ == "__main__":
    scheduled_jobs = set(queued_or_running_jobs())
    done_jobs = sqlite3_loads(NOSQL_PATH)

    for param in range(100):
        job_name = "job-param=%s" % param
        job_command = "%s clusterlib.py --param %s" % (sys.executable,
                                                       param)

        if job_name not in scheduled_jobs and job_command not in done_jobs:
            script = submit(job_command, job_name=job_name)
            print(script)

            # Uncomment those lines to launch the jobs
            # import os
            # os.system(script)
Пример #3
0
    parser.add_argument('-v', '--verbose', default=False, action="store_true")
    parser.add_argument('-s',
                        '--scores',
                        default=False,
                        action="store_true",
                        help="compute scores")

    args = vars(parser.parse_args())

    # Create log direcotyr if needed
    if not os.path.exists(LOG_DIRECTORY):
        os.makedirs(LOG_DIRECTORY)

    # Get running jobs
    all_jobs_running = set(queued_or_running_jobs())
    all_jobs_done = sqlite3_loads(get_sqlite3_path())

    # Intialize some counter for reporting
    n_jobs_running = 0
    n_jobs_done = 0
    n_jobs_launched = 0

    results = []

    # Launch if necessary experiments
    for parameters in PARAMETER_GRID:
        job_hash = make_hash(parameters)

        if job_hash in all_jobs_running:
            n_jobs_running += 1
Пример #4
0
    parser = argparse.ArgumentParser()
    parser.add_argument('-d', '--debug', default=False, action="store_true")
    parser.add_argument('-v', '--verbose', default=False, action="store_true")
    parser.add_argument('-s', '--scores', default=False, action="store_true",
                        help="compute scores")

    args = vars(parser.parse_args())


    # Create log direcotyr if needed
    if not os.path.exists(LOG_DIRECTORY):
        os.makedirs(LOG_DIRECTORY)

    # Get running jobs
    all_jobs_running = set(queued_or_running_jobs())
    all_jobs_done = sqlite3_loads(get_sqlite3_path())

    # Intialize some counter for reporting
    n_jobs_running = 0
    n_jobs_done = 0
    n_jobs_launched = 0

    results = []

    # Launch if necessary experiments
    for parameters in PARAMETER_GRID:
        job_hash = make_hash(parameters)

        if job_hash in all_jobs_running:
            n_jobs_running +=1
Пример #5
0
# clusterlib_launcher.py

import sys
from clusterlib.scheduler import queued_or_running_jobs
from clusterlib.scheduler import submit
from clusterlib.storage import sqlite3_loads
from clusterlib_main import NOSQL_PATH

if __name__ == "__main__":
    scheduled_jobs = set(queued_or_running_jobs())
    done_jobs = sqlite3_loads(NOSQL_PATH)

    for param in range(100):
        job_name = "job-param=%s" % param
        job_command = "%s clusterlib_main.py --param %s" % (sys.executable,
                                                            param)

        if job_name not in scheduled_jobs and job_command not in done_jobs:
            script = submit(job_command, job_name=job_name)
            print(script)

            # Uncomment those lines to launch the jobs
            # import os
            # os.system(script)
Пример #6
0
def load_results0_0_1(exp_name):
    db = get_resultdb0_0_1(exp_name)
    return sqlite3_loads(db)
Пример #7
0
def load_notifications0_0_1(exp_name):
    db = get_notifdb0_0_1(exp_name)
    return sqlite3_loads(db)