示例#1
0
def get_test_task_run(db: MephistoDB) -> str:
    """Helper to create a task run for tests"""
    task_name, task_id = get_test_task(db)
    requester_name, requester_id = get_test_requester(db)
    init_params = OmegaConf.to_yaml(OmegaConf.structured(MOCK_CONFIG))
    return db.new_task_run(task_id, requester_id, json.dumps(init_params),
                           "mock", "mock")
示例#2
0
def get_test_task_run(db: MephistoDB) -> str:
    """Helper to create a task run for tests"""
    task_name, task_id = get_test_task(db)
    requester_name, requester_id = get_test_requester(db)
    init_params = TaskConfig.get_mock_params()
    return db.new_task_run(task_id, requester_id, init_params, "mock", "mock")