示例#1
0
def simpleTestDagFunctionalSugar():
    outArt1 = lift(jobs.getOne, name = 'oneJob1')()
    outArt2 = distribute.ThunkArtifact(jobs.getOne)
    outArtA = lift(jobs.add, name = 'addJobA')(outArt1, outArt2)
    outArtB = lift(jobs.add, name = 'addJobB')(outArt2, outArtA)
    outArtC = lift(jobs.add, name = 'addJobC')(outArtA, outArtB)
    outArtD = lift(jobs.add, name = 'addJobD')(outArt1, outArtB)
    return [(outArtC, 5), (outArtD, 4)], 5, 2
示例#2
0
def estimateJobSet(
        distPrevArt,
        accArts,
        createAccArt=liftLocal(d.getDefaultCreateAcc)(),
        estimateArt=liftLocal(d.getDefaultEstimate)(),
        afterAccArt=lit(None),
        verbosityArt=lit(0),
):
    return lift(estimate)(distPrevArt, createAccArt, estimateArt, afterAccArt,
                          verbosityArt, *accArts)
示例#3
0
def accumulateJobSet(
    distPrevArt,
    corpusArt,
    uttIdChunkArts,
    createAccArt = liftLocal(d.getDefaultCreateAcc)(),
):
    accArts = [ lift(accumulate)(distPrevArt, corpusArt, uttIdChunkArt,
                                 createAccArt)
                for uttIdChunkArt in uttIdChunkArts ]
    return accArts
示例#4
0
def accumulateJobSet(
        distPrevArt,
        corpusArt,
        uttIdChunkArts,
        createAccArt=liftLocal(d.getDefaultCreateAcc)(),
):
    accArts = [
        lift(accumulate)(distPrevArt, corpusArt, uttIdChunkArt, createAccArt)
        for uttIdChunkArt in uttIdChunkArts
    ]
    return accArts
示例#5
0
def estimateWithTotAuxJobSet(
        distPrevArt,
        accArts,
        createAccArt=liftLocal(d.getDefaultCreateAcc)(),
        estimateTotAuxArt=liftLocal(d.getDefaultEstimateTotAux)(),
        afterAccArt=lit(None),
        monotoneAuxArt=lit(True),
        verbosityArt=lit(0),
):
    return lift(estimateWithTotAux)(distPrevArt, createAccArt,
                                    estimateTotAuxArt, afterAccArt,
                                    monotoneAuxArt, verbosityArt, *accArts)
示例#6
0
def estimateJobSet(
    distPrevArt,
    accArts,
    createAccArt = liftLocal(d.getDefaultCreateAcc)(),
    estimateArt = liftLocal(d.getDefaultEstimate)(),
    afterAccArt = lit(None),
    verbosityArt = lit(0),
):
    return lift(estimate)(
        distPrevArt, createAccArt, estimateArt, afterAccArt, verbosityArt,
        *accArts
    )
示例#7
0
def estimateWithTotAuxJobSet(
    distPrevArt,
    accArts,
    createAccArt = liftLocal(d.getDefaultCreateAcc)(),
    estimateTotAuxArt = liftLocal(d.getDefaultEstimateTotAux)(),
    afterAccArt = lit(None),
    monotoneAuxArt = lit(True),
    verbosityArt = lit(0),
):
    return lift(estimateWithTotAux)(
        distPrevArt, createAccArt, estimateTotAuxArt, afterAccArt,
        monotoneAuxArt, verbosityArt, *accArts
    )
示例#8
0
def liftExampleDag():
    oneArt = lift(jobs.getOne)()
    twoArt = lift(jobs.add)(oneArt, y = oneArt)
    return [(twoArt, 2), (oneArt, 1)], 2, 2