예제 #1
0
def job_exists(table_name, job):

    if "id" in job:
        jobs = database.load(table_name, job["id"])
    else:
        jobs = database.load(table_name, hash_of=job)

    return len(jobs) == 1
예제 #2
0
def load_experiments(cluster=None, filter_eq_dct=None):

    experiments = _filter_cluster(
        cluster, database.load("experiments", filter_eq_dct=filter_eq_dct))

    valid_experiments = []
    for experiment in experiments:
        valid_experiments.append(experiment)
        valid_experiments[-1]["clusters"] = _validate_clusters_for_loading(
            experiment["clusters"], experiment)

    return valid_experiments
예제 #3
0
def load_jobs(table_name, filter_eq_dct=None, job_id=None, hash_of=None):

    jobs = database.load(table_name, filter_eq_dct, job_id, hash_of=hash_of)

    return jobs