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
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)
def accumulateJobSet( distPrevArt, corpusArt, uttIdChunkArts, createAccArt = liftLocal(d.getDefaultCreateAcc)(), ): accArts = [ lift(accumulate)(distPrevArt, corpusArt, uttIdChunkArt, createAccArt) for uttIdChunkArt in uttIdChunkArts ] return accArts
def accumulateJobSet( distPrevArt, corpusArt, uttIdChunkArts, createAccArt=liftLocal(d.getDefaultCreateAcc)(), ): accArts = [ lift(accumulate)(distPrevArt, corpusArt, uttIdChunkArt, createAccArt) for uttIdChunkArt in uttIdChunkArts ] return accArts
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)
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 )
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 )
def liftExampleDag(): oneArt = lift(jobs.getOne)() twoArt = lift(jobs.add)(oneArt, y = oneArt) return [(twoArt, 2), (oneArt, 1)], 2, 2